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

Side by Side Diff: src/bootstrapper.cc

Issue 1127063003: [es6] implement default parameters via desugaring (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: some nits Created 5 years, 7 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 | « no previous file | src/flag-definitions.h » ('j') | src/flag-definitions.h » ('J')
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 1709 matching lines...) Expand 10 before | Expand all | Expand 10 after
1720 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_tostring) 1720 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_tostring)
1721 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_sloppy) 1721 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_sloppy)
1722 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode) 1722 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode)
1723 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode_regexps) 1723 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode_regexps)
1724 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_computed_property_names) 1724 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_computed_property_names)
1725 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_rest_parameters) 1725 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_rest_parameters)
1726 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_reflect) 1726 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_reflect)
1727 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_spreadcalls) 1727 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_spreadcalls)
1728 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_destructuring) 1728 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_destructuring)
1729 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_object) 1729 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_object)
1730 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_optional_params)
rossberg 2015/05/12 14:04:53 Nit: harmony_default_parameters
1730 1731
1731 1732
1732 void Genesis::InstallNativeFunctions_harmony_proxies() { 1733 void Genesis::InstallNativeFunctions_harmony_proxies() {
1733 if (FLAG_harmony_proxies) { 1734 if (FLAG_harmony_proxies) {
1734 INSTALL_NATIVE(JSFunction, "$proxyDerivedHasTrap", derived_has_trap); 1735 INSTALL_NATIVE(JSFunction, "$proxyDerivedHasTrap", derived_has_trap);
1735 INSTALL_NATIVE(JSFunction, "$proxyDerivedGetTrap", derived_get_trap); 1736 INSTALL_NATIVE(JSFunction, "$proxyDerivedGetTrap", derived_get_trap);
1736 INSTALL_NATIVE(JSFunction, "$proxyDerivedSetTrap", derived_set_trap); 1737 INSTALL_NATIVE(JSFunction, "$proxyDerivedSetTrap", derived_set_trap);
1737 INSTALL_NATIVE(JSFunction, "$proxyEnumerate", proxy_enumerate); 1738 INSTALL_NATIVE(JSFunction, "$proxyEnumerate", proxy_enumerate);
1738 } 1739 }
1739 } 1740 }
(...skipping 10 matching lines...) Expand all
1750 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_literals) 1751 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_literals)
1751 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrow_functions) 1752 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrow_functions)
1752 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_proxies) 1753 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_proxies)
1753 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy) 1754 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy)
1754 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_unicode) 1755 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_unicode)
1755 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_computed_property_names) 1756 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_computed_property_names)
1756 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_rest_parameters) 1757 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_rest_parameters)
1757 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_spreadcalls) 1758 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_spreadcalls)
1758 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_destructuring) 1759 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_destructuring)
1759 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object) 1760 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object)
1761 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_optional_params)
1760 1762
1761 void Genesis::InitializeGlobal_harmony_regexps() { 1763 void Genesis::InitializeGlobal_harmony_regexps() {
1762 Handle<JSObject> builtins(native_context()->builtins()); 1764 Handle<JSObject> builtins(native_context()->builtins());
1763 1765
1764 Handle<HeapObject> flag(FLAG_harmony_regexps ? heap()->true_value() 1766 Handle<HeapObject> flag(FLAG_harmony_regexps ? heap()->true_value()
1765 : heap()->false_value()); 1767 : heap()->false_value());
1766 Runtime::SetObjectProperty(isolate(), builtins, 1768 Runtime::SetObjectProperty(isolate(), builtins,
1767 factory()->harmony_regexps_string(), flag, 1769 factory()->harmony_regexps_string(), flag,
1768 STRICT).Assert(); 1770 STRICT).Assert();
1769 } 1771 }
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
2358 static const char* harmony_unicode_regexps_natives[] = {nullptr}; 2360 static const char* harmony_unicode_regexps_natives[] = {nullptr};
2359 static const char* harmony_computed_property_names_natives[] = {nullptr}; 2361 static const char* harmony_computed_property_names_natives[] = {nullptr};
2360 static const char* harmony_rest_parameters_natives[] = {nullptr}; 2362 static const char* harmony_rest_parameters_natives[] = {nullptr};
2361 static const char* harmony_reflect_natives[] = {"native harmony-reflect.js", 2363 static const char* harmony_reflect_natives[] = {"native harmony-reflect.js",
2362 nullptr}; 2364 nullptr};
2363 static const char* harmony_spreadcalls_natives[] = { 2365 static const char* harmony_spreadcalls_natives[] = {
2364 "native harmony-spread.js", nullptr}; 2366 "native harmony-spread.js", nullptr};
2365 static const char* harmony_destructuring_natives[] = {nullptr}; 2367 static const char* harmony_destructuring_natives[] = {nullptr};
2366 static const char* harmony_object_natives[] = {"native harmony-object.js", 2368 static const char* harmony_object_natives[] = {"native harmony-object.js",
2367 NULL}; 2369 NULL};
2370 static const char* harmony_optional_params_natives[] = {nullptr};
2368 2371
2369 for (int i = ExperimentalNatives::GetDebuggerCount(); 2372 for (int i = ExperimentalNatives::GetDebuggerCount();
2370 i < ExperimentalNatives::GetBuiltinsCount(); i++) { 2373 i < ExperimentalNatives::GetBuiltinsCount(); i++) {
2371 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ 2374 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \
2372 if (FLAG_##id) { \ 2375 if (FLAG_##id) { \
2373 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ 2376 for (size_t j = 0; id##_natives[j] != NULL; j++) { \
2374 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ 2377 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \
2375 if (strncmp(script_name.start(), id##_natives[j], \ 2378 if (strncmp(script_name.start(), id##_natives[j], \
2376 script_name.length()) == 0) { \ 2379 script_name.length()) == 0) { \
2377 if (!CompileExperimentalBuiltin(isolate(), i)) return false; \ 2380 if (!CompileExperimentalBuiltin(isolate(), i)) return false; \
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
3012 return from + sizeof(NestingCounterType); 3015 return from + sizeof(NestingCounterType);
3013 } 3016 }
3014 3017
3015 3018
3016 // Called when the top-level V8 mutex is destroyed. 3019 // Called when the top-level V8 mutex is destroyed.
3017 void Bootstrapper::FreeThreadResources() { 3020 void Bootstrapper::FreeThreadResources() {
3018 DCHECK(!IsActive()); 3021 DCHECK(!IsActive());
3019 } 3022 }
3020 3023
3021 } } // namespace v8::internal 3024 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/flag-definitions.h » ('j') | src/flag-definitions.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698