diff options
author | jfrijters <jfrijters> | 2010-05-27 13:17:56 +0400 |
---|---|---|
committer | jfrijters <jfrijters> | 2010-05-27 13:17:56 +0400 |
commit | 195f6ce2c6aab6b6c4a7b6528f0ee20750716295 (patch) | |
tree | 8d128d4d9011ea66aa8daf54db0392f1e9a4605b | |
parent | 36a5e0ce641f8caeb6afee943ce5814a3f1f8759 (diff) |
First step of moving all exception handling code to C#.
-rw-r--r-- | classpath/java/lang/ExceptionHelper.java | 9 | ||||
-rw-r--r-- | openjdk/map.xml | 2 | ||||
-rw-r--r-- | runtime/ExceptionHelper.cs | 16 |
3 files changed, 16 insertions, 11 deletions
diff --git a/classpath/java/lang/ExceptionHelper.java b/classpath/java/lang/ExceptionHelper.java index c3fd5900..1b548bfe 100644 --- a/classpath/java/lang/ExceptionHelper.java +++ b/classpath/java/lang/ExceptionHelper.java @@ -594,15 +594,6 @@ public final class ExceptionHelper return type.IsInstanceOfType(t); } - static ObjectStreamField[] getPersistentFields() - { - return new ObjectStreamField[] { - new ObjectStreamField("detailMessage", String.class), - new ObjectStreamField("cause", Throwable.class), - new ObjectStreamField("stackTrace", StackTraceElement[].class) - }; - } - static void writeObject(Throwable t, ObjectOutputStream s) throws IOException { synchronized (t) diff --git a/openjdk/map.xml b/openjdk/map.xml index 3b0c6b8d..077bce41 100644 --- a/openjdk/map.xml +++ b/openjdk/map.xml @@ -918,7 +918,7 @@ <field name="tracePart2" sig="Lcli.System.Diagnostics.StackTrace;" /> <clinit> <body> - <call class="java.lang.ExceptionHelper" name="getPersistentFields" sig="()[Ljava.io.ObjectStreamField;" /> + <call type="IKVM.NativeCode.java.lang.ExceptionHelper" name="getPersistentFields" sig="()[Ljava.io.ObjectStreamField;" /> <stsfld class="java.lang.Throwable" name="serialPersistentFields" sig="[Ljava.io.ObjectStreamField;" /> <ldc_i4_0 /> <newarr sig="Ljava.lang.StackTraceElement;" /> diff --git a/runtime/ExceptionHelper.cs b/runtime/ExceptionHelper.cs index fb042649..60d1b724 100644 --- a/runtime/ExceptionHelper.cs +++ b/runtime/ExceptionHelper.cs @@ -1,5 +1,5 @@ /* - Copyright (C) 2002, 2004, 2005, 2006, 2007 Jeroen Frijters + Copyright (C) 2002, 2004-2007, 2010 Jeroen Frijters This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -160,5 +160,19 @@ namespace IKVM.NativeCode.java.lang { return o.GetType(); } + + // called from map.xml + internal static global::java.io.ObjectStreamField[] getPersistentFields() + { +#if FIRST_PASS + return null; +#else + return new global::java.io.ObjectStreamField[] { + new global::java.io.ObjectStreamField("detailMessage", typeof(global::java.lang.String)), + new global::java.io.ObjectStreamField("cause", typeof(global::java.lang.Throwable)), + new global::java.io.ObjectStreamField("stackTrace", typeof(global::java.lang.StackTraceElement[])) + }; +#endif + } } } |