0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-29 08:58:01 -04:00

core: remove some unnecessary heap allocations

This commit is contained in:
Ben Noordhuis 2021-04-12 12:31:20 +02:00 committed by Bert Belder
parent 986513c080
commit 73b7bd92e5

View file

@ -155,19 +155,18 @@ fn v8_init(v8_platform: Option<v8::UniquePtr<v8::Platform>>) {
v8::V8::initialize_platform(v8_platform);
v8::V8::initialize();
let argv = vec![
"".to_string(),
"--wasm-test-streaming".to_string(),
let flags = concat!(
"--wasm-test-streaming",
// TODO(ry) This makes WASM compile synchronously. Eventually we should
// remove this to make it work asynchronously too. But that requires getting
// PumpMessageLoop and RunMicrotasks setup correctly.
// See https://github.com/denoland/deno/issues/2544
"--no-wasm-async-compilation".to_string(),
"--harmony-top-level-await".to_string(),
"--harmony-import-assertions".to_string(),
"--no-validate-asm".to_string(),
];
v8::V8::set_flags_from_command_line(argv);
" --no-wasm-async-compilation",
" --harmony-top-level-await",
" --harmony-import-assertions",
" --no-validate-asm",
);
v8::V8::set_flags_from_string(flags);
}
#[derive(Default)]