| Index: src/frames.cc
|
| diff --git a/src/frames.cc b/src/frames.cc
|
| index f34c07ab09c292c1888dc09728ea48a183627604..e9facbc9d98ec0f57d70940cb678bd6589bcb6d3 100644
|
| --- a/src/frames.cc
|
| +++ b/src/frames.cc
|
| @@ -1580,11 +1580,18 @@ int WasmFrame::position() const {
|
| isolate());
|
| DCHECK_LE(0, position);
|
| position = WasmCompiledModule::GetAsmJsSourcePosition(
|
| - compiled_module, function_index(), static_cast<uint32_t>(position));
|
| + compiled_module, function_index(), static_cast<uint32_t>(position),
|
| + at_to_number_conversion());
|
| }
|
| return position;
|
| }
|
|
|
| +bool WasmFrame::at_to_number_conversion() const {
|
| + // WasmToJsFrame::ComputeCallerState encoded this for us in the constant pool
|
| + // address ;)
|
| + return !!constant_pool_address();
|
| +}
|
| +
|
| int WasmFrame::LookupExceptionHandlerInTable(int* stack_slots) {
|
| DCHECK_NOT_NULL(stack_slots);
|
| Code* code = LookupCode();
|
| @@ -1594,6 +1601,21 @@ int WasmFrame::LookupExceptionHandlerInTable(int* stack_slots) {
|
| return table->LookupReturn(pc_offset);
|
| }
|
|
|
| +void WasmToJsFrame::ComputeCallerState(State* state) const {
|
| + // Remember at which of the two calls inside it we are, and transfer this
|
| + // information to the subsequent WASM frame.
|
| + Code* code = unchecked_code();
|
| + AbstractCode* abstract_code = AbstractCode::cast(code);
|
| + int offset = static_cast<int>(pc() - code->instruction_start());
|
| + int at_to_number_call = abstract_code->SourcePosition(offset);
|
| + DCHECK(at_to_number_call == 0 || at_to_number_call == 1);
|
| + StubFrame::ComputeCallerState(state);
|
| + DCHECK_EQ(StackFrame::WASM, ComputeType(iterator_, state));
|
| + // Use a little hack here: The constant pool address is not used for wasm
|
| + // frames, so use it to encode whether we are at the to_number call.
|
| + state->constant_pool_address = reinterpret_cast<Address*>(at_to_number_call);
|
| +}
|
| +
|
| namespace {
|
|
|
|
|
|
|