/// <summary> /// Initializes <c>$this</c> variable, its type and initialized state. /// </summary> private static void InitThisVar(FlowContext /*!*/ ctx, FlowState /*!*/ initialState, int varIndex) { var thisVarType = ctx.TypeRefContext.GetThisTypeMask(); if (thisVarType.IsUninitialized) { thisVarType = TypeRefMask.AnyType; } // initialState.SetVarUsed(varIndex); initialState.SetVar(varIndex, thisVarType); }
/// <summary> /// Initializes <c>$this</c> variable, its type and initialized state. /// </summary> private static void InitThisVar(FlowContext /*!*/ ctx, FlowState /*!*/ initialState) { var thisVarType = ctx.TypeRefContext.GetThisTypeMask(); if (thisVarType.IsUninitialized) { thisVarType = TypeRefMask.AnyType; } // var thisIdx = ctx.GetVarIndex(VariableName.ThisVariableName); initialState.SetVarUsed(thisIdx); initialState.SetVar(thisIdx, thisVarType); }