mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-17 08:51:34 +00:00
Rework constructor handling (#446)
This commit is contained in:
@ -174,26 +174,20 @@
|
||||
return
|
||||
)
|
||||
(func $std/operator-overloading/Tester#constructor (; 3 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(local $3 i32)
|
||||
get_local $0
|
||||
if (result i32)
|
||||
get_local $0
|
||||
else
|
||||
block (result i32)
|
||||
i32.const 8
|
||||
call $~lib/memory/memory.allocate
|
||||
set_local $3
|
||||
get_local $3
|
||||
get_local $1
|
||||
i32.store
|
||||
get_local $3
|
||||
get_local $2
|
||||
i32.store offset=4
|
||||
get_local $3
|
||||
end
|
||||
tee_local $0
|
||||
i32.eqz
|
||||
if
|
||||
i32.const 8
|
||||
call $~lib/memory/memory.allocate
|
||||
set_local $0
|
||||
end
|
||||
tee_local $0
|
||||
get_local $0
|
||||
get_local $1
|
||||
i32.store
|
||||
get_local $0
|
||||
get_local $2
|
||||
i32.store offset=4
|
||||
get_local $0
|
||||
)
|
||||
(func $std/operator-overloading/Tester.add (; 4 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
i32.const 0
|
||||
@ -1751,48 +1745,36 @@
|
||||
call $std/operator-overloading/Tester#constructor
|
||||
)
|
||||
(func $std/operator-overloading/TesterInlineStatic#constructor (; 32 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(local $3 i32)
|
||||
get_local $0
|
||||
if (result i32)
|
||||
get_local $0
|
||||
else
|
||||
block (result i32)
|
||||
i32.const 8
|
||||
call $~lib/memory/memory.allocate
|
||||
set_local $3
|
||||
get_local $3
|
||||
get_local $1
|
||||
i32.store
|
||||
get_local $3
|
||||
get_local $2
|
||||
i32.store offset=4
|
||||
get_local $3
|
||||
end
|
||||
tee_local $0
|
||||
i32.eqz
|
||||
if
|
||||
i32.const 8
|
||||
call $~lib/memory/memory.allocate
|
||||
set_local $0
|
||||
end
|
||||
tee_local $0
|
||||
get_local $0
|
||||
get_local $1
|
||||
i32.store
|
||||
get_local $0
|
||||
get_local $2
|
||||
i32.store offset=4
|
||||
get_local $0
|
||||
)
|
||||
(func $std/operator-overloading/TesterInlineInstance#constructor (; 33 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(local $3 i32)
|
||||
get_local $0
|
||||
if (result i32)
|
||||
get_local $0
|
||||
else
|
||||
block (result i32)
|
||||
i32.const 8
|
||||
call $~lib/memory/memory.allocate
|
||||
set_local $3
|
||||
get_local $3
|
||||
get_local $1
|
||||
i32.store
|
||||
get_local $3
|
||||
get_local $2
|
||||
i32.store offset=4
|
||||
get_local $3
|
||||
end
|
||||
tee_local $0
|
||||
i32.eqz
|
||||
if
|
||||
i32.const 8
|
||||
call $~lib/memory/memory.allocate
|
||||
set_local $0
|
||||
end
|
||||
tee_local $0
|
||||
get_local $0
|
||||
get_local $1
|
||||
i32.store
|
||||
get_local $0
|
||||
get_local $2
|
||||
i32.store offset=4
|
||||
get_local $0
|
||||
)
|
||||
(func $start (; 34 ;) (type $v)
|
||||
(local $0 i32)
|
||||
|
Reference in New Issue
Block a user