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 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
759 // Add locals name and value from the temporary copy from the function frame. | 759 // Add locals name and value from the temporary copy from the function frame. |
760 for (const auto& local : locals) details->set(details_index++, *local); | 760 for (const auto& local : locals) details->set(details_index++, *local); |
761 | 761 |
762 // Add the value being returned. | 762 // Add the value being returned. |
763 if (at_return) { | 763 if (at_return) { |
764 details->set(details_index++, *return_value); | 764 details->set(details_index++, *return_value); |
765 } | 765 } |
766 | 766 |
767 // Add the receiver (same as in function frame). | 767 // Add the receiver (same as in function frame). |
768 Handle<Object> receiver(it.frame()->receiver(), isolate); | 768 Handle<Object> receiver(it.frame()->receiver(), isolate); |
769 DCHECK(function->shared()->IsUserJavaScript()); | 769 DCHECK(!function->shared()->IsBuiltin()); |
770 DCHECK_IMPLIES(is_sloppy(shared->language_mode()), receiver->IsJSReceiver()); | 770 DCHECK_IMPLIES(is_sloppy(shared->language_mode()), receiver->IsJSReceiver()); |
771 details->set(kFrameDetailsReceiverIndex, *receiver); | 771 details->set(kFrameDetailsReceiverIndex, *receiver); |
772 | 772 |
773 DCHECK_EQ(details_size, details_index); | 773 DCHECK_EQ(details_size, details_index); |
774 return *isolate->factory()->NewJSArrayWithElements(details); | 774 return *isolate->factory()->NewJSArrayWithElements(details); |
775 } | 775 } |
776 | 776 |
777 | 777 |
778 RUNTIME_FUNCTION(Runtime_GetScopeCount) { | 778 RUNTIME_FUNCTION(Runtime_GetScopeCount) { |
779 HandleScope scope(isolate); | 779 HandleScope scope(isolate); |
(...skipping 1143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1923 Handle<Script> script = Handle<Script>(Script::cast(script_val->value())); | 1923 Handle<Script> script = Handle<Script>(Script::cast(script_val->value())); |
1924 | 1924 |
1925 Handle<WasmDebugInfo> debug_info = | 1925 Handle<WasmDebugInfo> debug_info = |
1926 wasm::GetDebugInfo(handle(script->wasm_instance(), isolate)); | 1926 wasm::GetDebugInfo(handle(script->wasm_instance(), isolate)); |
1927 return *WasmDebugInfo::DisassembleFunction(debug_info, | 1927 return *WasmDebugInfo::DisassembleFunction(debug_info, |
1928 script->wasm_function_index()); | 1928 script->wasm_function_index()); |
1929 } | 1929 } |
1930 | 1930 |
1931 } // namespace internal | 1931 } // namespace internal |
1932 } // namespace v8 | 1932 } // namespace v8 |
OLD | NEW |