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/frames.h" | 5 #include "src/frames.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <sstream> | 8 #include <sstream> |
9 | 9 |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
11 #include "src/deoptimizer.h" | 11 #include "src/deoptimizer.h" |
12 #include "src/frames-inl.h" | 12 #include "src/frames-inl.h" |
13 #include "src/full-codegen/full-codegen.h" | 13 #include "src/full-codegen/full-codegen.h" |
14 #include "src/register-configuration.h" | 14 #include "src/register-configuration.h" |
15 #include "src/safepoint-table.h" | 15 #include "src/safepoint-table.h" |
16 #include "src/string-stream.h" | 16 #include "src/string-stream.h" |
17 #include "src/vm-state-inl.h" | 17 #include "src/vm-state-inl.h" |
18 #include "src/wasm/wasm-debug.h" | |
19 #include "src/wasm/wasm-module.h" | 18 #include "src/wasm/wasm-module.h" |
| 19 #include "src/wasm/wasm-objects.h" |
20 | 20 |
21 namespace v8 { | 21 namespace v8 { |
22 namespace internal { | 22 namespace internal { |
23 | 23 |
24 ReturnAddressLocationResolver | 24 ReturnAddressLocationResolver |
25 StackFrame::return_address_location_resolver_ = NULL; | 25 StackFrame::return_address_location_resolver_ = NULL; |
26 | 26 |
27 | 27 |
28 // Iterator that supports traversing the stack handlers of a | 28 // Iterator that supports traversing the stack handlers of a |
29 // particular frame. Needs to know the top of the handler chain. | 29 // particular frame. Needs to know the top of the handler chain. |
(...skipping 1481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1511 FixedArray* deopt_data = LookupCode()->deoptimization_data(); | 1511 FixedArray* deopt_data = LookupCode()->deoptimization_data(); |
1512 DCHECK(deopt_data->length() == 2); | 1512 DCHECK(deopt_data->length() == 2); |
1513 return Smi::cast(deopt_data->get(1))->value(); | 1513 return Smi::cast(deopt_data->get(1))->value(); |
1514 } | 1514 } |
1515 | 1515 |
1516 Script* WasmFrame::script() const { | 1516 Script* WasmFrame::script() const { |
1517 Handle<JSObject> instance(JSObject::cast(wasm_instance()), isolate()); | 1517 Handle<JSObject> instance(JSObject::cast(wasm_instance()), isolate()); |
1518 if (wasm::WasmIsAsmJs(*instance, isolate())) { | 1518 if (wasm::WasmIsAsmJs(*instance, isolate())) { |
1519 return *wasm::GetAsmWasmScript(instance); | 1519 return *wasm::GetAsmWasmScript(instance); |
1520 } | 1520 } |
1521 Handle<wasm::WasmDebugInfo> debug_info = wasm::GetDebugInfo(instance); | 1521 Handle<WasmDebugInfo> debug_info = wasm::GetDebugInfo(instance); |
1522 return wasm::WasmDebugInfo::GetFunctionScript(debug_info, function_index()); | 1522 return WasmDebugInfo::GetFunctionScript(debug_info, function_index()); |
1523 } | 1523 } |
1524 | 1524 |
1525 int WasmFrame::position() const { | 1525 int WasmFrame::position() const { |
1526 int position = StandardFrame::position(); | 1526 int position = StandardFrame::position(); |
1527 if (wasm::WasmIsAsmJs(wasm_instance(), isolate())) { | 1527 if (wasm::WasmIsAsmJs(wasm_instance(), isolate())) { |
1528 Handle<JSObject> instance(JSObject::cast(wasm_instance()), isolate()); | 1528 Handle<JSObject> instance(JSObject::cast(wasm_instance()), isolate()); |
1529 position = | 1529 position = |
1530 wasm::GetAsmWasmSourcePosition(instance, function_index(), position); | 1530 wasm::GetAsmWasmSourcePosition(instance, function_index(), position); |
1531 } | 1531 } |
1532 return position; | 1532 return position; |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1972 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { | 1972 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { |
1973 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); | 1973 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); |
1974 list.Add(frame, zone); | 1974 list.Add(frame, zone); |
1975 } | 1975 } |
1976 return list.ToVector(); | 1976 return list.ToVector(); |
1977 } | 1977 } |
1978 | 1978 |
1979 | 1979 |
1980 } // namespace internal | 1980 } // namespace internal |
1981 } // namespace v8 | 1981 } // namespace v8 |
OLD | NEW |