Rework constructor handling (#446)

This commit is contained in:
Daniel Wirtz
2019-02-02 16:03:21 +01:00
committed by GitHub
parent 75328f3feb
commit 2131c51932
30 changed files with 3308 additions and 2809 deletions

View File

@ -487,38 +487,34 @@
i32.store offset=20
)
(func $~lib/map/Map<i8,i32>#constructor (; 8 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
get_local $0
if (result i32)
block (result i32)
get_local $0
else
block (result i32)
i32.eqz
if
i32.const 24
call $~lib/memory/memory.allocate
set_local $1
get_local $1
i32.const 0
i32.store
get_local $1
i32.const 0
i32.store offset=4
get_local $1
i32.const 0
i32.store offset=8
get_local $1
i32.const 0
i32.store offset=12
get_local $1
i32.const 0
i32.store offset=16
get_local $1
i32.const 0
i32.store offset=20
get_local $1
set_local $0
end
tee_local $0
get_local $0
i32.const 0
i32.store
get_local $0
i32.const 0
i32.store offset=4
get_local $0
i32.const 0
i32.store offset=8
get_local $0
i32.const 0
i32.store offset=12
get_local $0
i32.const 0
i32.store offset=16
get_local $0
i32.const 0
i32.store offset=20
get_local $0
end
tee_local $0
call $~lib/map/Map<i8,i32>#clear
get_local $0
)
@ -1363,38 +1359,34 @@
i32.store offset=20
)
(func $~lib/map/Map<u8,i32>#constructor (; 19 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
get_local $0
if (result i32)
block (result i32)
get_local $0
else
block (result i32)
i32.eqz
if
i32.const 24
call $~lib/memory/memory.allocate
set_local $1
get_local $1
i32.const 0
i32.store
get_local $1
i32.const 0
i32.store offset=4
get_local $1
i32.const 0
i32.store offset=8
get_local $1
i32.const 0
i32.store offset=12
get_local $1
i32.const 0
i32.store offset=16
get_local $1
i32.const 0
i32.store offset=20
get_local $1
set_local $0
end
tee_local $0
get_local $0
i32.const 0
i32.store
get_local $0
i32.const 0
i32.store offset=4
get_local $0
i32.const 0
i32.store offset=8
get_local $0
i32.const 0
i32.store offset=12
get_local $0
i32.const 0
i32.store offset=16
get_local $0
i32.const 0
i32.store offset=20
get_local $0
end
tee_local $0
call $~lib/map/Map<u8,i32>#clear
get_local $0
)
@ -2208,38 +2200,34 @@
i32.store offset=20
)
(func $~lib/map/Map<i16,i32>#constructor (; 29 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
get_local $0
if (result i32)
block (result i32)
get_local $0
else
block (result i32)
i32.eqz
if
i32.const 24
call $~lib/memory/memory.allocate
set_local $1
get_local $1
i32.const 0
i32.store
get_local $1
i32.const 0
i32.store offset=4
get_local $1
i32.const 0
i32.store offset=8
get_local $1
i32.const 0
i32.store offset=12
get_local $1
i32.const 0
i32.store offset=16
get_local $1
i32.const 0
i32.store offset=20
get_local $1
set_local $0
end
tee_local $0
get_local $0
i32.const 0
i32.store
get_local $0
i32.const 0
i32.store offset=4
get_local $0
i32.const 0
i32.store offset=8
get_local $0
i32.const 0
i32.store offset=12
get_local $0
i32.const 0
i32.store offset=16
get_local $0
i32.const 0
i32.store offset=20
get_local $0
end
tee_local $0
call $~lib/map/Map<i16,i32>#clear
get_local $0
)
@ -3099,38 +3087,34 @@
i32.store offset=20
)
(func $~lib/map/Map<u16,i32>#constructor (; 40 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
get_local $0
if (result i32)
block (result i32)
get_local $0
else
block (result i32)
i32.eqz
if
i32.const 24
call $~lib/memory/memory.allocate
set_local $1
get_local $1
i32.const 0
i32.store
get_local $1
i32.const 0
i32.store offset=4
get_local $1
i32.const 0
i32.store offset=8
get_local $1
i32.const 0
i32.store offset=12
get_local $1
i32.const 0
i32.store offset=16
get_local $1
i32.const 0
i32.store offset=20
get_local $1
set_local $0
end
tee_local $0
get_local $0
i32.const 0
i32.store
get_local $0
i32.const 0
i32.store offset=4
get_local $0
i32.const 0
i32.store offset=8
get_local $0
i32.const 0
i32.store offset=12
get_local $0
i32.const 0
i32.store offset=16
get_local $0
i32.const 0
i32.store offset=20
get_local $0
end
tee_local $0
call $~lib/map/Map<u16,i32>#clear
get_local $0
)
@ -3944,38 +3928,34 @@
i32.store offset=20
)
(func $~lib/map/Map<i32,i32>#constructor (; 50 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
get_local $0
if (result i32)
block (result i32)
get_local $0
else
block (result i32)
i32.eqz
if
i32.const 24
call $~lib/memory/memory.allocate
set_local $1
get_local $1
i32.const 0
i32.store
get_local $1
i32.const 0
i32.store offset=4
get_local $1
i32.const 0
i32.store offset=8
get_local $1
i32.const 0
i32.store offset=12
get_local $1
i32.const 0
i32.store offset=16
get_local $1
i32.const 0
i32.store offset=20
get_local $1
set_local $0
end
tee_local $0
get_local $0
i32.const 0
i32.store
get_local $0
i32.const 0
i32.store offset=4
get_local $0
i32.const 0
i32.store offset=8
get_local $0
i32.const 0
i32.store offset=12
get_local $0
i32.const 0
i32.store offset=16
get_local $0
i32.const 0
i32.store offset=20
get_local $0
end
tee_local $0
call $~lib/map/Map<i32,i32>#clear
get_local $0
)
@ -4807,38 +4787,34 @@
i32.store offset=20
)
(func $~lib/map/Map<u32,i32>#constructor (; 61 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
get_local $0
if (result i32)
block (result i32)
get_local $0
else
block (result i32)
i32.eqz
if
i32.const 24
call $~lib/memory/memory.allocate
set_local $1
get_local $1
i32.const 0
i32.store
get_local $1
i32.const 0
i32.store offset=4
get_local $1
i32.const 0
i32.store offset=8
get_local $1
i32.const 0
i32.store offset=12
get_local $1
i32.const 0
i32.store offset=16
get_local $1
i32.const 0
i32.store offset=20
get_local $1
set_local $0
end
tee_local $0
get_local $0
i32.const 0
i32.store
get_local $0
i32.const 0
i32.store offset=4
get_local $0
i32.const 0
i32.store offset=8
get_local $0
i32.const 0
i32.store offset=12
get_local $0
i32.const 0
i32.store offset=16
get_local $0
i32.const 0
i32.store offset=20
get_local $0
end
tee_local $0
call $~lib/map/Map<u32,i32>#clear
get_local $0
)
@ -5628,38 +5604,34 @@
i32.store offset=20
)
(func $~lib/map/Map<i64,i32>#constructor (; 71 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
get_local $0
if (result i32)
block (result i32)
get_local $0
else
block (result i32)
i32.eqz
if
i32.const 24
call $~lib/memory/memory.allocate
set_local $1
get_local $1
i32.const 0
i32.store
get_local $1
i32.const 0
i32.store offset=4
get_local $1
i32.const 0
i32.store offset=8
get_local $1
i32.const 0
i32.store offset=12
get_local $1
i32.const 0
i32.store offset=16
get_local $1
i32.const 0
i32.store offset=20
get_local $1
set_local $0
end
tee_local $0
get_local $0
i32.const 0
i32.store
get_local $0
i32.const 0
i32.store offset=4
get_local $0
i32.const 0
i32.store offset=8
get_local $0
i32.const 0
i32.store offset=12
get_local $0
i32.const 0
i32.store offset=16
get_local $0
i32.const 0
i32.store offset=20
get_local $0
end
tee_local $0
call $~lib/map/Map<i64,i32>#clear
get_local $0
)
@ -6545,38 +6517,34 @@
i32.store offset=20
)
(func $~lib/map/Map<u64,i32>#constructor (; 82 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
get_local $0
if (result i32)
block (result i32)
get_local $0
else
block (result i32)
i32.eqz
if
i32.const 24
call $~lib/memory/memory.allocate
set_local $1
get_local $1
i32.const 0
i32.store
get_local $1
i32.const 0
i32.store offset=4
get_local $1
i32.const 0
i32.store offset=8
get_local $1
i32.const 0
i32.store offset=12
get_local $1
i32.const 0
i32.store offset=16
get_local $1
i32.const 0
i32.store offset=20
get_local $1
set_local $0
end
tee_local $0
get_local $0
i32.const 0
i32.store
get_local $0
i32.const 0
i32.store offset=4
get_local $0
i32.const 0
i32.store offset=8
get_local $0
i32.const 0
i32.store offset=12
get_local $0
i32.const 0
i32.store offset=16
get_local $0
i32.const 0
i32.store offset=20
get_local $0
end
tee_local $0
call $~lib/map/Map<u64,i32>#clear
get_local $0
)
@ -7374,38 +7342,34 @@
i32.store offset=20
)
(func $~lib/map/Map<f32,i32>#constructor (; 92 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
get_local $0
if (result i32)
block (result i32)
get_local $0
else
block (result i32)
i32.eqz
if
i32.const 24
call $~lib/memory/memory.allocate
set_local $1
get_local $1
i32.const 0
i32.store
get_local $1
i32.const 0
i32.store offset=4
get_local $1
i32.const 0
i32.store offset=8
get_local $1
i32.const 0
i32.store offset=12
get_local $1
i32.const 0
i32.store offset=16
get_local $1
i32.const 0
i32.store offset=20
get_local $1
set_local $0
end
tee_local $0
get_local $0
i32.const 0
i32.store
get_local $0
i32.const 0
i32.store offset=4
get_local $0
i32.const 0
i32.store offset=8
get_local $0
i32.const 0
i32.store offset=12
get_local $0
i32.const 0
i32.store offset=16
get_local $0
i32.const 0
i32.store offset=20
get_local $0
end
tee_local $0
call $~lib/map/Map<f32,i32>#clear
get_local $0
)
@ -8208,38 +8172,34 @@
i32.store offset=20
)
(func $~lib/map/Map<f64,i32>#constructor (; 102 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
get_local $0
if (result i32)
block (result i32)
get_local $0
else
block (result i32)
i32.eqz
if
i32.const 24
call $~lib/memory/memory.allocate
set_local $1
get_local $1
i32.const 0
i32.store
get_local $1
i32.const 0
i32.store offset=4
get_local $1
i32.const 0
i32.store offset=8
get_local $1
i32.const 0
i32.store offset=12
get_local $1
i32.const 0
i32.store offset=16
get_local $1
i32.const 0
i32.store offset=20
get_local $1
set_local $0
end
tee_local $0
get_local $0
i32.const 0
i32.store
get_local $0
i32.const 0
i32.store offset=4
get_local $0
i32.const 0
i32.store offset=8
get_local $0
i32.const 0
i32.store offset=12
get_local $0
i32.const 0
i32.store offset=16
get_local $0
i32.const 0
i32.store offset=20
get_local $0
end
tee_local $0
call $~lib/map/Map<f64,i32>#clear
get_local $0
)