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/compiler-dispatcher/optimizing-compile-dispatcher.h" | 10 #include "src/compiler-dispatcher/optimizing-compile-dispatcher.h" |
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
673 RUNTIME_FUNCTION(Runtime_InNewSpace) { | 673 RUNTIME_FUNCTION(Runtime_InNewSpace) { |
674 SealHandleScope shs(isolate); | 674 SealHandleScope shs(isolate); |
675 DCHECK(args.length() == 1); | 675 DCHECK(args.length() == 1); |
676 CONVERT_ARG_CHECKED(Object, obj, 0); | 676 CONVERT_ARG_CHECKED(Object, obj, 0); |
677 return isolate->heap()->ToBoolean(isolate->heap()->InNewSpace(obj)); | 677 return isolate->heap()->ToBoolean(isolate->heap()->InNewSpace(obj)); |
678 } | 678 } |
679 | 679 |
680 RUNTIME_FUNCTION(Runtime_IsAsmWasmCode) { | 680 RUNTIME_FUNCTION(Runtime_IsAsmWasmCode) { |
681 SealHandleScope shs(isolate); | 681 SealHandleScope shs(isolate); |
682 DCHECK_EQ(1, args.length()); | 682 DCHECK_EQ(1, args.length()); |
683 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); | 683 CONVERT_ARG_CHECKED(JSFunction, function, 0); |
684 if (!function->shared()->HasAsmWasmData()) { | 684 if (!function->shared()->HasAsmWasmData()) { |
685 // Doesn't have wasm data. | 685 // Doesn't have wasm data. |
686 return isolate->heap()->false_value(); | 686 return isolate->heap()->false_value(); |
687 } | 687 } |
688 if (function->shared()->code() != | 688 if (function->shared()->code() != |
689 isolate->builtins()->builtin(Builtins::kInstantiateAsmJs)) { | 689 isolate->builtins()->builtin(Builtins::kInstantiateAsmJs)) { |
690 // Hasn't been compiled yet. | 690 // Hasn't been compiled yet. |
691 return isolate->heap()->false_value(); | 691 return isolate->heap()->false_value(); |
692 } | 692 } |
693 return isolate->heap()->true_value(); | 693 return isolate->heap()->true_value(); |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
810 RUNTIME_FUNCTION(Runtime_ValidateWasmOrphanedInstance) { | 810 RUNTIME_FUNCTION(Runtime_ValidateWasmOrphanedInstance) { |
811 HandleScope shs(isolate); | 811 HandleScope shs(isolate); |
812 DCHECK(args.length() == 1); | 812 DCHECK(args.length() == 1); |
813 CONVERT_ARG_HANDLE_CHECKED_2(WasmInstanceObject, instance, 0); | 813 CONVERT_ARG_HANDLE_CHECKED_2(WasmInstanceObject, instance, 0); |
814 wasm::testing::ValidateOrphanedInstance(isolate, instance); | 814 wasm::testing::ValidateOrphanedInstance(isolate, instance); |
815 return isolate->heap()->ToBoolean(true); | 815 return isolate->heap()->ToBoolean(true); |
816 } | 816 } |
817 | 817 |
818 } // namespace internal | 818 } // namespace internal |
819 } // namespace v8 | 819 } // namespace v8 |
OLD | NEW |