| 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 1736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1747 RUNTIME_FUNCTION(Runtime_DebugRecordAsyncFunction) { | 1747 RUNTIME_FUNCTION(Runtime_DebugRecordAsyncFunction) { |
| 1748 HandleScope scope(isolate); | 1748 HandleScope scope(isolate); |
| 1749 DCHECK_EQ(1, args.length()); | 1749 DCHECK_EQ(1, args.length()); |
| 1750 CONVERT_ARG_HANDLE_CHECKED(JSGeneratorObject, generator, 0); | 1750 CONVERT_ARG_HANDLE_CHECKED(JSGeneratorObject, generator, 0); |
| 1751 CHECK(isolate->debug()->last_step_action() >= StepNext); | 1751 CHECK(isolate->debug()->last_step_action() >= StepNext); |
| 1752 isolate->debug()->RecordAsyncFunction(generator); | 1752 isolate->debug()->RecordAsyncFunction(generator); |
| 1753 return isolate->heap()->undefined_value(); | 1753 return isolate->heap()->undefined_value(); |
| 1754 } | 1754 } |
| 1755 | 1755 |
| 1756 RUNTIME_FUNCTION(Runtime_DebugPushPromise) { | 1756 RUNTIME_FUNCTION(Runtime_DebugPushPromise) { |
| 1757 DCHECK(args.length() == 2); | 1757 DCHECK(args.length() == 1); |
| 1758 HandleScope scope(isolate); | 1758 HandleScope scope(isolate); |
| 1759 CONVERT_ARG_HANDLE_CHECKED(JSObject, promise, 0); | 1759 CONVERT_ARG_HANDLE_CHECKED(JSObject, promise, 0); |
| 1760 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 1); | 1760 isolate->PushPromise(promise); |
| 1761 isolate->PushPromise(promise, function); | |
| 1762 return isolate->heap()->undefined_value(); | 1761 return isolate->heap()->undefined_value(); |
| 1763 } | 1762 } |
| 1764 | 1763 |
| 1765 | 1764 |
| 1766 RUNTIME_FUNCTION(Runtime_DebugPopPromise) { | 1765 RUNTIME_FUNCTION(Runtime_DebugPopPromise) { |
| 1767 DCHECK(args.length() == 0); | 1766 DCHECK(args.length() == 0); |
| 1768 SealHandleScope shs(isolate); | 1767 SealHandleScope shs(isolate); |
| 1769 isolate->PopPromise(); | 1768 isolate->PopPromise(); |
| 1770 return isolate->heap()->undefined_value(); | 1769 return isolate->heap()->undefined_value(); |
| 1771 } | 1770 } |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1815 Handle<Script> script = Handle<Script>(Script::cast(script_val->value())); | 1814 Handle<Script> script = Handle<Script>(Script::cast(script_val->value())); |
| 1816 | 1815 |
| 1817 Handle<wasm::WasmDebugInfo> debug_info = | 1816 Handle<wasm::WasmDebugInfo> debug_info = |
| 1818 wasm::GetDebugInfo(handle(script->wasm_object(), isolate)); | 1817 wasm::GetDebugInfo(handle(script->wasm_object(), isolate)); |
| 1819 return *wasm::WasmDebugInfo::DisassembleFunction( | 1818 return *wasm::WasmDebugInfo::DisassembleFunction( |
| 1820 debug_info, script->wasm_function_index()); | 1819 debug_info, script->wasm_function_index()); |
| 1821 } | 1820 } |
| 1822 | 1821 |
| 1823 } // namespace internal | 1822 } // namespace internal |
| 1824 } // namespace v8 | 1823 } // namespace v8 |
| OLD | NEW |