Examples of JVariable


Examples of com.google.gwt.dev.jjs.ast.JVariable

    LivenessAssumption assumptions = AssumptionUtil.join(
        graph.getOutEdges(node), assumptionMap);

    if (node instanceof CfgWriteNode) {
      CfgWriteNode write = (CfgWriteNode) node;
      JVariable variable = write.getTargetVariable();
      if ((variable instanceof JLocal || variable instanceof JParameter) &&
          !isLive(assumptions, variable) && write.getValue() != null) {
        return new LivenessTransformation(graph, write);
      }
    }
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JVariable

        AssumptionUtil.join(g.getOutEdges(node), assumptionMap));

    node.accept(new CfgVisitor() {
      @Override
      public void visitReadNode(CfgReadNode node) {
        JVariable target = node.getTarget();
        if (target instanceof JLocal || target instanceof JParameter) {
          result.use(target);
        }
      }

      @Override
      public void visitReadWriteNode(CfgReadWriteNode node) {
        JVariable target = node.getTargetVariable();
        if (target instanceof JLocal || target instanceof JParameter) {
          result.use(target);
        }
      }

      @Override
      public void visitWriteNode(CfgWriteNode node) {
        JVariable target = node.getTargetVariable();
        if (target instanceof JLocal || target instanceof JParameter) {
          result.kill(target);
        }
      }
    });
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JVariable

      if (targetBinding.isNestedType() && !targetBinding.isStatic()) {
        NestedTypeBinding nestedBinding = (NestedTypeBinding) erasure(targetBinding);
        // Synthetic locals for local classes
        if (nestedBinding.outerLocalVariables != null) {
          for (SyntheticArgumentBinding arg : nestedBinding.outerLocalVariables) {
            JVariable variable = (JVariable) typeMap.get(arg.actualOuterLocalVariable);
            call.addArg(createVariableRef(info, variable,
                arg.actualOuterLocalVariable));
          }
        }
      }
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JVariable

      // Synthetic locals for local classes
      if (targetBinding.isNestedType() && !targetBinding.isStatic()) {
        NestedTypeBinding nestedBinding = (NestedTypeBinding) erasure(targetBinding);
        if (nestedBinding.outerLocalVariables != null) {
          for (SyntheticArgumentBinding arg : nestedBinding.outerLocalVariables) {
            JVariable variable = (JVariable) typeMap.get(arg.actualOuterLocalVariable);
            newInstance.addArg(createVariableRef(info, variable,
                arg.actualOuterLocalVariable));
          }
        }
      }
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JVariable

      Binding binding = x.binding;
      JNode node = typeMap.get(binding);
      if (!(node instanceof JVariable)) {
        return null;
      }
      JVariable variable = (JVariable) node;

      JExpression curRef = createVariableRef(info, variable, binding);
      if (x.genericCast != null) {
        JType castType = (JType) typeMap.get(x.genericCast);
        curRef = maybeCast(castType, curRef);
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JVariable

      Binding binding = x.binding;
      Object target = typeMap.get(binding);
      if (!(target instanceof JVariable)) {
        return null;
      }
      JVariable variable = (JVariable) target;

      /*
       * Wackiness: if a field happens to have synthetic accessors (only fields
       * can have them, apparently), this is a ref to a field in an enclosing
       * instance. CreateThisRef should compute a "this" access of the
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JVariable

    private JFieldRef makeInstanceFieldRef(SourceInfo info, JField field) {
      return new JFieldRef(info, makeThisRef(info), field, curClass.classType);
    }

    private JExpression makeLocalRef(SourceInfo info, LocalVariableBinding b) {
      JVariable variable = curMethod.locals.get(b);
      assert variable != null;
      if (variable instanceof JLocal) {
        return new JLocalRef(info, (JLocal) variable);
      } else {
        return new JParameterRef(info, (JParameter) variable);
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JVariable

      }

      JsExpression initializer = (JsExpression) pop(); // initializer
      JsNameRef localRef = (JsNameRef) pop(); // localRef

      JVariable target = x.getVariableRef().getTarget();
      if (target instanceof JField
          && ((JField) target).getLiteralInitializer() != null) {
        // Will initialize at top scope; no need to double-initialize.
        push(null);
        return;
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JVariable

    private JFieldRef makeInstanceFieldRef(SourceInfo info, JField field) {
      return new JFieldRef(info, makeThisRef(info), field, curClass.classType);
    }

    private JExpression makeLocalRef(SourceInfo info, LocalVariableBinding b) {
      JVariable variable = curMethod.locals.get(b);
      assert variable != null;
      if (variable instanceof JLocal) {
        return new JLocalRef(info, (JLocal) variable);
      } else {
        return new JParameterRef(info, (JParameter) variable);
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JVariable

    }

    CopyAssumption result = new CopyAssumption();

    for (JVariable v : copyToOriginal.keySet()) {
      JVariable original = copyToOriginal.get(v);
      if (original == value.copyToOriginal.get(v)) {
        result.copyToOriginal.put(v, original);
      } else {
        result.copyToOriginal.put(v, 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.