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/utils/random-number-generator.h" | 9 #include "src/base/utils/random-number-generator.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 2173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2184 if (!FLAG_harmony_reflect) return; | 2184 if (!FLAG_harmony_reflect) return; |
2185 | 2185 |
2186 Handle<JSGlobalObject> global(JSGlobalObject::cast( | 2186 Handle<JSGlobalObject> global(JSGlobalObject::cast( |
2187 native_context()->global_object())); | 2187 native_context()->global_object())); |
2188 Handle<String> reflect_string = | 2188 Handle<String> reflect_string = |
2189 factory()->NewStringFromStaticChars("Reflect"); | 2189 factory()->NewStringFromStaticChars("Reflect"); |
2190 Handle<JSObject> reflect = | 2190 Handle<JSObject> reflect = |
2191 factory()->NewJSObject(isolate()->object_function(), TENURED); | 2191 factory()->NewJSObject(isolate()->object_function(), TENURED); |
2192 JSObject::AddProperty(global, reflect_string, reflect, DONT_ENUM); | 2192 JSObject::AddProperty(global, reflect_string, reflect, DONT_ENUM); |
2193 | 2193 |
| 2194 SimpleInstallFunction(reflect, "defineProperty", |
| 2195 Builtins::kReflectDefineProperty, 3, true); |
2194 SimpleInstallFunction(reflect, "deleteProperty", | 2196 SimpleInstallFunction(reflect, "deleteProperty", |
2195 Builtins::kReflectDeleteProperty, 2, true); | 2197 Builtins::kReflectDeleteProperty, 2, true); |
2196 SimpleInstallFunction(reflect, "get", | 2198 SimpleInstallFunction(reflect, "get", |
2197 Builtins::kReflectGet, 3, false); | 2199 Builtins::kReflectGet, 3, false); |
2198 SimpleInstallFunction(reflect, "getPrototypeOf", | 2200 SimpleInstallFunction(reflect, "getPrototypeOf", |
2199 Builtins::kReflectGetPrototypeOf, 1, true); | 2201 Builtins::kReflectGetPrototypeOf, 1, true); |
2200 SimpleInstallFunction(reflect, "has", | 2202 SimpleInstallFunction(reflect, "has", |
2201 Builtins::kReflectHas, 2, true); | 2203 Builtins::kReflectHas, 2, true); |
2202 SimpleInstallFunction(reflect, "isExtensible", | 2204 SimpleInstallFunction(reflect, "isExtensible", |
2203 Builtins::kReflectIsExtensible, 1, true); | 2205 Builtins::kReflectIsExtensible, 1, true); |
(...skipping 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3320 } | 3322 } |
3321 | 3323 |
3322 | 3324 |
3323 // Called when the top-level V8 mutex is destroyed. | 3325 // Called when the top-level V8 mutex is destroyed. |
3324 void Bootstrapper::FreeThreadResources() { | 3326 void Bootstrapper::FreeThreadResources() { |
3325 DCHECK(!IsActive()); | 3327 DCHECK(!IsActive()); |
3326 } | 3328 } |
3327 | 3329 |
3328 } // namespace internal | 3330 } // namespace internal |
3329 } // namespace v8 | 3331 } // namespace v8 |
OLD | NEW |