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