/** Insert a reference to given type in the constant pool, * checking for an array with too many dimensions; * return the reference's index. * @param type The type for which a reference is inserted. */ int makeRef(DiagnosticPosition pos, Type type) { checkDimension(pos, type); return pool.put(type.tag == CLASS ? (Object)type.tsym : (Object)type); }
/** Insert a reference to given type in the constant pool, * checking for an array with too many dimensions; * return the reference's index. * @param type The type for which a reference is inserted. */ int makeRef(DiagnosticPosition pos, Type type) { checkDimension(pos, type); return pool.put(type.tag == CLASS ? (Object)type.tsym : (Object)type); }
/** Check if the given type is an array with too many dimensions. */ private void checkDimension(DiagnosticPosition pos, Type t) { switch (t.tag) { case METHOD: checkDimension(pos, t.getReturnType()); for (List<Type> args = t.getParameterTypes(); args.nonEmpty(); args = args.tail) checkDimension(pos, args.head); break; case ARRAY: if (types.dimensions(t) > ClassFile.MAX_DIMENSIONS) { log.error(pos, "limit.dimensions"); nerrs++; } break; default: break; } }
/** Check if the given type is an array with too many dimensions. */ private void checkDimension(DiagnosticPosition pos, Type t) { switch (t.tag) { case METHOD: checkDimension(pos, t.getReturnType()); for (List<Type> args = t.getParameterTypes(); args.nonEmpty(); args = args.tail) checkDimension(pos, args.head); break; case ARRAY: if (types.dimensions(t) > ClassFile.MAX_DIMENSIONS) { log.error(pos, "limit.dimensions"); nerrs++; } break; default: break; } }
/** Check if the given type is an array with too many dimensions. */ private void checkDimension(DiagnosticPosition pos, Type t) { switch (t.getTag()) { case METHOD: checkDimension(pos, t.getReturnType()); for (List<Type> args = t.getParameterTypes(); args.nonEmpty(); args = args.tail) checkDimension(pos, args.head); break; case ARRAY: if (types.dimensions(t) > ClassFile.MAX_DIMENSIONS) { log.error(pos, "limit.dimensions"); nerrs++; } break; default: break; } }
/** Check if the given type is an array with too many dimensions. */ private void checkDimension(DiagnosticPosition pos, Type t) { switch (t.getTag()) { case METHOD: checkDimension(pos, t.getReturnType()); for (List<Type> args = t.getParameterTypes(); args.nonEmpty(); args = args.tail) checkDimension(pos, args.head); break; case ARRAY: if (types.dimensions(t) > ClassFile.MAX_DIMENSIONS) { log.error(pos, "limit.dimensions"); nerrs++; } break; default: break; } }
/** Insert a reference to given type in the constant pool, * checking for an array with too many dimensions; * return the reference's index. * @param type The type for which a reference is inserted. */ int makeRef(DiagnosticPosition pos, Type type) { checkDimension(pos, type); if (type.isAnnotated()) { // Treat annotated types separately - we don't want // to collapse all of them - at least for annotated // exceptions. // TODO: review this. return pool.put((Object)type); } else { return pool.put(type.hasTag(CLASS) ? (Object)type.tsym : (Object)type); } }
/** Insert a reference to given type in the constant pool, * checking for an array with too many dimensions; * return the reference's index. * @param type The type for which a reference is inserted. */ int makeRef(DiagnosticPosition pos, Type type) { checkDimension(pos, type); if (type.isAnnotated()) { // Treat annotated types separately - we don't want // to collapse all of them - at least for annotated // exceptions. // TODO: review this. return pool.put((Object)type); } else { return pool.put(type.hasTag(CLASS) ? (Object)type.tsym : (Object)type); } }
public void visitMethodDef(JCMethodDecl tree) { // Create a new local environment that points pack at method // definition. Env<GenContext> localEnv = env.dup(tree); localEnv.enclMethod = tree; // The expected type of every return statement in this method // is the method's return type. this.pt = tree.sym.erasure(types).getReturnType(); checkDimension(tree.pos(), tree.sym.erasure(types)); genMethod(tree, localEnv, false); } //where
public void visitMethodDef(JCMethodDecl tree) { // Create a new local environment that points pack at method // definition. Env<GenContext> localEnv = env.dup(tree); localEnv.enclMethod = tree; // The expected type of every return statement in this method // is the method's return type. this.pt = tree.sym.erasure(types).getReturnType(); checkDimension(tree.pos(), tree.sym.erasure(types)); genMethod(tree, localEnv, false); } //where
public void visitMethodDef(JCMethodDecl tree) { // Create a new local environment that points pack at method // definition. Env<GenContext> localEnv = env.dup(tree); localEnv.enclMethod = tree; // The expected type of every return statement in this method // is the method's return type. this.pt = tree.sym.erasure(types).getReturnType(); checkDimension(tree.pos(), tree.sym.erasure(types)); genMethod(tree, localEnv, false); } //where
public void visitMethodDef(JCMethodDecl tree) { // Create a new local environment that points pack at method // definition. Env<GenContext> localEnv = env.dup(tree); localEnv.enclMethod = tree; // The expected type of every return statement in this method // is the method's return type. this.pt = tree.sym.erasure(types).getReturnType(); checkDimension(tree.pos(), tree.sym.erasure(types)); genMethod(tree, localEnv, false); } //where
public void visitVarDef(JCVariableDecl tree) { VarSymbol v = tree.sym; code.newLocal(v); if (tree.init != null) { checkStringConstant(tree.init.pos(), v.getConstValue()); if (v.getConstValue() == null || varDebugInfo) { genExpr(tree.init, v.erasure(types)).load(); items.makeLocalItem(v).store(); } } checkDimension(tree.pos(), v.type); }
public void visitVarDef(JCVariableDecl tree) { VarSymbol v = tree.sym; code.newLocal(v); if (tree.init != null) { checkStringConstant(tree.init.pos(), v.getConstValue()); if (v.getConstValue() == null || varDebugInfo) { genExpr(tree.init, v.erasure(types)).load(); items.makeLocalItem(v).store(); } } checkDimension(tree.pos(), v.type); }
public void visitVarDef(JCVariableDecl tree) { VarSymbol v = tree.sym; code.newLocal(v); if (tree.init != null) { checkStringConstant(tree.init.pos(), v.getConstValue()); if (v.getConstValue() == null || varDebugInfo) { genExpr(tree.init, v.erasure(types)).load(); items.makeLocalItem(v).store(); } } checkDimension(tree.pos(), v.type); }
public void visitVarDef(JCVariableDecl tree) { VarSymbol v = tree.sym; code.newLocal(v); if (tree.init != null) { checkStringConstant(tree.init.pos(), v.getConstValue()); if (v.getConstValue() == null || varDebugInfo) { genExpr(tree.init, v.erasure(types)).load(); items.makeLocalItem(v).store(); } } checkDimension(tree.pos(), v.type); }
checkDimension(l.head.pos(), l.head.sym.type); code.setDefined(code.newLocal(l.head.sym));
checkDimension(l.head.pos(), l.head.sym.type); code.setDefined(code.newLocal(l.head.sym));
checkDimension(l.head.pos(), l.head.sym.type); code.setDefined(code.newLocal(l.head.sym));
checkDimension(l.head.pos(), l.head.sym.type); code.setDefined(code.newLocal(l.head.sym));