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

Side by Side Diff: src/bootstrapper.cc

Issue 1399893002: [es7] implement |do| expressions proposal (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Less code duplication in Rewriter Created 5 years, 2 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
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 1863 matching lines...) Expand 10 before | Expand all | Expand 10 after
1874 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_spread_calls) 1874 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_spread_calls)
1875 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_destructuring) 1875 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_destructuring)
1876 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_observe) 1876 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_observe)
1877 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_spread_arrays) 1877 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_spread_arrays)
1878 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_new_target) 1878 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_new_target)
1879 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_concat_spreadable) 1879 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_concat_spreadable)
1880 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_regexps) 1880 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_regexps)
1881 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_unicode_regexps) 1881 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_unicode_regexps)
1882 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tostring) 1882 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tostring)
1883 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_completion) 1883 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_completion)
1884 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_do_expressions)
1884 1885
1885 1886
1886 void Genesis::InitializeGlobal_harmony_tolength() { 1887 void Genesis::InitializeGlobal_harmony_tolength() {
1887 Handle<JSObject> builtins(native_context()->builtins()); 1888 Handle<JSObject> builtins(native_context()->builtins());
1888 Handle<Object> flag(factory()->ToBoolean(FLAG_harmony_tolength)); 1889 Handle<Object> flag(factory()->ToBoolean(FLAG_harmony_tolength));
1889 Runtime::SetObjectProperty(isolate(), builtins, 1890 Runtime::SetObjectProperty(isolate(), builtins,
1890 factory()->harmony_tolength_string(), flag, 1891 factory()->harmony_tolength_string(), flag,
1891 STRICT).Assert(); 1892 STRICT).Assert();
1892 } 1893 }
1893 1894
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
2605 static const char* harmony_spread_arrays_natives[] = {nullptr}; 2606 static const char* harmony_spread_arrays_natives[] = {nullptr};
2606 static const char* harmony_sharedarraybuffer_natives[] = { 2607 static const char* harmony_sharedarraybuffer_natives[] = {
2607 "native harmony-sharedarraybuffer.js", "native harmony-atomics.js", NULL}; 2608 "native harmony-sharedarraybuffer.js", "native harmony-atomics.js", NULL};
2608 static const char* harmony_new_target_natives[] = {nullptr}; 2609 static const char* harmony_new_target_natives[] = {nullptr};
2609 static const char* harmony_concat_spreadable_natives[] = { 2610 static const char* harmony_concat_spreadable_natives[] = {
2610 "native harmony-concat-spreadable.js", nullptr}; 2611 "native harmony-concat-spreadable.js", nullptr};
2611 static const char* harmony_simd_natives[] = {"native harmony-simd.js", 2612 static const char* harmony_simd_natives[] = {"native harmony-simd.js",
2612 nullptr}; 2613 nullptr};
2613 static const char* harmony_tolength_natives[] = {nullptr}; 2614 static const char* harmony_tolength_natives[] = {nullptr};
2614 static const char* harmony_completion_natives[] = {nullptr}; 2615 static const char* harmony_completion_natives[] = {nullptr};
2616 static const char* harmony_do_expressions_natives[] = {nullptr};
2615 2617
2616 for (int i = ExperimentalNatives::GetDebuggerCount(); 2618 for (int i = ExperimentalNatives::GetDebuggerCount();
2617 i < ExperimentalNatives::GetBuiltinsCount(); i++) { 2619 i < ExperimentalNatives::GetBuiltinsCount(); i++) {
2618 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ 2620 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \
2619 if (FLAG_##id) { \ 2621 if (FLAG_##id) { \
2620 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ 2622 for (size_t j = 0; id##_natives[j] != NULL; j++) { \
2621 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ 2623 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \
2622 if (strncmp(script_name.start(), id##_natives[j], \ 2624 if (strncmp(script_name.start(), id##_natives[j], \
2623 script_name.length()) == 0) { \ 2625 script_name.length()) == 0) { \
2624 if (!Bootstrapper::CompileExperimentalBuiltin(isolate(), i)) { \ 2626 if (!Bootstrapper::CompileExperimentalBuiltin(isolate(), i)) { \
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
3304 } 3306 }
3305 3307
3306 3308
3307 // Called when the top-level V8 mutex is destroyed. 3309 // Called when the top-level V8 mutex is destroyed.
3308 void Bootstrapper::FreeThreadResources() { 3310 void Bootstrapper::FreeThreadResources() {
3309 DCHECK(!IsActive()); 3311 DCHECK(!IsActive());
3310 } 3312 }
3311 3313
3312 } // namespace internal 3314 } // namespace internal
3313 } // namespace v8 3315 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698