-
Bug
-
Resolution: Won't Fix
-
P3
-
None
-
b82
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8142233 | emb-9 | Vicente Arturo Romero Zaldivar | P3 | Resolved | Fixed | team |
This code:
class ClassType<U> {
U fu;
ClassType() {}
ClassType(ClassType<U> other) {
this.fu = other.fu;
}
ClassType(U fu) {
this.fu = fu;
}
@Override
public String toString() {
return "ClassType: " + String.valueOf(fu);
}
}
public class Hang {
static <U> ClassType<U> m(ClassType<U> src) {
return new ClassType<U>(src);
}
public static void main(String argv[]) {
ClassType<Number> c = m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>())))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))));
String result = c.toString();
if (!result.equals("ClassType: null")) {
throw new Error();
}
}
}
Takes forever to be compiled. Main reason naive implementation of some incorporation steps. A huge speed-up can be obtained if some heavy operations like type substitution are not executed for those cases when they imply a no-op
class ClassType<U> {
U fu;
ClassType() {}
ClassType(ClassType<U> other) {
this.fu = other.fu;
}
ClassType(U fu) {
this.fu = fu;
}
@Override
public String toString() {
return "ClassType: " + String.valueOf(fu);
}
}
public class Hang {
static <U> ClassType<U> m(ClassType<U> src) {
return new ClassType<U>(src);
}
public static void main(String argv[]) {
ClassType<Number> c = m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>(m(new ClassType<>())))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))));
String result = c.toString();
if (!result.equals("ClassType: null")) {
throw new Error();
}
}
}
Takes forever to be compiled. Main reason naive implementation of some incorporation steps. A huge speed-up can be obtained if some heavy operations like type substitution are not executed for those cases when they imply a no-op
- backported by
-
JDK-8142233 javac does a naive implementation of some incorporation steps
- Resolved
- is blocked by
-
JDK-8051946 JEP 215: Tiered Attribution for javac
- Closed