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

Side by Side Diff: src/bootstrapper.cc

Issue 2645923003: [async-iteration] expose Symbol.asyncIterator behind flag --harmony-async-iteration (Closed)
Patch Set: for landing Created 3 years, 11 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 | « no previous file | 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/ieee754.h" 9 #include "src/base/ieee754.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 3574 matching lines...) Expand 10 before | Expand all | Expand 10 after
3585 3585
3586 Handle<Object> unscopables = 3586 Handle<Object> unscopables =
3587 JSObject::GetProperty(array_prototype, factory()->unscopables_symbol()) 3587 JSObject::GetProperty(array_prototype, factory()->unscopables_symbol())
3588 .ToHandleChecked(); 3588 .ToHandleChecked();
3589 DCHECK(unscopables->IsJSObject()); 3589 DCHECK(unscopables->IsJSObject());
3590 JSObject::AddProperty(Handle<JSObject>::cast(unscopables), 3590 JSObject::AddProperty(Handle<JSObject>::cast(unscopables),
3591 factory()->values_string(), factory()->true_value(), 3591 factory()->values_string(), factory()->true_value(),
3592 NONE); 3592 NONE);
3593 } 3593 }
3594 3594
3595 void Genesis::InitializeGlobal_harmony_async_iteration() {
3596 if (!FLAG_harmony_async_iteration) return;
3597 Handle<JSFunction> symbol_fun(native_context()->symbol_function());
3598 InstallConstant(isolate(), symbol_fun, "asyncIterator",
3599 factory()->async_iterator_symbol());
3600 }
3601
3595 Handle<JSFunction> Genesis::InstallArrayBuffer(Handle<JSObject> target, 3602 Handle<JSFunction> Genesis::InstallArrayBuffer(Handle<JSObject> target,
3596 const char* name, 3603 const char* name,
3597 Builtins::Name call, 3604 Builtins::Name call,
3598 BuiltinFunctionId id) { 3605 BuiltinFunctionId id) {
3599 // Create the %ArrayBufferPrototype% 3606 // Create the %ArrayBufferPrototype%
3600 // Setup the {prototype} with the given {name} for @@toStringTag. 3607 // Setup the {prototype} with the given {name} for @@toStringTag.
3601 Handle<JSObject> prototype = 3608 Handle<JSObject> prototype =
3602 factory()->NewJSObject(isolate()->object_function(), TENURED); 3609 factory()->NewJSObject(isolate()->object_function(), TENURED);
3603 JSObject::AddProperty(prototype, factory()->to_string_tag_symbol(), 3610 JSObject::AddProperty(prototype, factory()->to_string_tag_symbol(),
3604 factory()->NewStringFromAsciiChecked(name), 3611 factory()->NewStringFromAsciiChecked(name),
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
4050 #ifdef V8_I18N_SUPPORT 4057 #ifdef V8_I18N_SUPPORT
4051 static const char* icu_case_mapping_natives[] = {"native icu-case-mapping.js", 4058 static const char* icu_case_mapping_natives[] = {"native icu-case-mapping.js",
4052 nullptr}; 4059 nullptr};
4053 static const char* datetime_format_to_parts_natives[] = { 4060 static const char* datetime_format_to_parts_natives[] = {
4054 "native datetime-format-to-parts.js", nullptr}; 4061 "native datetime-format-to-parts.js", nullptr};
4055 #endif 4062 #endif
4056 static const char* harmony_restrictive_generators_natives[] = {nullptr}; 4063 static const char* harmony_restrictive_generators_natives[] = {nullptr};
4057 static const char* harmony_trailing_commas_natives[] = {nullptr}; 4064 static const char* harmony_trailing_commas_natives[] = {nullptr};
4058 static const char* harmony_class_fields_natives[] = {nullptr}; 4065 static const char* harmony_class_fields_natives[] = {nullptr};
4059 static const char* harmony_object_rest_spread_natives[] = {nullptr}; 4066 static const char* harmony_object_rest_spread_natives[] = {nullptr};
4067 static const char* harmony_async_iteration_natives[] = {nullptr};
4060 4068
4061 for (int i = ExperimentalNatives::GetDebuggerCount(); 4069 for (int i = ExperimentalNatives::GetDebuggerCount();
4062 i < ExperimentalNatives::GetBuiltinsCount(); i++) { 4070 i < ExperimentalNatives::GetBuiltinsCount(); i++) {
4063 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ 4071 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \
4064 if (FLAG_##id) { \ 4072 if (FLAG_##id) { \
4065 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ 4073 for (size_t j = 0; id##_natives[j] != NULL; j++) { \
4066 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ 4074 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \
4067 if (strncmp(script_name.start(), id##_natives[j], \ 4075 if (strncmp(script_name.start(), id##_natives[j], \
4068 script_name.length()) == 0) { \ 4076 script_name.length()) == 0) { \
4069 if (!Bootstrapper::CompileExperimentalBuiltin(isolate(), i)) { \ 4077 if (!Bootstrapper::CompileExperimentalBuiltin(isolate(), i)) { \
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after
4816 } 4824 }
4817 4825
4818 4826
4819 // Called when the top-level V8 mutex is destroyed. 4827 // Called when the top-level V8 mutex is destroyed.
4820 void Bootstrapper::FreeThreadResources() { 4828 void Bootstrapper::FreeThreadResources() {
4821 DCHECK(!IsActive()); 4829 DCHECK(!IsActive());
4822 } 4830 }
4823 4831
4824 } // namespace internal 4832 } // namespace internal
4825 } // namespace v8 4833 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698