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 2632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Handle<JSFunction> callsite_fun = InstallFunction( | 2647 Handle<JSFunction> callsite_fun = InstallFunction( |
2648 container, "CallSite", JS_OBJECT_TYPE, JSObject::kHeaderSize, | 2648 container, "CallSite", JS_OBJECT_TYPE, JSObject::kHeaderSize, |
2649 isolate->initial_object_prototype(), Builtins::kCallSiteConstructor); | 2649 isolate->initial_object_prototype(), Builtins::kCallSiteConstructor); |
2650 callsite_fun->shared()->DontAdaptArguments(); | 2650 callsite_fun->shared()->DontAdaptArguments(); |
2651 callsite_fun->shared()->set_native(true); | 2651 callsite_fun->shared()->set_native(true); |
2652 | 2652 |
| 2653 isolate->native_context()->set_callsite_function(*callsite_fun); |
| 2654 |
2653 { | 2655 { |
2654 Handle<JSObject> proto = | 2656 Handle<JSObject> proto = |
2655 factory->NewJSObject(isolate->object_function(), TENURED); | 2657 factory->NewJSObject(isolate->object_function(), TENURED); |
2656 JSObject::AddProperty(proto, factory->constructor_string(), callsite_fun, | 2658 JSObject::AddProperty(proto, factory->constructor_string(), callsite_fun, |
2657 DONT_ENUM); | 2659 DONT_ENUM); |
2658 | 2660 |
2659 struct FunctionInfo { | 2661 struct FunctionInfo { |
2660 const char* name; | 2662 const char* name; |
2661 Builtins::Name id; | 2663 Builtins::Name id; |
2662 }; | 2664 }; |
(...skipping 1396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4059 } | 4061 } |
4060 | 4062 |
4061 | 4063 |
4062 // Called when the top-level V8 mutex is destroyed. | 4064 // Called when the top-level V8 mutex is destroyed. |
4063 void Bootstrapper::FreeThreadResources() { | 4065 void Bootstrapper::FreeThreadResources() { |
4064 DCHECK(!IsActive()); | 4066 DCHECK(!IsActive()); |
4065 } | 4067 } |
4066 | 4068 |
4067 } // namespace internal | 4069 } // namespace internal |
4068 } // namespace v8 | 4070 } // namespace v8 |
OLD | NEW |