public override void Visit(WritePropertyExpression node) { PushLocation(node); var stackState = _localVars.GetTemporaryStackState(); VisitNode(node.Container); AsDObject(); var objType = _result.ValueType; var obj = _localVars.PushTemporary(objType); _ilGen.Stloc(obj); node.AssignFieldId(); var oldMap = _localVars.PushTemporary(Types.PropertyMap.TypeOf); _ilGen.Ldloc(obj); _ilGen.Call(Types.DObject.GetMap); _ilGen.Stloc(oldMap); _ilGen.Ldloc(obj); _ilGen.Ldc_I4(node.FieldId); VisitNode(node.Value); var valueType = _result.ValueType; _localVars.PopTemporariesAfter(stackState); var value = _localVars.PushTemporary(valueType); _ilGen.Stloc(value); _ilGen.Ldloc(value); _ilGen.Call(Types.DObject.SetFieldByFieldId(valueType)); int profIndex = _currFuncMetadata.GetProfileIndex(node); _ilGen.Ldloc(obj); _ilGen.Ldloc(_profiler); _ilGen.Ldc_I4(profIndex); _ilGen.Ldc_I4(node.FieldId); _ilGen.Ldloc(oldMap); _ilGen.Call(Types.Operations.Internals.UpdateMapProfileForWrite); _ilGen.Ldloc(value); _result.ValueType = valueType; PopLocation(); }
public override void Visit(WritePropertyExpression node) { PushLocation(node); var stackState = _localVars.GetTemporaryStackState(); VisitNode(node.Container); AsDObject(); var objType = _result.ValueType; var obj = _localVars.PushTemporary(objType); _ilGen.Stloc(obj); _ilGen.Ldloc(obj); node.AssignFieldId(); _ilGen.Ldc_I4(node.FieldId); VisitNode(node.Value); var valueType = _result.ValueType; _localVars.PopTemporariesAfter(stackState); var value = _localVars.PushTemporary(valueType); _ilGen.Stloc(value); _ilGen.Ldloc(value); _ilGen.Call(Types.DObject.SetFieldByFieldId(valueType)); _ilGen.Ldloc(value); _result.ValueType = valueType; PopLocation(); }
public override void Visit(WritePropertyExpression node) { Visit((WriteIndexerExpression)node); }
public override void Visit(WritePropertyExpression node) { base.Visit(node); node.ValueType = GetType(node); }
internal static mdr.ValueTypes GetType(WritePropertyExpression expression) { return expression.Value.ValueType; }
public override void Visit(WritePropertyExpression node) { var nodeProfile = _currProfiler.GetNodeProfile(node); if (_currFuncMetadata.EnableInlineCache && nodeProfile != null && nodeProfile.Map != null && nodeProfile.PD != null && nodeProfile.PD.IsDataDescriptor && !nodeProfile.PD.IsInherited) { ///Let's keep this code as close to base.Visit so that updates are easy, ///even soon we can decide to put this code in a function PushLocation(node); var stackState = _localVars.GetTemporaryStackState(); VisitNode(node.Container); AsDObject(); var objType = _result.ValueType; var obj = _localVars.PushTemporary(objType); _ilGen.Stloc(obj); _ilGen.Ldloc(obj); node.AssignFieldId(); _ilGen.Ldc_I4(node.FieldId); VisitNode(node.Value); var valueType = _result.ValueType; _localVars.PopTemporariesAfter(stackState); var value = _localVars.PushTemporary(valueType); _ilGen.Stloc(value); _ilGen.Ldloc(value); _ilGen.Ldc_I4(nodeProfile.Map.UniqueId); _ilGen.Ldc_I4(nodeProfile.PD.Index); _ilGen.Call(Types.Operations.Internals.SetFieldUsingIC(valueType)); _ilGen.Ldloc(value); _result.ValueType = valueType; PopLocation(); } else base.Visit(node); }
public override void Visit(WritePropertyExpression node) { PushLocation(node); VisitNode(node.Container); VisitNode(node.Value); node.AssignFieldId(); _stackModel.Pop(2); BeginICMethod(node); _ilGen.Ldarg_CallFrame(); _ilGen.Ldc_I4(_stackModel.StackPointer); _ilGen.Ldc_I4(node.FieldId); _ilGen.Call(Types.Operations.ICMethods.WriteProperty); EndICMethod(); _stackModel.Push(1); PopLocation(); }
public abstract void Visit(WritePropertyExpression node);
public override void Visit(WritePropertyExpression node) { PushLocation(node); var pushBackResult = true; VisitNode(node.Container); VisitNode(node.Value); node.AssignFieldId(); _ilGen.Ldc_I4(node.FieldId); _ilGen.Ldc_I4(pushBackResult); Call(Types.Operations.Stack.StoreFieldByFieldId, 2, pushBackResult ? 1 : 0); PopLocation(); }
public override void Visit(WritePropertyExpression node) { AssignToImplicitReturn(node); }