| 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/bootstrapper.h" | 5 #include "src/bootstrapper.h" |
| 6 | 6 |
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/api-natives.h" | 8 #include "src/api-natives.h" |
| 9 #include "src/base/ieee754.h" | 9 #include "src/base/ieee754.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 2626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2637 SimpleInstallFunction(container, "AsyncFunctionThrow", | 2637 SimpleInstallFunction(container, "AsyncFunctionThrow", |
| 2638 Builtins::kGeneratorPrototypeThrow, 1, true); | 2638 Builtins::kGeneratorPrototypeThrow, 1, true); |
| 2639 async_function_next->shared()->set_native(false); | 2639 async_function_next->shared()->set_native(false); |
| 2640 async_function_throw->shared()->set_native(false); | 2640 async_function_throw->shared()->set_native(false); |
| 2641 } | 2641 } |
| 2642 } | 2642 } |
| 2643 | 2643 |
| 2644 { // -- C a l l S i t e | 2644 { // -- C a l l S i t e |
| 2645 // Builtin functions for CallSite. | 2645 // Builtin functions for CallSite. |
| 2646 | 2646 |
| 2647 // CallSites are a special case; the constructor is for our private use |
| 2648 // only, therefore we set it up as a builtin that throws. Internally, we use |
| 2649 // CallSiteUtils::Construct to create CallSite objects. |
| 2650 |
| 2647 Handle<JSFunction> callsite_fun = InstallFunction( | 2651 Handle<JSFunction> callsite_fun = InstallFunction( |
| 2648 container, "CallSite", JS_OBJECT_TYPE, JSObject::kHeaderSize, | 2652 container, "CallSite", JS_OBJECT_TYPE, JSObject::kHeaderSize, |
| 2649 isolate->initial_object_prototype(), Builtins::kCallSiteConstructor); | 2653 isolate->initial_object_prototype(), Builtins::kUnsupportedThrower); |
| 2650 callsite_fun->shared()->DontAdaptArguments(); | 2654 callsite_fun->shared()->DontAdaptArguments(); |
| 2651 callsite_fun->shared()->set_native(true); | 2655 callsite_fun->shared()->set_native(true); |
| 2652 | 2656 |
| 2653 isolate->native_context()->set_callsite_function(*callsite_fun); | 2657 isolate->native_context()->set_callsite_function(*callsite_fun); |
| 2654 | 2658 |
| 2655 { | 2659 { |
| 2656 Handle<JSObject> proto = | 2660 Handle<JSObject> proto = |
| 2657 factory->NewJSObject(isolate->object_function(), TENURED); | 2661 factory->NewJSObject(isolate->object_function(), TENURED); |
| 2658 JSObject::AddProperty(proto, factory->constructor_string(), callsite_fun, | 2662 JSObject::AddProperty(proto, factory->constructor_string(), callsite_fun, |
| 2659 DONT_ENUM); | 2663 DONT_ENUM); |
| (...skipping 1401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4061 } | 4065 } |
| 4062 | 4066 |
| 4063 | 4067 |
| 4064 // Called when the top-level V8 mutex is destroyed. | 4068 // Called when the top-level V8 mutex is destroyed. |
| 4065 void Bootstrapper::FreeThreadResources() { | 4069 void Bootstrapper::FreeThreadResources() { |
| 4066 DCHECK(!IsActive()); | 4070 DCHECK(!IsActive()); |
| 4067 } | 4071 } |
| 4068 | 4072 |
| 4069 } // namespace internal | 4073 } // namespace internal |
| 4070 } // namespace v8 | 4074 } // namespace v8 |
| OLD | NEW |