Examples of makeStatement()


Examples of com.google.gwt.dev.jjs.ast.JMethodCall.makeStatement()

        JMethod clinitMethod = enclosingType.methods.get(0);
        JMethodCall clinitCall = new JMethodCall(program, info, null,
            clinitMethod);
        JMethodBody body = (JMethodBody) ctor.getBody();
        List<JStatement> statements = body.getStatements();
        statements.add(clinitCall.makeStatement());

        /*
         * All synthetic fields must be assigned, unless we have an explicit
         * this constructor call, in which case the callee will assign them for
         * us.
 
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JMethodCall.makeStatement()

        if (!hasExplicitThis) {
          // $init is always in position 1 (clinit is in 0)
          JMethod initMethod = enclosingType.methods.get(1);
          JMethodCall initCall = new JMethodCall(program, info, thisRef,
              initMethod);
          statements.add(initCall.makeStatement());
        }

        // user code (finally!)
        if (x.statements != null) {
          for (int i = 0, n = x.statements.length; i < n; ++i) {
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JMethodCall.makeStatement()

        JParameter param = x.params.get(i);
        newCall.getArgs().add(new JParameterRef(program, sourceInfo, param));
      }
      JStatement statement;
      if (returnType == program.getTypeVoid()) {
        statement = newCall.makeStatement();
      } else {
        statement = new JReturnStatement(program, sourceInfo, newCall);
      }
      newBody.getStatements().add(statement);
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JMethodCall.makeStatement()

        JParameter param = x.getParams().get(i);
        newCall.addArg(new JParameterRef(sourceInfo, param));
      }
      JStatement statement;
      if (returnType == program.getTypeVoid()) {
        statement = newCall.makeStatement();
      } else {
        statement = new JReturnStatement(sourceInfo, newCall);
      }
      newBody.getBlock().addStmt(statement);
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JMethodCall.makeStatement()

        JParameter param = x.params.get(i);
        newCall.getArgs().add(new JParameterRef(program, sourceInfo, param));
      }
      JStatement statement;
      if (returnType == program.getTypeVoid()) {
        statement = newCall.makeStatement();
      } else {
        statement = new JReturnStatement(program, sourceInfo, newCall);
      }
      newBody.getStatements().add(statement);
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JMethodCall.makeStatement()

      JMethod mainMethod = findMainMethod(mainType);
      if (mainMethod != null && mainMethod.isStatic()) {
        JMethodCall onModuleLoadCall = new JMethodCall(program, null, null,
            mainMethod);
        statements.add(onModuleLoadCall.makeStatement());
        continue;
      }

      // Couldn't find a static main method; must rebind the class
      String[] resultTypeNames = rpo.getAllPossibleRebindAnswers(logger,
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JMethodCall.makeStatement()

         * explicit this constructor call, in which case the callee will.
         */
        if (!hasExplicitThis) {
          JMethod initMethod = curClass.type.getInitMethod();
          JMethodCall initCall = new JMethodCall(info, makeThisRef(info), initMethod);
          block.addStmt(initCall.makeStatement());
        }

        // user code (finally!)
        block.addStmts(statements);
        popMethodInfo();
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JMethodCall.makeStatement()

          if (nested) {
            processThisCallLocalArgs(declaringClass, call);
          }
        }
        call.setStaticDispatchOnly();
        push(call.makeStatement());
      } catch (Throwable e) {
        throw translateException(x, e);
      } finally {
        scope.methodScope().isConstructorCall = false;
      }
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JMethodCall.makeStatement()

      if (type.getSuperClass() != null) {
        JMethod myClinit = type.getClinitMethod();
        JMethod superClinit = type.getSuperClass().getClinitMethod();
        JMethodCall superClinitCall = new JMethodCall(myClinit.getSourceInfo(), null, superClinit);
        JMethodBody body = (JMethodBody) myClinit.getBody();
        body.getBlock().addStmt(0, superClinitCall.makeStatement());
      }

      // Implement getClass() implementation for all non-Object classes.
      if (isSyntheticGetClassNeeded(x, type)) {
        implementGetClass(type);
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JMethodCall.makeStatement()

        call.addArg(maybeCast(implParams.get(i).getType(), paramRef));
      }

      JMethodBody body = (JMethodBody) bridgeMethod.getBody();
      if (bridgeMethod.getType() == JPrimitiveType.VOID) {
        body.getBlock().addStmt(call.makeStatement());
      } else {
        body.getBlock().addStmt(new JReturnStatement(info, call));
      }
    }
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.