diff options
author | Ashley Nelson <nashley@google.com> | 2022-06-21 20:57:43 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-21 20:57:43 -0700 |
commit | 3b9c2e85fa5d97ba08a95c0c7cce7d041e699cde (patch) | |
tree | c01eb86869401931006b6503e47d60b9a44511b0 /test/lit/passes | |
parent | 7fa4c0841c31930759fbad2efb8ada3ef0e6f3ef (diff) | |
download | binaryen-3b9c2e85fa5d97ba08a95c0c7cce7d041e699cde.tar.gz binaryen-3b9c2e85fa5d97ba08a95c0c7cce7d041e699cde.tar.bz2 binaryen-3b9c2e85fa5d97ba08a95c0c7cce7d041e699cde.zip |
First class Data Segments (#4733)
* Updating wasm.h/cpp for DataSegments
* Updating wasm-binary.h/cpp for DataSegments
* Removed link from Memory to DataSegments and updated module-utils, Metrics and wasm-traversal
* checking isPassive when copying data segments to know whether to construct the data segment with an offset or not
* Removing memory member var from DataSegment class as there is only one memory rn. Updated wasm-validator.cpp
* Updated wasm-interpreter
* First look at updating Passes
* Updated wasm-s-parser
* Updated files in src/ir
* Updating tools files
* Last pass on src files before building
* added visitDataSegment
* Fixing build errors
* Data segments need a name
* fixing var name
* ran clang-format
* Ensuring a name on DataSegment
* Ensuring more datasegments have names
* Adding explicit name support
* Fix fuzzing name
* Outputting data name in wasm binary only if explicit
* Checking temp dataSegments vector to validateBinary because it's the one with the segments before we processNames
* Pass on when data segment names are explicitly set
* Ran auto_update_tests.py and check.py, success all around
* Removed an errant semi-colon and corrected a counter. Everything still passes
* Linting
* Fixing processing memory names after parsed from binary
* Updating the test from the last fix
* Correcting error comment
* Impl kripken@ comments
* Impl tlively@ comments
* Updated tests that remove data print when == 0
* Ran clang format
* Impl tlively@ comments
* Ran clang-format
Diffstat (limited to 'test/lit/passes')
-rw-r--r-- | test/lit/passes/O4_disable-bulk-memory.wast | 8 | ||||
-rw-r--r-- | test/lit/passes/inlining-optimizing_optimize-level=3.wast | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/test/lit/passes/O4_disable-bulk-memory.wast b/test/lit/passes/O4_disable-bulk-memory.wast index 4ab403159..76a264075 100644 --- a/test/lit/passes/O4_disable-bulk-memory.wast +++ b/test/lit/passes/O4_disable-bulk-memory.wast @@ -58,16 +58,16 @@ (data (i32.const 8) "\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") (data (i32.const 40) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - ;; CHECK: (data (i32.const 8) "\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - - ;; CHECK: (data (i32.const 40) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - ;; CHECK: (global $global$0 (mut i32) (i32.const 0)) ;; CHECK: (global $global$1 (mut i32) (i32.const 0)) ;; CHECK: (global $global$5 (mut i32) (i32.const 0)) + ;; CHECK: (data (i32.const 8) "\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") + + ;; CHECK: (data (i32.const 40) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + ;; CHECK: (table $0 1 funcref) (table $0 1 funcref) (elem (i32.const 0) $null) diff --git a/test/lit/passes/inlining-optimizing_optimize-level=3.wast b/test/lit/passes/inlining-optimizing_optimize-level=3.wast index 632ec16ec..301f23de2 100644 --- a/test/lit/passes/inlining-optimizing_optimize-level=3.wast +++ b/test/lit/passes/inlining-optimizing_optimize-level=3.wast @@ -35,8 +35,6 @@ ;; CHECK: (import "env" "memory" (memory $0 256 256)) (import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32)) - ;; CHECK: (data (i32.const 1024) "emcc_hello_world.asm.js") - ;; CHECK: (import "env" "table" (table $timport$0 18 18 funcref)) (import "env" "STACK_MAX" (global $STACK_MAX$asm2wasm$import i32)) ;; CHECK: (import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32)) @@ -99,6 +97,8 @@ (global $tempRet0 (mut i32) (i32.const 0)) (elem (global.get $tableBase) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $___stdio_write $b1 $b1 $b1 $b2 $b2 $b2 $b2 $b2 $_cleanup $b2 $b2) (data (i32.const 1024) "emcc_hello_world.asm.js") + ;; CHECK: (data (i32.const 1024) "emcc_hello_world.asm.js") + ;; CHECK: (elem (global.get $tableBase) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $___stdio_write $b1 $b1 $b1 $b2 $b2 $b2 $b2 $b2 $_cleanup $b2 $b2) ;; CHECK: (export "_i64Subtract" (func $_i64Subtract)) |