diff options
author | jfrijters <jfrijters> | 2004-12-03 10:57:15 +0300 |
---|---|---|
committer | jfrijters <jfrijters> | 2004-12-03 10:57:15 +0300 |
commit | 85d29db687aea6efcf6c8bae8e6e61a2486d6414 (patch) | |
tree | 3d6a269f6d958a1f06700edb153785982bbe5e8b | |
parent | 8508aceed4d552cd72868da435edcb0abe0a7962 (diff) |
*** empty log message ***
-rw-r--r-- | jvm/jvm.build | 4 | ||||
-rw-r--r-- | runtime/ClassLoaderWrapper.cs | 27 |
2 files changed, 21 insertions, 10 deletions
diff --git a/jvm/jvm.build b/jvm/jvm.build index 7e5b743a..dd76d9b7 100644 --- a/jvm/jvm.build +++ b/jvm/jvm.build @@ -1,8 +1,8 @@ <?xml version="1.0"?> <project name="JVM" default="JVM"> <target name="JVM"> - <exec program="../tools/asmref" useruntimeengine="true" commandline="mscorlib" output="jvm_h1.il" /> - <exec program="../tools/asmref" useruntimeengine="true" commandline="../bin/IKVM.Runtime.dll" output="jvm_h2.il" /> + <exec program="../tools/asmref.exe" useruntimeengine="true" commandline="mscorlib" output="jvm_h1.il" /> + <exec program="../tools/asmref.exe" useruntimeengine="true" commandline="../bin/IKVM.Runtime.dll" output="jvm_h2.il" /> <exec program="ilasm" commandline="/dll /out:../bin/JVM.DLL jvm_h1.il jvm_h2.il JVM.il" /> </target> </project> diff --git a/runtime/ClassLoaderWrapper.cs b/runtime/ClassLoaderWrapper.cs index 680923b1..f9bb0b45 100644 --- a/runtime/ClassLoaderWrapper.cs +++ b/runtime/ClassLoaderWrapper.cs @@ -238,17 +238,28 @@ class ClassLoaderWrapper { dims++; } - switch(name[dims]) + if(name[dims] == 'L') { - case 'L': + if(!name.EndsWith(";") || name.Length <= dims + 2 || name[dims + 1] == '[') { - type = LoadClassByDottedNameFast(name.Substring(dims + 1, name.IndexOf(';', dims) - dims - 1)); - if(type != null) - { - type = type.GetClassLoader().CreateArrayType(name, type.TypeAsArrayType, dims); - } - return type; + // malformed class name + return null; } + string elemClass = name.Substring(dims + 1, name.Length - dims - 2); + type = LoadClassByDottedNameFast(elemClass); + if(type != null) + { + type = type.GetClassLoader().CreateArrayType(name, type.TypeAsArrayType, dims); + } + return type; + } + if(name.Length != dims + 1) + { + // malformed class name + return null; + } + switch(name[dims]) + { case 'B': return GetBootstrapClassLoader().CreateArrayType(name, PrimitiveTypeWrapper.BYTE.TypeAsArrayType, dims); case 'C': |