Skip to content

Commit d166023

Browse files
joshualittCommit Queue
authored and
Commit Queue
committed
[wasm_builder] Defer encoding instructions until Module.encode.
This CL lays the foundation for allowing us to emit instructions without finalizing imports, which will in turn enable more flexibility in code generation. For example, we will no longer need to do a pre-code generation pass to collect imports. In addition, it will pave the way for other optimizations as suggested in the `TODO` at the top of `instructions.dart`. Perhaps counter-intuitively, even without any optimizations, this doesn't seem to be a measurable regression: Before: Completed compilation of dart2wasm-html-engine in 52652ms. Completed compilation of dart2wasm-html-html in 51827ms. Completed compilation of dart2wasm-html-ui in 20399ms. Completed compilation of dart2wasm-canvaskit-canvaskit in 32899ms. Completed compilation of dart2wasm-canvaskit-ui in 20695ms. Completed compilation of dart2wasm-skwasm-ui in 20319ms. After: Completed compilation of dart2wasm-html-engine in 51476ms. Completed compilation of dart2wasm-html-html in 48845ms. Completed compilation of dart2wasm-html-ui in 19676ms. Completed compilation of dart2wasm-canvaskit-canvaskit in 31933ms. Completed compilation of dart2wasm-canvaskit-ui in 19733ms. Completed compilation of dart2wasm-skwasm-ui in 19962ms. Change-Id: Ib3740f88db56070fc3ccdde484675267e4bf40c1 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/315580 Reviewed-by: Ömer Ağacan <[email protected]> Commit-Queue: Joshua Litt <[email protected]>
1 parent 39e1357 commit d166023

File tree

4 files changed

+1846
-465
lines changed

4 files changed

+1846
-465
lines changed

0 commit comments

Comments
 (0)