mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-12 22:41:27 +00:00
Fix 'static readonly' not being recognized as constant anymore, see #44
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
(type $ii (func (param i32) (result i32)))
|
||||
(type $iv (func (param i32)))
|
||||
(type $v (func))
|
||||
(global "$(lib)/allocator/arena/startOffset" (mut i32) (i32.const 0))
|
||||
(global "$(lib)/allocator/arena/offset" (mut i32) (i32.const 0))
|
||||
(global $HEAP_BASE i32 (i32.const 4))
|
||||
(memory $0 1)
|
||||
@ -9,89 +10,89 @@
|
||||
(export "free_memory" (func "$(lib)/allocator/arena/free_memory"))
|
||||
(export "reset_memory" (func "$(lib)/allocator/arena/reset_memory"))
|
||||
(export "memory" (memory $0))
|
||||
(start $(lib)/allocator/arena/reset_memory)
|
||||
(start $start)
|
||||
(func "$(lib)/allocator/arena/allocate_memory" (; 0 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
;;@ (lib)/allocator/arena.ts:14:2
|
||||
;;@ (lib)/allocator/arena.ts:17:2
|
||||
(if
|
||||
;;@ (lib)/allocator/arena.ts:14:6
|
||||
;;@ (lib)/allocator/arena.ts:17:6
|
||||
(i32.eqz
|
||||
;;@ (lib)/allocator/arena.ts:14:7
|
||||
;;@ (lib)/allocator/arena.ts:17:7
|
||||
(get_local $0)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:14:20
|
||||
;;@ (lib)/allocator/arena.ts:17:20
|
||||
(return
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:18:2
|
||||
;;@ (lib)/allocator/arena.ts:21:2
|
||||
(if
|
||||
;;@ (lib)/allocator/arena.ts:18:6
|
||||
;;@ (lib)/allocator/arena.ts:21:6
|
||||
(i32.gt_u
|
||||
;;@ (lib)/allocator/arena.ts:16:2
|
||||
;;@ (lib)/allocator/arena.ts:19:2
|
||||
(tee_local $2
|
||||
;;@ (lib)/allocator/arena.ts:16:15
|
||||
;;@ (lib)/allocator/arena.ts:19:15
|
||||
(i32.and
|
||||
(i32.add
|
||||
;;@ (lib)/allocator/arena.ts:16:16
|
||||
;;@ (lib)/allocator/arena.ts:19:16
|
||||
(i32.add
|
||||
;;@ (lib)/allocator/arena.ts:15:2
|
||||
;;@ (lib)/allocator/arena.ts:18:2
|
||||
(tee_local $1
|
||||
;;@ (lib)/allocator/arena.ts:15:12
|
||||
;;@ (lib)/allocator/arena.ts:18:12
|
||||
(get_global "$(lib)/allocator/arena/offset")
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:16:22
|
||||
;;@ (lib)/allocator/arena.ts:19:22
|
||||
(get_local $0)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:16:29
|
||||
;;@ (lib)/allocator/arena.ts:19:29
|
||||
(i32.const 7)
|
||||
)
|
||||
(i32.const -8)
|
||||
)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:18:15
|
||||
;;@ (lib)/allocator/arena.ts:21:15
|
||||
(i32.shl
|
||||
;;@ (lib)/allocator/arena.ts:17:2
|
||||
;;@ (lib)/allocator/arena.ts:20:2
|
||||
(tee_local $0
|
||||
;;@ (lib)/allocator/arena.ts:17:20
|
||||
;;@ (lib)/allocator/arena.ts:20:20
|
||||
(current_memory)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:18:37
|
||||
;;@ (lib)/allocator/arena.ts:21:37
|
||||
(i32.const 16)
|
||||
)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:21:4
|
||||
;;@ (lib)/allocator/arena.ts:24:4
|
||||
(if
|
||||
;;@ (lib)/allocator/arena.ts:21:8
|
||||
;;@ (lib)/allocator/arena.ts:24:8
|
||||
(i32.lt_s
|
||||
(grow_memory
|
||||
;;@ (lib)/allocator/arena.ts:20:22
|
||||
;;@ (lib)/allocator/arena.ts:23:22
|
||||
(select
|
||||
;;@ (lib)/allocator/arena.ts:20:26
|
||||
;;@ (lib)/allocator/arena.ts:23:26
|
||||
(get_local $0)
|
||||
(tee_local $4
|
||||
;;@ (lib)/allocator/arena.ts:19:4
|
||||
;;@ (lib)/allocator/arena.ts:22:4
|
||||
(tee_local $3
|
||||
;;@ (lib)/allocator/arena.ts:19:22
|
||||
;;@ (lib)/allocator/arena.ts:22:22
|
||||
(i32.shr_u
|
||||
(i32.and
|
||||
;;@ (lib)/allocator/arena.ts:19:23
|
||||
;;@ (lib)/allocator/arena.ts:22:23
|
||||
(i32.add
|
||||
;;@ (lib)/allocator/arena.ts:19:24
|
||||
;;@ (lib)/allocator/arena.ts:22:24
|
||||
(i32.sub
|
||||
(get_local $2)
|
||||
;;@ (lib)/allocator/arena.ts:19:33
|
||||
;;@ (lib)/allocator/arena.ts:22:33
|
||||
(get_local $1)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:19:39
|
||||
;;@ (lib)/allocator/arena.ts:22:39
|
||||
(i32.const 65535)
|
||||
)
|
||||
(i32.const -65536)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:19:62
|
||||
;;@ (lib)/allocator/arena.ts:22:62
|
||||
(i32.const 16)
|
||||
)
|
||||
)
|
||||
@ -102,50 +103,60 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:21:35
|
||||
;;@ (lib)/allocator/arena.ts:24:35
|
||||
(i32.const 0)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:22:6
|
||||
;;@ (lib)/allocator/arena.ts:25:6
|
||||
(if
|
||||
;;@ (lib)/allocator/arena.ts:22:10
|
||||
;;@ (lib)/allocator/arena.ts:25:10
|
||||
(i32.lt_s
|
||||
(grow_memory
|
||||
;;@ (lib)/allocator/arena.ts:22:22
|
||||
;;@ (lib)/allocator/arena.ts:25:22
|
||||
(get_local $3)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:22:37
|
||||
;;@ (lib)/allocator/arena.ts:25:37
|
||||
(i32.const 0)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:23:8
|
||||
;;@ (lib)/allocator/arena.ts:26:8
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:27:2
|
||||
;;@ (lib)/allocator/arena.ts:30:2
|
||||
(set_global "$(lib)/allocator/arena/offset"
|
||||
;;@ (lib)/allocator/arena.ts:27:11
|
||||
;;@ (lib)/allocator/arena.ts:30:11
|
||||
(get_local $2)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:28:9
|
||||
;;@ (lib)/allocator/arena.ts:31:9
|
||||
(get_local $1)
|
||||
)
|
||||
(func "$(lib)/allocator/arena/free_memory" (; 1 ;) (type $iv) (param $0 i32)
|
||||
;;@ (lib)/allocator/arena.ts:32:46
|
||||
;;@ (lib)/allocator/arena.ts:35:46
|
||||
(nop)
|
||||
)
|
||||
(func "$(lib)/allocator/arena/reset_memory" (; 2 ;) (type $v)
|
||||
;;@ (lib)/allocator/arena.ts:38:2
|
||||
;;@ (lib)/allocator/arena.ts:41:2
|
||||
(set_global "$(lib)/allocator/arena/offset"
|
||||
;;@ (lib)/allocator/arena.ts:38:11
|
||||
;;@ (lib)/allocator/arena.ts:41:11
|
||||
(get_global "$(lib)/allocator/arena/startOffset")
|
||||
)
|
||||
)
|
||||
(func $start (; 3 ;) (type $v)
|
||||
(set_global "$(lib)/allocator/arena/startOffset"
|
||||
;;@ (lib)/allocator/arena.ts:12:25
|
||||
(i32.and
|
||||
(i32.add
|
||||
;;@ (lib)/allocator/arena.ts:38:12
|
||||
;;@ (lib)/allocator/arena.ts:12:26
|
||||
(get_global $HEAP_BASE)
|
||||
;;@ (lib)/allocator/arena.ts:38:24
|
||||
;;@ (lib)/allocator/arena.ts:12:38
|
||||
(i32.const 7)
|
||||
)
|
||||
(i32.const -8)
|
||||
)
|
||||
)
|
||||
(set_global "$(lib)/allocator/arena/offset"
|
||||
;;@ (lib)/allocator/arena.ts:13:20
|
||||
(get_global "$(lib)/allocator/arena/startOffset")
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -6,6 +6,7 @@
|
||||
(global "$(lib)/allocator/common/alignment/BITS" i32 (i32.const 3))
|
||||
(global "$(lib)/allocator/common/alignment/SIZE" i32 (i32.const 8))
|
||||
(global "$(lib)/allocator/common/alignment/MASK" i32 (i32.const 7))
|
||||
(global "$(lib)/allocator/arena/startOffset" (mut i32) (i32.const 0))
|
||||
(global "$(lib)/allocator/arena/offset" (mut i32) (i32.const 0))
|
||||
(global $HEAP_BASE i32 (i32.const 4))
|
||||
(memory $0 1)
|
||||
@ -21,101 +22,101 @@
|
||||
(local $4 i32)
|
||||
(local $5 i32)
|
||||
(local $6 i32)
|
||||
;;@ (lib)/allocator/arena.ts:14:2
|
||||
;;@ (lib)/allocator/arena.ts:17:2
|
||||
(if
|
||||
;;@ (lib)/allocator/arena.ts:14:6
|
||||
;;@ (lib)/allocator/arena.ts:17:6
|
||||
(i32.eqz
|
||||
;;@ (lib)/allocator/arena.ts:14:7
|
||||
;;@ (lib)/allocator/arena.ts:17:7
|
||||
(get_local $0)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:14:20
|
||||
;;@ (lib)/allocator/arena.ts:17:20
|
||||
(return
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:15:2
|
||||
;;@ (lib)/allocator/arena.ts:18:2
|
||||
(set_local $1
|
||||
;;@ (lib)/allocator/arena.ts:15:12
|
||||
;;@ (lib)/allocator/arena.ts:18:12
|
||||
(get_global "$(lib)/allocator/arena/offset")
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:16:2
|
||||
;;@ (lib)/allocator/arena.ts:19:2
|
||||
(set_local $2
|
||||
;;@ (lib)/allocator/arena.ts:16:15
|
||||
;;@ (lib)/allocator/arena.ts:19:15
|
||||
(i32.and
|
||||
(i32.add
|
||||
;;@ (lib)/allocator/arena.ts:16:16
|
||||
;;@ (lib)/allocator/arena.ts:19:16
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
;;@ (lib)/allocator/arena.ts:16:22
|
||||
;;@ (lib)/allocator/arena.ts:19:22
|
||||
(get_local $0)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:16:29
|
||||
;;@ (lib)/allocator/arena.ts:19:29
|
||||
(i32.const 7)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:16:40
|
||||
;;@ (lib)/allocator/arena.ts:19:40
|
||||
(i32.xor
|
||||
;;@ (lib)/allocator/arena.ts:16:41
|
||||
;;@ (lib)/allocator/arena.ts:19:41
|
||||
(i32.const 7)
|
||||
(i32.const -1)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:17:2
|
||||
;;@ (lib)/allocator/arena.ts:20:2
|
||||
(set_local $3
|
||||
;;@ (lib)/allocator/arena.ts:17:20
|
||||
;;@ (lib)/allocator/arena.ts:20:20
|
||||
(current_memory)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:18:2
|
||||
;;@ (lib)/allocator/arena.ts:21:2
|
||||
(if
|
||||
;;@ (lib)/allocator/arena.ts:18:6
|
||||
;;@ (lib)/allocator/arena.ts:21:6
|
||||
(i32.gt_u
|
||||
(get_local $2)
|
||||
;;@ (lib)/allocator/arena.ts:18:15
|
||||
;;@ (lib)/allocator/arena.ts:21:15
|
||||
(i32.shl
|
||||
(get_local $3)
|
||||
;;@ (lib)/allocator/arena.ts:18:37
|
||||
;;@ (lib)/allocator/arena.ts:21:37
|
||||
(i32.const 16)
|
||||
)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:18:41
|
||||
;;@ (lib)/allocator/arena.ts:21:41
|
||||
(block
|
||||
;;@ (lib)/allocator/arena.ts:19:4
|
||||
;;@ (lib)/allocator/arena.ts:22:4
|
||||
(set_local $4
|
||||
;;@ (lib)/allocator/arena.ts:19:22
|
||||
;;@ (lib)/allocator/arena.ts:22:22
|
||||
(i32.shr_u
|
||||
(i32.and
|
||||
;;@ (lib)/allocator/arena.ts:19:23
|
||||
;;@ (lib)/allocator/arena.ts:22:23
|
||||
(i32.add
|
||||
;;@ (lib)/allocator/arena.ts:19:24
|
||||
;;@ (lib)/allocator/arena.ts:22:24
|
||||
(i32.sub
|
||||
(get_local $2)
|
||||
;;@ (lib)/allocator/arena.ts:19:33
|
||||
;;@ (lib)/allocator/arena.ts:22:33
|
||||
(get_local $1)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:19:39
|
||||
;;@ (lib)/allocator/arena.ts:22:39
|
||||
(i32.const 65535)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:19:49
|
||||
;;@ (lib)/allocator/arena.ts:22:49
|
||||
(i32.xor
|
||||
;;@ (lib)/allocator/arena.ts:19:50
|
||||
;;@ (lib)/allocator/arena.ts:22:50
|
||||
(i32.const 65535)
|
||||
(i32.const -1)
|
||||
)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:19:62
|
||||
;;@ (lib)/allocator/arena.ts:22:62
|
||||
(i32.const 16)
|
||||
)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:20:4
|
||||
;;@ (lib)/allocator/arena.ts:23:4
|
||||
(set_local $5
|
||||
;;@ (lib)/allocator/arena.ts:20:22
|
||||
;;@ (lib)/allocator/arena.ts:23:22
|
||||
(select
|
||||
(tee_local $5
|
||||
;;@ (lib)/allocator/arena.ts:20:26
|
||||
;;@ (lib)/allocator/arena.ts:23:26
|
||||
(get_local $3)
|
||||
)
|
||||
(tee_local $6
|
||||
;;@ (lib)/allocator/arena.ts:20:39
|
||||
;;@ (lib)/allocator/arena.ts:23:39
|
||||
(get_local $4)
|
||||
)
|
||||
(i32.gt_s
|
||||
@ -124,40 +125,40 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:21:4
|
||||
;;@ (lib)/allocator/arena.ts:24:4
|
||||
(if
|
||||
;;@ (lib)/allocator/arena.ts:21:8
|
||||
;;@ (lib)/allocator/arena.ts:24:8
|
||||
(i32.lt_s
|
||||
(grow_memory
|
||||
;;@ (lib)/allocator/arena.ts:21:20
|
||||
;;@ (lib)/allocator/arena.ts:24:20
|
||||
(get_local $5)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:21:35
|
||||
;;@ (lib)/allocator/arena.ts:24:35
|
||||
(i32.const 0)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:22:6
|
||||
;;@ (lib)/allocator/arena.ts:25:6
|
||||
(if
|
||||
;;@ (lib)/allocator/arena.ts:22:10
|
||||
;;@ (lib)/allocator/arena.ts:25:10
|
||||
(i32.lt_s
|
||||
(grow_memory
|
||||
;;@ (lib)/allocator/arena.ts:22:22
|
||||
;;@ (lib)/allocator/arena.ts:25:22
|
||||
(get_local $4)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:22:37
|
||||
;;@ (lib)/allocator/arena.ts:25:37
|
||||
(i32.const 0)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:23:8
|
||||
;;@ (lib)/allocator/arena.ts:26:8
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:27:2
|
||||
;;@ (lib)/allocator/arena.ts:30:2
|
||||
(set_global "$(lib)/allocator/arena/offset"
|
||||
;;@ (lib)/allocator/arena.ts:27:11
|
||||
;;@ (lib)/allocator/arena.ts:30:11
|
||||
(get_local $2)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:28:9
|
||||
;;@ (lib)/allocator/arena.ts:31:9
|
||||
(return
|
||||
(get_local $1)
|
||||
)
|
||||
@ -165,42 +166,33 @@
|
||||
(func "$(lib)/allocator/arena/free_memory" (; 1 ;) (type $iv) (param $0 i32)
|
||||
)
|
||||
(func "$(lib)/allocator/arena/reset_memory" (; 2 ;) (type $v)
|
||||
;;@ (lib)/allocator/arena.ts:38:2
|
||||
;;@ (lib)/allocator/arena.ts:41:2
|
||||
(set_global "$(lib)/allocator/arena/offset"
|
||||
;;@ (lib)/allocator/arena.ts:38:11
|
||||
(i32.and
|
||||
(i32.add
|
||||
;;@ (lib)/allocator/arena.ts:38:12
|
||||
(get_global $HEAP_BASE)
|
||||
;;@ (lib)/allocator/arena.ts:38:24
|
||||
(i32.const 7)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:38:35
|
||||
(i32.xor
|
||||
;;@ (lib)/allocator/arena.ts:38:36
|
||||
(i32.const 7)
|
||||
(i32.const -1)
|
||||
)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:41:11
|
||||
(get_global "$(lib)/allocator/arena/startOffset")
|
||||
)
|
||||
)
|
||||
(func $start (; 3 ;) (type $v)
|
||||
(set_global "$(lib)/allocator/arena/offset"
|
||||
;;@ (lib)/allocator/arena.ts:10:20
|
||||
(set_global "$(lib)/allocator/arena/startOffset"
|
||||
;;@ (lib)/allocator/arena.ts:12:25
|
||||
(i32.and
|
||||
(i32.add
|
||||
;;@ (lib)/allocator/arena.ts:10:21
|
||||
;;@ (lib)/allocator/arena.ts:12:26
|
||||
(get_global $HEAP_BASE)
|
||||
;;@ (lib)/allocator/arena.ts:10:33
|
||||
;;@ (lib)/allocator/arena.ts:12:38
|
||||
(i32.const 7)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:10:44
|
||||
;;@ (lib)/allocator/arena.ts:12:49
|
||||
(i32.xor
|
||||
;;@ (lib)/allocator/arena.ts:10:45
|
||||
;;@ (lib)/allocator/arena.ts:12:50
|
||||
(i32.const 7)
|
||||
(i32.const -1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set_global "$(lib)/allocator/arena/offset"
|
||||
;;@ (lib)/allocator/arena.ts:13:20
|
||||
(get_global "$(lib)/allocator/arena/startOffset")
|
||||
)
|
||||
)
|
||||
)
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user