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 2156303002: Implement new Function.prototype.toString and fix CreateDynamicFunction parsing (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix async function constructor Created 4 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
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/ieee754.h" 9 #include "src/base/ieee754.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 3228 matching lines...) Expand 10 before | Expand all | Expand 10 after
3239 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tailcalls) 3239 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tailcalls)
3240 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_restrictive_declarations) 3240 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_restrictive_declarations)
3241 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_string_padding) 3241 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_string_padding)
3242 #ifdef V8_I18N_SUPPORT 3242 #ifdef V8_I18N_SUPPORT
3243 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(datetime_format_to_parts) 3243 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(datetime_format_to_parts)
3244 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(icu_case_mapping) 3244 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(icu_case_mapping)
3245 #endif 3245 #endif
3246 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_async_await) 3246 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_async_await)
3247 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_restrictive_generators) 3247 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_restrictive_generators)
3248 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_trailing_commas) 3248 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_trailing_commas)
3249 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_function_tostring)
3249 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_class_fields) 3250 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_class_fields)
3250 3251
3251 void InstallPublicSymbol(Factory* factory, Handle<Context> native_context, 3252 void InstallPublicSymbol(Factory* factory, Handle<Context> native_context,
3252 const char* name, Handle<Symbol> value) { 3253 const char* name, Handle<Symbol> value) {
3253 Handle<JSGlobalObject> global( 3254 Handle<JSGlobalObject> global(
3254 JSGlobalObject::cast(native_context->global_object())); 3255 JSGlobalObject::cast(native_context->global_object()));
3255 Handle<String> symbol_string = factory->InternalizeUtf8String("Symbol"); 3256 Handle<String> symbol_string = factory->InternalizeUtf8String("Symbol");
3256 Handle<JSObject> symbol = Handle<JSObject>::cast( 3257 Handle<JSObject> symbol = Handle<JSObject>::cast(
3257 JSObject::GetProperty(global, symbol_string).ToHandleChecked()); 3258 JSObject::GetProperty(global, symbol_string).ToHandleChecked());
3258 Handle<String> name_string = factory->InternalizeUtf8String(name); 3259 Handle<String> name_string = factory->InternalizeUtf8String(name);
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
3837 "native harmony-string-padding.js", nullptr}; 3838 "native harmony-string-padding.js", nullptr};
3838 #ifdef V8_I18N_SUPPORT 3839 #ifdef V8_I18N_SUPPORT
3839 static const char* icu_case_mapping_natives[] = {"native icu-case-mapping.js", 3840 static const char* icu_case_mapping_natives[] = {"native icu-case-mapping.js",
3840 nullptr}; 3841 nullptr};
3841 static const char* datetime_format_to_parts_natives[] = { 3842 static const char* datetime_format_to_parts_natives[] = {
3842 "native datetime-format-to-parts.js", nullptr}; 3843 "native datetime-format-to-parts.js", nullptr};
3843 #endif 3844 #endif
3844 static const char* harmony_async_await_natives[] = {nullptr}; 3845 static const char* harmony_async_await_natives[] = {nullptr};
3845 static const char* harmony_restrictive_generators_natives[] = {nullptr}; 3846 static const char* harmony_restrictive_generators_natives[] = {nullptr};
3846 static const char* harmony_trailing_commas_natives[] = {nullptr}; 3847 static const char* harmony_trailing_commas_natives[] = {nullptr};
3848 static const char* harmony_function_tostring_natives[] = {nullptr};
3847 static const char* harmony_class_fields_natives[] = {nullptr}; 3849 static const char* harmony_class_fields_natives[] = {nullptr};
3848 3850
3849 for (int i = ExperimentalNatives::GetDebuggerCount(); 3851 for (int i = ExperimentalNatives::GetDebuggerCount();
3850 i < ExperimentalNatives::GetBuiltinsCount(); i++) { 3852 i < ExperimentalNatives::GetBuiltinsCount(); i++) {
3851 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ 3853 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \
3852 if (FLAG_##id) { \ 3854 if (FLAG_##id) { \
3853 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ 3855 for (size_t j = 0; id##_natives[j] != NULL; j++) { \
3854 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ 3856 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \
3855 if (strncmp(script_name.start(), id##_natives[j], \ 3857 if (strncmp(script_name.start(), id##_natives[j], \
3856 script_name.length()) == 0) { \ 3858 script_name.length()) == 0) { \
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after
4572 } 4574 }
4573 4575
4574 4576
4575 // Called when the top-level V8 mutex is destroyed. 4577 // Called when the top-level V8 mutex is destroyed.
4576 void Bootstrapper::FreeThreadResources() { 4578 void Bootstrapper::FreeThreadResources() {
4577 DCHECK(!IsActive()); 4579 DCHECK(!IsActive());
4578 } 4580 }
4579 4581
4580 } // namespace internal 4582 } // namespace internal
4581 } // namespace v8 4583 } // namespace v8
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/builtins/builtins-function.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698