Examples of makeStmt()


Examples of com.google.gwt.dev.js.ast.JsExpression.makeStmt()

          rhs = new JsObjectLiteral(sourceInfo);
        }
        JsExpression protoAsg = createAssignment(lhs, rhs);
        JsExpression tmpAsg = createAssignment(globalTemp.makeRef(sourceInfo),
            protoAsg);
        JsExprStmt tmpAsgStmt = tmpAsg.makeStmt();
        globalStmts.add(tmpAsgStmt);
        typeForStatMap.put(tmpAsgStmt, x);
      } else {
        /*
         * MAGIC: java.lang.String is implemented as a JavaScript String
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsExpression.makeStmt()

        JsNameRef rhs = prototype.makeRef(sourceInfo);
        rhs.setQualifier(jsProgram.getRootScope().declareName("String").makeRef(
            sourceInfo));
        JsExpression tmpAsg = createAssignment(globalTemp.makeRef(sourceInfo),
            rhs);
        JsExprStmt tmpAsgStmt = tmpAsg.makeStmt();
        globalStmts.add(tmpAsgStmt);
        typeForStatMap.put(tmpAsgStmt, x);
      }
    }
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsExpression.makeStmt()

        body.getStatements().add(jsReturn);
        rhs.setBody(body);

        // asg
        JsExpression asg = createAssignment(lhs, rhs);
        JsExprStmt stmt = asg.makeStmt();
        globalStmts.add(stmt);
        typeForStatMap.put(stmt, program.getTypeJavaLangObject());
      }
    }
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsExpression.makeStmt()

            GenerateJavaScriptVisitor.class, "Type id assignment");
        JsNameRef fieldRef = typeIdName.makeRef(sourceInfo);
        fieldRef.setQualifier(globalTemp.makeRef(sourceInfo));
        JsNumberLiteral typeIdLit = jsProgram.getNumberLiteral(typeId);
        JsExpression asg = createAssignment(fieldRef, typeIdLit);
        JsExprStmt asgStmt = asg.makeStmt();
        globalStmts.add(asgStmt);
        typeForStatMap.put(asgStmt, x);
      }
    }
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsExpression.makeStmt()

          GenerateJavaScriptAST.class, "Type marker");
      JsNameRef fieldRef = typeMarkerName.makeRef(sourceInfo);
      fieldRef.setQualifier(globalTemp.makeRef(sourceInfo));
      JsExpression asg = createAssignment(fieldRef,
          nullMethodName.makeRef(sourceInfo));
      JsExprStmt stmt = asg.makeStmt();
      globalStmts.add(stmt);
      typeForStatMap.put(stmt, program.getTypeJavaLangObject());
    }

    private JsExpression generateTypeTable() {
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsExpression.makeStmt()

      SourceInfo sourceInfo = clinitFunc.getSourceInfo().makeChild(
          GenerateJavaScriptVisitor.class, "clinit reassignment");
      // self-assign to the null method immediately (to prevent reentrancy)
      JsExpression asg = createAssignment(clinitFunc.getName().makeRef(
          sourceInfo), nullMethodName.makeRef(sourceInfo));
      statements.add(0, asg.makeStmt());
    }

    private JsInvocation maybeCreateClinitCall(JField x) {
      if (!x.isStatic()) {
        return null;
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsExpression.makeStmt()

    }

    // @Override
    public void endVisit(JExpressionStatement x, Context ctx) {
      JsExpression expr = (JsExpression) pop(); // expr
      push(expr.makeStmt());
    }

    // @Override
    public void endVisit(JField x, Context ctx) {
      // if we need an initial value, create an assignment
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsExpression.makeStmt()

      params.add(new JsParameter(modName));
      params.add(new JsParameter(modBase));
      JsExpression asg = createAssignment(
          topScope.findExistingUnobfuscatableName("$moduleName").makeRef(),
          modName.makeRef());
      body.getStatements().add(asg.makeStmt());
      asg = createAssignment(topScope.findExistingUnobfuscatableName(
          "$moduleBase").makeRef(), modBase.makeRef());
      body.getStatements().add(asg.makeStmt());
      JsIf jsIf = new JsIf();
      body.getStatements().add(jsIf);
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsExpression.makeStmt()

          topScope.findExistingUnobfuscatableName("$moduleName").makeRef(),
          modName.makeRef());
      body.getStatements().add(asg.makeStmt());
      asg = createAssignment(topScope.findExistingUnobfuscatableName(
          "$moduleBase").makeRef(), modBase.makeRef());
      body.getStatements().add(asg.makeStmt());
      JsIf jsIf = new JsIf();
      body.getStatements().add(jsIf);
      jsIf.setIfExpr(errFn.makeRef());
      JsTry jsTry = new JsTry();
      jsIf.setThenStmt(jsTry);
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsExpression.makeStmt()

        } else {
          rhs = new JsObjectLiteral();
        }
        JsExpression protoAsg = createAssignment(lhs, rhs);
        JsExpression tmpAsg = createAssignment(globalTemp.makeRef(), protoAsg);
        globalStmts.add(tmpAsg.makeStmt());
      } else {
        /*
         * MAGIC: java.lang.String is implemented as a JavaScript String
         * primitive with a modified prototype.
         */
 
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.