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/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/extensions/externalize-string-extension.h" | 10 #include "src/extensions/externalize-string-extension.h" |
(...skipping 2080 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2091 native_context()->global_object())); | 2091 native_context()->global_object())); |
2092 Handle<String> reflect_string = factory->NewStringFromStaticChars("Reflect"); | 2092 Handle<String> reflect_string = factory->NewStringFromStaticChars("Reflect"); |
2093 Handle<JSObject> reflect = | 2093 Handle<JSObject> reflect = |
2094 factory->NewJSObject(isolate()->object_function(), TENURED); | 2094 factory->NewJSObject(isolate()->object_function(), TENURED); |
2095 JSObject::AddProperty(global, reflect_string, reflect, DONT_ENUM); | 2095 JSObject::AddProperty(global, reflect_string, reflect, DONT_ENUM); |
2096 | 2096 |
2097 SimpleInstallFunction(reflect, factory->defineProperty_string(), | 2097 SimpleInstallFunction(reflect, factory->defineProperty_string(), |
2098 Builtins::kReflectDefineProperty, 3, true); | 2098 Builtins::kReflectDefineProperty, 3, true); |
2099 SimpleInstallFunction(reflect, factory->deleteProperty_string(), | 2099 SimpleInstallFunction(reflect, factory->deleteProperty_string(), |
2100 Builtins::kReflectDeleteProperty, 2, true); | 2100 Builtins::kReflectDeleteProperty, 2, true); |
2101 SimpleInstallFunction(reflect, factory->get_string(), | 2101 SimpleInstallFunction(reflect, factory->get_string(), Builtins::kReflectGet, |
2102 Builtins::kReflectGet, 3, false); | 2102 3, false); |
2103 SimpleInstallFunction(reflect, factory->getOwnPropertyDescriptor_string(), | 2103 SimpleInstallFunction(reflect, factory->getOwnPropertyDescriptor_string(), |
2104 Builtins::kReflectGetOwnPropertyDescriptor, 2, true); | 2104 Builtins::kReflectGetOwnPropertyDescriptor, 2, true); |
2105 SimpleInstallFunction(reflect, factory->getPrototypeOf_string(), | 2105 SimpleInstallFunction(reflect, factory->getPrototypeOf_string(), |
2106 Builtins::kReflectGetPrototypeOf, 1, true); | 2106 Builtins::kReflectGetPrototypeOf, 1, true); |
2107 SimpleInstallFunction(reflect, factory->has_string(), | 2107 SimpleInstallFunction(reflect, factory->has_string(), Builtins::kReflectHas, |
2108 Builtins::kReflectHas, 2, true); | 2108 2, true); |
2109 SimpleInstallFunction(reflect, factory->isExtensible_string(), | 2109 SimpleInstallFunction(reflect, factory->isExtensible_string(), |
2110 Builtins::kReflectIsExtensible, 1, true); | 2110 Builtins::kReflectIsExtensible, 1, true); |
2111 SimpleInstallFunction(reflect, factory->ownKeys_string(), | 2111 SimpleInstallFunction(reflect, factory->ownKeys_string(), |
2112 Builtins::kReflectOwnKeys, 1, true); | 2112 Builtins::kReflectOwnKeys, 1, true); |
2113 SimpleInstallFunction(reflect, factory->preventExtensions_string(), | 2113 SimpleInstallFunction(reflect, factory->preventExtensions_string(), |
2114 Builtins::kReflectPreventExtensions, 1, true); | 2114 Builtins::kReflectPreventExtensions, 1, true); |
2115 SimpleInstallFunction(reflect, factory->set_string(), | 2115 SimpleInstallFunction(reflect, factory->set_string(), Builtins::kReflectSet, |
2116 Builtins::kReflectSet, 3, false); | 2116 3, false); |
2117 SimpleInstallFunction(reflect, factory->setPrototypeOf_string(), | 2117 SimpleInstallFunction(reflect, factory->setPrototypeOf_string(), |
2118 Builtins::kReflectSetPrototypeOf, 2, true); | 2118 Builtins::kReflectSetPrototypeOf, 2, true); |
2119 } | 2119 } |
2120 | 2120 |
2121 | 2121 |
2122 void Genesis::InitializeGlobal_harmony_sharedarraybuffer() { | 2122 void Genesis::InitializeGlobal_harmony_sharedarraybuffer() { |
2123 if (!FLAG_harmony_sharedarraybuffer) return; | 2123 if (!FLAG_harmony_sharedarraybuffer) return; |
2124 | 2124 |
2125 Handle<JSGlobalObject> global( | 2125 Handle<JSGlobalObject> global( |
2126 JSGlobalObject::cast(native_context()->global_object())); | 2126 JSGlobalObject::cast(native_context()->global_object())); |
(...skipping 1093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3220 } | 3220 } |
3221 | 3221 |
3222 | 3222 |
3223 // Called when the top-level V8 mutex is destroyed. | 3223 // Called when the top-level V8 mutex is destroyed. |
3224 void Bootstrapper::FreeThreadResources() { | 3224 void Bootstrapper::FreeThreadResources() { |
3225 DCHECK(!IsActive()); | 3225 DCHECK(!IsActive()); |
3226 } | 3226 } |
3227 | 3227 |
3228 } // namespace internal | 3228 } // namespace internal |
3229 } // namespace v8 | 3229 } // namespace v8 |
OLD | NEW |