OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/isolate.h" | 5 #include "src/isolate.h" |
6 | 6 |
7 #include <stdlib.h> | 7 #include <stdlib.h> |
8 | 8 |
9 #include <fstream> // NOLINT(readability/streams) | 9 #include <fstream> // NOLINT(readability/streams) |
10 #include <sstream> | 10 #include <sstream> |
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
516 const int wasm_function_index = wasm_frame->function_index(); | 516 const int wasm_function_index = wasm_frame->function_index(); |
517 Code* code = wasm_frame->unchecked_code(); | 517 Code* code = wasm_frame->unchecked_code(); |
518 Handle<AbstractCode> abstract_code(AbstractCode::cast(code), this); | 518 Handle<AbstractCode> abstract_code(AbstractCode::cast(code), this); |
519 const int offset = | 519 const int offset = |
520 static_cast<int>(wasm_frame->pc() - code->instruction_start()); | 520 static_cast<int>(wasm_frame->pc() - code->instruction_start()); |
521 | 521 |
522 // TODO(wasm): The wasm object returned by the WasmFrame should always | 522 // TODO(wasm): The wasm object returned by the WasmFrame should always |
523 // be a wasm object. | 523 // be a wasm object. |
524 DCHECK(wasm::IsWasmInstance(*instance) || instance->IsUndefined(this)); | 524 DCHECK(wasm::IsWasmInstance(*instance) || instance->IsUndefined(this)); |
525 | 525 |
526 int flags = wasm::WasmIsAsmJs(*instance, this) | 526 int flags = 0; |
527 ? FrameArray::kIsAsmJsWasmFrame | 527 if (wasm::WasmIsAsmJs(*instance, this)) { |
528 : FrameArray::kIsWasmFrame; | 528 flags |= FrameArray::kIsAsmJsWasmFrame; |
529 if (wasm_frame->at_to_number_conversion()) { | |
530 flags |= FrameArray::kAsmJsAtNumberConversion; | |
531 } | |
532 } else { | |
533 flags |= FrameArray::kIsWasmFrame; | |
534 } | |
529 | 535 |
530 elements = | 536 elements = |
531 FrameArray::AppendWasmFrame(elements, instance, wasm_function_index, | 537 FrameArray::AppendWasmFrame(elements, instance, wasm_function_index, |
532 abstract_code, offset, flags); | 538 abstract_code, offset, flags); |
533 } break; | 539 } break; |
534 | 540 |
535 default: | 541 default: |
536 break; | 542 break; |
537 } | 543 } |
538 } | 544 } |
(...skipping 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1550 continue; | 1556 continue; |
1551 } | 1557 } |
1552 | 1558 |
1553 if (elements->IsAsmJsWasmFrame(i)) { | 1559 if (elements->IsAsmJsWasmFrame(i)) { |
1554 Handle<WasmCompiledModule> compiled_module( | 1560 Handle<WasmCompiledModule> compiled_module( |
1555 WasmInstanceObject::cast(elements->WasmInstance(i)) | 1561 WasmInstanceObject::cast(elements->WasmInstance(i)) |
1556 ->get_compiled_module()); | 1562 ->get_compiled_module()); |
1557 int func_index = elements->WasmFunctionIndex(i)->value(); | 1563 int func_index = elements->WasmFunctionIndex(i)->value(); |
1558 int code_offset = elements->Offset(i)->value(); | 1564 int code_offset = elements->Offset(i)->value(); |
1559 int byte_pos = elements->Code(i)->SourcePosition(code_offset); | 1565 int byte_pos = elements->Code(i)->SourcePosition(code_offset); |
1566 bool at_tonumber_conversion = | |
titzer
2016/12/08 14:08:50
at_to_number_conversion to be consistent with the
Clemens Hammacher
2016/12/08 15:26:21
Done.
| |
1567 elements->Flags(i)->value() & FrameArray::kAsmJsAtNumberConversion; | |
1560 int source_pos = WasmCompiledModule::GetAsmJsSourcePosition( | 1568 int source_pos = WasmCompiledModule::GetAsmJsSourcePosition( |
1561 compiled_module, func_index, byte_pos); | 1569 compiled_module, func_index, byte_pos, at_tonumber_conversion); |
1562 Handle<Script> script = compiled_module->script(); | 1570 Handle<Script> script = compiled_module->script(); |
1563 | 1571 |
1564 *target = MessageLocation(script, source_pos, source_pos + 1); | 1572 *target = MessageLocation(script, source_pos, source_pos + 1); |
1565 return true; | 1573 return true; |
1566 } | 1574 } |
1567 | 1575 |
1568 Handle<JSFunction> fun = handle(elements->Function(i), this); | 1576 Handle<JSFunction> fun = handle(elements->Function(i), this); |
1569 if (!fun->shared()->IsSubjectToDebugging()) continue; | 1577 if (!fun->shared()->IsSubjectToDebugging()) continue; |
1570 | 1578 |
1571 Object* script = fun->shared()->script(); | 1579 Object* script = fun->shared()->script(); |
(...skipping 1944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3516 // Then check whether this scope intercepts. | 3524 // Then check whether this scope intercepts. |
3517 if ((flag & intercept_mask_)) { | 3525 if ((flag & intercept_mask_)) { |
3518 intercepted_flags_ |= flag; | 3526 intercepted_flags_ |= flag; |
3519 return true; | 3527 return true; |
3520 } | 3528 } |
3521 return false; | 3529 return false; |
3522 } | 3530 } |
3523 | 3531 |
3524 } // namespace internal | 3532 } // namespace internal |
3525 } // namespace v8 | 3533 } // namespace v8 |
OLD | NEW |