Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: src/bootstrapper.cc

Issue 1309243003: ES6: Array.prototype.slice and friends should use ToLength instead of ToUint32 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed nit: use factory()->ToBoolean() Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/array.js ('k') | src/flag-definitions.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 Handle<Object> flag(factory()->ToBoolean(FLAG_harmony_tolength));
1857 Runtime::SetObjectProperty(isolate(), builtins,
1858 factory()->harmony_tolength_string(), flag,
1859 STRICT).Assert();
1860 }
1861
1862
1854 void Genesis::InitializeGlobal_harmony_reflect() { 1863 void Genesis::InitializeGlobal_harmony_reflect() {
1855 if (!FLAG_harmony_reflect) return; 1864 if (!FLAG_harmony_reflect) return;
1856 1865
1857 Handle<JSGlobalObject> global(JSGlobalObject::cast( 1866 Handle<JSGlobalObject> global(JSGlobalObject::cast(
1858 native_context()->global_object())); 1867 native_context()->global_object()));
1859 Handle<String> reflect_string = 1868 Handle<String> reflect_string =
1860 factory()->NewStringFromStaticChars("Reflect"); 1869 factory()->NewStringFromStaticChars("Reflect");
1861 Handle<Object> reflect = 1870 Handle<Object> reflect =
1862 factory()->NewJSObject(isolate()->object_function(), TENURED); 1871 factory()->NewJSObject(isolate()->object_function(), TENURED);
1863 JSObject::AddProperty(global, reflect_string, reflect, DONT_ENUM); 1872 JSObject::AddProperty(global, reflect_string, reflect, DONT_ENUM);
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
2524 static const char* harmony_object_observe_natives[] = { 2533 static const char* harmony_object_observe_natives[] = {
2525 "native harmony-object-observe.js", nullptr}; 2534 "native harmony-object-observe.js", nullptr};
2526 static const char* harmony_spread_arrays_natives[] = {nullptr}; 2535 static const char* harmony_spread_arrays_natives[] = {nullptr};
2527 static const char* harmony_sharedarraybuffer_natives[] = { 2536 static const char* harmony_sharedarraybuffer_natives[] = {
2528 "native harmony-sharedarraybuffer.js", "native harmony-atomics.js", NULL}; 2537 "native harmony-sharedarraybuffer.js", "native harmony-atomics.js", NULL};
2529 static const char* harmony_new_target_natives[] = {nullptr}; 2538 static const char* harmony_new_target_natives[] = {nullptr};
2530 static const char* harmony_concat_spreadable_natives[] = { 2539 static const char* harmony_concat_spreadable_natives[] = {
2531 "native harmony-concat-spreadable.js", nullptr}; 2540 "native harmony-concat-spreadable.js", nullptr};
2532 static const char* harmony_simd_natives[] = {"native harmony-simd.js", 2541 static const char* harmony_simd_natives[] = {"native harmony-simd.js",
2533 nullptr}; 2542 nullptr};
2543 static const char* harmony_tolength_natives[] = {nullptr};
2534 2544
2535 for (int i = ExperimentalNatives::GetDebuggerCount(); 2545 for (int i = ExperimentalNatives::GetDebuggerCount();
2536 i < ExperimentalNatives::GetBuiltinsCount(); i++) { 2546 i < ExperimentalNatives::GetBuiltinsCount(); i++) {
2537 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ 2547 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \
2538 if (FLAG_##id) { \ 2548 if (FLAG_##id) { \
2539 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ 2549 for (size_t j = 0; id##_natives[j] != NULL; j++) { \
2540 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ 2550 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \
2541 if (strncmp(script_name.start(), id##_natives[j], \ 2551 if (strncmp(script_name.start(), id##_natives[j], \
2542 script_name.length()) == 0) { \ 2552 script_name.length()) == 0) { \
2543 if (!Bootstrapper::CompileExperimentalBuiltin(isolate(), i)) { \ 2553 if (!Bootstrapper::CompileExperimentalBuiltin(isolate(), i)) { \
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
3225 } 3235 }
3226 3236
3227 3237
3228 // Called when the top-level V8 mutex is destroyed. 3238 // Called when the top-level V8 mutex is destroyed.
3229 void Bootstrapper::FreeThreadResources() { 3239 void Bootstrapper::FreeThreadResources() {
3230 DCHECK(!IsActive()); 3240 DCHECK(!IsActive());
3231 } 3241 }
3232 3242
3233 } // namespace internal 3243 } // namespace internal
3234 } // namespace v8 3244 } // namespace v8
OLDNEW
« no previous file with comments | « src/array.js ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698