RE: [Ikvm-developers] RE: ikvm performance
Brought to you by:
jfrijters
|
From: Jonathan P. <jp...@ny...> - 2003-08-28 11:34:52
|
I meant to say: ikvmc should always finish the compilation
Jonathan
-----Original Message-----
From: Jonathan Pierce [mailto:jp...@ny...]
Sent: Thursday, August 28, 2003 7:28 AM
To: 'Jonathan Pierce'; 'Jeroen Frijters'; 'ikvm list'
Subject: RE: [Ikvm-developers] RE: ikvm performance
Jeroen,
I looked at the generated assembly and answered some of my own questions.
In general, if the compilation generates code that always fails at runtime,
then ikvmc should consider it an error, but if the runtime can recover
dynamically, then ikvmc should consider it a warning. Either way, ikvmc
should not finish the compilation, but the assembly in the case of an error,
the assembly would need to be recompiled if any of the ikvmc generated
errors got resolved by changes in other assemblies.
I see how ClassNotFound issues during ikvmc compile time can be treated as a
WARNING since they can recover the missing class at runtime using
ByteCodeHelper.DynamicInvokevirtual
The missing method errors and illegal access errors should be considered
errors by ikvmc since the resulting code in the current implementation can't
recover at runtime unless this assembly is recompiled, even if the missing
methods or access errors are resolved by recompiling the external assembly
that defines the referenced class.
For missing methods, you call:
ExceptionHelper.ThrowHack(new NoSuchMethodError("javax.swing.JDialog.()V"));
It would be better if you could generate code that could recover at runtime
for methods that are no longer missing in dynamically referenced assemblies
or assemblies that were changed since ikvmc was run on this assembly.
For access errors, you generate code like:
ExceptionHelper.ThrowHack(new IllegalAccessError("Try to access method
javax.swing.JMenuBar.()V from class
org.apache.bcel.verifier.VerifierAppFrame"));
This code also doesn't recover at runtime. It would be better if you could
find a way to generate code that checks the access at runtime again and
calls the method dynamically if it is now accessible.
Jonathan
|