diff options
author | jfrijters <jfrijters> | 2011-06-17 18:46:35 +0400 |
---|---|---|
committer | jfrijters <jfrijters> | 2011-06-17 18:46:35 +0400 |
commit | f5c6a874a0283e2f0946a6d2b5ea0caf1af194a3 (patch) | |
tree | 2966a6d6a79eda0d5f80df4d015b94d3fcf1712a | |
parent | 71230ea4651385d053b92952b17bc40e82b2af39 (diff) |
Use some map.xml magic to create a no-op constructor that will allow the number of source differences to be reduced while maintaining the optimized nature of the DUMMY instance.
-rw-r--r-- | openjdk/java/lang/ClassLoader.java | 5 | ||||
-rw-r--r-- | openjdk/map.xml | 7 |
2 files changed, 11 insertions, 1 deletions
diff --git a/openjdk/java/lang/ClassLoader.java b/openjdk/java/lang/ClassLoader.java index 63d1924a..a33d2384 100644 --- a/openjdk/java/lang/ClassLoader.java +++ b/openjdk/java/lang/ClassLoader.java @@ -192,8 +192,11 @@ public abstract class ClassLoader { @ikvm.lang.Internal public static final ClassLoader DUMMY = new ClassLoader(false) { }; - private ClassLoader(boolean ignored) + ClassLoader(boolean ignored) { + // [IKVM] This constructor is IKVM specific and only used to construct DUMMY. + // Note that this body is replaced in map.xml with an empty body as + // we don't want to execute any of the instance field initializers. } /** diff --git a/openjdk/map.xml b/openjdk/map.xml index 0ce4f42d..6a878eea 100644 --- a/openjdk/map.xml +++ b/openjdk/map.xml @@ -1369,6 +1369,13 @@ <field name="wrapper" sig="Lcli.IKVM.Internal.ClassLoaderWrapper;" modifiers=""> <attribute type="IKVM.Attributes.HideFromJavaAttribute" sig="()V" /> </field> + <constructor sig="(Z)V"> + <body> + <ldarg_0 /> + <call class="java.lang.Object" name="<init>" sig="()V" /> + <ret /> + </body> + </constructor> <method name="getBootstrapResource" sig="(Ljava.lang.String;)Ljava.net.URL;"> <body> <ldarg_0 /> |