Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(642)

Unified Diff: src/isolate.cc

Issue 1605633003: [interpreter] First implementation of stack unwinding. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_int-5
Patch Set: Rebase and skip one more test. Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/interpreter/bytecode-generator.cc ('k') | src/mips/builtins-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index 4e42b436b1317022c966370fae99334736912e51..45a6c576cd216bdd200ff178b633b04553db243c 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -1116,6 +1116,26 @@ Object* Isolate::UnwindAndFindHandler() {
}
}
+ // For interpreted frame we perform a range lookup in the handler table.
+ if (frame->is_interpreted() && catchable_by_js) {
+ InterpretedFrame* js_frame = static_cast<InterpretedFrame*>(frame);
+ int stack_slots = 0; // Will contain stack slot count of frame.
+ offset = js_frame->LookupExceptionHandlerInTable(&stack_slots, NULL);
+ if (offset >= 0) {
+ // Patch the bytecode offset in the interpreted frame to reflect the
+ // position of the exception handler. The special builtin below will
+ // take care of continuing to dispatch at that position.
+ js_frame->PatchBytecodeOffset(static_cast<int>(offset));
+ offset = 0;
+
+ // Gather information from the frame.
+ code = *builtins()->InterpreterEnterExceptionHandler();
+ handler_sp = frame->sp();
+ handler_fp = frame->fp();
+ break;
+ }
+ }
+
// For JavaScript frames we perform a range lookup in the handler table.
if (frame->is_java_script() && catchable_by_js) {
JavaScriptFrame* js_frame = static_cast<JavaScriptFrame*>(frame);
« no previous file with comments | « src/interpreter/bytecode-generator.cc ('k') | src/mips/builtins-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698