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

Side by Side Diff: src/bootstrapper.cc

Issue 663683006: Implement ES6 Template Literals (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove TemplateLiteral AST node, do it all in parsing Created 6 years, 1 month 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 | Annotate | Revision Log
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 1578 matching lines...) Expand 10 before | Expand all | Expand 10 after
1589 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_scoping) 1589 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_scoping)
1590 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_modules) 1590 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_modules)
1591 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_strings) 1591 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_strings)
1592 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_arrays) 1592 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_arrays)
1593 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_classes) 1593 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_classes)
1594 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_object_literals) 1594 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_object_literals)
1595 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_regexps) 1595 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_regexps)
1596 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_arrow_functions) 1596 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_arrow_functions)
1597 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_numeric_literals) 1597 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_numeric_literals)
1598 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_tostring) 1598 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_tostring)
1599 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_templates)
1599 1600
1600 1601
1601 void Genesis::InstallNativeFunctions_harmony_proxies() { 1602 void Genesis::InstallNativeFunctions_harmony_proxies() {
1602 if (FLAG_harmony_proxies) { 1603 if (FLAG_harmony_proxies) {
1603 INSTALL_NATIVE(JSFunction, "DerivedHasTrap", derived_has_trap); 1604 INSTALL_NATIVE(JSFunction, "DerivedHasTrap", derived_has_trap);
1604 INSTALL_NATIVE(JSFunction, "DerivedGetTrap", derived_get_trap); 1605 INSTALL_NATIVE(JSFunction, "DerivedGetTrap", derived_get_trap);
1605 INSTALL_NATIVE(JSFunction, "DerivedSetTrap", derived_set_trap); 1606 INSTALL_NATIVE(JSFunction, "DerivedSetTrap", derived_set_trap);
1606 INSTALL_NATIVE(JSFunction, "ProxyEnumerate", proxy_enumerate); 1607 INSTALL_NATIVE(JSFunction, "ProxyEnumerate", proxy_enumerate);
1607 } 1608 }
1608 } 1609 }
1609 1610
1610 #undef INSTALL_NATIVE 1611 #undef INSTALL_NATIVE
1611 1612
1612 #define EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(id) \ 1613 #define EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(id) \
1613 void Genesis::InitializeGlobal_##id() {} 1614 void Genesis::InitializeGlobal_##id() {}
1614 1615
1615 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_scoping) 1616 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_scoping)
1616 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_modules) 1617 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_modules)
1617 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_strings) 1618 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_strings)
1618 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrays) 1619 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrays)
1619 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_classes) 1620 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_classes)
1620 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_literals) 1621 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_literals)
1621 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrow_functions) 1622 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrow_functions)
1622 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_numeric_literals) 1623 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_numeric_literals)
1623 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tostring) 1624 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tostring)
1624 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_proxies) 1625 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_proxies)
1626 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_templates)
1625 1627
1626 void Genesis::InitializeGlobal_harmony_regexps() { 1628 void Genesis::InitializeGlobal_harmony_regexps() {
1627 Handle<JSObject> builtins(native_context()->builtins()); 1629 Handle<JSObject> builtins(native_context()->builtins());
1628 1630
1629 Handle<HeapObject> flag(FLAG_harmony_regexps ? heap()->true_value() 1631 Handle<HeapObject> flag(FLAG_harmony_regexps ? heap()->true_value()
1630 : heap()->false_value()); 1632 : heap()->false_value());
1631 PropertyAttributes attributes = 1633 PropertyAttributes attributes =
1632 static_cast<PropertyAttributes>(DONT_DELETE | READ_ONLY); 1634 static_cast<PropertyAttributes>(DONT_DELETE | READ_ONLY);
1633 Runtime::DefineObjectProperty(builtins, factory()->harmony_regexps_string(), 1635 Runtime::DefineObjectProperty(builtins, factory()->harmony_regexps_string(),
1634 flag, attributes).Assert(); 1636 flag, attributes).Assert();
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
2157 static const char* harmony_classes_natives[] = {"native harmony-classes.js", 2159 static const char* harmony_classes_natives[] = {"native harmony-classes.js",
2158 NULL}; 2160 NULL};
2159 static const char* harmony_modules_natives[] = {NULL}; 2161 static const char* harmony_modules_natives[] = {NULL};
2160 static const char* harmony_scoping_natives[] = {NULL}; 2162 static const char* harmony_scoping_natives[] = {NULL};
2161 static const char* harmony_object_literals_natives[] = {NULL}; 2163 static const char* harmony_object_literals_natives[] = {NULL};
2162 static const char* harmony_regexps_natives[] = {NULL}; 2164 static const char* harmony_regexps_natives[] = {NULL};
2163 static const char* harmony_arrow_functions_natives[] = {NULL}; 2165 static const char* harmony_arrow_functions_natives[] = {NULL};
2164 static const char* harmony_numeric_literals_natives[] = {NULL}; 2166 static const char* harmony_numeric_literals_natives[] = {NULL};
2165 static const char* harmony_tostring_natives[] = {"native harmony-tostring.js", 2167 static const char* harmony_tostring_natives[] = {"native harmony-tostring.js",
2166 NULL}; 2168 NULL};
2169 static const char* harmony_templates_natives[] = {
2170 "native harmony-templates.js", NULL};
2167 2171
2168 for (int i = ExperimentalNatives::GetDebuggerCount(); 2172 for (int i = ExperimentalNatives::GetDebuggerCount();
2169 i < ExperimentalNatives::GetBuiltinsCount(); i++) { 2173 i < ExperimentalNatives::GetBuiltinsCount(); i++) {
2170 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ 2174 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \
2171 if (FLAG_##id) { \ 2175 if (FLAG_##id) { \
2172 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ 2176 for (size_t j = 0; id##_natives[j] != NULL; j++) { \
2173 if (strcmp(ExperimentalNatives::GetScriptName(i).start(), \ 2177 if (strcmp(ExperimentalNatives::GetScriptName(i).start(), \
2174 id##_natives[j]) == 0) { \ 2178 id##_natives[j]) == 0) { \
2175 if (!CompileExperimentalBuiltin(isolate(), i)) return false; \ 2179 if (!CompileExperimentalBuiltin(isolate(), i)) return false; \
2176 } \ 2180 } \
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
2810 return from + sizeof(NestingCounterType); 2814 return from + sizeof(NestingCounterType);
2811 } 2815 }
2812 2816
2813 2817
2814 // Called when the top-level V8 mutex is destroyed. 2818 // Called when the top-level V8 mutex is destroyed.
2815 void Bootstrapper::FreeThreadResources() { 2819 void Bootstrapper::FreeThreadResources() {
2816 DCHECK(!IsActive()); 2820 DCHECK(!IsActive());
2817 } 2821 }
2818 2822
2819 } } // namespace v8::internal 2823 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/bailout-reason.h ('k') | src/flag-definitions.h » ('j') | src/harmony-templates.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698