Package com.google.gwt.dev.js.ast

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


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


      for (JsFunction func : nonInitialEntries) {
        if (func != null) {
          JsInvocation call = new JsInvocation(jsProgram.getSourceInfo());
          call.setQualifier(func.getName().makeRef(
              jsProgram.getSourceInfo().makeChild()));
          globalStmts.add(call.makeStmt());
        }
      }
    }

    @Override
View Full Code Here

          JsInvocation call = new JsInvocation(sourceInfo);
          call.setQualifier(entryName.makeRef(sourceInfo));
          call.getArguments().add(func.getName().makeRef(sourceInfo));
          JsInvocation entryCall = new JsInvocation(sourceInfo);
          entryCall.setQualifier(call);
          callBlock.getStatements().add(entryCall.makeStmt());
        }
      }
      JsCatch jsCatch = new JsCatch(sourceInfo, fnScope, "e");
      jsTry.getCatches().add(jsCatch);
      JsBlock catchBlock = new JsBlock(sourceInfo);
View Full Code Here

      JsCatch jsCatch = new JsCatch(sourceInfo, fnScope, "e");
      jsTry.getCatches().add(jsCatch);
      JsBlock catchBlock = new JsBlock(sourceInfo);
      jsCatch.setBody(catchBlock);
      JsInvocation errCall = new JsInvocation(sourceInfo);
      catchBlock.getStatements().add(errCall.makeStmt());
      errCall.setQualifier(errFn.makeRef(sourceInfo));
      errCall.getArguments().add(modName.makeRef(sourceInfo));
    }

    private void generateLongLiterals(JsVars vars) {
View Full Code Here

    JsName loadMethodName = map.nameForMethod(loadMethod);
    SourceInfo sourceInfo = jsprogram.getSourceInfo();
    JsInvocation call = new JsInvocation(sourceInfo);
    call.setQualifier(wrapWithEntry(loadMethodName.makeRef(sourceInfo)));
    call.getArguments().add(new JsNumberLiteral(sourceInfo, fragmentId));
    List<JsStatement> newStats = Collections.<JsStatement> singletonList(call.makeStmt());
    return newStats;
  }

  /**
   * Assume that all code described by <code>alreadyLoadedPredicate</code> has
View Full Code Here

        }
      }

      JsInvocation jsInvocation = maybeCreateClinitCall(x);
      if (jsInvocation != null) {
        jsFunc.getBody().getStatements().add(0, jsInvocation.makeStmt());
      }

      if (x.isTrace()) {
        jsFunc.setTrace();
      }
View Full Code Here

        JsFunction modernizerFn =
            indexedFunctions.get("JavaClassHierarchySetupUtil.modernizeBrowser");
        JsName modernizerFnName = modernizerFn.getName();
        JsInvocation callModernizerFn = new JsInvocation(x.getSourceInfo());
        callModernizerFn.setQualifier(modernizerFnName.makeRef(x.getSourceInfo()));
        globalStmts.add(callModernizerFn.makeStmt());
      }
    }

    /**
     * Creates gwtOnLoad bootstrapping code. Unusually, the created code is executed as part of
View Full Code Here

        JsFunction registerRuntimeRebindsFunction =
            indexedFunctions.get(runtimeRebindRegistratorTypeShortName + ".register");
        JsInvocation registerRuntimeRebindsCall = new JsInvocation(sourceInfo);
        registerRuntimeRebindsCall.setQualifier(
            registerRuntimeRebindsFunction.getName().makeRef(sourceInfo));
        globalStmts.add(registerRuntimeRebindsCall.makeStmt());
      }

      String modulepropertyProviderRegistratorSourceName =
          program.getPropertyProviderRegistratorTypeSourceName();
      // Skip if no runtime property registry code in this module, probably a monolithic compile.
View Full Code Here

        JsFunction registerPropertyProvidersFunction =
            indexedFunctions.get(propertyProviderRegistratorTypeShortName + ".register");
        JsInvocation registerPropertyProvidersCall = new JsInvocation(sourceInfo);
        registerPropertyProvidersCall.setQualifier(
            registerPropertyProvidersFunction.getName().makeRef(sourceInfo));
        globalStmts.add(registerPropertyProvidersCall.makeStmt());
      }

      // var $entry = Impl.registerEntry();
      JsName entryName = topScope.declareName("$entry");
      JsVar entryVar = new JsVar(sourceInfo, entryName);
View Full Code Here

      List<JsExpression> previousGwtOnLoadCallArguments = previousGwtOnLoadCall.getArguments();
      previousGwtOnLoadCallArguments.add(errFn.makeRef(sourceInfo));
      previousGwtOnLoadCallArguments.add(modName.makeRef(sourceInfo));
      previousGwtOnLoadCallArguments.add(modBase.makeRef(sourceInfo));
      previousGwtOnLoadCallArguments.add(softPermutationId.makeRef(sourceInfo));
      previousGwtOnLoadIf.setThenStmt(previousGwtOnLoadCall.makeStmt());

      // $moduleName = modName;
      JsExpression moduleNameAssignment =
          createAssignment(topScope.findExistingUnobfuscatableName("$moduleName").makeRef(
              sourceInfo), modName.makeRef(sourceInfo));
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.