Examples of JsNumberLiteral


Examples of com.google.gwt.dev.js.ast.JsNumberLiteral

          break;
        default:
          throw new InternalCompilerException("Can't handle simplify of op " + op);
      }
      return result instanceof Double ?
          new JsNumberLiteral(info, ((Double) result).doubleValue()) :
          JsBooleanLiteral.get(((Boolean) result).booleanValue());
    }
    return expr;
  }
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsNumberLiteral

        List<JsExpression> arguments = rewritten.getArguments();
        if (q == null) {
          q = JsNullLiteral.INSTANCE;
        }
        arguments.add(q);
        arguments.add(new JsNumberLiteral(info, dispId));
        arguments.add(new JsNumberLiteral(info, paramCount));

        accept(rewritten);
        return false;
      }
      return super.visit(x, ctx);
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsNumberLiteral

            }

            SourceInfo info = x.getSourceInfo();
            JsInvocation inner = new JsInvocation(info);
            inner.setQualifier(new JsNameRef(info, "__gwt_makeJavaInvoke"));
            inner.getArguments().add(new JsNumberLiteral(info, paramCount));

            JsInvocation outer = new JsInvocation(info);
            outer.setQualifier(inner);
            JsExpression q = ref.getQualifier();
            if (q == null) {
              q = JsNullLiteral.INSTANCE;
            }
            List<JsExpression> arguments = outer.getArguments();
            arguments.add(q);
            arguments.add(new JsNumberLiteral(info, dispId));
            arguments.addAll(x.getArguments());

            accept(outer);
            return false;
          }
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsNumberLiteral

    push(JsBooleanLiteral.get(x.getValue()));
  }

  @Override
  public final void endVisit(JCharLiteral x, Context ctx) {
    push(new JsNumberLiteral(x.getSourceInfo(), x.getValue()));
  }
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsNumberLiteral

    push(new JsNumberLiteral(x.getSourceInfo(), x.getValue()));
  }

  @Override
  public final void endVisit(JDoubleLiteral x, Context ctx) {
    push(new JsNumberLiteral(x.getSourceInfo(), x.getValue()));
  }
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsNumberLiteral

    push(new JsNumberLiteral(x.getSourceInfo(), x.getValue()));
  }

  @Override
  public final void endVisit(JFloatLiteral x, Context ctx) {
    push(new JsNumberLiteral(x.getSourceInfo(), x.getValue()));
  }
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsNumberLiteral

    push(new JsNumberLiteral(x.getSourceInfo(), x.getValue()));
  }

  @Override
  public final void endVisit(JIntLiteral x, Context ctx) {
    push(new JsNumberLiteral(x.getSourceInfo(), x.getValue()));
  }
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsNumberLiteral

    JsObjectLiteral objectLit = new JsObjectLiteral(sourceInfo);
    List<JsPropertyInitializer> inits = objectLit.getPropertyInitializers();
    JsExpression label0 = new JsNameRef(sourceInfo, "l");
    JsExpression label1 = new JsNameRef(sourceInfo, "m");
    JsExpression label2 = new JsNameRef(sourceInfo, "h");
    JsExpression value0 = new JsNumberLiteral(sourceInfo, intArray[0]);
    JsExpression value1 = new JsNumberLiteral(sourceInfo, intArray[1]);
    JsExpression value2 = new JsNumberLiteral(sourceInfo, intArray[2]);
    inits.add(new JsPropertyInitializer(sourceInfo, label0, value0));
    inits.add(new JsPropertyInitializer(sourceInfo, label1, value1));
    inits.add(new JsPropertyInitializer(sourceInfo, label2, value2));
    push(objectLit);
  }
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsNumberLiteral

    JMethod loadMethod = jprogram.getIndexedMethod("AsyncFragmentLoader.onLoad");
    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;
  }
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsNumberLiteral

    private JsObjectLiteral buildJsCastMapLiteral(List<JsExpression> runtimeTypeIdLiterals,
        SourceInfo sourceInfo) {
      JsObjectLiteral objLit = new JsObjectLiteral(sourceInfo);
      objLit.setInternable();
      List<JsPropertyInitializer> props = objLit.getPropertyInitializers();
      JsNumberLiteral one = new JsNumberLiteral(sourceInfo, 1);
      for (JsExpression runtimeTypeIdLiteral : runtimeTypeIdLiterals) {
        JsPropertyInitializer prop = new JsPropertyInitializer(sourceInfo,
            runtimeTypeIdLiteral, one);
        props.add(prop);
      }
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.