From 66d91308d3dc73325a350053b3f8d4eddf6afee5 Mon Sep 17 00:00:00 2001 From: Arthur Peters Date: Tue, 10 Oct 2017 14:19:01 -0500 Subject: [PATCH] PorcE: Add TODOs for issue #216. --- PorcE/src/orc/run/porce/GetField.java | 1 + PorcE/src/orc/run/porce/call/ExternalCPSDispatch.java | 4 ++++ PorcE/src/orc/run/porce/call/ExternalDirectDispatch.java | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/PorcE/src/orc/run/porce/GetField.java b/PorcE/src/orc/run/porce/GetField.java index 87cc74ac3..abda3a681 100644 --- a/PorcE/src/orc/run/porce/GetField.java +++ b/PorcE/src/orc/run/porce/GetField.java @@ -41,6 +41,7 @@ public Object slowPath(final Object obj) { return accessWithBoundary(accessor, obj); } catch (final Exception e) { CompilerDirectives.transferToInterpreter(); + // TODO: Wrap exception to include Orc stack information. This will mean wrapping this in JavaException if needed and calling setBacktrace execution.get().notifyOrcWithBoundary(new CaughtEvent(e)); throw HaltException.SINGLETON(); } diff --git a/PorcE/src/orc/run/porce/call/ExternalCPSDispatch.java b/PorcE/src/orc/run/porce/call/ExternalCPSDispatch.java index e2633a65c..39a6bc329 100644 --- a/PorcE/src/orc/run/porce/call/ExternalCPSDispatch.java +++ b/PorcE/src/orc/run/porce/call/ExternalCPSDispatch.java @@ -82,6 +82,7 @@ public void specificDirect(final VirtualFrame frame, final Object target, final throw e; } catch (final ExceptionHaltException e) { exceptionProfiles[0].enter(); + // TODO: Wrap exception to include Orc stack information. This will mean wrapping this in JavaException if needed and calling setBacktrace execution.get().notifyOrcWithBoundary(new CaughtEvent(e.getCause())); counter.haltToken(); } catch (final HaltException e) { @@ -89,6 +90,7 @@ public void specificDirect(final VirtualFrame frame, final Object target, final counter.haltToken(); } catch (final Exception e) { exceptionProfiles[2].enter(); + // TODO: Wrap exception to include Orc stack information. This will mean wrapping this in JavaException if needed and calling setBacktrace execution.get().notifyOrcWithBoundary(new CaughtEvent(e)); counter.haltToken(); } @@ -116,6 +118,7 @@ public void specific(final VirtualFrame frame, final Object target, final Object throw e; } catch (final ExceptionHaltException e) { exceptionProfiles[0].enter(); + // TODO: Wrap exception to include Orc stack information. This will mean wrapping this in JavaException if needed and calling setBacktrace execution.get().notifyOrcWithBoundary(new CaughtEvent(e.getCause())); counter.haltToken(); } catch (final HaltException e) { @@ -123,6 +126,7 @@ public void specific(final VirtualFrame frame, final Object target, final Object counter.haltToken(); } catch (final Exception e) { exceptionProfiles[2].enter(); + // TODO: Wrap exception to include Orc stack information. This will mean wrapping this in JavaException if needed and calling setBacktrace execution.get().notifyOrcWithBoundary(new CaughtEvent(e)); counter.haltToken(); } diff --git a/PorcE/src/orc/run/porce/call/ExternalDirectDispatch.java b/PorcE/src/orc/run/porce/call/ExternalDirectDispatch.java index ebfb87c0b..d010378eb 100644 --- a/PorcE/src/orc/run/porce/call/ExternalDirectDispatch.java +++ b/PorcE/src/orc/run/porce/call/ExternalDirectDispatch.java @@ -39,6 +39,7 @@ public Object specific(final VirtualFrame frame, final Object target, final Obje return invokeDirectWithBoundary(invoker, target, arguments); } catch (final ExceptionHaltException e) { exceptionProfiles[0].enter(); + // TODO: Wrap exception to include Orc stack information. This will mean wrapping this in JavaException if needed and calling setBacktrace execution.get().notifyOrcWithBoundary(new CaughtEvent(e.getCause())); throw HaltException.SINGLETON(); } catch (final HaltException e) { @@ -46,6 +47,7 @@ public Object specific(final VirtualFrame frame, final Object target, final Obje throw e; } catch (final Exception e) { exceptionProfiles[2].enter(); + // TODO: Wrap exception to include Orc stack information. This will mean wrapping this in JavaException if needed and calling setBacktrace execution.get().notifyOrcWithBoundary(new CaughtEvent(e)); throw HaltException.SINGLETON(); } @@ -58,6 +60,7 @@ public Object universal(final VirtualFrame frame, final Object target, final Obj return invokeDirectWithBoundary(invoker, target, arguments); } catch (final ExceptionHaltException e) { exceptionProfiles[0].enter(); + // TODO: Wrap exception to include Orc stack information. This will mean wrapping this in JavaException if needed and calling setBacktrace execution.get().notifyOrcWithBoundary(new CaughtEvent(e.getCause())); throw HaltException.SINGLETON(); } catch (final HaltException e) { @@ -65,6 +68,7 @@ public Object universal(final VirtualFrame frame, final Object target, final Obj throw e; } catch (final Exception e) { exceptionProfiles[2].enter(); + // TODO: Wrap exception to include Orc stack information. This will mean wrapping this in JavaException if needed and calling setBacktrace execution.get().notifyOrcWithBoundary(new CaughtEvent(e)); throw HaltException.SINGLETON(); }