Java: fix Array_3 byte compiler failures
Per Bothner
per@bothner.com
Thu Sep 26 12:20:00 GMT 2002
Andrew Haley wrote:
> How could it be otherwise? aconst_null doesn't push an array type.
At the source-code level, it has to be converted to an array type,
before you can use it.
However, I tried a more direct example:
int baz()
{
Object[] x = null;
return x.length;
}
This generates:
0: aconst_null
1: astore_1
2: aload_1
3: arraylength
4: ireturn
So in this case at least case the bytecode has to handle
null_pointer_node.
I withdraw my objection.
--
--Per Bothner
per@bothner.com http://www.bothner.com/per/
More information about the Java
mailing list