Commit 13b8a123 authored by littledan's avatar littledan Committed by Commit bot

Move async/await JS support code out of experimental natives

The file formerly known as src/js/harmony-async-await.js does not
expose anything directly to JavaScript code; it just makes a few
functions available on the native context for the parser desugaring
to expand into. Experimental natives have various issues with
larger amounts of code, so this patch moves the JS builtins to
support async functions out of experimental natives and into the
core snapshot. The change would be done eventually anyway, but this
patch does it before removing the flag to support shipping the
feature while avoiding the pitfalls of experimental natives.

Drive by cleanup: remove more unused functions from the whitelist for experimental natives.

BUG=v8:5427,v8:4483

Review-Url: https://codereview.chromium.org/2365123002
Cr-Commit-Position: refs/heads/master@{#39706}
parent cd049c2c
......@@ -401,6 +401,7 @@ action("js2c") {
"src/js/templates.js",
"src/js/spread.js",
"src/js/proxy.js",
"src/js/async-await.js",
"src/debug/mirrors.js",
"src/debug/debug.js",
"src/debug/liveedit.js",
......@@ -443,7 +444,6 @@ action("js2c_experimental") {
sources = [
"src/js/macros.py",
"src/messages.h",
"src/js/harmony-async-await.js",
"src/js/harmony-atomics.js",
"src/js/harmony-simd.js",
"src/js/harmony-string-padding.js",
......
......@@ -3452,8 +3452,7 @@ bool Genesis::InstallExperimentalNatives() {
static const char* datetime_format_to_parts_natives[] = {
"native datetime-format-to-parts.js", nullptr};
#endif
static const char* harmony_async_await_natives[] = {
"native harmony-async-await.js", nullptr};
static const char* harmony_async_await_natives[] = {nullptr};
static const char* harmony_restrictive_generators_natives[] = {nullptr};
static const char* harmony_trailing_commas_natives[] = {nullptr};
static const char* harmony_class_fields_natives[] = {nullptr};
......
......@@ -182,31 +182,14 @@ function PostNatives(utils) {
// Whitelist of exports from normal natives to experimental natives and debug.
var expose_list = [
"ArrayToString",
"AsyncFunctionNext",
"AsyncFunctionThrow",
"FormatDateToParts",
"GetIterator",
"GetMethod",
"GlobalPromise",
"IsPromise",
"MapEntries",
"MapIterator",
"MapIteratorNext",
"MaxSimple",
"MinSimple",
"NewPromiseCapability",
"PerformPromiseThen",
"PromiseThen",
"PromiseCreate",
"PromiseNextMicrotaskID",
"RegExpSubclassExecJS",
"RegExpSubclassMatch",
"RegExpSubclassReplace",
"RegExpSubclassSearch",
"RegExpSubclassSplit",
"RegExpSubclassTest",
"RejectPromise",
"ResolvePromise",
"SetIterator",
"SetIteratorNext",
"SetValues",
......@@ -218,16 +201,11 @@ function PostNatives(utils) {
// From runtime:
"is_concat_spreadable_symbol",
"iterator_symbol",
"promise_async_stack_id_symbol",
"promise_result_symbol",
"promise_state_symbol",
"promise_forwarding_handler_symbol",
"promise_handled_by_symbol",
"promise_handled_hint_symbol",
"promise_has_handler_symbol",
"object_freeze",
"object_is_frozen",
"object_is_sealed",
"promise_result_symbol",
"promise_state_symbol",
"reflect_apply",
"reflect_construct",
"regexp_flags_symbol",
......
......@@ -2214,6 +2214,7 @@
'js/templates.js',
'js/spread.js',
'js/proxy.js',
'js/async-await.js',
'debug/mirrors.js',
'debug/debug.js',
'debug/liveedit.js',
......@@ -2224,7 +2225,6 @@
'js/harmony-atomics.js',
'js/harmony-simd.js',
'js/harmony-string-padding.js',
'js/harmony-async-await.js'
],
'libraries_bin_file': '<(SHARED_INTERMEDIATE_DIR)/libraries.bin',
'libraries_experimental_bin_file': '<(SHARED_INTERMEDIATE_DIR)/libraries-experimental.bin',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment