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