Examples of makeRef()


Examples of com.google.gwt.dev.js.ast.JsName.makeRef()

          // Was pruned; this compilation must have no dynamic casts.
          return;
        }
        SourceInfo sourceInfo = x.getSourceInfo().makeChild(
            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);
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsName.makeRef()

        // Was pruned; this compilation must have no JSO instanceof tests.
        return;
      }
      SourceInfo sourceInfo = jsProgram.createSourceInfoSynthetic(
          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);
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsName.makeRef()

    }

    @Override
    public void endVisit(JClassLiteral x, Context ctx) {
      JsName classLit = names.get(x.getField());
      push(classLit.makeRef(x.getSourceInfo()));
    }

    @Override
    public void endVisit(JClassSeed x, Context ctx) {
      push(names.get(x.getRefType()).makeRef(x.getSourceInfo()));
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsName.makeRef()

        var.setInitExpr(rhs);
        push(var);
      } else {
        // for non-statics, only setup an assignment if needed
        if (rhs != null) {
          JsNameRef fieldRef = name.makeRef(x.getSourceInfo());
          fieldRef.setQualifier(globalTemp.makeRef(x.getSourceInfo()));
          JsExpression asg = createAssignment(fieldRef, rhs);
          push(new JsExprStmt(x.getSourceInfo(), asg));
        } else {
          push(null);
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsName.makeRef()

    @Override
    public void endVisit(JFieldRef x, Context ctx) {
      JField field = x.getField();
      JsName jsFieldName = names.get(field);
      JsNameRef nameRef = jsFieldName.makeRef(x.getSourceInfo());
      JsExpression curExpr = nameRef;

      /*
       * Note: the comma expressions here would cause an illegal tree state if
       * the result expression ended up on the lhs of an assignment. A hack in
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsName.makeRef()

      }
      nameString += "_longLit";
      JsName longLit = topScope.declareName(nameString);
      longLits.put(x.getValue(), longLit);
      longObjects.put(longLit, longLiteralAllocation);
      push(longLit.makeRef(x.getSourceInfo()));
    }

    @Override
    public void endVisit(JMethod x, Context ctx) {
      if (x.isAbstract()) {
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsName.makeRef()

           *
           * Have to use a "call" construct.
           */
          JsName callName = objectScope.declareName("call");
          callName.setObfuscatable(false);
          qualifier = callName.makeRef(x.getSourceInfo());
          qualifier.setQualifier(names.get(method).makeRef(x.getSourceInfo()));
          jsInvocation.getArguments().add(0, (JsExpression) pop()); // instance
        } else {
          // Dispatch polymorphically (normal case).
          qualifier = polymorphicNames.get(method).makeRef(x.getSourceInfo());
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsName.makeRef()

        JMethod loadedMethod = program.getIndexedMethod("AsyncFragmentLoader.browserLoaderLeftoversFragmentHasLoaded");
        JsName loadedMethodName = names.get(loadedMethod);
        SourceInfo sourceInfo = jsProgram.getSourceInfo().makeChild(
            GenerateJavaScriptAST.class, "call to leftoversFragmentHasLoaded ");
        JsInvocation call = new JsInvocation(sourceInfo);
        call.setQualifier(loadedMethodName.makeRef(sourceInfo));
        globalStmts.add(call.makeStmt());
      }
      for (JsFunction func : nonInitialEntries) {
        if (func != null) {
          SourceInfo sourceInfo = jsProgram.getSourceInfo().makeChild(
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsName.makeRef()

    public void endVisit(JClassLiteral x, Context ctx) {
      // My seed function name
      String nameString = x.getRefType().getJavahSignatureName() + "_classlit";
      JsName classLit = topScope.declareName(nameString);
      classLits.put(x.getRefType(), classLit);
      push(classLit.makeRef());
    }

    // @Override
    public void endVisit(JClassSeed x, Context ctx) {
      push(getName(x.getRefType()).makeRef());
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsName.makeRef()

        var.setInitExpr(rhs);
        push(var);
      } else {
        // for non-statics, only setup an assignment if needed
        if (rhs != null) {
          JsNameRef fieldRef = name.makeRef();
          fieldRef.setQualifier(globalTemp.makeRef());
          JsExpression asg = createAssignment(fieldRef, rhs);
          push(new JsExprStmt(asg));
        } else {
          push(null);
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.