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 <memory> | 7 #include <memory> |
8 | 8 |
9 #include "src/arguments.h" | 9 #include "src/arguments.h" |
10 #include "src/assembler-inl.h" | 10 #include "src/assembler-inl.h" |
(...skipping 930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
941 HandleScope scope(isolate); | 941 HandleScope scope(isolate); |
942 CONVERT_ARG_HANDLE_CHECKED(JSObject, instance_obj, 0); | 942 CONVERT_ARG_HANDLE_CHECKED(JSObject, instance_obj, 0); |
943 CHECK(WasmInstanceObject::IsWasmInstanceObject(*instance_obj)); | 943 CHECK(WasmInstanceObject::IsWasmInstanceObject(*instance_obj)); |
944 Handle<WasmInstanceObject> instance = | 944 Handle<WasmInstanceObject> instance = |
945 Handle<WasmInstanceObject>::cast(instance_obj); | 945 Handle<WasmInstanceObject>::cast(instance_obj); |
946 if (!instance->has_debug_info()) return 0; | 946 if (!instance->has_debug_info()) return 0; |
947 uint64_t num = instance->debug_info()->NumInterpretedCalls(); | 947 uint64_t num = instance->debug_info()->NumInterpretedCalls(); |
948 return *isolate->factory()->NewNumberFromSize(static_cast<size_t>(num)); | 948 return *isolate->factory()->NewNumberFromSize(static_cast<size_t>(num)); |
949 } | 949 } |
950 | 950 |
| 951 RUNTIME_FUNCTION(Runtime_IncrementWaitCount) { |
| 952 isolate->IncrementWaitCountForTesting(); |
| 953 return isolate->heap()->undefined_value(); |
| 954 } |
| 955 |
| 956 RUNTIME_FUNCTION(Runtime_DecrementWaitCount) { |
| 957 isolate->DecrementWaitCountForTesting(); |
| 958 return isolate->heap()->undefined_value(); |
| 959 } |
951 } // namespace internal | 960 } // namespace internal |
952 } // namespace v8 | 961 } // namespace v8 |
OLD | NEW |