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/ast/prettyprinter.h" | 8 #include "src/ast/prettyprinter.h" |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/conversions.h" | 10 #include "src/conversions.h" |
11 #include "src/debug/debug.h" | 11 #include "src/debug/debug.h" |
12 #include "src/frames-inl.h" | 12 #include "src/frames-inl.h" |
13 #include "src/isolate-inl.h" | 13 #include "src/isolate-inl.h" |
14 #include "src/messages.h" | 14 #include "src/messages.h" |
15 #include "src/parsing/parser.h" | 15 #include "src/parsing/parser.h" |
| 16 #include "src/wasm/wasm-module.h" |
16 | 17 |
17 namespace v8 { | 18 namespace v8 { |
18 namespace internal { | 19 namespace internal { |
19 | 20 |
20 RUNTIME_FUNCTION(Runtime_CheckIsBootstrapping) { | 21 RUNTIME_FUNCTION(Runtime_CheckIsBootstrapping) { |
21 SealHandleScope shs(isolate); | 22 SealHandleScope shs(isolate); |
22 DCHECK(args.length() == 0); | 23 DCHECK(args.length() == 0); |
23 RUNTIME_ASSERT(isolate->bootstrapper()->IsActive()); | 24 RUNTIME_ASSERT(isolate->bootstrapper()->IsActive()); |
24 return isolate->heap()->undefined_value(); | 25 return isolate->heap()->undefined_value(); |
25 } | 26 } |
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
588 | 589 |
589 RUNTIME_FUNCTION(Runtime_OrdinaryHasInstance) { | 590 RUNTIME_FUNCTION(Runtime_OrdinaryHasInstance) { |
590 HandleScope scope(isolate); | 591 HandleScope scope(isolate); |
591 DCHECK_EQ(2, args.length()); | 592 DCHECK_EQ(2, args.length()); |
592 CONVERT_ARG_HANDLE_CHECKED(Object, callable, 0); | 593 CONVERT_ARG_HANDLE_CHECKED(Object, callable, 0); |
593 CONVERT_ARG_HANDLE_CHECKED(Object, object, 1); | 594 CONVERT_ARG_HANDLE_CHECKED(Object, object, 1); |
594 RETURN_RESULT_OR_FAILURE( | 595 RETURN_RESULT_OR_FAILURE( |
595 isolate, Object::OrdinaryHasInstance(isolate, callable, object)); | 596 isolate, Object::OrdinaryHasInstance(isolate, callable, object)); |
596 } | 597 } |
597 | 598 |
| 599 RUNTIME_FUNCTION(Runtime_IsWasmObject) { |
| 600 HandleScope scope(isolate); |
| 601 DCHECK_EQ(1, args.length()); |
| 602 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); |
| 603 bool is_wasm_object = object->IsJSObject() && |
| 604 wasm::IsWasmObject(Handle<JSObject>::cast(object)); |
| 605 return *isolate->factory()->ToBoolean(is_wasm_object); |
| 606 } |
| 607 |
598 } // namespace internal | 608 } // namespace internal |
599 } // namespace v8 | 609 } // namespace v8 |
OLD | NEW |