Examples of SourceInfo


Examples of com.google.gwt.dev.jjs.SourceInfo

            + unOp.getIntDatum());
    }
  }

  private JsVars mapVar(Node varNode) throws JsParserException {
    SourceInfo info = makeSourceInfo(varNode);
    pushSourceInfo(info);
    JsVars toVars = new JsVars(info);
    Node fromVar = varNode.getFirstChild();
    while (fromVar != null) {
      // Use a conservative name allocation strategy that allocates all names
View Full Code Here

Examples of com.google.gwt.dev.jjs.SourceInfo

        new Range[sourceInfoMap.size()]);
    Arrays.sort(dependencyOrder, Range.DEPENDENCY_ORDER_COMPARATOR);

    Stack<RangeInfo> dependencyScope = new Stack<RangeInfo>();
    for (Range range : dependencyOrder) {
      SourceInfo info = sourceInfoMap.get(range);
      assert info != null;

      // Infer dependency information
      if (!dependencyScope.isEmpty()) {

        /*
         * Pop frames until we get back to a container, using this as a chance
         * to build up our list of non-overlapping Ranges to report back to the
         * user.
         */
        while (!dependencyScope.peek().range.contains(range)) {
          popAndRecord(dependencyScope, fragment);
        }
      }

      // Possibly create and record Members
      if (!sourceInfoSeen.contains(info)) {
        sourceInfoSeen.add(info);
        for (Correlation c : info.getPrimaryCorrelationsArray()) {
          if (c == null) {
            continue;
          }
          if (membersByCorrelation.containsKey(c)) {
            continue;
View Full Code Here

Examples of com.google.gwt.dev.jjs.SourceInfo

     */
    if (lastEnd < toStore.getStart()) {
      Range newRange = new Range(lastEnd, toStore.getStart());
      assert !dependencyScope.isEmpty();

      SourceInfo gapInfo = dependencyScope.peek().info;
      recordStory(gapInfo, fragment, newRange.length(), newRange);

      lastEnd += newRange.length();
    }

View Full Code Here

Examples of com.google.gwt.dev.jjs.SourceInfo

  protected <T extends JsVisitable<T>> T doAccept(T node) {
    boolean addEntry = node instanceof HasSourceInfo;
    int start = addEntry ? out.getPosition() : 0;
    T toReturn = super.doAccept(node);
    if (addEntry) {
      SourceInfo info = ((HasSourceInfo) node).getSourceInfo();
      sourceInfoMap.put(new Range(start, out.getPosition()), info);
    }
    return toReturn;
  }
View Full Code Here

Examples of com.google.gwt.dev.jjs.SourceInfo

    lineNumbers = program.getScope().declareName("$JsStackEmulator_location",
        "$location");
  }

  private void makeVars() {
    SourceInfo info = program.getSourceInfo().makeChild(JsStackEmulator.class,
        "Emulated stack data");
    JsVar stackVar = new JsVar(info, stack);
    stackVar.setInitExpr(new JsArrayLiteral(info));
    JsVar stackDepthVar = new JsVar(info, stackDepth);
    stackDepthVar.setInitExpr(program.getNumberLiteral(info, -1));
View Full Code Here

Examples of com.google.gwt.dev.jjs.SourceInfo

      if (name.getStaticRef() != caughtFunction) {
        return;
      }

      // $stackDepth = stackIndex
      SourceInfo info = x.getSourceInfo().makeChild(JsStackEmulator.class,
          "Resetting stack depth");
      JsBinaryOperation reset = new JsBinaryOperation(info,
          JsBinaryOperator.ASG, stackDepth.makeRef(info),
          eeVisitor.stackIndexRef(info));
View Full Code Here

Examples of com.google.gwt.dev.jjs.SourceInfo

          x.setExpr(op);
        }
      } else {
        if (x.getExpr() != null && x.getExpr().hasSideEffects()) {
          // temp = expr; pop(); return temp;
          SourceInfo info = x.getSourceInfo().makeChild(JsStackEmulator.class,
              "Flow break with side-effect");
          JsBinaryOperation asg = new JsBinaryOperation(info,
              JsBinaryOperator.ASG, returnTempRef(info), x.getExpr());
          x.setExpr(returnTempRef(info));
          pop(x, asg, ctx);
View Full Code Here

Examples of com.google.gwt.dev.jjs.SourceInfo

         */
        return;
      }

      // pop()
      SourceInfo info = x.getSourceInfo().makeChild(JsStackEmulator.class,
          "Stack exit");
      JsExpression op = pop(info);

      if (checkEarlyExit) {
        // earlyExit && pop()
View Full Code Here

Examples of com.google.gwt.dev.jjs.SourceInfo

    private JsCatch makeSyntheticCatchBlock(JsTry x) {
      /*
       * catch (e) { e = caught(e); throw e; }
       */
      SourceInfo info = x.getSourceInfo().makeChild(JsStackEmulator.class,
          "Synthetic catch block to fix stack depth");

      JsCatch c = new JsCatch(info, currentFunction.getScope(), "e");
      JsName paramName = c.getParameter().getName();

View Full Code Here

Examples of com.google.gwt.dev.jjs.SourceInfo

     * @param ctx the visitor context
     */
    private void pop(JsStatement x, JsExpression expr,
        JsContext<JsStatement> ctx) {
      // $stackDepth = stackIndex - 1
      SourceInfo info = x.getSourceInfo().makeChild(JsStackEmulator.class,
          "Stack exit");

      JsExpression op = pop(info);

      if (ctx.canInsert()) {
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.