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

Side by Side Diff: src/bootstrapper.cc

Issue 798243004: ES6 computed property names (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Disable test on windows Created 5 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
« no previous file with comments | « src/bailout-reason.h ('k') | src/builtins.h » ('j') | no next file with comments »
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/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 1579 matching lines...) Expand 10 before | Expand all | Expand 10 after
1590 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_array_includes) 1590 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_array_includes)
1591 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_classes) 1591 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_classes)
1592 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_object_literals) 1592 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_object_literals)
1593 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_regexps) 1593 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_regexps)
1594 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_arrow_functions) 1594 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_arrow_functions)
1595 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_numeric_literals) 1595 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_numeric_literals)
1596 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_tostring) 1596 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_tostring)
1597 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_templates) 1597 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_templates)
1598 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_sloppy) 1598 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_sloppy)
1599 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode) 1599 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode)
1600 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_computed_property_names)
1600 1601
1601 1602
1602 void Genesis::InstallNativeFunctions_harmony_proxies() { 1603 void Genesis::InstallNativeFunctions_harmony_proxies() {
1603 if (FLAG_harmony_proxies) { 1604 if (FLAG_harmony_proxies) {
1604 INSTALL_NATIVE(JSFunction, "DerivedHasTrap", derived_has_trap); 1605 INSTALL_NATIVE(JSFunction, "DerivedHasTrap", derived_has_trap);
1605 INSTALL_NATIVE(JSFunction, "DerivedGetTrap", derived_get_trap); 1606 INSTALL_NATIVE(JSFunction, "DerivedGetTrap", derived_get_trap);
1606 INSTALL_NATIVE(JSFunction, "DerivedSetTrap", derived_set_trap); 1607 INSTALL_NATIVE(JSFunction, "DerivedSetTrap", derived_set_trap);
1607 INSTALL_NATIVE(JSFunction, "ProxyEnumerate", proxy_enumerate); 1608 INSTALL_NATIVE(JSFunction, "ProxyEnumerate", proxy_enumerate);
1608 } 1609 }
1609 } 1610 }
1610 1611
1611 #undef INSTALL_NATIVE 1612 #undef INSTALL_NATIVE
1612 1613
1613 #define EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(id) \ 1614 #define EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(id) \
1614 void Genesis::InitializeGlobal_##id() {} 1615 void Genesis::InitializeGlobal_##id() {}
1615 1616
1616 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_scoping) 1617 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_scoping)
1617 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_modules) 1618 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_modules)
1618 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_strings) 1619 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_strings)
1619 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrays) 1620 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrays)
1620 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_array_includes) 1621 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_array_includes)
1621 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_classes) 1622 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_classes)
1622 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_literals) 1623 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_literals)
1623 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrow_functions) 1624 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrow_functions)
1624 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_numeric_literals) 1625 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_numeric_literals)
1625 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tostring) 1626 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tostring)
1626 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_proxies) 1627 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_proxies)
1627 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_templates) 1628 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_templates)
1628 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy) 1629 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy)
1630 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_computed_property_names)
1629 1631
1630 void Genesis::InitializeGlobal_harmony_regexps() { 1632 void Genesis::InitializeGlobal_harmony_regexps() {
1631 Handle<JSObject> builtins(native_context()->builtins()); 1633 Handle<JSObject> builtins(native_context()->builtins());
1632 1634
1633 Handle<HeapObject> flag(FLAG_harmony_regexps ? heap()->true_value() 1635 Handle<HeapObject> flag(FLAG_harmony_regexps ? heap()->true_value()
1634 : heap()->false_value()); 1636 : heap()->false_value());
1635 PropertyAttributes attributes = 1637 PropertyAttributes attributes =
1636 static_cast<PropertyAttributes>(DONT_DELETE | READ_ONLY); 1638 static_cast<PropertyAttributes>(DONT_DELETE | READ_ONLY);
1637 Runtime::DefineObjectProperty(builtins, factory()->harmony_regexps_string(), 1639 Runtime::DefineObjectProperty(builtins, factory()->harmony_regexps_string(),
1638 flag, attributes).Assert(); 1640 flag, attributes).Assert();
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
2185 static const char* harmony_regexps_natives[] = { 2187 static const char* harmony_regexps_natives[] = {
2186 "native harmony-regexp.js", NULL}; 2188 "native harmony-regexp.js", NULL};
2187 static const char* harmony_arrow_functions_natives[] = {NULL}; 2189 static const char* harmony_arrow_functions_natives[] = {NULL};
2188 static const char* harmony_numeric_literals_natives[] = {NULL}; 2190 static const char* harmony_numeric_literals_natives[] = {NULL};
2189 static const char* harmony_tostring_natives[] = {"native harmony-tostring.js", 2191 static const char* harmony_tostring_natives[] = {"native harmony-tostring.js",
2190 NULL}; 2192 NULL};
2191 static const char* harmony_templates_natives[] = { 2193 static const char* harmony_templates_natives[] = {
2192 "native harmony-templates.js", NULL}; 2194 "native harmony-templates.js", NULL};
2193 static const char* harmony_sloppy_natives[] = {NULL}; 2195 static const char* harmony_sloppy_natives[] = {NULL};
2194 static const char* harmony_unicode_natives[] = {NULL}; 2196 static const char* harmony_unicode_natives[] = {NULL};
2197 static const char* harmony_computed_property_names_natives[] = {NULL};
2195 2198
2196 for (int i = ExperimentalNatives::GetDebuggerCount(); 2199 for (int i = ExperimentalNatives::GetDebuggerCount();
2197 i < ExperimentalNatives::GetBuiltinsCount(); i++) { 2200 i < ExperimentalNatives::GetBuiltinsCount(); i++) {
2198 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ 2201 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \
2199 if (FLAG_##id) { \ 2202 if (FLAG_##id) { \
2200 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ 2203 for (size_t j = 0; id##_natives[j] != NULL; j++) { \
2201 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ 2204 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \
2202 if (strncmp(script_name.start(), id##_natives[j], \ 2205 if (strncmp(script_name.start(), id##_natives[j], \
2203 script_name.length()) == 0) { \ 2206 script_name.length()) == 0) { \
2204 if (!CompileExperimentalBuiltin(isolate(), i)) return false; \ 2207 if (!CompileExperimentalBuiltin(isolate(), i)) return false; \
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
2854 return from + sizeof(NestingCounterType); 2857 return from + sizeof(NestingCounterType);
2855 } 2858 }
2856 2859
2857 2860
2858 // Called when the top-level V8 mutex is destroyed. 2861 // Called when the top-level V8 mutex is destroyed.
2859 void Bootstrapper::FreeThreadResources() { 2862 void Bootstrapper::FreeThreadResources() {
2860 DCHECK(!IsActive()); 2863 DCHECK(!IsActive());
2861 } 2864 }
2862 2865
2863 } } // namespace v8::internal 2866 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/bailout-reason.h ('k') | src/builtins.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698