mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-26 21:21:54 +00:00
Replace more workarounds with actual lazy compilation in stdlib
This commit is contained in:
@ -2209,17 +2209,17 @@
|
||||
(local $5 i64)
|
||||
(local $6 i32)
|
||||
(local $7 i32)
|
||||
(local $8 i64)
|
||||
(local $8 i32)
|
||||
(local $9 i64)
|
||||
(local $10 i64)
|
||||
(local $11 i64)
|
||||
(local $12 i32)
|
||||
(local $13 i64)
|
||||
(local $14 i32)
|
||||
(local $12 i64)
|
||||
(local $13 i32)
|
||||
(local $14 i64)
|
||||
local.get $1
|
||||
f64.const 0
|
||||
f64.lt
|
||||
local.tee $12
|
||||
local.tee $13
|
||||
if (result f64)
|
||||
local.get $0
|
||||
i32.const 45
|
||||
@ -2230,14 +2230,14 @@
|
||||
local.get $1
|
||||
end
|
||||
i64.reinterpret_f64
|
||||
local.tee $13
|
||||
local.tee $14
|
||||
i64.const 9218868437227405312
|
||||
i64.and
|
||||
i64.const 52
|
||||
i64.shr_u
|
||||
i32.wrap_i64
|
||||
local.set $7
|
||||
local.get $13
|
||||
local.get $14
|
||||
i64.const 4503599627370495
|
||||
i64.and
|
||||
local.get $7
|
||||
@ -2258,7 +2258,7 @@
|
||||
local.tee $7
|
||||
i32.const 1
|
||||
i32.sub
|
||||
local.set $6
|
||||
local.set $8
|
||||
local.get $2
|
||||
i64.const 1
|
||||
i64.shl
|
||||
@ -2279,23 +2279,23 @@
|
||||
i64.eq
|
||||
i32.const 1
|
||||
i32.add
|
||||
local.tee $14
|
||||
local.tee $6
|
||||
i64.extend_i32_s
|
||||
i64.shl
|
||||
i64.const 1
|
||||
i64.sub
|
||||
local.get $7
|
||||
local.get $14
|
||||
i32.sub
|
||||
local.get $6
|
||||
i32.sub
|
||||
local.get $8
|
||||
local.get $4
|
||||
i32.sub
|
||||
local.tee $6
|
||||
local.tee $8
|
||||
i32.sub
|
||||
i64.extend_i32_s
|
||||
i64.shl
|
||||
global.set $~lib/internal/number/_frc_minus
|
||||
local.get $6
|
||||
local.get $8
|
||||
global.set $~lib/internal/number/_exp
|
||||
i32.const 348
|
||||
i32.const -61
|
||||
@ -2318,24 +2318,23 @@
|
||||
i32.shr_s
|
||||
i32.const 1
|
||||
i32.add
|
||||
local.tee $6
|
||||
local.tee $8
|
||||
i32.const 3
|
||||
i32.shl
|
||||
local.tee $4
|
||||
i32.sub
|
||||
global.set $~lib/internal/number/_K
|
||||
i32.const 1992
|
||||
i32.load
|
||||
local.set $4
|
||||
local.set $6
|
||||
i32.const 1728
|
||||
i32.load
|
||||
local.get $6
|
||||
i32.const 3
|
||||
i32.shl
|
||||
local.get $4
|
||||
i32.add
|
||||
i64.load offset=8
|
||||
global.set $~lib/internal/number/_frc_pow
|
||||
local.get $4
|
||||
local.get $6
|
||||
local.get $8
|
||||
i32.const 1
|
||||
i32.shl
|
||||
i32.add
|
||||
@ -2345,31 +2344,31 @@
|
||||
local.get $2
|
||||
i64.clz
|
||||
i32.wrap_i64
|
||||
local.tee $4
|
||||
local.tee $6
|
||||
i64.extend_i32_s
|
||||
i64.shl
|
||||
local.tee $2
|
||||
i64.const 4294967295
|
||||
i64.and
|
||||
local.tee $8
|
||||
local.tee $9
|
||||
global.get $~lib/internal/number/_frc_pow
|
||||
local.tee $5
|
||||
i64.const 4294967295
|
||||
i64.and
|
||||
local.tee $9
|
||||
local.tee $10
|
||||
i64.mul
|
||||
local.set $3
|
||||
local.get $5
|
||||
i64.const 32
|
||||
i64.shr_u
|
||||
local.tee $10
|
||||
local.get $8
|
||||
local.tee $11
|
||||
local.get $9
|
||||
i64.mul
|
||||
local.get $2
|
||||
i64.const 32
|
||||
i64.shr_u
|
||||
local.tee $2
|
||||
local.get $9
|
||||
local.get $10
|
||||
i64.mul
|
||||
local.get $3
|
||||
i64.const 32
|
||||
@ -2384,14 +2383,14 @@
|
||||
i64.const 32
|
||||
i64.shr_u
|
||||
local.get $2
|
||||
local.get $10
|
||||
local.get $11
|
||||
i64.mul
|
||||
local.get $3
|
||||
i64.const 32
|
||||
i64.shr_u
|
||||
i64.add
|
||||
i64.add
|
||||
local.set $13
|
||||
local.set $14
|
||||
local.get $5
|
||||
i64.const 4294967295
|
||||
i64.and
|
||||
@ -2400,22 +2399,22 @@
|
||||
local.tee $3
|
||||
i64.const 4294967295
|
||||
i64.and
|
||||
local.tee $10
|
||||
local.tee $11
|
||||
i64.mul
|
||||
local.set $11
|
||||
local.get $10
|
||||
local.set $12
|
||||
local.get $11
|
||||
local.get $5
|
||||
i64.const 32
|
||||
i64.shr_u
|
||||
local.tee $8
|
||||
local.tee $9
|
||||
i64.mul
|
||||
local.get $2
|
||||
local.get $3
|
||||
i64.const 32
|
||||
i64.shr_u
|
||||
local.tee $9
|
||||
local.tee $10
|
||||
i64.mul
|
||||
local.get $11
|
||||
local.get $12
|
||||
i64.const 32
|
||||
i64.shr_u
|
||||
i64.add
|
||||
@ -2427,41 +2426,41 @@
|
||||
i64.add
|
||||
i64.const 32
|
||||
i64.shr_u
|
||||
local.get $8
|
||||
local.get $9
|
||||
local.get $10
|
||||
i64.mul
|
||||
local.get $2
|
||||
i64.const 32
|
||||
i64.shr_u
|
||||
i64.add
|
||||
i64.add
|
||||
local.set $11
|
||||
local.set $12
|
||||
global.get $~lib/internal/number/_frc_minus
|
||||
local.tee $2
|
||||
i64.const 4294967295
|
||||
i64.and
|
||||
local.tee $8
|
||||
local.tee $9
|
||||
local.get $5
|
||||
i64.const 4294967295
|
||||
i64.and
|
||||
local.tee $9
|
||||
local.tee $10
|
||||
i64.mul
|
||||
local.set $3
|
||||
local.get $11
|
||||
local.get $12
|
||||
i64.const 1
|
||||
i64.sub
|
||||
local.tee $11
|
||||
local.tee $12
|
||||
local.get $5
|
||||
i64.const 32
|
||||
i64.shr_u
|
||||
local.tee $10
|
||||
local.get $8
|
||||
local.tee $11
|
||||
local.get $9
|
||||
i64.mul
|
||||
local.get $2
|
||||
i64.const 32
|
||||
i64.shr_u
|
||||
local.tee $2
|
||||
local.get $9
|
||||
local.get $10
|
||||
i64.mul
|
||||
local.get $3
|
||||
i64.const 32
|
||||
@ -2476,7 +2475,7 @@
|
||||
i64.const 32
|
||||
i64.shr_u
|
||||
local.get $2
|
||||
local.get $10
|
||||
local.get $11
|
||||
i64.mul
|
||||
local.get $3
|
||||
i64.const 32
|
||||
@ -2487,35 +2486,35 @@
|
||||
i64.add
|
||||
i64.sub
|
||||
local.set $3
|
||||
local.get $12
|
||||
local.get $13
|
||||
i32.const 1
|
||||
i32.shl
|
||||
local.get $0
|
||||
i32.add
|
||||
local.get $0
|
||||
local.get $13
|
||||
global.get $~lib/internal/number/_exp_pow
|
||||
local.tee $14
|
||||
local.get $14
|
||||
local.get $7
|
||||
local.get $4
|
||||
local.get $6
|
||||
i32.sub
|
||||
global.get $~lib/internal/number/_exp_pow
|
||||
local.tee $6
|
||||
i32.add
|
||||
i32.const -64
|
||||
i32.sub
|
||||
local.get $11
|
||||
local.get $12
|
||||
global.get $~lib/internal/number/_exp
|
||||
local.get $14
|
||||
local.get $6
|
||||
i32.add
|
||||
i32.const -64
|
||||
i32.sub
|
||||
local.get $3
|
||||
local.get $12
|
||||
local.get $13
|
||||
call $~lib/internal/number/genDigits
|
||||
local.get $12
|
||||
local.get $13
|
||||
i32.sub
|
||||
global.get $~lib/internal/number/_K
|
||||
call $~lib/internal/number/prettify
|
||||
local.get $12
|
||||
local.get $13
|
||||
i32.add
|
||||
)
|
||||
(func $~lib/string/String#substring (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
|
Reference in New Issue
Block a user