| 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" |
| (...skipping 1541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1552 return static_cast<Code*>(isolate()->FindCodeObject(pc())); | 1552 return static_cast<Code*>(isolate()->FindCodeObject(pc())); |
| 1553 } | 1553 } |
| 1554 | 1554 |
| 1555 void WasmFrame::Iterate(ObjectVisitor* v) const { IterateCompiledFrame(v); } | 1555 void WasmFrame::Iterate(ObjectVisitor* v) const { IterateCompiledFrame(v); } |
| 1556 | 1556 |
| 1557 Address WasmFrame::GetCallerStackPointer() const { | 1557 Address WasmFrame::GetCallerStackPointer() const { |
| 1558 return fp() + ExitFrameConstants::kCallerSPOffset; | 1558 return fp() + ExitFrameConstants::kCallerSPOffset; |
| 1559 } | 1559 } |
| 1560 | 1560 |
| 1561 WasmInstanceObject* WasmFrame::wasm_instance() const { | 1561 WasmInstanceObject* WasmFrame::wasm_instance() const { |
| 1562 Object* ret = wasm::GetOwningWasmInstance(LookupCode()); | 1562 WasmInstanceObject* obj = wasm::GetOwningWasmInstance(LookupCode()); |
| 1563 // This is a live stack frame, there must be a live wasm instance available. | 1563 // This is a live stack frame; it must have a live instance. |
| 1564 DCHECK_NOT_NULL(ret); | 1564 DCHECK_NOT_NULL(obj); |
| 1565 return WasmInstanceObject::cast(ret); | 1565 return obj; |
| 1566 } | 1566 } |
| 1567 | 1567 |
| 1568 uint32_t WasmFrame::function_index() const { | 1568 uint32_t WasmFrame::function_index() const { |
| 1569 FixedArray* deopt_data = LookupCode()->deoptimization_data(); | 1569 FixedArray* deopt_data = LookupCode()->deoptimization_data(); |
| 1570 DCHECK(deopt_data->length() == 2); | 1570 DCHECK(deopt_data->length() == 2); |
| 1571 return Smi::cast(deopt_data->get(1))->value(); | 1571 return Smi::cast(deopt_data->get(1))->value(); |
| 1572 } | 1572 } |
| 1573 | 1573 |
| 1574 Script* WasmFrame::script() const { | 1574 Script* WasmFrame::script() const { |
| 1575 Handle<JSObject> instance(JSObject::cast(wasm_instance()), isolate()); | 1575 Handle<JSObject> instance(JSObject::cast(wasm_instance()), isolate()); |
| (...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2043 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { | 2043 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { |
| 2044 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); | 2044 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); |
| 2045 list.Add(frame, zone); | 2045 list.Add(frame, zone); |
| 2046 } | 2046 } |
| 2047 return list.ToVector(); | 2047 return list.ToVector(); |
| 2048 } | 2048 } |
| 2049 | 2049 |
| 2050 | 2050 |
| 2051 } // namespace internal | 2051 } // namespace internal |
| 2052 } // namespace v8 | 2052 } // namespace v8 |
| OLD | NEW |