diff options
author | jfrijters <jfrijters> | 2015-05-31 14:03:28 +0300 |
---|---|---|
committer | jfrijters <jfrijters> | 2015-05-31 14:03:28 +0300 |
commit | 3cecb628c94c9b5d7a7e3476fcac80695b73ac17 (patch) | |
tree | 734e5630f08a26bb636b678abd00fc1b05629de9 /runtime/openjdk/java.lang.invoke.cs | |
parent | d58046e07129a714fb79573b490859d6484b05a7 (diff) |
Partial fix for Object.clone/finalize invocation via MethodHandle. Open issues:
- Object.clone/finalize can't be called on Throwable or cli.System.Object derived objects
- Throwable.clone/finalize can't be called on cli.System.Exception derived objects
Diffstat (limited to 'runtime/openjdk/java.lang.invoke.cs')
-rw-r--r-- | runtime/openjdk/java.lang.invoke.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/openjdk/java.lang.invoke.cs b/runtime/openjdk/java.lang.invoke.cs index b8b64967..2f760ee4 100644 --- a/runtime/openjdk/java.lang.invoke.cs +++ b/runtime/openjdk/java.lang.invoke.cs @@ -905,6 +905,11 @@ static partial class MethodHandleUtil { dm.EmitCastclass(tw.TypeAsBaseType); } + else if (mw.IsProtected && (mw.DeclaringType == CoreClasses.java.lang.Object.Wrapper || mw.DeclaringType == CoreClasses.java.lang.Throwable.Wrapper)) + { + // HACK we don't support calling clone or finalize on cli.System.Object and cli.System.Exception + dm.EmitCastclass(tw.TypeAsBaseType); + } else if (tw != CoreClasses.cli.System.Object.Wrapper) { dm.EmitCheckcast(tw); |