| 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 1443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1454 return static_cast<Code*>(isolate()->FindCodeObject(pc())); | 1454 return static_cast<Code*>(isolate()->FindCodeObject(pc())); |
| 1455 } | 1455 } |
| 1456 | 1456 |
| 1457 void WasmFrame::Iterate(ObjectVisitor* v) const { IterateCompiledFrame(v); } | 1457 void WasmFrame::Iterate(ObjectVisitor* v) const { IterateCompiledFrame(v); } |
| 1458 | 1458 |
| 1459 Address WasmFrame::GetCallerStackPointer() const { | 1459 Address WasmFrame::GetCallerStackPointer() const { |
| 1460 return fp() + ExitFrameConstants::kCallerSPOffset; | 1460 return fp() + ExitFrameConstants::kCallerSPOffset; |
| 1461 } | 1461 } |
| 1462 | 1462 |
| 1463 Object* WasmFrame::wasm_obj() const { | 1463 Object* WasmFrame::wasm_obj() const { |
| 1464 FixedArray* deopt_data = LookupCode()->deoptimization_data(); | 1464 return wasm::GetOwningWasmInstance(*isolate()->factory()->undefined_value(), |
| 1465 DCHECK(deopt_data->length() == 2); | 1465 LookupCode()); |
| 1466 return deopt_data->get(0); | |
| 1467 } | 1466 } |
| 1468 | 1467 |
| 1469 uint32_t WasmFrame::function_index() const { | 1468 uint32_t WasmFrame::function_index() const { |
| 1470 FixedArray* deopt_data = LookupCode()->deoptimization_data(); | 1469 FixedArray* deopt_data = LookupCode()->deoptimization_data(); |
| 1471 DCHECK(deopt_data->length() == 2); | 1470 DCHECK(deopt_data->length() == 2); |
| 1472 return Smi::cast(deopt_data->get(1))->value(); | 1471 return Smi::cast(deopt_data->get(1))->value(); |
| 1473 } | 1472 } |
| 1474 | 1473 |
| 1475 Script* WasmFrame::script() const { | 1474 Script* WasmFrame::script() const { |
| 1476 Handle<JSObject> wasm(JSObject::cast(wasm_obj()), isolate()); | 1475 Handle<JSObject> wasm(JSObject::cast(wasm_obj()), isolate()); |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1909 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { | 1908 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { |
| 1910 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); | 1909 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); |
| 1911 list.Add(frame, zone); | 1910 list.Add(frame, zone); |
| 1912 } | 1911 } |
| 1913 return list.ToVector(); | 1912 return list.ToVector(); |
| 1914 } | 1913 } |
| 1915 | 1914 |
| 1916 | 1915 |
| 1917 } // namespace internal | 1916 } // namespace internal |
| 1918 } // namespace v8 | 1917 } // namespace v8 |
| OLD | NEW |