Chromium Code Reviews| 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 1833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1844 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object) | 1844 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object) |
| 1845 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_observe) | 1845 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_observe) |
| 1846 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_spread_arrays) | 1846 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_spread_arrays) |
| 1847 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_new_target) | 1847 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_new_target) |
| 1848 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_concat_spreadable) | 1848 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_concat_spreadable) |
| 1849 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_regexps) | 1849 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_regexps) |
| 1850 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_unicode_regexps) | 1850 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_unicode_regexps) |
| 1851 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tostring) | 1851 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tostring) |
| 1852 | 1852 |
| 1853 | 1853 |
| 1854 void Genesis::InitializeGlobal_harmony_tolength() { | |
| 1855 Handle<JSObject> builtins(native_context()->builtins()); | |
| 1856 | |
| 1857 Handle<HeapObject> flag(FLAG_harmony_tolength ? heap()->true_value() | |
|
Michael Starzinger
2015/09/16 16:21:33
nit: Use factory()->ToBoolean(FLAG_harmony_tolengt
aperez
2015/09/16 17:34:47
Acknowledged.
| |
| 1858 : heap()->false_value()); | |
| 1859 Runtime::SetObjectProperty(isolate(), builtins, | |
| 1860 factory()->harmony_tolength_string(), flag, | |
| 1861 STRICT).Assert(); | |
| 1862 } | |
| 1863 | |
| 1864 | |
| 1854 void Genesis::InitializeGlobal_harmony_reflect() { | 1865 void Genesis::InitializeGlobal_harmony_reflect() { |
| 1855 if (!FLAG_harmony_reflect) return; | 1866 if (!FLAG_harmony_reflect) return; |
| 1856 | 1867 |
| 1857 Handle<JSGlobalObject> global(JSGlobalObject::cast( | 1868 Handle<JSGlobalObject> global(JSGlobalObject::cast( |
| 1858 native_context()->global_object())); | 1869 native_context()->global_object())); |
| 1859 Handle<String> reflect_string = | 1870 Handle<String> reflect_string = |
| 1860 factory()->NewStringFromStaticChars("Reflect"); | 1871 factory()->NewStringFromStaticChars("Reflect"); |
| 1861 Handle<Object> reflect = | 1872 Handle<Object> reflect = |
| 1862 factory()->NewJSObject(isolate()->object_function(), TENURED); | 1873 factory()->NewJSObject(isolate()->object_function(), TENURED); |
| 1863 JSObject::AddProperty(global, reflect_string, reflect, DONT_ENUM); | 1874 JSObject::AddProperty(global, reflect_string, reflect, DONT_ENUM); |
| (...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2524 static const char* harmony_object_observe_natives[] = { | 2535 static const char* harmony_object_observe_natives[] = { |
| 2525 "native harmony-object-observe.js", nullptr}; | 2536 "native harmony-object-observe.js", nullptr}; |
| 2526 static const char* harmony_spread_arrays_natives[] = {nullptr}; | 2537 static const char* harmony_spread_arrays_natives[] = {nullptr}; |
| 2527 static const char* harmony_sharedarraybuffer_natives[] = { | 2538 static const char* harmony_sharedarraybuffer_natives[] = { |
| 2528 "native harmony-sharedarraybuffer.js", "native harmony-atomics.js", NULL}; | 2539 "native harmony-sharedarraybuffer.js", "native harmony-atomics.js", NULL}; |
| 2529 static const char* harmony_new_target_natives[] = {nullptr}; | 2540 static const char* harmony_new_target_natives[] = {nullptr}; |
| 2530 static const char* harmony_concat_spreadable_natives[] = { | 2541 static const char* harmony_concat_spreadable_natives[] = { |
| 2531 "native harmony-concat-spreadable.js", nullptr}; | 2542 "native harmony-concat-spreadable.js", nullptr}; |
| 2532 static const char* harmony_simd_natives[] = {"native harmony-simd.js", | 2543 static const char* harmony_simd_natives[] = {"native harmony-simd.js", |
| 2533 nullptr}; | 2544 nullptr}; |
| 2545 static const char* harmony_tolength_natives[] = {nullptr}; | |
| 2534 | 2546 |
| 2535 for (int i = ExperimentalNatives::GetDebuggerCount(); | 2547 for (int i = ExperimentalNatives::GetDebuggerCount(); |
| 2536 i < ExperimentalNatives::GetBuiltinsCount(); i++) { | 2548 i < ExperimentalNatives::GetBuiltinsCount(); i++) { |
| 2537 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ | 2549 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ |
| 2538 if (FLAG_##id) { \ | 2550 if (FLAG_##id) { \ |
| 2539 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ | 2551 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ |
| 2540 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ | 2552 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ |
| 2541 if (strncmp(script_name.start(), id##_natives[j], \ | 2553 if (strncmp(script_name.start(), id##_natives[j], \ |
| 2542 script_name.length()) == 0) { \ | 2554 script_name.length()) == 0) { \ |
| 2543 if (!Bootstrapper::CompileExperimentalBuiltin(isolate(), i)) { \ | 2555 if (!Bootstrapper::CompileExperimentalBuiltin(isolate(), i)) { \ |
| (...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3225 } | 3237 } |
| 3226 | 3238 |
| 3227 | 3239 |
| 3228 // Called when the top-level V8 mutex is destroyed. | 3240 // Called when the top-level V8 mutex is destroyed. |
| 3229 void Bootstrapper::FreeThreadResources() { | 3241 void Bootstrapper::FreeThreadResources() { |
| 3230 DCHECK(!IsActive()); | 3242 DCHECK(!IsActive()); |
| 3231 } | 3243 } |
| 3232 | 3244 |
| 3233 } // namespace internal | 3245 } // namespace internal |
| 3234 } // namespace v8 | 3246 } // namespace v8 |
| OLD | NEW |