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

Side by Side Diff: src/bootstrapper.cc

Issue 1083193005: WIP: new.target (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix return from new func Created 5 years, 8 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/api-natives.h" 8 #include "src/api-natives.h"
9 #include "src/base/utils/random-number-generator.h" 9 #include "src/base/utils/random-number-generator.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 1653 matching lines...) Expand 10 before | Expand all | Expand 10 after
1664 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_object_literals) 1664 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_object_literals)
1665 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_regexps) 1665 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_regexps)
1666 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_arrow_functions) 1666 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_arrow_functions)
1667 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_tostring) 1667 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_tostring)
1668 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_sloppy) 1668 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_sloppy)
1669 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode) 1669 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode)
1670 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode_regexps) 1670 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode_regexps)
1671 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_computed_property_names) 1671 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_computed_property_names)
1672 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_rest_parameters) 1672 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_rest_parameters)
1673 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_reflect) 1673 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_reflect)
1674 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_new_target)
1674 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_spreadcalls) 1675 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_spreadcalls)
1675 1676
1676 1677
1677 void Genesis::InstallNativeFunctions_harmony_proxies() { 1678 void Genesis::InstallNativeFunctions_harmony_proxies() {
1678 if (FLAG_harmony_proxies) { 1679 if (FLAG_harmony_proxies) {
1679 INSTALL_NATIVE(JSFunction, "$proxyDerivedHasTrap", derived_has_trap); 1680 INSTALL_NATIVE(JSFunction, "$proxyDerivedHasTrap", derived_has_trap);
1680 INSTALL_NATIVE(JSFunction, "$proxyDerivedGetTrap", derived_get_trap); 1681 INSTALL_NATIVE(JSFunction, "$proxyDerivedGetTrap", derived_get_trap);
1681 INSTALL_NATIVE(JSFunction, "$proxyDerivedSetTrap", derived_set_trap); 1682 INSTALL_NATIVE(JSFunction, "$proxyDerivedSetTrap", derived_set_trap);
1682 INSTALL_NATIVE(JSFunction, "$proxyEnumerate", proxy_enumerate); 1683 INSTALL_NATIVE(JSFunction, "$proxyEnumerate", proxy_enumerate);
1683 } 1684 }
1684 } 1685 }
1685 1686
1686 #undef INSTALL_NATIVE 1687 #undef INSTALL_NATIVE
1687 1688
1688 #define EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(id) \ 1689 #define EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(id) \
1689 void Genesis::InitializeGlobal_##id() {} 1690 void Genesis::InitializeGlobal_##id() {}
1690 1691
1691 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_modules) 1692 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_modules)
1692 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrays) 1693 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrays)
1693 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_array_includes) 1694 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_array_includes)
1694 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_classes) 1695 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_classes)
1695 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_literals) 1696 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_literals)
1696 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrow_functions) 1697 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrow_functions)
1697 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_proxies) 1698 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_proxies)
1698 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy) 1699 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy)
1699 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_unicode) 1700 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_unicode)
1700 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_computed_property_names) 1701 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_computed_property_names)
1701 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_rest_parameters) 1702 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_rest_parameters)
1703 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_new_target)
1702 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_spreadcalls) 1704 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_spreadcalls)
1703 1705
1704 void Genesis::InitializeGlobal_harmony_regexps() { 1706 void Genesis::InitializeGlobal_harmony_regexps() {
1705 Handle<JSObject> builtins(native_context()->builtins()); 1707 Handle<JSObject> builtins(native_context()->builtins());
1706 1708
1707 Handle<HeapObject> flag(FLAG_harmony_regexps ? heap()->true_value() 1709 Handle<HeapObject> flag(FLAG_harmony_regexps ? heap()->true_value()
1708 : heap()->false_value()); 1710 : heap()->false_value());
1709 Runtime::SetObjectProperty(isolate(), builtins, 1711 Runtime::SetObjectProperty(isolate(), builtins,
1710 factory()->harmony_regexps_string(), flag, 1712 factory()->harmony_regexps_string(), flag,
1711 STRICT).Assert(); 1713 STRICT).Assert();
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
2316 static const char* harmony_arrow_functions_natives[] = {NULL}; 2318 static const char* harmony_arrow_functions_natives[] = {NULL};
2317 static const char* harmony_tostring_natives[] = {"native harmony-tostring.js", 2319 static const char* harmony_tostring_natives[] = {"native harmony-tostring.js",
2318 NULL}; 2320 NULL};
2319 static const char* harmony_sloppy_natives[] = {NULL}; 2321 static const char* harmony_sloppy_natives[] = {NULL};
2320 static const char* harmony_unicode_natives[] = {NULL}; 2322 static const char* harmony_unicode_natives[] = {NULL};
2321 static const char* harmony_unicode_regexps_natives[] = {NULL}; 2323 static const char* harmony_unicode_regexps_natives[] = {NULL};
2322 static const char* harmony_computed_property_names_natives[] = {NULL}; 2324 static const char* harmony_computed_property_names_natives[] = {NULL};
2323 static const char* harmony_rest_parameters_natives[] = {NULL}; 2325 static const char* harmony_rest_parameters_natives[] = {NULL};
2324 static const char* harmony_reflect_natives[] = {"native harmony-reflect.js", 2326 static const char* harmony_reflect_natives[] = {"native harmony-reflect.js",
2325 NULL}; 2327 NULL};
2328 static const char* harmony_new_target_natives[] = {NULL};
2326 static const char* harmony_spreadcalls_natives[] = { 2329 static const char* harmony_spreadcalls_natives[] = {
2327 "native harmony-spread.js", NULL}; 2330 "native harmony-spread.js", NULL};
2328 2331
2329 for (int i = ExperimentalNatives::GetDebuggerCount(); 2332 for (int i = ExperimentalNatives::GetDebuggerCount();
2330 i < ExperimentalNatives::GetBuiltinsCount(); i++) { 2333 i < ExperimentalNatives::GetBuiltinsCount(); i++) {
2331 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ 2334 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \
2332 if (FLAG_##id) { \ 2335 if (FLAG_##id) { \
2333 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ 2336 for (size_t j = 0; id##_natives[j] != NULL; j++) { \
2334 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ 2337 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \
2335 if (strncmp(script_name.start(), id##_natives[j], \ 2338 if (strncmp(script_name.start(), id##_natives[j], \
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
2960 return from + sizeof(NestingCounterType); 2963 return from + sizeof(NestingCounterType);
2961 } 2964 }
2962 2965
2963 2966
2964 // Called when the top-level V8 mutex is destroyed. 2967 // Called when the top-level V8 mutex is destroyed.
2965 void Bootstrapper::FreeThreadResources() { 2968 void Bootstrapper::FreeThreadResources() {
2966 DCHECK(!IsActive()); 2969 DCHECK(!IsActive());
2967 } 2970 }
2968 2971
2969 } } // namespace v8::internal 2972 } } // 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