Skip to content
Snippets Groups Projects
Commit eaa6a499 authored by Mick Jordan's avatar Mick Jordan
Browse files

Truffle NFI: fix tracing return values

parent f24783f1
Branches
No related tags found
No related merge requests found
...@@ -238,7 +238,8 @@ public class TruffleNFI_Call implements CallRFFI { ...@@ -238,7 +238,8 @@ public class TruffleNFI_Call implements CallRFFI {
try { try {
TruffleObject callFunction = (TruffleObject) ForeignAccess.sendInvoke(bindNode, TruffleObject callFunction = (TruffleObject) ForeignAccess.sendInvoke(bindNode,
nativeCallInfo.address.asTruffleObject(), "bind", "(): object"); nativeCallInfo.address.asTruffleObject(), "bind", "(): object");
return ForeignAccess.sendExecute(executeNode, callFunction); result = ForeignAccess.sendExecute(executeNode, callFunction);
return result;
} catch (InteropException ex) { } catch (InteropException ex) {
throw RInternalError.shouldNotReachHere(ex); throw RInternalError.shouldNotReachHere(ex);
} finally { } finally {
...@@ -256,7 +257,8 @@ public class TruffleNFI_Call implements CallRFFI { ...@@ -256,7 +257,8 @@ public class TruffleNFI_Call implements CallRFFI {
try { try {
TruffleObject callFunction = (TruffleObject) ForeignAccess.sendInvoke(bindNode, TruffleObject callFunction = (TruffleObject) ForeignAccess.sendInvoke(bindNode,
nativeCallInfo.address.asTruffleObject(), "bind", "(object): object"); nativeCallInfo.address.asTruffleObject(), "bind", "(object): object");
return ForeignAccess.sendExecute(executeNode, callFunction, JavaInterop.asTruffleObject(args[0])); result = ForeignAccess.sendExecute(executeNode, callFunction, JavaInterop.asTruffleObject(args[0]));
return result;
} catch (InteropException ex) { } catch (InteropException ex) {
throw RInternalError.shouldNotReachHere(ex); throw RInternalError.shouldNotReachHere(ex);
} finally { } finally {
...@@ -274,7 +276,8 @@ public class TruffleNFI_Call implements CallRFFI { ...@@ -274,7 +276,8 @@ public class TruffleNFI_Call implements CallRFFI {
try { try {
TruffleObject callFunction = (TruffleObject) ForeignAccess.sendInvoke(bindNode, TruffleObject callFunction = (TruffleObject) ForeignAccess.sendInvoke(bindNode,
nativeCallInfo.address.asTruffleObject(), "bind", "(object, object): object"); nativeCallInfo.address.asTruffleObject(), "bind", "(object, object): object");
return ForeignAccess.sendExecute(executeNode, callFunction, JavaInterop.asTruffleObject(args[0]), JavaInterop.asTruffleObject(args[1])); result = ForeignAccess.sendExecute(executeNode, callFunction, JavaInterop.asTruffleObject(args[0]), JavaInterop.asTruffleObject(args[1]));
return result;
} catch (InteropException ex) { } catch (InteropException ex) {
throw RInternalError.shouldNotReachHere(ex); throw RInternalError.shouldNotReachHere(ex);
} finally { } finally {
...@@ -292,7 +295,8 @@ public class TruffleNFI_Call implements CallRFFI { ...@@ -292,7 +295,8 @@ public class TruffleNFI_Call implements CallRFFI {
try { try {
TruffleObject callFunction = (TruffleObject) ForeignAccess.sendInvoke(bindNode, TruffleObject callFunction = (TruffleObject) ForeignAccess.sendInvoke(bindNode,
nativeCallInfo.address.asTruffleObject(), "bind", "(object, object, object): object"); nativeCallInfo.address.asTruffleObject(), "bind", "(object, object, object): object");
return ForeignAccess.sendExecute(executeNode, callFunction, JavaInterop.asTruffleObject(args[0]), JavaInterop.asTruffleObject(args[1]), JavaInterop.asTruffleObject(args[2])); result = ForeignAccess.sendExecute(executeNode, callFunction, JavaInterop.asTruffleObject(args[0]), JavaInterop.asTruffleObject(args[1]), JavaInterop.asTruffleObject(args[2]));
return result;
} catch (InteropException ex) { } catch (InteropException ex) {
throw RInternalError.shouldNotReachHere(ex); throw RInternalError.shouldNotReachHere(ex);
} finally { } finally {
...@@ -310,8 +314,9 @@ public class TruffleNFI_Call implements CallRFFI { ...@@ -310,8 +314,9 @@ public class TruffleNFI_Call implements CallRFFI {
try { try {
TruffleObject callFunction = (TruffleObject) ForeignAccess.sendInvoke(bindNode, TruffleObject callFunction = (TruffleObject) ForeignAccess.sendInvoke(bindNode,
nativeCallInfo.address.asTruffleObject(), "bind", "(object, object, object, object): object"); nativeCallInfo.address.asTruffleObject(), "bind", "(object, object, object, object): object");
return ForeignAccess.sendExecute(executeNode, callFunction, JavaInterop.asTruffleObject(args[0]), JavaInterop.asTruffleObject(args[1]), JavaInterop.asTruffleObject(args[2]), result = ForeignAccess.sendExecute(executeNode, callFunction, JavaInterop.asTruffleObject(args[0]), JavaInterop.asTruffleObject(args[1]), JavaInterop.asTruffleObject(args[2]),
JavaInterop.asTruffleObject(args[3])); JavaInterop.asTruffleObject(args[3]));
return result;
} catch (InteropException ex) { } catch (InteropException ex) {
throw RInternalError.shouldNotReachHere(ex); throw RInternalError.shouldNotReachHere(ex);
} finally { } finally {
...@@ -329,8 +334,9 @@ public class TruffleNFI_Call implements CallRFFI { ...@@ -329,8 +334,9 @@ public class TruffleNFI_Call implements CallRFFI {
try { try {
TruffleObject callFunction = (TruffleObject) ForeignAccess.sendInvoke(bindNode, TruffleObject callFunction = (TruffleObject) ForeignAccess.sendInvoke(bindNode,
nativeCallInfo.address.asTruffleObject(), "bind", "(object, object, object, object, object): object"); nativeCallInfo.address.asTruffleObject(), "bind", "(object, object, object, object, object): object");
return ForeignAccess.sendExecute(executeNode, callFunction, JavaInterop.asTruffleObject(args[0]), JavaInterop.asTruffleObject(args[1]), result = ForeignAccess.sendExecute(executeNode, callFunction, JavaInterop.asTruffleObject(args[0]), JavaInterop.asTruffleObject(args[1]),
JavaInterop.asTruffleObject(args[2]), JavaInterop.asTruffleObject(args[3]), JavaInterop.asTruffleObject(args[4])); JavaInterop.asTruffleObject(args[2]), JavaInterop.asTruffleObject(args[3]), JavaInterop.asTruffleObject(args[4]));
return result;
} catch (InteropException ex) { } catch (InteropException ex) {
throw RInternalError.shouldNotReachHere(ex); throw RInternalError.shouldNotReachHere(ex);
} finally { } finally {
...@@ -348,8 +354,9 @@ public class TruffleNFI_Call implements CallRFFI { ...@@ -348,8 +354,9 @@ public class TruffleNFI_Call implements CallRFFI {
try { try {
TruffleObject callFunction = (TruffleObject) ForeignAccess.sendInvoke(bindNode, TruffleObject callFunction = (TruffleObject) ForeignAccess.sendInvoke(bindNode,
nativeCallInfo.address.asTruffleObject(), "bind", "(object, object, object, object, object, object): object"); nativeCallInfo.address.asTruffleObject(), "bind", "(object, object, object, object, object, object): object");
return ForeignAccess.sendExecute(executeNode, callFunction, JavaInterop.asTruffleObject(args[0]), JavaInterop.asTruffleObject(args[1]), result = ForeignAccess.sendExecute(executeNode, callFunction, JavaInterop.asTruffleObject(args[0]), JavaInterop.asTruffleObject(args[1]),
JavaInterop.asTruffleObject(args[2]), JavaInterop.asTruffleObject(args[3]), JavaInterop.asTruffleObject(args[4]), JavaInterop.asTruffleObject(args[5])); JavaInterop.asTruffleObject(args[2]), JavaInterop.asTruffleObject(args[3]), JavaInterop.asTruffleObject(args[4]), JavaInterop.asTruffleObject(args[5]));
return result;
} catch (InteropException ex) { } catch (InteropException ex) {
throw RInternalError.shouldNotReachHere(ex); throw RInternalError.shouldNotReachHere(ex);
} finally { } finally {
...@@ -367,9 +374,10 @@ public class TruffleNFI_Call implements CallRFFI { ...@@ -367,9 +374,10 @@ public class TruffleNFI_Call implements CallRFFI {
try { try {
TruffleObject callFunction = (TruffleObject) ForeignAccess.sendInvoke(bindNode, TruffleObject callFunction = (TruffleObject) ForeignAccess.sendInvoke(bindNode,
nativeCallInfo.address.asTruffleObject(), "bind", "(object, object, object, object, object, object, object): object"); nativeCallInfo.address.asTruffleObject(), "bind", "(object, object, object, object, object, object, object): object");
return ForeignAccess.sendExecute(executeNode, callFunction, JavaInterop.asTruffleObject(args[0]), JavaInterop.asTruffleObject(args[1]), result = ForeignAccess.sendExecute(executeNode, callFunction, JavaInterop.asTruffleObject(args[0]), JavaInterop.asTruffleObject(args[1]),
JavaInterop.asTruffleObject(args[2]), JavaInterop.asTruffleObject(args[3]), JavaInterop.asTruffleObject(args[4]), JavaInterop.asTruffleObject(args[5]), JavaInterop.asTruffleObject(args[2]), JavaInterop.asTruffleObject(args[3]), JavaInterop.asTruffleObject(args[4]), JavaInterop.asTruffleObject(args[5]),
JavaInterop.asTruffleObject(args[6])); JavaInterop.asTruffleObject(args[6]));
return result;
} catch (InteropException ex) { } catch (InteropException ex) {
throw RInternalError.shouldNotReachHere(ex); throw RInternalError.shouldNotReachHere(ex);
} finally { } finally {
...@@ -387,9 +395,10 @@ public class TruffleNFI_Call implements CallRFFI { ...@@ -387,9 +395,10 @@ public class TruffleNFI_Call implements CallRFFI {
try { try {
TruffleObject callFunction = (TruffleObject) ForeignAccess.sendInvoke(bindNode, TruffleObject callFunction = (TruffleObject) ForeignAccess.sendInvoke(bindNode,
nativeCallInfo.address.asTruffleObject(), "bind", "(object, object, object, object, object, object, object, object): object"); nativeCallInfo.address.asTruffleObject(), "bind", "(object, object, object, object, object, object, object, object): object");
return ForeignAccess.sendExecute(executeNode, callFunction, JavaInterop.asTruffleObject(args[0]), JavaInterop.asTruffleObject(args[1]), result = ForeignAccess.sendExecute(executeNode, callFunction, JavaInterop.asTruffleObject(args[0]), JavaInterop.asTruffleObject(args[1]),
JavaInterop.asTruffleObject(args[2]), JavaInterop.asTruffleObject(args[3]), JavaInterop.asTruffleObject(args[4]), JavaInterop.asTruffleObject(args[5]), JavaInterop.asTruffleObject(args[2]), JavaInterop.asTruffleObject(args[3]), JavaInterop.asTruffleObject(args[4]), JavaInterop.asTruffleObject(args[5]),
JavaInterop.asTruffleObject(args[6]), JavaInterop.asTruffleObject(args[7])); JavaInterop.asTruffleObject(args[6]), JavaInterop.asTruffleObject(args[7]));
return result;
} catch (InteropException ex) { } catch (InteropException ex) {
throw RInternalError.shouldNotReachHere(ex); throw RInternalError.shouldNotReachHere(ex);
} finally { } finally {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment