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

Side by Side Diff: src/bootstrapper.cc

Issue 548833002: [es6] implement Object.assign (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Use runtime %IsPropertyEnumerable() Created 5 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « BUILD.gn ('k') | src/flag-definitions.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 1675 matching lines...) Expand 10 before | Expand all | Expand 10 after
1686 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_arrow_functions) 1686 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_arrow_functions)
1687 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_tostring) 1687 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_tostring)
1688 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_sloppy) 1688 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_sloppy)
1689 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode) 1689 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode)
1690 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode_regexps) 1690 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode_regexps)
1691 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_computed_property_names) 1691 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_computed_property_names)
1692 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_rest_parameters) 1692 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_rest_parameters)
1693 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_reflect) 1693 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_reflect)
1694 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_spreadcalls) 1694 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_spreadcalls)
1695 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_destructuring) 1695 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_destructuring)
1696 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_object)
1696 1697
1697 1698
1698 void Genesis::InstallNativeFunctions_harmony_proxies() { 1699 void Genesis::InstallNativeFunctions_harmony_proxies() {
1699 if (FLAG_harmony_proxies) { 1700 if (FLAG_harmony_proxies) {
1700 INSTALL_NATIVE(JSFunction, "$proxyDerivedHasTrap", derived_has_trap); 1701 INSTALL_NATIVE(JSFunction, "$proxyDerivedHasTrap", derived_has_trap);
1701 INSTALL_NATIVE(JSFunction, "$proxyDerivedGetTrap", derived_get_trap); 1702 INSTALL_NATIVE(JSFunction, "$proxyDerivedGetTrap", derived_get_trap);
1702 INSTALL_NATIVE(JSFunction, "$proxyDerivedSetTrap", derived_set_trap); 1703 INSTALL_NATIVE(JSFunction, "$proxyDerivedSetTrap", derived_set_trap);
1703 INSTALL_NATIVE(JSFunction, "$proxyEnumerate", proxy_enumerate); 1704 INSTALL_NATIVE(JSFunction, "$proxyEnumerate", proxy_enumerate);
1704 } 1705 }
1705 } 1706 }
1706 1707
1707 #undef INSTALL_NATIVE 1708 #undef INSTALL_NATIVE
1708 1709
1709 #define EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(id) \ 1710 #define EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(id) \
1710 void Genesis::InitializeGlobal_##id() {} 1711 void Genesis::InitializeGlobal_##id() {}
1711 1712
1712 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_modules) 1713 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_modules)
1713 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrays) 1714 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrays)
1714 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_array_includes) 1715 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_array_includes)
1715 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_classes) 1716 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_classes)
1716 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_literals) 1717 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_literals)
1717 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrow_functions) 1718 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrow_functions)
1718 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_proxies) 1719 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_proxies)
1719 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy) 1720 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy)
1720 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_unicode) 1721 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_unicode)
1721 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_computed_property_names) 1722 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_computed_property_names)
1722 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_rest_parameters) 1723 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_rest_parameters)
1723 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_spreadcalls) 1724 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_spreadcalls)
1724 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_destructuring) 1725 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_destructuring)
1726 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object)
1725 1727
1726 void Genesis::InitializeGlobal_harmony_regexps() { 1728 void Genesis::InitializeGlobal_harmony_regexps() {
1727 Handle<JSObject> builtins(native_context()->builtins()); 1729 Handle<JSObject> builtins(native_context()->builtins());
1728 1730
1729 Handle<HeapObject> flag(FLAG_harmony_regexps ? heap()->true_value() 1731 Handle<HeapObject> flag(FLAG_harmony_regexps ? heap()->true_value()
1730 : heap()->false_value()); 1732 : heap()->false_value());
1731 Runtime::SetObjectProperty(isolate(), builtins, 1733 Runtime::SetObjectProperty(isolate(), builtins,
1732 factory()->harmony_regexps_string(), flag, 1734 factory()->harmony_regexps_string(), flag,
1733 STRICT).Assert(); 1735 STRICT).Assert();
1734 } 1736 }
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
2321 static const char* harmony_sloppy_natives[] = {nullptr}; 2323 static const char* harmony_sloppy_natives[] = {nullptr};
2322 static const char* harmony_unicode_natives[] = {nullptr}; 2324 static const char* harmony_unicode_natives[] = {nullptr};
2323 static const char* harmony_unicode_regexps_natives[] = {nullptr}; 2325 static const char* harmony_unicode_regexps_natives[] = {nullptr};
2324 static const char* harmony_computed_property_names_natives[] = {nullptr}; 2326 static const char* harmony_computed_property_names_natives[] = {nullptr};
2325 static const char* harmony_rest_parameters_natives[] = {nullptr}; 2327 static const char* harmony_rest_parameters_natives[] = {nullptr};
2326 static const char* harmony_reflect_natives[] = {"native harmony-reflect.js", 2328 static const char* harmony_reflect_natives[] = {"native harmony-reflect.js",
2327 nullptr}; 2329 nullptr};
2328 static const char* harmony_spreadcalls_natives[] = { 2330 static const char* harmony_spreadcalls_natives[] = {
2329 "native harmony-spread.js", nullptr}; 2331 "native harmony-spread.js", nullptr};
2330 static const char* harmony_destructuring_natives[] = {nullptr}; 2332 static const char* harmony_destructuring_natives[] = {nullptr};
2333 static const char* harmony_object_natives[] = {"native harmony-object.js",
2334 NULL};
2331 2335
2332 for (int i = ExperimentalNatives::GetDebuggerCount(); 2336 for (int i = ExperimentalNatives::GetDebuggerCount();
2333 i < ExperimentalNatives::GetBuiltinsCount(); i++) { 2337 i < ExperimentalNatives::GetBuiltinsCount(); i++) {
2334 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ 2338 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \
2335 if (FLAG_##id) { \ 2339 if (FLAG_##id) { \
2336 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ 2340 for (size_t j = 0; id##_natives[j] != NULL; j++) { \
2337 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ 2341 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \
2338 if (strncmp(script_name.start(), id##_natives[j], \ 2342 if (strncmp(script_name.start(), id##_natives[j], \
2339 script_name.length()) == 0) { \ 2343 script_name.length()) == 0) { \
2340 if (!CompileExperimentalBuiltin(isolate(), i)) return false; \ 2344 if (!CompileExperimentalBuiltin(isolate(), i)) return false; \
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
2963 return from + sizeof(NestingCounterType); 2967 return from + sizeof(NestingCounterType);
2964 } 2968 }
2965 2969
2966 2970
2967 // Called when the top-level V8 mutex is destroyed. 2971 // Called when the top-level V8 mutex is destroyed.
2968 void Bootstrapper::FreeThreadResources() { 2972 void Bootstrapper::FreeThreadResources() {
2969 DCHECK(!IsActive()); 2973 DCHECK(!IsActive());
2970 } 2974 }
2971 2975
2972 } } // namespace v8::internal 2976 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698