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

Unified Diff: src/isolate.cc

Issue 2623773004: [wasm] Introduce WasmToInterpreterFrame (Closed)
Patch Set: Renaming Created 3 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/frames-inl.h ('k') | src/log.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 99ab3b3f1a858f19b81f6cfa0ffabba6c2a8434c..f620897922f3088458139ddcd5e7acaad22644d0 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -510,8 +510,8 @@ Handle<Object> Isolate::CaptureSimpleStackTrace(Handle<JSReceiver> error_object,
offset, flags);
} break;
- case StackFrame::WASM: {
- WasmFrame* wasm_frame = WasmFrame::cast(frame);
+ case StackFrame::WASM_COMPILED: {
+ WasmCompiledFrame* wasm_frame = WasmCompiledFrame::cast(frame);
Handle<WasmInstanceObject> instance(wasm_frame->wasm_instance(), this);
const int wasm_function_index = wasm_frame->function_index();
Code* code = wasm_frame->unchecked_code();
@@ -534,6 +534,10 @@ Handle<Object> Isolate::CaptureSimpleStackTrace(Handle<JSReceiver> error_object,
abstract_code, offset, flags);
} break;
+ case StackFrame::WASM_INTERPRETER_ENTRY:
+ // TODO(clemensh): Add frames.
+ break;
+
default:
break;
}
@@ -699,7 +703,7 @@ class CaptureStackTraceHelper {
return stack_frame;
}
- Handle<JSObject> NewStackFrameObject(WasmFrame* frame) {
+ Handle<JSObject> NewStackFrameObject(WasmCompiledFrame* frame) {
Handle<JSObject> stack_frame =
factory()->NewJSObject(isolate_->object_function());
@@ -783,7 +787,7 @@ Handle<JSArray> Isolate::CaptureCurrentStackTrace(
}
} else {
DCHECK(frame->is_wasm());
- WasmFrame* wasm_frame = WasmFrame::cast(frame);
+ WasmCompiledFrame* wasm_frame = WasmCompiledFrame::cast(frame);
Handle<JSObject> new_frame_obj = helper.NewStackFrameObject(wasm_frame);
stack_trace_elems->set(frames_seen, *new_frame_obj);
frames_seen++;
@@ -1220,7 +1224,7 @@ Object* Isolate::UnwindAndFindHandler() {
if (FLAG_wasm_eh_prototype) {
if (frame->is_wasm() && is_catchable_by_wasm(exception)) {
int stack_slots = 0; // Will contain stack slot count of frame.
- WasmFrame* wasm_frame = static_cast<WasmFrame*>(frame);
+ WasmCompiledFrame* wasm_frame = static_cast<WasmCompiledFrame*>(frame);
offset = wasm_frame->LookupExceptionHandlerInTable(&stack_slots);
if (offset >= 0) {
// Compute the stack pointer from the frame pointer. This ensures that
@@ -1309,6 +1313,9 @@ Object* Isolate::UnwindAndFindHandler() {
CHECK_EQ(-1, offset);
}
+ // TODO(clemensh): Handle unwinding interpreted wasm frames (stored in the
+ // WasmInterpreter C++ object).
+
RemoveMaterializedObjectsOnUnwind(frame);
}
« no previous file with comments | « src/frames-inl.h ('k') | src/log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698