RE: [Ikvm-developers] RE: ikvm performance
Brought to you by:
jfrijters
|
From: Jeroen F. <je...@su...> - 2003-08-28 09:56:13
|
After fixing a bug in compiler.cs (in CastInterfaceArgs) having to do with unloadable classes, I was able to convert bcel and ant. During the conversion you get many warnings (missing classes and illegal access errors), but it does convert the code correctly. Here is what I did: ikvmc -out:bcel-5.1.dll -target:library -reference:\ikvm\bin\classpath.dll bcel-5.1\bcel-5.1.jar=20 ikvmc -out:apache-ant-1.5.4.dll -target:library -reference:\ikvm\bin\classpath.dll -reference:bcel-5.1.dll apache-ant-1.5.4\lib\*.jar Call me cynical, but I'm skeptical that this is (ever) going to work. I think you underestimate how much dynamic class loading is part of large Java applications/frameworks. Dynamic class loading doesn't mix well with the .NET assembly model. Regards, Jeroen > -----Original Message----- > From: Jonathan Pierce [mailto:jp...@ny...]=20 > Sent: Thursday, August 28, 2003 10:59 > To: Jeroen Frijters; 'ikvm list' > Subject: RE: [Ikvm-developers] RE: ikvm performance >=20 > Jeroen, >=20 > Jonathan Pierce wrote: > > 1. I noticed that when I run eclipse with ikvm, it starts up=20 > > very slowly. > > Obviously, it would be much faster if the jar files in the=20 > > classpath were precompiled with ikvmc. I also noticed that > > ikvm starter.cs just uses a URLClassLoader to dynamically > > load the types from the jars in the classpath. >=20 > >>A better (and easier) approach, is to manually > >>convert an application using ikvmc, but this may require=20 > source changes > >>(to Eclipse).=20 > I know it isn't easy to do, but it would be better if caching=20 > of converted > code was dynamically available to all applications instead of=20 > requiring all > users to manually convert each jar file to get the=20 > performance improvement. > This is also difficult to do sometimes because of the=20 > dependencies and the > fact that many jar files won't compile because of missing classes and > methods. You'll see what I mean when you try to convert the=20 > ant files below. >=20 > What do you think about adding support for the -usestubrefs=20 > option to ikvmc > like jbimp has to defer missing class errors until runtime? >=20 > >>I think this is already supposed to work. Do you have a=20 > repro or a link > >>to the ant jar that you're trying to compile? >=20 > It's the middle of the night for me, but I thought I'd give=20 > you something > else to work on. Some of the problems are related to swing methods in > jdialog not being declared public, others related to missing=20 > classes that > are not in classpath but are in the jdk1.2 runtime. I'll be=20 > very impressed > if you get the ant.jar 1.5.4 dist to compile with ikvmc. >=20 > The ant distribution is from the apache site, but I also had similar > problems converting some of the jar files included in the=20 > eclipse dist. > Converting the ant distribution will be a smaller task so it=20 > is better to > get that working first before attempting to get ikvmc to work with the > eclipse jars. >=20 > The ant and bcel links, and any other apache libs you may=20 > need are on the > apache site: >=20 > Here's the one for Ant 1.5.4: >=20 > Src: http://apache.secsup.org/dist/ant/source/apache-ant-1.5.4-src.zip > Binary:=20 > http://apache.webmeta.com/ant/binaries/apache-ant-1.5.4-bin.zip >=20 > And here is the BCEL code that it seems to use: > Binary: > http://jakarta.apache.org/builds/jakarta-bcel/release/v5.1/bce > l-5.1.zip >=20 > Source: > http://jakarta.apache.org/builds/jakarta-bcel/release/v5.1/bce > l-5.1-src.zip >=20 > I tried the following after also downloading bcel, but didn't=20 > get very far: > cd "C:\apache-ant-1.5.4\dist\lib\" > ikvmc ../../lib/xml-apis.jar -out:xml-apis.dll -target:library > -reference:c:\ikvm\bin\classpath.dll > ikvmc ../../lib/xercesImpl.jar -out:xercesImpl.dll -target:library > -reference:c:\ikvm\bin\classpath.dll -reference:xml-apis.dll > ikvmc ../../lib/bcel-5.1.jar -out:bcel-5.1.dll -target:library > -reference:c:\ikvm\bin\classpath.dll > ikvmc ant.jar optional.jar -out:ant.dll -target:library > -reference:c:\ikvm\bin\classpath.dll -reference:xml-apis.dll > -reference:xercesImpl.dll -reference:bcel-5.1.dll >=20 > Good Luck... >=20 > Jonathan >=20 >=20 >=20 |