diff options
author | Alon Zakai <alonzakai@gmail.com> | 2019-01-10 19:30:58 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-10 19:30:58 -0800 |
commit | 4084d6e70922f8b1cc00c3a24bf5db41e03d5e79 (patch) | |
tree | 355607438e8c4131209c86e2d018e1705e6fa6a8 /test/passes/func-metrics.wast | |
parent | 6f435bc063840f16b782fd3faa733990cdf3a24e (diff) | |
download | binaryen-4084d6e70922f8b1cc00c3a24bf5db41e03d5e79.tar.gz binaryen-4084d6e70922f8b1cc00c3a24bf5db41e03d5e79.tar.bz2 binaryen-4084d6e70922f8b1cc00c3a24bf5db41e03d5e79.zip |
Fix copying of globals (#1854)
This broke when we refactored imports, as now Global has two more fields.
Test is on --func-metrics, which depends on copying to compute some things.
Diffstat (limited to 'test/passes/func-metrics.wast')
-rw-r--r-- | test/passes/func-metrics.wast | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/passes/func-metrics.wast b/test/passes/func-metrics.wast index 5b16848ea..e95d819d9 100644 --- a/test/passes/func-metrics.wast +++ b/test/passes/func-metrics.wast @@ -122,4 +122,13 @@ (call $waka) ) ) +(module ;; various globals + (type $0 (func (result i32))) + (import "env" "STACKTOP" (global $gimport$0 i32)) + (global $global$0 (mut i32) (global.get $gimport$0)) + (export "stackSave" (func $0)) + (func $0 (; 0 ;) (type $0) (result i32) + (global.get $global$0) + ) +) |