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

Unified Diff: src/frames.cc

Issue 1764603003: Handle stack frames differently inside and on the boundary of wasm. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 4 years, 10 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.h ('k') | src/frames-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/frames.cc
diff --git a/src/frames.cc b/src/frames.cc
index 643ee69ce8fa3b6ba970d387574683f417707a95..55281bf7053f22b58e8f127d348d01885b50e635 100644
--- a/src/frames.cc
+++ b/src/frames.cc
@@ -458,7 +458,16 @@ StackFrame::Type StackFrame::ComputeType(const StackFrameIteratorBase* iterator,
case Code::OPTIMIZED_FUNCTION:
return OPTIMIZED;
case Code::WASM_FUNCTION:
- return WASM;
+ switch (code_obj->wasm_function_type()) {
+ case Code::WASM_INNER_FUNCTION:
+ return WASM;
+ case Code::WASM_TO_JS:
+ return WASM_TO_JS;
+ case Code::JS_TO_WASM:
+ return JS_TO_WASM;
+ default:
+ UNREACHABLE();
JF 2016/03/03 21:11:52 You'll already get a warning if you don't cover al
titzer 2016/03/03 21:36:20 Better safe than sorry.
JF 2016/03/03 21:38:46 Right, what I'm saying is that having `default: UN
bradn 2016/03/03 21:39:10 I'm not sure I share your trust in the compiler :-
JF 2016/03/03 21:58:33 All you need is one to give you the warning. The b
+ }
case Code::BUILTIN:
if (!marker->IsSmi()) {
if (StandardFrame::IsArgumentsAdaptorFrame(state->fp)) {
@@ -707,12 +716,14 @@ void StandardFrame::IterateCompiledFrame(ObjectVisitor* v) const {
// Visit the return address in the callee and incoming arguments.
IteratePc(v, pc_address(), constant_pool_address(), code);
- // Visit the context in stub frame and JavaScript frame.
- // Visit the function in JavaScript frame.
- Object** fixed_base = &Memory::Object_at(
- fp() + StandardFrameConstants::kMarkerOffset);
- Object** fixed_limit = &Memory::Object_at(fp());
- v->VisitPointers(fixed_base, fixed_limit);
+ if (!is_wasm() && !is_wasm_to_js()) {
+ // Visit the context in stub frame and JavaScript frame.
+ // Visit the function in JavaScript frame.
+ Object** fixed_base =
+ &Memory::Object_at(fp() + StandardFrameConstants::kMarkerOffset);
+ Object** fixed_limit = &Memory::Object_at(fp());
+ v->VisitPointers(fixed_base, fixed_limit);
+ }
}
« no previous file with comments | « src/frames.h ('k') | src/frames-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698