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

Side by Side Diff: src/bootstrapper.cc

Issue 1841543003: [esnext] implement frontend changes for async/await proposal (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix a pointless edit Created 4 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
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 2467 matching lines...) Expand 10 before | Expand all | Expand 10 after
2478 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(intl_extra) 2478 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(intl_extra)
2479 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_explicit_tailcalls) 2479 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_explicit_tailcalls)
2480 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tailcalls) 2480 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tailcalls)
2481 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_instanceof) 2481 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_instanceof)
2482 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_restrictive_declarations) 2482 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_restrictive_declarations)
2483 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_exponentiation_operator) 2483 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_exponentiation_operator)
2484 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_string_padding) 2484 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_string_padding)
2485 #ifdef V8_I18N_SUPPORT 2485 #ifdef V8_I18N_SUPPORT
2486 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(icu_case_mapping) 2486 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(icu_case_mapping)
2487 #endif 2487 #endif
2488 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_async_await)
2488 2489
2489 void InstallPublicSymbol(Factory* factory, Handle<Context> native_context, 2490 void InstallPublicSymbol(Factory* factory, Handle<Context> native_context,
2490 const char* name, Handle<Symbol> value) { 2491 const char* name, Handle<Symbol> value) {
2491 Handle<JSGlobalObject> global( 2492 Handle<JSGlobalObject> global(
2492 JSGlobalObject::cast(native_context->global_object())); 2493 JSGlobalObject::cast(native_context->global_object()));
2493 Handle<String> symbol_string = factory->InternalizeUtf8String("Symbol"); 2494 Handle<String> symbol_string = factory->InternalizeUtf8String("Symbol");
2494 Handle<JSObject> symbol = Handle<JSObject>::cast( 2495 Handle<JSObject> symbol = Handle<JSObject>::cast(
2495 JSObject::GetProperty(global, symbol_string).ToHandleChecked()); 2496 JSObject::GetProperty(global, symbol_string).ToHandleChecked());
2496 Handle<String> name_string = factory->InternalizeUtf8String(name); 2497 Handle<String> name_string = factory->InternalizeUtf8String(name);
2497 PropertyAttributes attributes = 2498 PropertyAttributes attributes =
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
3051 static const char* harmony_object_own_property_descriptors_natives[] = { 3052 static const char* harmony_object_own_property_descriptors_natives[] = {
3052 nullptr}; 3053 nullptr};
3053 static const char* harmony_array_prototype_values_natives[] = {nullptr}; 3054 static const char* harmony_array_prototype_values_natives[] = {nullptr};
3054 static const char* harmony_exponentiation_operator_natives[] = {nullptr}; 3055 static const char* harmony_exponentiation_operator_natives[] = {nullptr};
3055 static const char* harmony_string_padding_natives[] = { 3056 static const char* harmony_string_padding_natives[] = {
3056 "native harmony-string-padding.js", nullptr}; 3057 "native harmony-string-padding.js", nullptr};
3057 #ifdef V8_I18N_SUPPORT 3058 #ifdef V8_I18N_SUPPORT
3058 static const char* icu_case_mapping_natives[] = {"native icu-case-mapping.js", 3059 static const char* icu_case_mapping_natives[] = {"native icu-case-mapping.js",
3059 nullptr}; 3060 nullptr};
3060 #endif 3061 #endif
3062 static const char* harmony_async_await_natives[] = {nullptr};
3061 3063
3062 for (int i = ExperimentalNatives::GetDebuggerCount(); 3064 for (int i = ExperimentalNatives::GetDebuggerCount();
3063 i < ExperimentalNatives::GetBuiltinsCount(); i++) { 3065 i < ExperimentalNatives::GetBuiltinsCount(); i++) {
3064 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ 3066 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \
3065 if (FLAG_##id) { \ 3067 if (FLAG_##id) { \
3066 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ 3068 for (size_t j = 0; id##_natives[j] != NULL; j++) { \
3067 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ 3069 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \
3068 if (strncmp(script_name.start(), id##_natives[j], \ 3070 if (strncmp(script_name.start(), id##_natives[j], \
3069 script_name.length()) == 0) { \ 3071 script_name.length()) == 0) { \
3070 if (!Bootstrapper::CompileExperimentalBuiltin(isolate(), i)) { \ 3072 if (!Bootstrapper::CompileExperimentalBuiltin(isolate(), i)) { \
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
3728 } 3730 }
3729 3731
3730 3732
3731 // Called when the top-level V8 mutex is destroyed. 3733 // Called when the top-level V8 mutex is destroyed.
3732 void Bootstrapper::FreeThreadResources() { 3734 void Bootstrapper::FreeThreadResources() {
3733 DCHECK(!IsActive()); 3735 DCHECK(!IsActive());
3734 } 3736 }
3735 3737
3736 } // namespace internal 3738 } // namespace internal
3737 } // namespace v8 3739 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698