commit 277714827150d508faaebacaa28a7c89cdedc39f Author: Clemens Backes <clem...@chromium.org> Date: Mon Jan 25 16:59:53 2021
[build] Introduce gn arg to disable WebAssembly
For now, that flag only avoid the installation of the 'WebAssembly' global. Follow-up CLs will remove unneeded code from the binary if the gn arg is not set to true.
commit 18136654138db94cc8ffd9bade187a404004081e Author: Clemens Backes <clem...@chromium.org> Date: Mon Feb 22 11:06:40 2021
[no-wasm] Skip wasm tests if wasm is disabled
This CL introduces a test runner flag to detect if webassembly has been disabled. Since all tests that require wasm are alrady skipped in lite mode, we introduce a has_webassembly flag for the test runner which checks for v8_enable_webassembly=true and v8_enable_lite_mode=false. As a drive-by, we also do not set the V8_ENABLE_WEBASSEMBLY preprocessor flag if lite mode is enabled.
The status files are updated by splitting wasm tests from the "lite_mode" section and checking for "not has_webassembly" instead.
Note that the v8_enable_webassembly=false configuration is not tested on any bot currently, but I will make sure that all tests keep passing on further changes in this configuration.
commit 4cd9625998b3a0064c764681575301f0b64289da Author: Clemens Backes <clem...@chromium.org> Date: Mon Feb 22 11:35:30 2021
[asm] Move regression tests to own directory
This moves all asm.js tests (tests that use "%IsAsmWasmCode") into a separate directory. This will make it easier to skip them all in the v8_enable_webassembly=false configuration.
commit 96bfcfb845fbb6889122708360148e82adedf98e Author: Clemens Backes <clem...@chromium.org> Date: Mon Feb 22 12:19:20 2021
[no-wasm] Make --expose-wasm flag readonly
If webassembly is disabled via a gn arg, we will not be able to enable it via command-line switch. Hence make this flag read-only in that configuration.
commit ca89bf259f3ec118af788ec2410c0efe84806197 Author: Clemens Backes <clem...@chromium.org> Date: Tue Feb 23 09:51:40 2021
[no-wasm] Exclude asm->wasm translation code
The v8_enable_webassembly=false configuration will not be a able to run any wasm code, hence remove the whole asm to wasm translation from the binary.
In order to skip specific unit tests in that configuration, we move the definition of the v8_enable_webassembly gn argument from BUILD.gn to v8.gni, such that it is available in all gn files.
commit b411a66486c255d69f3888d1054b1ff61b1ed97d Author: Clemens Backes <clem...@chromium.org> Date: Tue Feb 23 15:00:33 2021
[build] Assert that webassembly is disabled on lite mode
This avoids having to check both flags in two places, and prevents people from trying to enable WebAssembly in lite mode (which would currently build, but you still would not get Wasm support).
The downside is that the default value shown by `gn args --list` now sais `""` instead of `true`.
commit 0be822b47e92503e3eaf3bec563141aa1bf9f368 Author: Clemens Backes <clem...@chromium.org> Date: Mon Mar 01 15:24:52 2021
[api][no-wasm] Disable Webassembly in the API
This CL removes the includes of src/wasm files from the API if Wasm is disabled (v8_enable_webassembly=false). This will allow to later remove the whole src/wasm directory from compilation. Since we do not want to modify the exposed API in a no-wasm build, we instead make all Wasm-related functions fail.
commit 8890bb21f938cf041ac3a14df777de49c848b036 Author: Clemens Backes <clem...@chromium.org> Date: Tue Mar 02 18:27:53 2021
[no-wasm] Remove wasm debugging support
This removes all wasm includes from src/debug and src/inspector if webassembly is disabled (v8_enable_webassembly=false). It also removes the definition of {WasmValueObject} and {v8::debug::WasmScript}. This will allow to later fully exclude the src/wasm directory from compilation (once other components are fixed).
commit 4e0ac2ed13d929651d459890d74be4aef669044b Author: Clemens Backes <clem...@chromium.org> Date: Fri Mar 05 11:40:31 2021
[no-wasm] Remove wasm-js
This CL removes wasm-js.cc from compilation if v8_enable_webassembly=false. In order to do so, an alternative implementation of {v8::WasmStreaming} has to be provided, because the public API should stay unchanged. The only path to obtain a {v8::WasmStreaming} object is via {v8::WasmStreaming::Unpack}, which will always fail if WebAssembly is not supported. Hence all methods in {WasmStreamingImpl} are unreachable.
As a drive-by, this CL removes all includes from src/wasm in src/init (bootstrapper.cc would have been done anyway, and v8.cc is just a few changes).
commit c87b273c29f442520b0806e5a880e3cf964254c1 Author: Clemens Backes <clem...@chromium.org> Date: Fri Mar 05 11:35:37 2021
[no-wasm] Remove wasm engine from isolate
This removes the {wasm_engine_} field from the isolate if v8_enable_webassembly=false. This avoids any includes from src/wasm in isolate.{h,cc}. Unconditional access to the wasm engine in other parts are also #if'ed out to avoid nullptr accesses. Long-term, the {Isolate::wasm_engine()} method will be fully removed, but this can only be done once src/wasm is excluded from compilation.
commit 7585aaf3e311913c2e2d4d11d89275c0513c1d13 Author: Clemens Backes <clem...@chromium.org> Date: Fri Mar 05 17:35:25 2021
[IWYU] Fix includes of wasm-engine.h
Remove the include from js-array-buffer-inl.h, because the wasm engine is not used in that file. Add missing includes in other files that relied on the recursive include.
commit 2cd2c4885a7a80cabdeee194435566ac334d9a47 Author: Clemens Backes <clem...@chromium.org> Date: Fri Mar 05 17:46:02 2021
[no-wasm] Remove deoptimizer support
This removes all includes of src/wasm from src/deoptimizer, by #if'ing out wasm-related parts. This will allow to later exclude the whole src/wasm directory from compilation.
Drive-by: Inline DecodeWasmReturnKind and EncodeWasmReturnKind to avoid more #ifs.
commit 577f983b7a0a6edea9c5c58148c688abb823e23a Author: Clemens Backes <clem...@chromium.org> Date: Mon Mar 08 13:47:44 2021
[no-wasm] Exclude more targets from build
This excludes more targets and tests that won't work without webassembly: - wee8 - multi_return_fuzzer - wasm-js - wasm-spec-tests - wasm-api-tests - several cctests
commit 80f5dfda0147d6b078ae6c9d0eb947bd012bf72d Author: Clemens Backes <clem...@chromium.org> Date: Thu Mar 11 11:53:24 2021
[no-wasm] Exclude src/wasm from compilation
This is the biggest chunk, including - all of src/wasm, - torque file for wasm objects, - torque file for wasm builtins, - wasm builtins, - wasm runtime functions, - int64 lowering, - simd scala lowering, - WasmGraphBuilder (TF graph construction for wasm), - wasm frame types, - wasm interrupts, - the JSWasmCall opcode, - wasm backing store allocation.
Those components are all recursively entangled, so I found no way to split this change up further.
Some includes that were recursively included by wasm headers needed to be added explicitly now.
backing-store-unittest.cc is renamed to wasm-backing-store-unittest.cc because it only tests wasm backing stores. This file is excluded from no-wasm builds then.
commit 05265d882405b8fbf4b7b5189e43c934829a1686 Author: Clemens Backes <clem...@chromium.org> Date: Mon Mar 15 13:20:04 2021
[no-wasm][flags] Remove wasm flags
This removes all wasm-related flags in no-wasm builds. We could have made them read-only, but fully removing them actually forces us to consider the no-wasm case at every use site, which often hints at further cleanups.
commit fa565b93060bf5fec71d2cc172d6bf110e731f33 Author: Clemens Backes <clem...@chromium.org> Date: Thu Mar 18 13:11:51 2021
[no-wasm] Fix compilation by #if'ing out test code
The test was extended in this CL: https://crrev.com/c/2762420 It now uses wasm::SimdShuffle, which is only available if webassembly is enabled. Thus, #if out the test if webassembly is disabled.
Done for now. We got ~2.6MB binary savings on x64. There are a few hundred more kB to be gained if e.g. unneeded parts of code generation are excluded, but that would be per platform, and much more work. Hence we decided to stop here for now.
Git Watcher via monorail
unread,
Feb 17, 2022, 8:35:06 AM2/17/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message