Chromium Code Reviews| 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); |
| + } |
| } |