Use untouched/optimized naming scheme in tests as well

This commit is contained in:
dcodeIO
2018-02-17 11:14:41 +01:00
parent e50a23bf75
commit 31633899f9
49 changed files with 419 additions and 10437 deletions

View File

@ -11,28 +11,19 @@
(export "memory" (memory $0))
(start $start)
(func "$(lib)/array/CArray#__get" (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
;;@ (lib)/array.ts:173:4
(if
;;@ (lib)/array.ts:173:8
(i32.lt_s
(get_local $1)
;;@ (lib)/array.ts:173:16
(i32.const 0)
)
;;@ (lib)/array.ts:174:6
(unreachable)
)
;;@ (lib)/array.ts:175:71
(return
;;@ (lib)/array.ts:175:11
(i32.load
;;@ (lib)/array.ts:175:19
(i32.add
(get_local $0)
;;@ (lib)/array.ts:175:45
(i32.mul
(get_local $1)
;;@ (lib)/array.ts:175:60
(i32.const 4)
)
)
@ -40,49 +31,35 @@
)
)
(func "$(lib)/array/CArray#__set" (; 2 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
;;@ (lib)/array.ts:180:4
(if
;;@ (lib)/array.ts:180:8
(i32.lt_s
(get_local $1)
;;@ (lib)/array.ts:180:16
(i32.const 0)
)
;;@ (lib)/array.ts:181:6
(unreachable)
)
;;@ (lib)/array.ts:182:4
(i32.store
;;@ (lib)/array.ts:182:13
(i32.add
(get_local $0)
;;@ (lib)/array.ts:182:39
(i32.mul
(get_local $1)
;;@ (lib)/array.ts:182:54
(i32.const 4)
)
)
;;@ (lib)/array.ts:182:67
(get_local $2)
)
)
(func $start (; 3 ;) (type $v)
(local $0 i32)
(set_global $std/carray/arr
;;@ std/carray.ts:6:23
(get_global $HEAP_BASE)
)
;;@ std/carray.ts:8:0
(if
(i32.eqz
;;@ std/carray.ts:8:7
(i32.eq
(i32.load
;;@ std/carray.ts:8:17
(get_global $HEAP_BASE)
)
;;@ std/carray.ts:8:31
(i32.const 0)
)
)
@ -96,20 +73,15 @@
(unreachable)
)
)
;;@ std/carray.ts:9:0
(if
(i32.eqz
;;@ std/carray.ts:9:7
(i32.eq
(i32.load
;;@ std/carray.ts:9:17
(i32.add
(get_global $HEAP_BASE)
;;@ std/carray.ts:9:29
(i32.const 4)
)
)
;;@ std/carray.ts:9:35
(i32.const 0)
)
)
@ -123,17 +95,13 @@
(unreachable)
)
)
;;@ std/carray.ts:11:0
(if
(i32.eqz
;;@ std/carray.ts:11:7
(i32.eq
(call "$(lib)/array/CArray#__get"
(get_global $std/carray/arr)
;;@ std/carray.ts:11:11
(i32.const 0)
)
;;@ std/carray.ts:11:17
(i32.const 0)
)
)
@ -147,17 +115,13 @@
(unreachable)
)
)
;;@ std/carray.ts:12:0
(if
(i32.eqz
;;@ std/carray.ts:12:7
(i32.eq
(call "$(lib)/array/CArray#__get"
(get_global $std/carray/arr)
;;@ std/carray.ts:12:11
(i32.const 1)
)
;;@ std/carray.ts:12:17
(i32.const 0)
)
)
@ -171,32 +135,22 @@
(unreachable)
)
)
;;@ std/carray.ts:14:0
(call "$(lib)/array/CArray#__set"
(get_global $std/carray/arr)
;;@ std/carray.ts:14:4
(i32.const 0)
;;@ std/carray.ts:14:9
(i32.const 42)
)
;;@ std/carray.ts:15:0
(call "$(lib)/array/CArray#__set"
(get_global $std/carray/arr)
;;@ std/carray.ts:15:4
(i32.const 1)
;;@ std/carray.ts:15:9
(i32.const 24)
)
;;@ std/carray.ts:17:0
(if
(i32.eqz
;;@ std/carray.ts:17:7
(i32.eq
(i32.load
;;@ std/carray.ts:17:17
(get_global $HEAP_BASE)
)
;;@ std/carray.ts:17:31
(i32.const 42)
)
)
@ -210,20 +164,15 @@
(unreachable)
)
)
;;@ std/carray.ts:18:0
(if
(i32.eqz
;;@ std/carray.ts:18:7
(i32.eq
(i32.load
;;@ std/carray.ts:18:17
(i32.add
(get_global $HEAP_BASE)
;;@ std/carray.ts:18:29
(i32.const 4)
)
)
;;@ std/carray.ts:18:35
(i32.const 24)
)
)
@ -237,17 +186,13 @@
(unreachable)
)
)
;;@ std/carray.ts:20:0
(if
(i32.eqz
;;@ std/carray.ts:20:7
(i32.eq
(call "$(lib)/array/CArray#__get"
(get_global $std/carray/arr)
;;@ std/carray.ts:20:11
(i32.const 0)
)
;;@ std/carray.ts:20:17
(i32.const 42)
)
)
@ -261,17 +206,13 @@
(unreachable)
)
)
;;@ std/carray.ts:21:0
(if
(i32.eqz
;;@ std/carray.ts:21:7
(i32.eq
(call "$(lib)/array/CArray#__get"
(get_global $std/carray/arr)
;;@ std/carray.ts:21:11
(i32.const 1)
)
;;@ std/carray.ts:21:17
(i32.const 24)
)
)
@ -285,25 +226,19 @@
(unreachable)
)
)
;;@ std/carray.ts:23:0
(if
(i32.eqz
;;@ std/carray.ts:23:7
(i32.eq
(block (result i32)
(call "$(lib)/array/CArray#__set"
;;@ std/carray.ts:23:8
(get_global $std/carray/arr)
;;@ std/carray.ts:23:12
(i32.const 3)
(tee_local $0
;;@ std/carray.ts:23:17
(i32.const 9000)
)
)
(get_local $0)
)
;;@ std/carray.ts:23:26
(i32.const 9000)
)
)
@ -317,20 +252,15 @@
(unreachable)
)
)
;;@ std/carray.ts:25:0
(if
(i32.eqz
;;@ std/carray.ts:25:7
(i32.eq
(i32.load
;;@ std/carray.ts:25:17
(i32.add
(get_global $HEAP_BASE)
;;@ std/carray.ts:25:29
(i32.const 12)
)
)
;;@ std/carray.ts:25:36
(i32.const 9000)
)
)
@ -344,17 +274,13 @@
(unreachable)
)
)
;;@ std/carray.ts:26:0
(if
(i32.eqz
;;@ std/carray.ts:26:7
(i32.eq
(call "$(lib)/array/CArray#__get"
(get_global $std/carray/arr)
;;@ std/carray.ts:26:11
(i32.const 3)
)
;;@ std/carray.ts:26:17
(i32.const 9000)
)
)

View File

@ -18,106 +18,74 @@
(local $3 i32)
(local $4 i32)
(local $5 i32)
;;@ (lib)/allocator/arena.ts:15:2
(if
;;@ (lib)/allocator/arena.ts:15:6
(i32.eqz
;;@ (lib)/allocator/arena.ts:15:7
(get_local $0)
)
;;@ (lib)/allocator/arena.ts:15:20
(return
(i32.const 0)
)
)
;;@ (lib)/allocator/arena.ts:16:2
(set_local $1
;;@ (lib)/allocator/arena.ts:16:12
(get_global "$(lib)/allocator/arena/HEAP_OFFSET")
)
;;@ (lib)/allocator/arena.ts:17:2
(set_local $2
;;@ (lib)/allocator/arena.ts:17:12
(i32.and
(i32.add
;;@ (lib)/allocator/arena.ts:17:13
(i32.add
(get_local $1)
;;@ (lib)/allocator/arena.ts:17:19
(get_local $0)
)
;;@ (lib)/allocator/arena.ts:17:26
(i32.const 7)
)
;;@ (lib)/allocator/arena.ts:17:40
(i32.xor
;;@ (lib)/allocator/arena.ts:17:41
(i32.const 7)
(i32.const -1)
)
)
)
;;@ (lib)/allocator/arena.ts:18:2
(set_local $3
;;@ (lib)/allocator/arena.ts:18:14
(i32.shl
(current_memory)
;;@ (lib)/allocator/arena.ts:18:41
(i32.const 16)
)
)
;;@ (lib)/allocator/arena.ts:19:2
(if
;;@ (lib)/allocator/arena.ts:19:6
(i32.and
(if (result i32)
(i32.ne
(tee_local $4
(i32.gt_u
(get_local $2)
;;@ (lib)/allocator/arena.ts:19:12
(get_local $3)
)
)
(i32.const 0)
)
;;@ (lib)/allocator/arena.ts:19:21
(i32.lt_s
(grow_memory
;;@ (lib)/allocator/arena.ts:20:4
(select
(tee_local $4
;;@ (lib)/allocator/arena.ts:21:6
(i32.shr_u
(i32.sub
;;@ (lib)/allocator/arena.ts:21:7
(i32.and
;;@ (lib)/allocator/arena.ts:21:8
(i32.add
;;@ (lib)/allocator/arena.ts:21:9
(get_local $2)
;;@ (lib)/allocator/arena.ts:21:15
(i32.const 65535)
)
;;@ (lib)/allocator/arena.ts:21:25
(i32.xor
;;@ (lib)/allocator/arena.ts:21:26
(i32.const 65535)
(i32.const -1)
)
)
;;@ (lib)/allocator/arena.ts:21:36
(get_local $3)
)
;;@ (lib)/allocator/arena.ts:21:46
(i32.const 16)
)
)
(tee_local $5
;;@ (lib)/allocator/arena.ts:22:6
(i32.shr_u
(get_local $3)
;;@ (lib)/allocator/arena.ts:22:46
(i32.const 16)
)
)
@ -127,53 +95,42 @@
)
)
)
;;@ (lib)/allocator/arena.ts:24:6
(i32.const 0)
)
(get_local $4)
)
(i32.const 1)
)
;;@ (lib)/allocator/arena.ts:24:9
(unreachable)
)
;;@ (lib)/allocator/arena.ts:25:2
(set_global "$(lib)/allocator/arena/HEAP_OFFSET"
;;@ (lib)/allocator/arena.ts:25:16
(get_local $2)
)
;;@ (lib)/allocator/arena.ts:26:9
(return
(get_local $1)
)
)
(func $std/new/AClass#constructor (; 1 ;) (type $ifv) (param $0 i32) (param $1 f32)
;;@ std/new.ts:8:4
(i32.store
(get_local $0)
(i32.add
(i32.load
(get_local $0)
)
;;@ std/new.ts:8:19
(i32.const 1)
)
)
;;@ std/new.ts:9:4
(f32.store offset=4
(get_local $0)
;;@ std/new.ts:9:24
(get_local $1)
)
)
(func $start (; 2 ;) (type $v)
(local $0 i32)
(set_global "$(lib)/allocator/arena/HEAP_OFFSET"
;;@ (lib)/allocator/arena.ts:11:25
(get_global $HEAP_BASE)
)
(set_global $std/new/aClass
;;@ std/new.ts:13:13
(block (result i32)
(set_local $0
(call "$(lib)/allocator/arena/allocate_memory"
@ -182,17 +139,14 @@
)
(i32.store
(get_local $0)
;;@ std/new.ts:5:16
(i32.const 1)
)
(f32.store offset=4
(get_local $0)
;;@ std/new.ts:6:22
(f32.const 2)
)
(call $std/new/AClass#constructor
(get_local $0)
;;@ std/new.ts:13:24
(f32.const 3)
)
(get_local $0)