summaryrefslogtreecommitdiff
path: root/test/example/module-splitting.txt
diff options
context:
space:
mode:
authorThomas Lively <7121787+tlively@users.noreply.github.com>2021-06-01 12:15:24 -0400
committerGitHub <noreply@github.com>2021-06-01 09:15:24 -0700
commit028f47368fe844130f52ad7811c8028ebd18a38e (patch)
tree7c6b2a68a55f922d70f534abd594d900079139b3 /test/example/module-splitting.txt
parent88606f75b97ef3014edb74484125534c2040095b (diff)
downloadbinaryen-028f47368fe844130f52ad7811c8028ebd18a38e.tar.gz
binaryen-028f47368fe844130f52ad7811c8028ebd18a38e.tar.bz2
binaryen-028f47368fe844130f52ad7811c8028ebd18a38e.zip
[wasm-split] Minimize names of newly created exports (#3905)
wasm-split would previously use internal function names to create the external names of the functions that are newly exported from the primary module to be imported into the secondary module. When the input module contains full function names (as is commonly the case when emitting symbol maps), this caused the function names to be preserved as the export names, even when names are otherwise being stripped. To save on code size and properly anonymize functions, generate minimal export names when debuginfo is disabled instead.
Diffstat (limited to 'test/example/module-splitting.txt')
-rw-r--r--test/example/module-splitting.txt72
1 files changed, 72 insertions, 0 deletions
diff --git a/test/example/module-splitting.txt b/test/example/module-splitting.txt
index 5c3728cde..2b92e9dd6 100644
--- a/test/example/module-splitting.txt
+++ b/test/example/module-splitting.txt
@@ -1107,3 +1107,75 @@ Secondary:
)
+Minimized names primary:
+(module
+ (type $none_=>_none (func))
+ (export "already_exported" (func $3))
+ (export "%b" (func $7))
+ (export "%a" (func $0))
+ (export "%c" (func $1))
+ (export "%d" (func $2))
+ (export "%e" (func $4))
+ (export "%f" (func $5))
+ (export "%g" (func $6))
+ (export "%h" (func $8))
+ (export "%i" (func $9))
+ (func $0
+ (nop)
+ )
+ (func $1
+ (nop)
+ )
+ (func $2
+ (nop)
+ )
+ (func $3
+ (nop)
+ )
+ (func $4
+ (nop)
+ )
+ (func $5
+ (nop)
+ )
+ (func $6
+ (nop)
+ )
+ (func $7
+ (nop)
+ )
+ (func $8
+ (nop)
+ )
+ (func $9
+ (nop)
+ )
+)
+
+Minimized names secondary:
+(module
+ (type $none_=>_none (func))
+ (import "primary" "%a" (func $0))
+ (import "primary" "%c" (func $1))
+ (import "primary" "%d" (func $2))
+ (import "primary" "already_exported" (func $3))
+ (import "primary" "%e" (func $4))
+ (import "primary" "%f" (func $5))
+ (import "primary" "%g" (func $6))
+ (import "primary" "%b" (func $7))
+ (import "primary" "%h" (func $8))
+ (import "primary" "%i" (func $9))
+ (func $call
+ (call $0)
+ (call $1)
+ (call $2)
+ (call $3)
+ (call $4)
+ (call $5)
+ (call $6)
+ (call $7)
+ (call $8)
+ (call $9)
+ )
+)
+