Reduce inlining verbosity

With debug info and source maps in place there is not much value anymore in emitting explicitly named blocks.
This commit is contained in:
dcodeIO
2018-11-12 14:54:08 +01:00
parent 04a0cb8de7
commit d62d84521e
18 changed files with 2626 additions and 3055 deletions

View File

@@ -2473,7 +2473,7 @@
i32.lt_s
i32.eqz
br_if $break|5
block $~lib/memory/memory.copy|inlined.0
block
get_local $6
get_local $8
i32.add
@@ -4137,18 +4137,16 @@
get_local $0
get_local $1
i32.store offset=4
block $~lib/memory/memory.fill|inlined.0
get_local $3
get_global $~lib/internal/arraybuffer/HEADER_SIZE
i32.add
set_local $4
i32.const 0
set_local $5
get_local $4
get_local $5
get_local $2
call $~lib/internal/memory/memset
end
get_local $3
get_global $~lib/internal/arraybuffer/HEADER_SIZE
i32.add
set_local $4
i32.const 0
set_local $5
get_local $4
get_local $5
get_local $2
call $~lib/internal/memory/memset
get_local $0
)
(func $~lib/array/Array<String>#__unchecked_set (; 39 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
@@ -4199,60 +4197,54 @@
get_local $0
get_local $1
i32.store
block $~lib/memory/memory.fill|inlined.1
get_local $0
get_global $~lib/internal/arraybuffer/HEADER_SIZE
i32.add
get_local $2
i32.add
set_local $3
i32.const 0
set_local $4
get_local $1
get_local $2
i32.sub
set_local $5
get_local $3
get_local $4
get_local $5
call $~lib/internal/memory/memset
end
get_local $0
get_global $~lib/internal/arraybuffer/HEADER_SIZE
i32.add
get_local $2
i32.add
set_local $3
i32.const 0
set_local $4
get_local $1
get_local $2
i32.sub
set_local $5
get_local $3
get_local $4
get_local $5
call $~lib/internal/memory/memset
else
get_local $1
call $~lib/internal/arraybuffer/allocateUnsafe
set_local $5
block $~lib/memory/memory.copy|inlined.2
get_local $5
get_global $~lib/internal/arraybuffer/HEADER_SIZE
i32.add
set_local $4
get_local $0
get_global $~lib/internal/arraybuffer/HEADER_SIZE
i32.add
set_local $3
get_local $4
get_local $3
get_local $2
call $~lib/internal/memory/memmove
end
block $~lib/memory/memory.fill|inlined.2
get_local $5
get_global $~lib/internal/arraybuffer/HEADER_SIZE
i32.add
get_local $2
i32.add
set_local $3
i32.const 0
set_local $4
get_local $1
get_local $2
i32.sub
set_local $6
get_local $3
get_local $4
get_local $6
call $~lib/internal/memory/memset
end
get_local $5
get_global $~lib/internal/arraybuffer/HEADER_SIZE
i32.add
set_local $4
get_local $0
get_global $~lib/internal/arraybuffer/HEADER_SIZE
i32.add
set_local $3
get_local $4
get_local $3
get_local $2
call $~lib/internal/memory/memmove
get_local $5
get_global $~lib/internal/arraybuffer/HEADER_SIZE
i32.add
get_local $2
i32.add
set_local $3
i32.const 0
set_local $4
get_local $1
get_local $2
i32.sub
set_local $6
get_local $3
get_local $4
get_local $6
call $~lib/internal/memory/memset
get_local $5
return
end
@@ -4328,15 +4320,13 @@
get_local $0
get_local $5
i32.store offset=4
block $~lib/internal/arraybuffer/storeUnsafe<String,String>|inlined.2
get_local $3
get_local $2
i32.const 2
i32.shl
i32.add
get_local $1
i32.store offset=8
end
get_local $3
get_local $2
i32.const 2
i32.shl
i32.add
get_local $1
i32.store offset=8
get_local $5
)
(func $~lib/string/String#split (; 42 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
@@ -4450,15 +4440,13 @@
i32.add
i32.load16_u offset=4
i32.store16 offset=4
block $~lib/internal/arraybuffer/storeUnsafe<String,String>|inlined.1
get_local $6
get_local $7
i32.const 2
i32.shl
i32.add
get_local $8
i32.store offset=8
end
get_local $6
get_local $7
i32.const 2
i32.shl
i32.add
get_local $8
i32.store offset=8
end
get_local $7
i32.const 1
@@ -4885,12 +4873,10 @@
get_local $2
call $~lib/internal/string/allocateUnsafe
set_local $3
block $~lib/internal/number/utoa32_core|inlined.0
get_local $3
get_local $0
get_local $2
call $~lib/internal/number/utoa32_lut
end
get_local $3
get_local $0
get_local $2
call $~lib/internal/number/utoa32_lut
get_local $1
if
get_local $3
@@ -4914,12 +4900,10 @@
get_local $1
call $~lib/internal/string/allocateUnsafe
set_local $2
block $~lib/internal/number/utoa32_core|inlined.1
get_local $2
get_local $0
get_local $1
call $~lib/internal/number/utoa32_lut
end
get_local $2
get_local $0
get_local $1
call $~lib/internal/number/utoa32_lut
get_local $2
)
(func $~lib/internal/number/decimalCount64 (; 49 ;) (type $Ii) (param $0 i64) (result i32)
@@ -5153,12 +5137,10 @@
get_local $3
call $~lib/internal/string/allocateUnsafe
set_local $1
block $~lib/internal/number/utoa32_core|inlined.2
get_local $1
get_local $2
get_local $3
call $~lib/internal/number/utoa32_lut
end
get_local $1
get_local $2
get_local $3
call $~lib/internal/number/utoa32_lut
else
get_local $0
call $~lib/internal/number/decimalCount64
@@ -5166,12 +5148,10 @@
get_local $3
call $~lib/internal/string/allocateUnsafe
set_local $1
block $~lib/internal/number/utoa64_core|inlined.0
get_local $1
get_local $0
get_local $3
call $~lib/internal/number/utoa64_lut
end
get_local $1
get_local $0
get_local $3
call $~lib/internal/number/utoa64_lut
end
get_local $1
)
@@ -5213,12 +5193,10 @@
get_local $4
call $~lib/internal/string/allocateUnsafe
set_local $2
block $~lib/internal/number/utoa32_core|inlined.3
get_local $2
get_local $3
get_local $4
call $~lib/internal/number/utoa32_lut
end
get_local $2
get_local $3
get_local $4
call $~lib/internal/number/utoa32_lut
else
get_local $0
call $~lib/internal/number/decimalCount64
@@ -5228,12 +5206,10 @@
get_local $4
call $~lib/internal/string/allocateUnsafe
set_local $2
block $~lib/internal/number/utoa64_core|inlined.1
get_local $2
get_local $0
get_local $4
call $~lib/internal/number/utoa64_lut
end
get_local $2
get_local $0
get_local $4
call $~lib/internal/number/utoa64_lut
end
get_local $1
if
@@ -5561,88 +5537,86 @@
get_local $14
i32.add
set_global $~lib/internal/number/_K
block $~lib/internal/number/grisuRound|inlined.0
block $~lib/internal/arraybuffer/loadUnsafe<u32,u64>|inlined.6 (result i64)
get_local $16
get_local $14
i32.const 2
i32.shl
i32.add
i64.load32_u offset=8
end
get_local $7
i64.extend_s/i32
i64.shl
set_local $20
get_local $0
get_local $15
i32.const 1
i32.sub
i32.const 1
block $~lib/internal/arraybuffer/loadUnsafe<u32,u64>|inlined.6 (result i64)
get_local $16
get_local $14
i32.const 2
i32.shl
i32.add
set_local $18
get_local $18
i32.load16_u offset=4
set_local $21
block $break|2
loop $continue|2
i64.load32_u offset=8
end
get_local $7
i64.extend_s/i32
i64.shl
set_local $20
get_local $0
get_local $15
i32.const 1
i32.sub
i32.const 1
i32.shl
i32.add
set_local $18
get_local $18
i32.load16_u offset=4
set_local $21
block $break|2
loop $continue|2
get_local $19
get_local $10
i64.lt_u
tee_local $22
if (result i32)
get_local $5
get_local $19
i64.sub
get_local $20
i64.ge_u
else
get_local $22
end
tee_local $22
if (result i32)
get_local $19
get_local $20
i64.add
get_local $10
i64.lt_u
tee_local $22
if (result i32)
get_local $5
get_local $22
else
get_local $10
get_local $19
i64.sub
get_local $20
i64.ge_u
else
get_local $22
end
tee_local $22
if (result i32)
get_local $19
get_local $20
i64.add
get_local $10
i64.lt_u
tee_local $22
if (result i32)
get_local $22
else
get_local $10
get_local $19
i64.sub
get_local $19
get_local $20
i64.add
get_local $10
i64.sub
i64.gt_u
end
else
get_local $22
i64.sub
i64.gt_u
end
if
block
get_local $21
i32.const 1
i32.sub
set_local $21
get_local $19
get_local $20
i64.add
set_local $19
end
br $continue|2
else
get_local $22
end
if
block
get_local $21
i32.const 1
i32.sub
set_local $21
get_local $19
get_local $20
i64.add
set_local $19
end
br $continue|2
end
end
get_local $18
get_local $21
i32.store16 offset=4
end
get_local $18
get_local $21
i32.store16 offset=4
get_local $15
return
end
@@ -5727,76 +5701,74 @@
end
i64.mul
set_local $10
block $~lib/internal/number/grisuRound|inlined.1
get_local $0
get_local $15
i32.const 1
i32.sub
i32.const 1
i32.shl
i32.add
set_local $17
get_local $17
i32.load16_u offset=4
set_local $21
block $break|4
loop $continue|4
get_local $0
get_local $15
i32.const 1
i32.sub
i32.const 1
i32.shl
i32.add
set_local $17
get_local $17
i32.load16_u offset=4
set_local $21
block $break|4
loop $continue|4
get_local $13
get_local $10
i64.lt_u
tee_local $18
if (result i32)
get_local $5
get_local $13
i64.sub
get_local $8
i64.ge_u
else
get_local $18
end
tee_local $18
if (result i32)
get_local $13
get_local $8
i64.add
get_local $10
i64.lt_u
tee_local $18
if (result i32)
get_local $5
get_local $18
else
get_local $10
get_local $13
i64.sub
get_local $8
i64.ge_u
else
get_local $18
end
tee_local $18
if (result i32)
get_local $13
get_local $8
i64.add
get_local $10
i64.lt_u
tee_local $18
if (result i32)
get_local $18
else
get_local $10
get_local $13
i64.sub
get_local $13
get_local $8
i64.add
get_local $10
i64.sub
i64.gt_u
end
else
get_local $18
i64.sub
i64.gt_u
end
if
block
get_local $21
i32.const 1
i32.sub
set_local $21
get_local $13
get_local $8
i64.add
set_local $13
end
br $continue|4
else
get_local $18
end
if
block
get_local $21
i32.const 1
i32.sub
set_local $21
get_local $13
get_local $8
i64.add
set_local $13
end
br $continue|4
end
end
get_local $17
get_local $21
i32.store16 offset=4
end
get_local $17
get_local $21
i32.store16 offset=4
get_local $15
return
end
@@ -5908,28 +5880,26 @@
i32.shl
i32.add
set_local $4
block $~lib/memory/memory.copy|inlined.3
get_local $4
get_global $~lib/internal/string/HEADER_SIZE
i32.add
i32.const 2
i32.add
set_local $5
get_local $4
get_global $~lib/internal/string/HEADER_SIZE
i32.add
set_local $6
i32.const 0
get_local $2
i32.sub
i32.const 1
i32.shl
set_local $7
get_local $5
get_local $6
get_local $7
call $~lib/internal/memory/memmove
end
get_local $4
get_global $~lib/internal/string/HEADER_SIZE
i32.add
i32.const 2
i32.add
set_local $5
get_local $4
get_global $~lib/internal/string/HEADER_SIZE
i32.add
set_local $6
i32.const 0
get_local $2
i32.sub
i32.const 1
i32.shl
set_local $7
get_local $5
get_local $6
get_local $7
call $~lib/internal/memory/memmove
get_local $0
get_local $3
i32.const 1
@@ -5958,28 +5928,26 @@
get_local $3
i32.sub
set_local $4
block $~lib/memory/memory.copy|inlined.4
get_local $0
get_global $~lib/internal/string/HEADER_SIZE
i32.add
get_local $4
i32.const 1
i32.shl
i32.add
set_local $7
get_local $0
get_global $~lib/internal/string/HEADER_SIZE
i32.add
set_local $6
get_local $1
i32.const 1
i32.shl
set_local $5
get_local $7
get_local $6
get_local $5
call $~lib/internal/memory/memmove
end
get_local $0
get_global $~lib/internal/string/HEADER_SIZE
i32.add
get_local $4
i32.const 1
i32.shl
i32.add
set_local $7
get_local $0
get_global $~lib/internal/string/HEADER_SIZE
i32.add
set_local $6
get_local $1
i32.const 1
i32.shl
set_local $5
get_local $7
get_local $6
get_local $5
call $~lib/internal/memory/memmove
get_local $0
get_global $~lib/internal/string/CharCode._0
get_global $~lib/internal/string/CharCode.DOT
@@ -6049,12 +6017,10 @@
i32.const 1
i32.add
set_local $7
block $~lib/internal/number/utoa32_core|inlined.4
get_local $4
get_local $5
get_local $7
call $~lib/internal/number/utoa32_lut
end
get_local $4
get_local $5
get_local $7
call $~lib/internal/number/utoa32_lut
get_local $4
get_global $~lib/internal/string/CharCode.MINUS
get_global $~lib/internal/string/CharCode.PLUS
@@ -6073,28 +6039,26 @@
i32.const 1
i32.shl
set_local $7
block $~lib/memory/memory.copy|inlined.5
get_local $0
get_global $~lib/internal/string/HEADER_SIZE
i32.add
i32.const 4
i32.add
set_local $6
get_local $0
get_global $~lib/internal/string/HEADER_SIZE
i32.add
i32.const 2
i32.add
set_local $5
get_local $7
i32.const 2
i32.sub
set_local $4
get_local $6
get_local $5
get_local $4
call $~lib/internal/memory/memmove
end
get_local $0
get_global $~lib/internal/string/HEADER_SIZE
i32.add
i32.const 4
i32.add
set_local $6
get_local $0
get_global $~lib/internal/string/HEADER_SIZE
i32.add
i32.const 2
i32.add
set_local $5
get_local $7
i32.const 2
i32.sub
set_local $4
get_local $6
get_local $5
get_local $4
call $~lib/internal/memory/memmove
get_local $0
get_global $~lib/internal/string/CharCode.DOT
i32.store16 offset=6
@@ -6131,12 +6095,10 @@
i32.const 1
i32.add
set_local $8
block $~lib/internal/number/utoa32_core|inlined.5
get_local $4
get_local $5
get_local $8
call $~lib/internal/number/utoa32_lut
end
get_local $4
get_local $5
get_local $8
call $~lib/internal/number/utoa32_lut
get_local $4
get_global $~lib/internal/string/CharCode.MINUS
get_global $~lib/internal/string/CharCode.PLUS
@@ -6233,7 +6195,7 @@
i32.add
i32.sub
set_local $4
block $~lib/internal/number/normalizedBoundaries|inlined.0
block
get_local $6
i64.const 1
i64.shl
@@ -6282,7 +6244,7 @@
get_local $8
set_global $~lib/internal/number/_exp
end
block $~lib/internal/number/getCachedPower|inlined.0
block
get_global $~lib/internal/number/_exp
set_local $10
i32.const -61
@@ -6745,28 +6707,24 @@
get_local $2
call $~lib/string/String#substring
set_local $3
block $~lib/internal/string/freeUnsafe|inlined.0
get_local $1
i32.eqz
if
i32.const 0
i32.const 112
i32.const 28
i32.const 4
call $~lib/env/abort
unreachable
end
block $~lib/memory/memory.free|inlined.0
block
get_local $1
i32.eqz
if
i32.const 0
i32.const 112
i32.const 28
i32.const 4
call $~lib/env/abort
unreachable
end
block $~lib/memory/memory.free|inlined.0
block
get_local $1
call $~lib/allocator/arena/__memory_free
br $~lib/memory/memory.free|inlined.0
unreachable
end
unreachable
end
call $~lib/allocator/arena/__memory_free
br $~lib/memory/memory.free|inlined.0
unreachable
end
unreachable
end
get_local $3
)