mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-12 06:21:29 +00:00
Rework constructor handling (#446)
This commit is contained in:
@ -81,18 +81,19 @@
|
||||
if
|
||||
i32.const 4
|
||||
call $~lib/allocator/arena/__memory_allocate
|
||||
tee_local $0
|
||||
i32.const 1
|
||||
i32.store
|
||||
set_local $0
|
||||
end
|
||||
get_local $0
|
||||
i32.const 1
|
||||
i32.store
|
||||
get_local $0
|
||||
i32.load
|
||||
i32.const 1
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 6
|
||||
i32.const 8
|
||||
i32.const 4
|
||||
call $~lib/env/abort
|
||||
unreachable
|
||||
@ -103,22 +104,18 @@
|
||||
(local $0 i32)
|
||||
i32.const 8
|
||||
call $~lib/allocator/arena/__memory_allocate
|
||||
call $call-super/A#constructor
|
||||
tee_local $0
|
||||
i32.const 1
|
||||
i32.store
|
||||
get_local $0
|
||||
i32.const 2
|
||||
i32.store offset=4
|
||||
get_local $0
|
||||
call $call-super/A#constructor
|
||||
tee_local $0
|
||||
i32.load
|
||||
i32.const 1
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 15
|
||||
i32.const 17
|
||||
i32.const 4
|
||||
call $~lib/env/abort
|
||||
unreachable
|
||||
@ -130,7 +127,7 @@
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 16
|
||||
i32.const 18
|
||||
i32.const 4
|
||||
call $~lib/env/abort
|
||||
unreachable
|
||||
@ -147,7 +144,7 @@
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 22
|
||||
i32.const 24
|
||||
i32.const 2
|
||||
call $~lib/env/abort
|
||||
unreachable
|
||||
@ -159,20 +156,31 @@
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 23
|
||||
i32.const 25
|
||||
i32.const 2
|
||||
call $~lib/env/abort
|
||||
unreachable
|
||||
end
|
||||
)
|
||||
(func $call-super/D#constructor (; 5 ;) (type $FUNCSIG$i) (result i32)
|
||||
(local $0 i32)
|
||||
i32.const 8
|
||||
call $~lib/allocator/arena/__memory_allocate
|
||||
tee_local $0
|
||||
(func $call-super/C#constructor (; 5 ;) (type $ii) (param $0 i32) (result i32)
|
||||
get_local $0
|
||||
i32.eqz
|
||||
if
|
||||
i32.const 4
|
||||
call $~lib/allocator/arena/__memory_allocate
|
||||
set_local $0
|
||||
end
|
||||
get_local $0
|
||||
i32.const 1
|
||||
i32.store
|
||||
get_local $0
|
||||
)
|
||||
(func $call-super/D#constructor (; 6 ;) (type $FUNCSIG$i) (result i32)
|
||||
(local $0 i32)
|
||||
i32.const 8
|
||||
call $~lib/allocator/arena/__memory_allocate
|
||||
call $call-super/C#constructor
|
||||
tee_local $0
|
||||
i32.const 2
|
||||
i32.store offset=4
|
||||
get_local $0
|
||||
@ -182,7 +190,7 @@
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 36
|
||||
i32.const 40
|
||||
i32.const 4
|
||||
call $~lib/env/abort
|
||||
unreachable
|
||||
@ -194,14 +202,14 @@
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 37
|
||||
i32.const 41
|
||||
i32.const 4
|
||||
call $~lib/env/abort
|
||||
unreachable
|
||||
end
|
||||
get_local $0
|
||||
)
|
||||
(func $call-super/test2 (; 6 ;) (type $v)
|
||||
(func $call-super/test2 (; 7 ;) (type $v)
|
||||
(local $0 i32)
|
||||
call $call-super/D#constructor
|
||||
tee_local $0
|
||||
@ -211,7 +219,7 @@
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 43
|
||||
i32.const 47
|
||||
i32.const 2
|
||||
call $~lib/env/abort
|
||||
unreachable
|
||||
@ -223,17 +231,21 @@
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 44
|
||||
i32.const 48
|
||||
i32.const 2
|
||||
call $~lib/env/abort
|
||||
unreachable
|
||||
end
|
||||
)
|
||||
(func $call-super/E#constructor (; 7 ;) (type $FUNCSIG$i) (result i32)
|
||||
(local $0 i32)
|
||||
i32.const 4
|
||||
call $~lib/allocator/arena/__memory_allocate
|
||||
tee_local $0
|
||||
(func $call-super/E#constructor (; 8 ;) (type $ii) (param $0 i32) (result i32)
|
||||
get_local $0
|
||||
i32.eqz
|
||||
if
|
||||
i32.const 4
|
||||
call $~lib/allocator/arena/__memory_allocate
|
||||
set_local $0
|
||||
end
|
||||
get_local $0
|
||||
i32.const 1
|
||||
i32.store
|
||||
get_local $0
|
||||
@ -243,34 +255,124 @@
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 52
|
||||
i32.const 58
|
||||
i32.const 4
|
||||
call $~lib/env/abort
|
||||
unreachable
|
||||
end
|
||||
get_local $0
|
||||
)
|
||||
(func $start (; 8 ;) (type $v)
|
||||
i32.const 40
|
||||
set_global $~lib/allocator/arena/startOffset
|
||||
get_global $~lib/allocator/arena/startOffset
|
||||
set_global $~lib/allocator/arena/offset
|
||||
call $call-super/test1
|
||||
call $call-super/test2
|
||||
(func $call-super/test3 (; 9 ;) (type $v)
|
||||
(local $0 i32)
|
||||
i32.const 8
|
||||
call $~lib/allocator/arena/__memory_allocate
|
||||
call $call-super/E#constructor
|
||||
tee_local $0
|
||||
i32.const 2
|
||||
i32.store offset=4
|
||||
get_local $0
|
||||
i32.load
|
||||
i32.const 1
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 62
|
||||
i32.const 68
|
||||
i32.const 2
|
||||
call $~lib/env/abort
|
||||
unreachable
|
||||
end
|
||||
get_local $0
|
||||
i32.load offset=4
|
||||
i32.const 2
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 69
|
||||
i32.const 2
|
||||
call $~lib/env/abort
|
||||
unreachable
|
||||
end
|
||||
)
|
||||
(func $null (; 9 ;) (type $v)
|
||||
(func $call-super/H#constructor (; 10 ;) (type $FUNCSIG$i) (result i32)
|
||||
(local $0 i32)
|
||||
i32.const 8
|
||||
call $~lib/allocator/arena/__memory_allocate
|
||||
call $call-super/C#constructor
|
||||
tee_local $0
|
||||
i32.const 2
|
||||
i32.store offset=4
|
||||
get_local $0
|
||||
)
|
||||
(func $call-super/test4 (; 11 ;) (type $v)
|
||||
(local $0 i32)
|
||||
call $call-super/H#constructor
|
||||
tee_local $0
|
||||
i32.load
|
||||
i32.const 1
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 86
|
||||
i32.const 2
|
||||
call $~lib/env/abort
|
||||
unreachable
|
||||
end
|
||||
get_local $0
|
||||
i32.load offset=4
|
||||
i32.const 2
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 87
|
||||
i32.const 2
|
||||
call $~lib/env/abort
|
||||
unreachable
|
||||
end
|
||||
)
|
||||
(func $call-super/test5 (; 12 ;) (type $v)
|
||||
(local $0 i32)
|
||||
call $call-super/H#constructor
|
||||
tee_local $0
|
||||
i32.load
|
||||
i32.const 1
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 106
|
||||
i32.const 2
|
||||
call $~lib/env/abort
|
||||
unreachable
|
||||
end
|
||||
get_local $0
|
||||
i32.load offset=4
|
||||
i32.const 2
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 107
|
||||
i32.const 2
|
||||
call $~lib/env/abort
|
||||
unreachable
|
||||
end
|
||||
)
|
||||
(func $start (; 13 ;) (type $v)
|
||||
i32.const 40
|
||||
set_global $~lib/allocator/arena/startOffset
|
||||
get_global $~lib/allocator/arena/startOffset
|
||||
set_global $~lib/allocator/arena/offset
|
||||
call $call-super/test1
|
||||
call $call-super/test2
|
||||
call $call-super/test3
|
||||
call $call-super/test4
|
||||
call $call-super/test5
|
||||
)
|
||||
(func $null (; 14 ;) (type $v)
|
||||
nop
|
||||
)
|
||||
)
|
||||
|
Reference in New Issue
Block a user