| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/runtime/runtime-utils.h" | 5 #include "src/runtime/runtime-utils.h" |
| 6 | 6 |
| 7 #include "src/arguments.h" | 7 #include "src/arguments.h" |
| 8 #include "src/debug/debug-evaluate.h" | 8 #include "src/debug/debug-evaluate.h" |
| 9 #include "src/debug/debug-frames.h" | 9 #include "src/debug/debug-frames.h" |
| 10 #include "src/debug/debug-scopes.h" | 10 #include "src/debug/debug-scopes.h" |
| (...skipping 1785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1796 } | 1796 } |
| 1797 | 1797 |
| 1798 RUNTIME_FUNCTION(Runtime_GetWasmFunctionOffsetTable) { | 1798 RUNTIME_FUNCTION(Runtime_GetWasmFunctionOffsetTable) { |
| 1799 DCHECK(args.length() == 1); | 1799 DCHECK(args.length() == 1); |
| 1800 HandleScope scope(isolate); | 1800 HandleScope scope(isolate); |
| 1801 CONVERT_ARG_CHECKED(JSValue, script_val, 0); | 1801 CONVERT_ARG_CHECKED(JSValue, script_val, 0); |
| 1802 | 1802 |
| 1803 CHECK(script_val->value()->IsScript()); | 1803 CHECK(script_val->value()->IsScript()); |
| 1804 Handle<Script> script = Handle<Script>(Script::cast(script_val->value())); | 1804 Handle<Script> script = Handle<Script>(Script::cast(script_val->value())); |
| 1805 | 1805 |
| 1806 Handle<wasm::WasmDebugInfo> debug_info( | 1806 Handle<wasm::WasmDebugInfo> debug_info = |
| 1807 wasm::GetDebugInfo(script->wasm_object()), isolate); | 1807 wasm::GetDebugInfo(handle(script->wasm_object(), isolate)); |
| 1808 Handle<FixedArray> elements = wasm::WasmDebugInfo::GetFunctionOffsetTable( | 1808 Handle<FixedArray> elements = wasm::WasmDebugInfo::GetFunctionOffsetTable( |
| 1809 debug_info, script->wasm_function_index()); | 1809 debug_info, script->wasm_function_index()); |
| 1810 return *isolate->factory()->NewJSArrayWithElements(elements); | 1810 return *isolate->factory()->NewJSArrayWithElements(elements); |
| 1811 } | 1811 } |
| 1812 | 1812 |
| 1813 RUNTIME_FUNCTION(Runtime_DisassembleWasmFunction) { | 1813 RUNTIME_FUNCTION(Runtime_DisassembleWasmFunction) { |
| 1814 DCHECK(args.length() == 1); | 1814 DCHECK(args.length() == 1); |
| 1815 HandleScope scope(isolate); | 1815 HandleScope scope(isolate); |
| 1816 CONVERT_ARG_CHECKED(JSValue, script_val, 0); | 1816 CONVERT_ARG_CHECKED(JSValue, script_val, 0); |
| 1817 | 1817 |
| 1818 CHECK(script_val->value()->IsScript()); | 1818 CHECK(script_val->value()->IsScript()); |
| 1819 Handle<Script> script = Handle<Script>(Script::cast(script_val->value())); | 1819 Handle<Script> script = Handle<Script>(Script::cast(script_val->value())); |
| 1820 | 1820 |
| 1821 Handle<wasm::WasmDebugInfo> debug_info( | 1821 Handle<wasm::WasmDebugInfo> debug_info = |
| 1822 wasm::GetDebugInfo(script->wasm_object()), isolate); | 1822 wasm::GetDebugInfo(handle(script->wasm_object(), isolate)); |
| 1823 return *wasm::WasmDebugInfo::DisassembleFunction( | 1823 return *wasm::WasmDebugInfo::DisassembleFunction( |
| 1824 debug_info, script->wasm_function_index()); | 1824 debug_info, script->wasm_function_index()); |
| 1825 } | 1825 } |
| 1826 | 1826 |
| 1827 } // namespace internal | 1827 } // namespace internal |
| 1828 } // namespace v8 | 1828 } // namespace v8 |
| OLD | NEW |