Package com.dragome.compiler.ast

Examples of com.dragome.compiler.ast.ReturnStatement


      body.removeChild(body.getFirstChild());

      MethodInvocation consume= (MethodInvocation) body.getLastChild();
      body.removeChild(consume);

      ReturnStatement r= new ReturnStatement(0, 0);
      r.setExpression((Expression) consume.getArguments().get(0));
      body.appendChild(r);

      print("_dragomeJs.StringInit" + signatureReplaced + " = function(");
      closingString= "};\n";
    }
View Full Code Here


    }

    if (DragomeJsCompiler.compiler.optimize && methodDecl.getBody().getLastChild() instanceof ReturnStatement)
    {
      ReturnStatement ret= (ReturnStatement) methodDecl.getBody().getLastChild();
      if (ret.getExpression() == null)
      {
        methodDecl.getBody().removeChild(ret);
      }
    }
View Full Code Here

      case Const.RET:
      {

        int index= readUnsigned();
        ReturnStatement r= new ReturnStatement(currentIndex, currentIndex);
        r.setExpression(createVariableBinding(index, Type.INT, false));
        instruction= r;
        break;
      }

      case Const.RETURN:

      case Const.IRETURN:

      case Const.FRETURN:

      case Const.LRETURN:

      case Const.DRETURN:

      case Const.ARETURN:
      {

        ReturnStatement r= new ReturnStatement(currentIndex, currentIndex);
        if (opcode != Const.RETURN)
        {
          r.setExpression(stack.pop());
        }
        instruction= r;
        break;
      }
View Full Code Here

TOP

Related Classes of com.dragome.compiler.ast.ReturnStatement

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.