1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-23 07:44:48 -05:00

cleanup(core): top-level-await is now always enabled (#11082)

Starting with V8 9.1, top-level-await is always enabled by default.
See https://v8.dev/blog/v8-release-91 for the release notes.

- Remove the now redundant v8 flag.
- Clarify doc comment and add link to the feature explainer.
This commit is contained in:
Maxime Guerreiro 2021-06-22 17:47:09 +02:00 committed by GitHub
parent 20b0a5125a
commit 02f7a52235
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -162,7 +162,6 @@ fn v8_init(v8_platform: Option<v8::UniquePtr<v8::Platform>>) {
// See https://github.com/denoland/deno/issues/2544 // See https://github.com/denoland/deno/issues/2544
" --experimental-wasm-threads", " --experimental-wasm-threads",
" --no-wasm-async-compilation", " --no-wasm-async-compilation",
" --harmony-top-level-await",
" --harmony-import-assertions", " --harmony-import-assertions",
" --no-validate-asm", " --no-validate-asm",
); );
@ -1139,9 +1138,9 @@ impl JsRuntime {
} }
} }
/// "deno_core" runs V8 with "--harmony-top-level-await" /// "deno_core" runs V8 with Top Level Await enabled. It means that each
/// flag on - it means that each module evaluation returns a promise /// module evaluation returns a promise from V8.
/// from V8. /// Feature docs: https://v8.dev/features/top-level-await
/// ///
/// This promise resolves after all dependent modules have also /// This promise resolves after all dependent modules have also
/// resolved. Each dependent module may perform calls to "import()" and APIs /// resolved. Each dependent module may perform calls to "import()" and APIs