Skip to content

Commit 1af1dd8

Browse files
committed
add early remove-unused-module-elements
1 parent 4703c43 commit 1af1dd8

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

cli/asc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -694,6 +694,7 @@ exports.main = function main(argv, options, callback) {
694694

695695
// PassRunner::addDefaultGlobalOptimizationPrePasses
696696
add("duplicate-function-elimination");
697+
add("remove-unused-module-elements"); // differs
697698

698699
// PassRunner::addDefaultFunctionOptimizationPasses
699700
if (optimizeLevel >= 3 || shrinkLevel >= 1) {
Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
(module
2-
(type $none_=>_none (func))
32
(type $i32_i32_=>_none (func (param i32 i32)))
43
(type $i32_=>_i32 (func (param i32) (result i32)))
54
(memory $0 0)
6-
(global $~lib/rt/stub/offset (mut i32) (i32.const 0))
75
(global $extends-recursive/Child i32 (i32.const 3))
86
(export "memory" (memory $0))
97
(export "Child" (global $extends-recursive/Child))
108
(export "Child#get:child" (func $extends-recursive/Parent#get:child))
119
(export "Child#set:child" (func $extends-recursive/Parent#set:child))
12-
(start $~start)
1310
(func $extends-recursive/Parent#get:child (param $0 i32) (result i32)
1411
local.get $0
1512
i32.load
@@ -22,8 +19,4 @@
2219
local.get $1
2320
i32.store
2421
)
25-
(func $~start
26-
i32.const 1024
27-
global.set $~lib/rt/stub/offset
28-
)
2922
)

0 commit comments

Comments
 (0)