-
Bug
-
Resolution: Fixed
-
P4
-
1.3.0
-
merlin
-
x86
-
windows_nt, windows_2000
-
Verified
Name: tb29552 Date: 07/04/2000
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
I was tinkering, and discovered the following:
*** SOURCE CODE ***
package cwhitmer.test;
public class Tester {
public static void main( String[] args ) {
Tester.class = null;
}
}
** STEPS **
Compile the above code, and you get the following InternalError:
An exception has occurred in the compiler (1.3.0). Please file a bug at the Java
Developer Connection (http://java.sun.com/cgi-bin/bugreport.cgi). Include your
program and the following diagnostic in your report. Thank you.
java.lang.InternalError: store unsupported: com.sun.tools.javac.v8.comp.Items$St
ackItem@12f614
at com.sun.tools.javac.v8.comp.Items$Item.store(Items.java:192)
at com.sun.tools.javac.v8.comp.Items$AssignItem.drop(Items.java:704)
at com.sun.tools.javac.v8.comp.Gen._case(Gen.java:873)
at com.sun.tools.javac.v8.tree.Tree$Exec.visit(Tree.java:699)
at com.sun.tools.javac.v8.comp.Gen.genDef(Gen.java:375)
at com.sun.tools.javac.v8.comp.Gen.genStat(Gen.java:392)
at com.sun.tools.javac.v8.comp.Gen.genStats(Gen.java:401)
at com.sun.tools.javac.v8.comp.Gen._case(Gen.java:507)
at com.sun.tools.javac.v8.tree.Tree$Block.visit(Tree.java:492)
at com.sun.tools.javac.v8.comp.Gen.genDef(Gen.java:375)
at com.sun.tools.javac.v8.comp.Gen.genStat(Gen.java:392)
at com.sun.tools.javac.v8.comp.Gen.genMethod(Gen.java:477)
at com.sun.tools.javac.v8.comp.Gen._case(Gen.java:452)
at com.sun.tools.javac.v8.tree.Tree$MethodDef.visit(Tree.java:441)
at com.sun.tools.javac.v8.comp.Gen.genDef(Gen.java:375)
at com.sun.tools.javac.v8.comp.Gen.genClass(Gen.java:1366)
at com.sun.tools.javac.v8.JavaCompiler.genCode(JavaCompiler.java:302)
at com.sun.tools.javac.v8.JavaCompiler.compile(JavaCompiler.java:407)
at com.sun.tools.javac.v8.Main.compile(Main.java:247)
at com.sun.tools.javac.Main.main(Main.java:16)
This is better than actually *allowing* the assignment, but shouldn't it be
handled more cleanly?
(Review ID: 106813)
======================================================================
Name: rmT116609 Date: 10/31/2000
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
class A
{
void b() { A.class = null; }
}
An exception has occurred in the compiler (1.3.0). Please file a bug at the Java
Developer Connection (http://java.sun.com/cgi-bin/bugreport.cgi). Include your
program and the following diagnostic in your report. Thank you.
java.lang.InternalError: store unsupported: com.sun.tools.javac.v8.comp.Items$St
ackItem@1503a3
at com.sun.tools.javac.v8.comp.Items$Item.store(Items.java:192)
at com.sun.tools.javac.v8.comp.Items$AssignItem.drop(Items.java:704)
at com.sun.tools.javac.v8.comp.Gen._case(Gen.java:873)
at com.sun.tools.javac.v8.tree.Tree$Exec.visit(Tree.java:699)
at com.sun.tools.javac.v8.comp.Gen.genDef(Gen.java:375)
at com.sun.tools.javac.v8.comp.Gen.genStat(Gen.java:392)
at com.sun.tools.javac.v8.comp.Gen.genStats(Gen.java:401)
at com.sun.tools.javac.v8.comp.Gen._case(Gen.java:507)
at com.sun.tools.javac.v8.tree.Tree$Block.visit(Tree.java:492)
at com.sun.tools.javac.v8.comp.Gen.genDef(Gen.java:375)
at com.sun.tools.javac.v8.comp.Gen.genStat(Gen.java:392)
at com.sun.tools.javac.v8.comp.Gen.genMethod(Gen.java:477)
at com.sun.tools.javac.v8.comp.Gen._case(Gen.java:452)
at com.sun.tools.javac.v8.tree.Tree$MethodDef.visit(Tree.java:441)
at com.sun.tools.javac.v8.comp.Gen.genDef(Gen.java:375)
at com.sun.tools.javac.v8.comp.Gen.genClass(Gen.java:1366)
at com.sun.tools.javac.v8.JavaCompiler.genCode(JavaCompiler.java:302)
at com.sun.tools.javac.v8.JavaCompiler.compile(JavaCompiler.java:407)
at com.sun.tools.javac.v8.Main.compile(Main.java:247)
at com.sun.tools.javac.Main.main(Main.java:16)
I understand that 'this' is a value, so it is '.class'. But it would be VERY
nice for 'this' and '.class' to be variables... It will introduce unprecedented
dynamics to the application..
Anyway, the access to object's _vtable at run-time would be nice;
currently one should use additional level of indirection to change the
functionality at runtime :-(
E.g a client has a reference to interface/abstract class, and we want to
replace the concrete class being referenced at runtime without touching this
reference...
(Review ID: 111625)
======================================================================
Name: tb29552 Date: 01/26/2001
C:\jdk1.3\demo\jfc\TableExample\src>java -version
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
program(part):
Integer m= new Integer(5);
Integer n= new Integer(999);
m.class = n.class;
Error:
D:\liu\GraphicJava2\19\18>javac Test.java
An exception has occurred in the compiler (1.3.0). Please file a bug at the
Java Developer Connection (ht
tp://java.sun.com/cgi-bin/bugreport.cgi). Include your program and the
following diagnostic in your repo
rt. Thank you.
java.lang.InternalError: store unsupported:
com.sun.tools.javac.v8.comp.Items$StackItem@ecd7e
at com.sun.tools.javac.v8.comp.Items$Item.store(Items.java:192)
at com.sun.tools.javac.v8.comp.Items$AssignItem.drop(Items.java:704)
at com.sun.tools.javac.v8.comp.Gen._case(Gen.java:873)
at com.sun.tools.javac.v8.tree.Tree$Exec.visit(Tree.java:699)
at com.sun.tools.javac.v8.comp.Gen.genDef(Gen.java:375)
at com.sun.tools.javac.v8.comp.Gen.genStat(Gen.java:392)
at com.sun.tools.javac.v8.comp.Gen.genStats(Gen.java:401)
at com.sun.tools.javac.v8.comp.Gen._case(Gen.java:507)
at com.sun.tools.javac.v8.tree.Tree$Block.visit(Tree.java:492)
at com.sun.tools.javac.v8.comp.Gen.genDef(Gen.java:375)
at com.sun.tools.javac.v8.comp.Gen.genStat(Gen.java:392)
at com.sun.tools.javac.v8.comp.Gen.genMethod(Gen.java:477)
at com.sun.tools.javac.v8.comp.Gen._case(Gen.java:452)
at com.sun.tools.javac.v8.tree.Tree$MethodDef.visit(Tree.java:441)
at com.sun.tools.javac.v8.comp.Gen.genDef(Gen.java:375)
at com.sun.tools.javac.v8.comp.Gen.genClass(Gen.java:1366)
at com.sun.tools.javac.v8.JavaCompiler.genCode(JavaCompiler.java:302)
at com.sun.tools.javac.v8.JavaCompiler.compile(JavaCompiler.java:407)
at com.sun.tools.javac.v8.Main.compile(Main.java:247)
at com.sun.tools.javac.Main.main(Main.java:16)
(Review ID: 115862)
======================================================================