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/ast/prettyprinter.h" | 10 #include "src/ast/prettyprinter.h" |
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
625 CONVERT_ARG_HANDLE_CHECKED(Object, object, 1); | 625 CONVERT_ARG_HANDLE_CHECKED(Object, object, 1); |
626 RETURN_RESULT_OR_FAILURE( | 626 RETURN_RESULT_OR_FAILURE( |
627 isolate, Object::OrdinaryHasInstance(isolate, callable, object)); | 627 isolate, Object::OrdinaryHasInstance(isolate, callable, object)); |
628 } | 628 } |
629 | 629 |
630 RUNTIME_FUNCTION(Runtime_IsWasmObject) { | 630 RUNTIME_FUNCTION(Runtime_IsWasmObject) { |
631 HandleScope scope(isolate); | 631 HandleScope scope(isolate); |
632 DCHECK_EQ(1, args.length()); | 632 DCHECK_EQ(1, args.length()); |
633 CONVERT_ARG_CHECKED(Object, object, 0); | 633 CONVERT_ARG_CHECKED(Object, object, 0); |
634 bool is_wasm_object = | 634 bool is_wasm_object = |
635 object->IsJSObject() && wasm::IsWasmObject(JSObject::cast(object)); | 635 object->IsJSObject() && wasm::IsWasmInstance(JSObject::cast(object)); |
636 return *isolate->factory()->ToBoolean(is_wasm_object); | 636 return *isolate->factory()->ToBoolean(is_wasm_object); |
637 } | 637 } |
638 | 638 |
639 RUNTIME_FUNCTION(Runtime_Typeof) { | 639 RUNTIME_FUNCTION(Runtime_Typeof) { |
640 HandleScope scope(isolate); | 640 HandleScope scope(isolate); |
641 DCHECK_EQ(1, args.length()); | 641 DCHECK_EQ(1, args.length()); |
642 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); | 642 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); |
643 return *Object::TypeOf(isolate, object); | 643 return *Object::TypeOf(isolate, object); |
644 } | 644 } |
645 | 645 |
646 } // namespace internal | 646 } // namespace internal |
647 } // namespace v8 | 647 } // namespace v8 |
OLD | NEW |