| 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 1500 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 | 
|---|