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

Side by Side Diff: src/bootstrapper.cc

Issue 2620943002: [ESnext] Implement Object Rest (Closed)
Patch Set: add todo and test Created 3 years, 11 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/ieee754.h" 9 #include "src/base/ieee754.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 3442 matching lines...) Expand 10 before | Expand all | Expand 10 after
3453 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_regexp_property) 3453 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_regexp_property)
3454 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_function_sent) 3454 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_function_sent)
3455 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tailcalls) 3455 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tailcalls)
3456 #ifdef V8_I18N_SUPPORT 3456 #ifdef V8_I18N_SUPPORT
3457 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(datetime_format_to_parts) 3457 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(datetime_format_to_parts)
3458 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(icu_case_mapping) 3458 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(icu_case_mapping)
3459 #endif 3459 #endif
3460 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_restrictive_generators) 3460 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_restrictive_generators)
3461 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_trailing_commas) 3461 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_trailing_commas)
3462 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_class_fields) 3462 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_class_fields)
3463 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_spread) 3463 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_rest_spread)
3464 3464
3465 void InstallPublicSymbol(Factory* factory, Handle<Context> native_context, 3465 void InstallPublicSymbol(Factory* factory, Handle<Context> native_context,
3466 const char* name, Handle<Symbol> value) { 3466 const char* name, Handle<Symbol> value) {
3467 Handle<JSGlobalObject> global( 3467 Handle<JSGlobalObject> global(
3468 JSGlobalObject::cast(native_context->global_object())); 3468 JSGlobalObject::cast(native_context->global_object()));
3469 Handle<String> symbol_string = factory->InternalizeUtf8String("Symbol"); 3469 Handle<String> symbol_string = factory->InternalizeUtf8String("Symbol");
3470 Handle<JSObject> symbol = Handle<JSObject>::cast( 3470 Handle<JSObject> symbol = Handle<JSObject>::cast(
3471 JSObject::GetProperty(global, symbol_string).ToHandleChecked()); 3471 JSObject::GetProperty(global, symbol_string).ToHandleChecked());
3472 Handle<String> name_string = factory->InternalizeUtf8String(name); 3472 Handle<String> name_string = factory->InternalizeUtf8String(name);
3473 PropertyAttributes attributes = 3473 PropertyAttributes attributes =
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
4014 static const char* harmony_array_prototype_values_natives[] = {nullptr}; 4014 static const char* harmony_array_prototype_values_natives[] = {nullptr};
4015 #ifdef V8_I18N_SUPPORT 4015 #ifdef V8_I18N_SUPPORT
4016 static const char* icu_case_mapping_natives[] = {"native icu-case-mapping.js", 4016 static const char* icu_case_mapping_natives[] = {"native icu-case-mapping.js",
4017 nullptr}; 4017 nullptr};
4018 static const char* datetime_format_to_parts_natives[] = { 4018 static const char* datetime_format_to_parts_natives[] = {
4019 "native datetime-format-to-parts.js", nullptr}; 4019 "native datetime-format-to-parts.js", nullptr};
4020 #endif 4020 #endif
4021 static const char* harmony_restrictive_generators_natives[] = {nullptr}; 4021 static const char* harmony_restrictive_generators_natives[] = {nullptr};
4022 static const char* harmony_trailing_commas_natives[] = {nullptr}; 4022 static const char* harmony_trailing_commas_natives[] = {nullptr};
4023 static const char* harmony_class_fields_natives[] = {nullptr}; 4023 static const char* harmony_class_fields_natives[] = {nullptr};
4024 static const char* harmony_object_spread_natives[] = {nullptr}; 4024 static const char* harmony_object_rest_spread_natives[] = {nullptr};
4025 4025
4026 for (int i = ExperimentalNatives::GetDebuggerCount(); 4026 for (int i = ExperimentalNatives::GetDebuggerCount();
4027 i < ExperimentalNatives::GetBuiltinsCount(); i++) { 4027 i < ExperimentalNatives::GetBuiltinsCount(); i++) {
4028 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ 4028 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \
4029 if (FLAG_##id) { \ 4029 if (FLAG_##id) { \
4030 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ 4030 for (size_t j = 0; id##_natives[j] != NULL; j++) { \
4031 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ 4031 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \
4032 if (strncmp(script_name.start(), id##_natives[j], \ 4032 if (strncmp(script_name.start(), id##_natives[j], \
4033 script_name.length()) == 0) { \ 4033 script_name.length()) == 0) { \
4034 if (!Bootstrapper::CompileExperimentalBuiltin(isolate(), i)) { \ 4034 if (!Bootstrapper::CompileExperimentalBuiltin(isolate(), i)) { \
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
4760 } 4760 }
4761 4761
4762 4762
4763 // Called when the top-level V8 mutex is destroyed. 4763 // Called when the top-level V8 mutex is destroyed.
4764 void Bootstrapper::FreeThreadResources() { 4764 void Bootstrapper::FreeThreadResources() {
4765 DCHECK(!IsActive()); 4765 DCHECK(!IsActive());
4766 } 4766 }
4767 4767
4768 } // namespace internal 4768 } // namespace internal
4769 } // namespace v8 4769 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast/ast.h ('k') | src/builtins/builtins-object.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698