mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-25 20:51:44 +00:00
Rework constructor handling (#446)
This commit is contained in:
@ -101,27 +101,23 @@
|
||||
return
|
||||
)
|
||||
(func $std/new/AClass#constructor (; 2 ;) (type $ifi) (param $0 i32) (param $1 f32) (result i32)
|
||||
(local $2 i32)
|
||||
get_local $0
|
||||
get_local $0
|
||||
if (result i32)
|
||||
block (result i32)
|
||||
get_local $0
|
||||
else
|
||||
block (result i32)
|
||||
i32.eqz
|
||||
if
|
||||
i32.const 8
|
||||
call $~lib/memory/memory.allocate
|
||||
set_local $2
|
||||
get_local $2
|
||||
i32.const 1
|
||||
i32.store
|
||||
get_local $2
|
||||
f32.const 2
|
||||
f32.store offset=4
|
||||
get_local $2
|
||||
set_local $0
|
||||
end
|
||||
tee_local $0
|
||||
get_local $0
|
||||
i32.const 1
|
||||
i32.store
|
||||
get_local $0
|
||||
f32.const 2
|
||||
f32.store offset=4
|
||||
get_local $0
|
||||
end
|
||||
tee_local $0
|
||||
i32.load
|
||||
i32.const 1
|
||||
i32.add
|
||||
|
Reference in New Issue
Block a user