Пример #1
0
 public AstObjectCreation(string file, int line, int col, AstTypeExpr type)
     : base(file, line, col)
 {
     if (type == null)
         throw new ArgumentNullException("type");
     _typeExpr = type;
     _proxy = new ArgumentsProxy(_arguments);
 }
Пример #2
0
 public AstGetSetNewDecl([NotNull] ISourcePosition position, [NotNull] string id, [CanBeNull] AstGetSet expression)
     : base(position)
 {
     if (id == null)
         throw new ArgumentNullException("id");
     
     _expression = expression;
     _id = id;
     _arguments = _expression == null ? new ArgumentsProxy(new List<AstExpr>()) : null;
 }
Пример #3
0
        private void _emitRecursiveTailCall(CompilerTarget target, ArgumentsProxy symbolArgs)
        {
            var symbolParams = target.Function.Parameters;
            var nullNode = new AstNull(File, Line, Column);

            //copy parameters to temporary variables
            for (var i = 0; i < symbolParams.Count; i++)
            {
                if (i < symbolArgs.Count)
                    symbolArgs[i].EmitValueCode(target);
                else
                    nullNode.EmitValueCode(target);
            }
            //overwrite parameters
            for (var i = symbolParams.Count - 1; i >= 0; i--)
            {
                target.EmitStoreLocal(Position, symbolParams[i]);
            }

            target.EmitJump(Position, 0);
        }
Пример #4
0
 protected AstGetSetImplBase(ISourcePosition position, PCall call)
     : base(position)
 {
     _call = call;
     _proxy = new ArgumentsProxy(new List<AstExpr>());
 }
Пример #5
0
 internal AstCreateCoroutine(Parser p)
     : base(p)
 {
     _proxy = new ArgumentsProxy(_arguments);
 }
Пример #6
0
 public AstCreateCoroutine(string file, int line, int col)
     : base(file, line, col)
 {
     _proxy = new ArgumentsProxy(_arguments);
 }