public override void Visit(ArrayLiteral node) { VisitNodes(node.Items); Visit((Literal)node); }
public override void Visit(ArrayLiteral node) { PushLocation(node); var arraySize = node.Items.Count; _ilGen.Ldc_I4(arraySize); _ilGen.Newobj(Types.DArray.CONSTRUCTOR_Int32); //Here we are sure that the internal array has the correct size, so we can directly .Set stuff if (arraySize > 0) { _ilGen.Dup(); //The one on the stack is for storage, one more to get the InternalArray _ilGen.Ldfld(Types.DArray.Elements); var elements = _localVars.PushTemporary(Types.DValue.ArrayOf); _ilGen.Stloc(elements); for (var i = 0; i < arraySize; ++i) { var stackState = _localVars.GetTemporaryStackState(); _ilGen.Ldloc(elements); _ilGen.Ldc_I4(i); _ilGen.Ldelema(Types.DValue.TypeOf); VisitNode(node.Items[i]); _ilGen.Call(Types.DValue.Set.Get(_result.ValueType)); _localVars.PopTemporariesAfter(stackState); } _localVars.PopTemporary(elements); } _result.ValueType = mdr.ValueTypes.Array; PopLocation(); }
internal static mdr.ValueTypes GetType(ArrayLiteral expression) { return mdr.ValueTypes.Array; }
public override void Visit(ArrayLiteral node) { base.Visit(node); node.ValueType = GetType(node); }
public override void Visit(ArrayLiteral node) { PushLocation(node); VisitNodes(node.Items); BeginICMethod(node); var arraySize = node.Items.Count; _stackModel.Pop(arraySize); _ilGen.Ldarg_CallFrame(); _ilGen.Ldc_I4(_stackModel.StackPointer); _ilGen.Ldc_I4(arraySize); _ilGen.Call(Types.Operations.ICMethods.CreateArray); EndICMethod(); _result.ValueType = mdr.ValueTypes.DValueRef; _stackModel.Push(1); PopLocation(); }
public override void Visit(ArrayLiteral node) { Visit((Literal)node); }
public abstract void Visit(ArrayLiteral node);
public override void Visit(ArrayLiteral node) { PushLocation(node); VisitNodes(node.Items); var arraySize = node.Items.Count; _ilGen.Ldc_I4(arraySize); Call(Types.Operations.Stack.CreateArray, arraySize, 1); PopLocation(); }
public override void Visit(ArrayLiteral node) { throw new NotImplementedException(); }
public override void Visit(ArrayLiteral node) { AssignToImplicitReturn(node); }