Package com.dragome.compiler.ast

Examples of com.dragome.compiler.ast.MethodInvocation.addArgument()


  public void visit(ClassLiteral literal)
  {
    MethodBinding binding= MethodBinding.lookup("java.lang.Class", "forName", "(Ljava/lang/String;)Ljava/lang/Class;");
    MethodInvocation mi= new MethodInvocation(currentMethodDeclaration, binding);
    mi.addArgument(new StringLiteral(literal.getSignature().toString()));
    visit(mi);
  }

  public void visit(NullLiteral literal)
  {
View Full Code Here


        MethodBinding binding= MethodBinding.lookup("javascript.Utils", "cmp", "(DDI)I");
        MethodInvocation mi= new MethodInvocation(methodDecl, binding);

        Expression value2= stack.pop();
        mi.addArgument(stack.pop());
        mi.addArgument(value2);

        int gORl= 0;
        if (instructionType.getName().endsWith("g"))
          gORl= 1;
View Full Code Here

        MethodBinding binding= MethodBinding.lookup("javascript.Utils", "cmp", "(DDI)I");
        MethodInvocation mi= new MethodInvocation(methodDecl, binding);

        Expression value2= stack.pop();
        mi.addArgument(stack.pop());
        mi.addArgument(value2);

        int gORl= 0;
        if (instructionType.getName().endsWith("g"))
          gORl= 1;
        else if (instructionType.getName().endsWith("l"))
View Full Code Here

        int gORl= 0;
        if (instructionType.getName().endsWith("g"))
          gORl= 1;
        else if (instructionType.getName().endsWith("l"))
          gORl= -1;
        mi.addArgument(NumberLiteral.create(gORl));

        instruction= mi;

        break;
      }
View Full Code Here

        int kk= stack.size() - nArgs;
        for (int i= 0; i < nArgs; i++)
        {
          Expression arg= (Expression) stack.get(kk);
          stack.remove(kk);
          invocation.addArgument(arg);
        }

        opStackDelta= -nArgs;

        if (opcode == Const.INVOKEVIRTUAL || opcode == Const.INVOKESPECIAL || opcode == Const.INVOKEINTERFACE)
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.