Package com.google.gwt.dev.jjs

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


      }
    }

    private void checkRemoved() {
      if (removed) {
        throw new InternalCompilerException("Node was already removed");
      }
    }
View Full Code Here


    }

    private void checkState() {
      checkRemoved();
      if (replaced) {
        throw new InternalCompilerException("Node was already replaced");
      }
    }
View Full Code Here

      switch (x.getOp()) {
        case SHL:
        case SHR:
        case SHRU:
          if (rhsType == longType) {
            throw new InternalCompilerException(
                "Expected right operand not to be of type long");
          }
          break;
        default:
          if (rhsType != longType) {
            throw new InternalCompilerException(
                "Expected right operand to be of type long");
          }
      }

      JMethod method = program.getIndexedMethod("LongLib." + methodName);
View Full Code Here

    @Override
    public void endVisit(JPostfixOperation x, Context ctx) {
      JType argType = x.getArg().getType();
      if (argType == longType) {
        throw new InternalCompilerException(
            "Postfix operations on longs should not reach here");
      }
    }
View Full Code Here

        case BIT_OR:
          return "or";

        case AND:
        case OR:
          throw new InternalCompilerException(
              "AND and OR should not have long operands");

        case ASG:
          // Nothing to do.
          return null;

        case ASG_ADD:
        case ASG_SUB:
        case ASG_MUL:
        case ASG_DIV:
        case ASG_MOD:
        case ASG_SHL:
        case ASG_SHR:
        case ASG_SHRU:
        case ASG_BIT_AND:
        case ASG_BIT_OR:
        case ASG_BIT_XOR:
          throw new InternalCompilerException(
              "Modifying long ops should not reach here");
        default:
          throw new InternalCompilerException("Should not reach here");
      }
    }
View Full Code Here

    private String getEmulationMethod(JUnaryOperator op) {
      switch (op) {
        case INC:
        case DEC:
          throw new InternalCompilerException(
              "Modifying long ops should not reach here");
        case NEG:
          return "neg";
        case NOT:
          throw new InternalCompilerException(
              "NOT should not have a long operand");
        case BIT_NOT:
          return "not";
        default:
          throw new InternalCompilerException("Should not reach here");
      }
    }
View Full Code Here

      Throwable e) {
    if (e instanceof OutOfMemoryError) {
      // Always rethrow OOMs (might have no memory to load ICE class anyway).
      throw (OutOfMemoryError) e;
    }
    InternalCompilerException ice;
    if (e instanceof InternalCompilerException) {
      ice = (InternalCompilerException) e;
    } else {
      ice = new InternalCompilerException("Unexpected error during visit.", e);
    }
    ice.addNode(node);
    return ice;
  }
View Full Code Here

        Throwable e) {
      if (e instanceof OutOfMemoryError) {
        // Always rethrow OOMs (might have no memory to load ICE class anyway).
        throw (OutOfMemoryError) e;
      }
      InternalCompilerException ice;
      if (e instanceof InternalCompilerException) {
        ice = (InternalCompilerException) e;
        ice.addNode(node);
      } else {
        ice = new InternalCompilerException(node,
            "Error constructing Java AST", e);
      }
      return ice;
    }
View Full Code Here

          // This code can actually leave an unbox operation in
          // an lvalue position, for example ++(x.intValue()).
          // Such trees are cleaned up in FixAssignmentToUnbox.
          JType typeToUnbox = (JType) typeMap.get(x.resolvedType);
          if (!(typeToUnbox instanceof JClassType)) {
            throw new InternalCompilerException(result,
                "Attempt to unbox a non-class type: " + typeToUnbox.getName(),
                null);
          }

          result = unbox(result, (JClassType) typeToUnbox);
View Full Code Here

            targetMethod = method;
            break;
          }
        }
        if (targetMethod == null) {
          throw new InternalCompilerException(
              "String constructor error; no matching implementation.");
        }
        call = new JMethodCall(makeSourceInfo(x), null, targetMethod);
      } else {
        JNewInstance newInstance = new JNewInstance(info, newType);
View Full Code Here

TOP

Related Classes of com.google.gwt.dev.jjs.InternalCompilerException

Copyright © 2018 www.massapicom. 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.