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

Side by Side Diff: src/bootstrapper.cc

Issue 795573005: ES6 computed property names (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Moar tests Created 6 years 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/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/extensions/externalize-string-extension.h" 9 #include "src/extensions/externalize-string-extension.h"
10 #include "src/extensions/free-buffer-extension.h" 10 #include "src/extensions/free-buffer-extension.h"
(...skipping 1573 matching lines...) Expand 10 before | Expand all | Expand 10 after
1584 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_arrays) 1584 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_arrays)
1585 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_classes) 1585 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_classes)
1586 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_object_literals) 1586 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_object_literals)
1587 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_regexps) 1587 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_regexps)
1588 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_arrow_functions) 1588 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_arrow_functions)
1589 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_numeric_literals) 1589 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_numeric_literals)
1590 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_tostring) 1590 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_tostring)
1591 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_templates) 1591 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_templates)
1592 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_sloppy) 1592 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_sloppy)
1593 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode) 1593 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode)
1594 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_computed_property_names)
1594 1595
1595 1596
1596 void Genesis::InstallNativeFunctions_harmony_proxies() { 1597 void Genesis::InstallNativeFunctions_harmony_proxies() {
1597 if (FLAG_harmony_proxies) { 1598 if (FLAG_harmony_proxies) {
1598 INSTALL_NATIVE(JSFunction, "DerivedHasTrap", derived_has_trap); 1599 INSTALL_NATIVE(JSFunction, "DerivedHasTrap", derived_has_trap);
1599 INSTALL_NATIVE(JSFunction, "DerivedGetTrap", derived_get_trap); 1600 INSTALL_NATIVE(JSFunction, "DerivedGetTrap", derived_get_trap);
1600 INSTALL_NATIVE(JSFunction, "DerivedSetTrap", derived_set_trap); 1601 INSTALL_NATIVE(JSFunction, "DerivedSetTrap", derived_set_trap);
1601 INSTALL_NATIVE(JSFunction, "ProxyEnumerate", proxy_enumerate); 1602 INSTALL_NATIVE(JSFunction, "ProxyEnumerate", proxy_enumerate);
1602 } 1603 }
1603 } 1604 }
1604 1605
1605 #undef INSTALL_NATIVE 1606 #undef INSTALL_NATIVE
1606 1607
1607 #define EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(id) \ 1608 #define EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(id) \
1608 void Genesis::InitializeGlobal_##id() {} 1609 void Genesis::InitializeGlobal_##id() {}
1609 1610
1610 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_scoping) 1611 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_scoping)
1611 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_modules) 1612 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_modules)
1612 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_strings) 1613 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_strings)
1613 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrays) 1614 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrays)
1614 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_classes) 1615 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_classes)
1615 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_literals) 1616 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_literals)
1616 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrow_functions) 1617 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrow_functions)
1617 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_numeric_literals) 1618 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_numeric_literals)
1618 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tostring) 1619 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tostring)
1619 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_proxies) 1620 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_proxies)
1620 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_templates) 1621 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_templates)
1621 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy) 1622 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy)
1622 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_unicode) 1623 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_unicode)
1624 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_computed_property_names)
1623 1625
1624 void Genesis::InitializeGlobal_harmony_regexps() { 1626 void Genesis::InitializeGlobal_harmony_regexps() {
1625 Handle<JSObject> builtins(native_context()->builtins()); 1627 Handle<JSObject> builtins(native_context()->builtins());
1626 1628
1627 Handle<HeapObject> flag(FLAG_harmony_regexps ? heap()->true_value() 1629 Handle<HeapObject> flag(FLAG_harmony_regexps ? heap()->true_value()
1628 : heap()->false_value()); 1630 : heap()->false_value());
1629 PropertyAttributes attributes = 1631 PropertyAttributes attributes =
1630 static_cast<PropertyAttributes>(DONT_DELETE | READ_ONLY); 1632 static_cast<PropertyAttributes>(DONT_DELETE | READ_ONLY);
1631 Runtime::DefineObjectProperty(builtins, factory()->harmony_regexps_string(), 1633 Runtime::DefineObjectProperty(builtins, factory()->harmony_regexps_string(),
1632 flag, attributes).Assert(); 1634 flag, attributes).Assert();
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
2164 static const char* harmony_object_literals_natives[] = {NULL}; 2166 static const char* harmony_object_literals_natives[] = {NULL};
2165 static const char* harmony_regexps_natives[] = {NULL}; 2167 static const char* harmony_regexps_natives[] = {NULL};
2166 static const char* harmony_arrow_functions_natives[] = {NULL}; 2168 static const char* harmony_arrow_functions_natives[] = {NULL};
2167 static const char* harmony_numeric_literals_natives[] = {NULL}; 2169 static const char* harmony_numeric_literals_natives[] = {NULL};
2168 static const char* harmony_tostring_natives[] = {"native harmony-tostring.js", 2170 static const char* harmony_tostring_natives[] = {"native harmony-tostring.js",
2169 NULL}; 2171 NULL};
2170 static const char* harmony_templates_natives[] = { 2172 static const char* harmony_templates_natives[] = {
2171 "native harmony-templates.js", NULL}; 2173 "native harmony-templates.js", NULL};
2172 static const char* harmony_sloppy_natives[] = {NULL}; 2174 static const char* harmony_sloppy_natives[] = {NULL};
2173 static const char* harmony_unicode_natives[] = {NULL}; 2175 static const char* harmony_unicode_natives[] = {NULL};
2176 static const char* harmony_computed_property_names_natives[] = {NULL};
2174 2177
2175 for (int i = ExperimentalNatives::GetDebuggerCount(); 2178 for (int i = ExperimentalNatives::GetDebuggerCount();
2176 i < ExperimentalNatives::GetBuiltinsCount(); i++) { 2179 i < ExperimentalNatives::GetBuiltinsCount(); i++) {
2177 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ 2180 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \
2178 if (FLAG_##id) { \ 2181 if (FLAG_##id) { \
2179 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ 2182 for (size_t j = 0; id##_natives[j] != NULL; j++) { \
2180 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ 2183 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \
2181 if (strncmp(script_name.start(), id##_natives[j], \ 2184 if (strncmp(script_name.start(), id##_natives[j], \
2182 script_name.length()) == 0) { \ 2185 script_name.length()) == 0) { \
2183 if (!CompileExperimentalBuiltin(isolate(), i)) return false; \ 2186 if (!CompileExperimentalBuiltin(isolate(), i)) return false; \
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
2819 return from + sizeof(NestingCounterType); 2822 return from + sizeof(NestingCounterType);
2820 } 2823 }
2821 2824
2822 2825
2823 // Called when the top-level V8 mutex is destroyed. 2826 // Called when the top-level V8 mutex is destroyed.
2824 void Bootstrapper::FreeThreadResources() { 2827 void Bootstrapper::FreeThreadResources() {
2825 DCHECK(!IsActive()); 2828 DCHECK(!IsActive());
2826 } 2829 }
2827 2830
2828 } } // namespace v8::internal 2831 } } // namespace v8::internal
OLDNEW
« src/arm/full-codegen-arm.cc ('K') | « src/bailout-reason.h ('k') | src/builtins.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698