Skip to content

Commit 77c7024

Browse files
committed
minor tweaks for pass pipeline
1 parent 1c88fde commit 77c7024

4 files changed

Lines changed: 5 additions & 31 deletions

File tree

‎src/module.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2860,11 +2860,12 @@ export class Module {
28602860
}
28612861

28622862
passes.push("simplify-globals-optimizing");
2863-
passes.push("reorder-globals");
2864-
passes.push("reorder-functions");
28652863
passes.push("remove-unused-brs");
28662864
passes.push("optimize-instructions");
2865+
passes.push("vacuum");
28672866
}
2867+
passes.push("reorder-globals");
2868+
passes.push("reorder-functions");
28682869
// clean up
28692870
if (optimizeLevel >= 2 || shrinkLevel >= 1) {
28702871
passes.push("duplicate-function-elimination");

‎tests/compiler/class-overloading.release.wat‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3162,15 +3162,6 @@
31623162
call $~lib/builtins/abort
31633163
unreachable
31643164
end
3165-
i32.const 0
3166-
if
3167-
i32.const 0
3168-
i32.const 1552
3169-
i32.const 209
3170-
i32.const 1
3171-
call $~lib/builtins/abort
3172-
unreachable
3173-
end
31743165
global.get $~lib/memory/__stack_pointer
31753166
i32.const 4
31763167
i32.add

‎tests/compiler/class-static-function.release.wat‎

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
(module
22
(type $0 (func (result i32)))
3-
(type $1 (func (param i32 i32 i32 i32)))
4-
(type $2 (func))
3+
(type $1 (func))
4+
(type $2 (func (param i32 i32 i32 i32)))
55
(import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32)))
66
(global $~lib/memory/__stack_pointer (mut i32) (i32.const 33916))
77
(memory $0 1)
@@ -39,15 +39,6 @@
3939
i32.load
4040
call_indirect (type $0)
4141
drop
42-
i32.const 0
43-
if
44-
i32.const 0
45-
i32.const 1088
46-
i32.const 11
47-
i32.const 1
48-
call $~lib/builtins/abort
49-
unreachable
50-
end
5142
global.get $~lib/memory/__stack_pointer
5243
i32.const 4
5344
i32.add

‎tests/compiler/inlining.release.wat‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1740,15 +1740,6 @@
17401740
i32.load
17411741
call_indirect (type $5)
17421742
drop
1743-
i32.const 0
1744-
if
1745-
i32.const 0
1746-
i32.const 1056
1747-
i32.const 69
1748-
i32.const 3
1749-
call $~lib/builtins/abort
1750-
unreachable
1751-
end
17521743
global.get $~lib/memory/__stack_pointer
17531744
i32.const 123
17541745
i32.store

0 commit comments

Comments
 (0)