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

Side by Side Diff: src/bootstrapper.cc

Issue 2094463002: Allow trailing commas in function parameter lists (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: add mjsunit test for arguments.length with trailing commas Created 4 years, 5 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/ieee754.h" 9 #include "src/base/ieee754.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 2686 matching lines...) Expand 10 before | Expand all | Expand 10 after
2697 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tailcalls) 2697 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tailcalls)
2698 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_instanceof) 2698 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_instanceof)
2699 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_restrictive_declarations) 2699 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_restrictive_declarations)
2700 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_exponentiation_operator) 2700 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_exponentiation_operator)
2701 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_string_padding) 2701 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_string_padding)
2702 #ifdef V8_I18N_SUPPORT 2702 #ifdef V8_I18N_SUPPORT
2703 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(icu_case_mapping) 2703 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(icu_case_mapping)
2704 #endif 2704 #endif
2705 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_async_await) 2705 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_async_await)
2706 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_restrictive_generators) 2706 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_restrictive_generators)
2707 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_trailing_commas_in_parameters)
2707 2708
2708 void InstallPublicSymbol(Factory* factory, Handle<Context> native_context, 2709 void InstallPublicSymbol(Factory* factory, Handle<Context> native_context,
2709 const char* name, Handle<Symbol> value) { 2710 const char* name, Handle<Symbol> value) {
2710 Handle<JSGlobalObject> global( 2711 Handle<JSGlobalObject> global(
2711 JSGlobalObject::cast(native_context->global_object())); 2712 JSGlobalObject::cast(native_context->global_object()));
2712 Handle<String> symbol_string = factory->InternalizeUtf8String("Symbol"); 2713 Handle<String> symbol_string = factory->InternalizeUtf8String("Symbol");
2713 Handle<JSObject> symbol = Handle<JSObject>::cast( 2714 Handle<JSObject> symbol = Handle<JSObject>::cast(
2714 JSObject::GetProperty(global, symbol_string).ToHandleChecked()); 2715 JSObject::GetProperty(global, symbol_string).ToHandleChecked());
2715 Handle<String> name_string = factory->InternalizeUtf8String(name); 2716 Handle<String> name_string = factory->InternalizeUtf8String(name);
2716 PropertyAttributes attributes = 2717 PropertyAttributes attributes =
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
3300 static const char* harmony_exponentiation_operator_natives[] = {nullptr}; 3301 static const char* harmony_exponentiation_operator_natives[] = {nullptr};
3301 static const char* harmony_string_padding_natives[] = { 3302 static const char* harmony_string_padding_natives[] = {
3302 "native harmony-string-padding.js", nullptr}; 3303 "native harmony-string-padding.js", nullptr};
3303 #ifdef V8_I18N_SUPPORT 3304 #ifdef V8_I18N_SUPPORT
3304 static const char* icu_case_mapping_natives[] = {"native icu-case-mapping.js", 3305 static const char* icu_case_mapping_natives[] = {"native icu-case-mapping.js",
3305 nullptr}; 3306 nullptr};
3306 #endif 3307 #endif
3307 static const char* harmony_async_await_natives[] = { 3308 static const char* harmony_async_await_natives[] = {
3308 "native harmony-async-await.js", nullptr}; 3309 "native harmony-async-await.js", nullptr};
3309 static const char* harmony_restrictive_generators_natives[] = {nullptr}; 3310 static const char* harmony_restrictive_generators_natives[] = {nullptr};
3311 static const char* harmony_trailing_commas_in_parameters_natives[] = {
3312 nullptr};
3310 3313
3311 for (int i = ExperimentalNatives::GetDebuggerCount(); 3314 for (int i = ExperimentalNatives::GetDebuggerCount();
3312 i < ExperimentalNatives::GetBuiltinsCount(); i++) { 3315 i < ExperimentalNatives::GetBuiltinsCount(); i++) {
3313 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ 3316 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \
3314 if (FLAG_##id) { \ 3317 if (FLAG_##id) { \
3315 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ 3318 for (size_t j = 0; id##_natives[j] != NULL; j++) { \
3316 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ 3319 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \
3317 if (strncmp(script_name.start(), id##_natives[j], \ 3320 if (strncmp(script_name.start(), id##_natives[j], \
3318 script_name.length()) == 0) { \ 3321 script_name.length()) == 0) { \
3319 if (!Bootstrapper::CompileExperimentalBuiltin(isolate(), i)) { \ 3322 if (!Bootstrapper::CompileExperimentalBuiltin(isolate(), i)) { \
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
3979 } 3982 }
3980 3983
3981 3984
3982 // Called when the top-level V8 mutex is destroyed. 3985 // Called when the top-level V8 mutex is destroyed.
3983 void Bootstrapper::FreeThreadResources() { 3986 void Bootstrapper::FreeThreadResources() {
3984 DCHECK(!IsActive()); 3987 DCHECK(!IsActive());
3985 } 3988 }
3986 3989
3987 } // namespace internal 3990 } // namespace internal
3988 } // namespace v8 3991 } // namespace v8
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