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

Side by Side Diff: src/bootstrapper.cc

Issue 953563002: Implement experimental exponentiation operator (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: use Number() instead of OrderedNumber() to include NaN Created 5 years, 10 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/ast.cc ('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/api-natives.h" 8 #include "src/api-natives.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/extensions/externalize-string-extension.h" 10 #include "src/extensions/externalize-string-extension.h"
(...skipping 1597 matching lines...) Expand 10 before | Expand all | Expand 10 after
1608 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_regexps) 1608 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_regexps)
1609 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_arrow_functions) 1609 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_arrow_functions)
1610 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_numeric_literals) 1610 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_numeric_literals)
1611 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_tostring) 1611 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_tostring)
1612 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_templates) 1612 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_templates)
1613 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_sloppy) 1613 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_sloppy)
1614 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode) 1614 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode)
1615 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode_regexps) 1615 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode_regexps)
1616 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_computed_property_names) 1616 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_computed_property_names)
1617 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_rest_parameters) 1617 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_rest_parameters)
1618 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_exponentiation)
1618 1619
1619 1620
1620 void Genesis::InstallNativeFunctions_harmony_proxies() { 1621 void Genesis::InstallNativeFunctions_harmony_proxies() {
1621 if (FLAG_harmony_proxies) { 1622 if (FLAG_harmony_proxies) {
1622 INSTALL_NATIVE(JSFunction, "DerivedHasTrap", derived_has_trap); 1623 INSTALL_NATIVE(JSFunction, "DerivedHasTrap", derived_has_trap);
1623 INSTALL_NATIVE(JSFunction, "DerivedGetTrap", derived_get_trap); 1624 INSTALL_NATIVE(JSFunction, "DerivedGetTrap", derived_get_trap);
1624 INSTALL_NATIVE(JSFunction, "DerivedSetTrap", derived_set_trap); 1625 INSTALL_NATIVE(JSFunction, "DerivedSetTrap", derived_set_trap);
1625 INSTALL_NATIVE(JSFunction, "ProxyEnumerate", proxy_enumerate); 1626 INSTALL_NATIVE(JSFunction, "ProxyEnumerate", proxy_enumerate);
1626 } 1627 }
1627 } 1628 }
(...skipping 12 matching lines...) Expand all
1640 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_literals) 1641 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_literals)
1641 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrow_functions) 1642 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrow_functions)
1642 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_numeric_literals) 1643 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_numeric_literals)
1643 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tostring) 1644 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tostring)
1644 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_proxies) 1645 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_proxies)
1645 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_templates) 1646 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_templates)
1646 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy) 1647 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy)
1647 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_unicode) 1648 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_unicode)
1648 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_computed_property_names) 1649 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_computed_property_names)
1649 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_rest_parameters) 1650 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_rest_parameters)
1651 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_exponentiation)
1650 1652
1651 void Genesis::InitializeGlobal_harmony_regexps() { 1653 void Genesis::InitializeGlobal_harmony_regexps() {
1652 Handle<JSObject> builtins(native_context()->builtins()); 1654 Handle<JSObject> builtins(native_context()->builtins());
1653 1655
1654 Handle<HeapObject> flag(FLAG_harmony_regexps ? heap()->true_value() 1656 Handle<HeapObject> flag(FLAG_harmony_regexps ? heap()->true_value()
1655 : heap()->false_value()); 1657 : heap()->false_value());
1656 PropertyAttributes attributes = 1658 PropertyAttributes attributes =
1657 static_cast<PropertyAttributes>(DONT_DELETE | READ_ONLY); 1659 static_cast<PropertyAttributes>(DONT_DELETE | READ_ONLY);
1658 Runtime::DefineObjectProperty(builtins, factory()->harmony_regexps_string(), 1660 Runtime::DefineObjectProperty(builtins, factory()->harmony_regexps_string(),
1659 flag, attributes).Assert(); 1661 flag, attributes).Assert();
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
2223 static const char* harmony_numeric_literals_natives[] = {NULL}; 2225 static const char* harmony_numeric_literals_natives[] = {NULL};
2224 static const char* harmony_tostring_natives[] = {"native harmony-tostring.js", 2226 static const char* harmony_tostring_natives[] = {"native harmony-tostring.js",
2225 NULL}; 2227 NULL};
2226 static const char* harmony_templates_natives[] = { 2228 static const char* harmony_templates_natives[] = {
2227 "native harmony-templates.js", NULL}; 2229 "native harmony-templates.js", NULL};
2228 static const char* harmony_sloppy_natives[] = {NULL}; 2230 static const char* harmony_sloppy_natives[] = {NULL};
2229 static const char* harmony_unicode_natives[] = {NULL}; 2231 static const char* harmony_unicode_natives[] = {NULL};
2230 static const char* harmony_unicode_regexps_natives[] = {NULL}; 2232 static const char* harmony_unicode_regexps_natives[] = {NULL};
2231 static const char* harmony_computed_property_names_natives[] = {NULL}; 2233 static const char* harmony_computed_property_names_natives[] = {NULL};
2232 static const char* harmony_rest_parameters_natives[] = {NULL}; 2234 static const char* harmony_rest_parameters_natives[] = {NULL};
2235 static const char* harmony_exponentiation_natives[] = {NULL};
2233 2236
2234 for (int i = ExperimentalNatives::GetDebuggerCount(); 2237 for (int i = ExperimentalNatives::GetDebuggerCount();
2235 i < ExperimentalNatives::GetBuiltinsCount(); i++) { 2238 i < ExperimentalNatives::GetBuiltinsCount(); i++) {
2236 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ 2239 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \
2237 if (FLAG_##id) { \ 2240 if (FLAG_##id) { \
2238 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ 2241 for (size_t j = 0; id##_natives[j] != NULL; j++) { \
2239 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ 2242 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \
2240 if (strncmp(script_name.start(), id##_natives[j], \ 2243 if (strncmp(script_name.start(), id##_natives[j], \
2241 script_name.length()) == 0) { \ 2244 script_name.length()) == 0) { \
2242 if (!CompileExperimentalBuiltin(isolate(), i)) return false; \ 2245 if (!CompileExperimentalBuiltin(isolate(), i)) return false; \
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
2859 return from + sizeof(NestingCounterType); 2862 return from + sizeof(NestingCounterType);
2860 } 2863 }
2861 2864
2862 2865
2863 // Called when the top-level V8 mutex is destroyed. 2866 // Called when the top-level V8 mutex is destroyed.
2864 void Bootstrapper::FreeThreadResources() { 2867 void Bootstrapper::FreeThreadResources() {
2865 DCHECK(!IsActive()); 2868 DCHECK(!IsActive());
2866 } 2869 }
2867 2870
2868 } } // namespace v8::internal 2871 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.cc ('k') | src/builtins.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698