changeset 23293:a134baee9f15

Add CompilerDirectives#transferToInterpreter to catch block in NFI call method.
author Manuel Rigger <rigger.manuel@gmail.com>
date Tue, 12 Jan 2016 11:56:23 +0100
parents 1a1a163340e7
children 3c37032e8e63
files graal/com.oracle.graal.truffle.hotspot/src/com/oracle/graal/truffle/hotspot/nfi/HotSpotNativeFunctionHandle.java
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.truffle.hotspot/src/com/oracle/graal/truffle/hotspot/nfi/HotSpotNativeFunctionHandle.java	Mon Jan 11 20:19:25 2016 -0800
+++ b/graal/com.oracle.graal.truffle.hotspot/src/com/oracle/graal/truffle/hotspot/nfi/HotSpotNativeFunctionHandle.java	Tue Jan 12 11:56:23 2016 +0100
@@ -32,6 +32,7 @@
 import com.oracle.graal.debug.Debug;
 import com.oracle.graal.debug.Debug.Scope;
 import com.oracle.nfi.api.NativeFunctionHandle;
+import com.oracle.truffle.api.CompilerDirectives;
 
 public class HotSpotNativeFunctionHandle implements NativeFunctionHandle {
 
@@ -72,6 +73,7 @@
             traceResult(res);
             return res;
         } catch (InvalidInstalledCodeException e) {
+            CompilerDirectives.transferToInterpreter();
             throw JVMCIError.shouldNotReachHere("Execution of GNFI Callstub failed: " + name);
         }
     }