@danielsimonjr/mathts-wasm 0.3.0 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,30 +6,30 @@
6
6
  (type $4 (func (param i32 i32)))
7
7
  (type $5 (func (param i32) (result f64)))
8
8
  (type $6 (func (param f64 f64) (result f64)))
9
- (type $7 (func (param i32 i32) (result f64)))
10
- (type $8 (func (param i32 i32 i32) (result i32)))
9
+ (type $7 (func (param i32 i32 i32) (result i32)))
10
+ (type $8 (func (param i32 i32) (result f64)))
11
11
  (type $9 (func (param i32 i32 i32 i32)))
12
12
  (type $10 (func (param i32 f64)))
13
13
  (type $11 (func (param f64) (result i32)))
14
14
  (type $12 (func (param i32 i32 i32 i32) (result i32)))
15
- (type $13 (func (param i32 f64 i32)))
16
- (type $14 (func))
17
- (type $15 (func (param f64 f64) (result i32)))
18
- (type $16 (func (param f64 f64 f64) (result f64)))
15
+ (type $13 (func (param f64 f64) (result i32)))
16
+ (type $14 (func (param f64 f64 f64) (result f64)))
17
+ (type $15 (func (param i32 f64 i32)))
18
+ (type $16 (func))
19
19
  (type $17 (func (param i32 i32 i32 i32 i32)))
20
20
  (type $18 (func (param i32 i32 i32 f64) (result i32)))
21
21
  (type $19 (func (param i64 i64) (result i64)))
22
22
  (type $20 (func (param i32 f64) (result f64)))
23
- (type $21 (func (param i32)))
24
- (type $22 (func (param i32 f64 f64) (result i32)))
25
- (type $23 (func (param i32 i32 f64)))
26
- (type $24 (func (param i32 i32 f64) (result i32)))
27
- (type $25 (func (param i32 f64) (result i32)))
28
- (type $26 (func (param f64 i32) (result f64)))
29
- (type $27 (func (param f64 f64 i32) (result f64)))
30
- (type $28 (func (param i32 i32 i32 i32 i32 i32)))
31
- (type $29 (func (param i32 i32 i32) (result f64)))
32
- (type $30 (func (param i32 i32 i32 i32 i32) (result i32)))
23
+ (type $21 (func (param f64 i32) (result f64)))
24
+ (type $22 (func (param i32)))
25
+ (type $23 (func (param i32 f64 f64) (result i32)))
26
+ (type $24 (func (param i32 i32 f64)))
27
+ (type $25 (func (param i32 i32 f64) (result i32)))
28
+ (type $26 (func (param i32 i32 i32 i32 i32) (result i32)))
29
+ (type $27 (func (param i32 f64) (result i32)))
30
+ (type $28 (func (param f64 f64 i32) (result f64)))
31
+ (type $29 (func (param i32 i32 i32 i32 i32 i32)))
32
+ (type $30 (func (param i32 i32 i32) (result f64)))
33
33
  (type $31 (func (param i32 i32 i32 i32 i32 i32) (result i32)))
34
34
  (type $32 (func (param f64 i64) (result i32)))
35
35
  (type $33 (func (param f64 i32 f64 i32 i32)))
@@ -7315,97 +7315,109 @@
7315
7315
  return
7316
7316
  )
7317
7317
  (func $src/ops/array/array_min (param $data i32) (result f64)
7318
+ (local $data|1 i32)
7318
7319
  (local $len i32)
7319
7320
  (local $minVal f64)
7320
7321
  (local $i i32)
7321
7322
  (local $val f64)
7322
- local.get $data
7323
- call $~lib/typedarray/Float64Array#get:length
7324
- local.set $len
7325
- local.get $len
7326
- i32.const 0
7327
- i32.eq
7328
- if
7329
- global.get $~lib/builtins/f64.NaN
7330
- return
7331
- end
7332
- local.get $data
7333
- i32.const 0
7334
- call $~lib/typedarray/Float64Array#__uget
7335
- local.set $minVal
7336
- i32.const 1
7337
- local.set $i
7338
- loop $for-loop|0
7339
- local.get $i
7323
+ block $src/ops/f64-buffer/f64Min|inlined.0 (result f64)
7324
+ local.get $data
7325
+ local.set $data|1
7326
+ local.get $data|1
7327
+ call $~lib/typedarray/Float64Array#get:length
7328
+ local.set $len
7340
7329
  local.get $len
7341
- i32.lt_s
7330
+ i32.const 0
7331
+ i32.eq
7342
7332
  if
7343
- local.get $data
7333
+ global.get $~lib/builtins/f64.NaN
7334
+ br $src/ops/f64-buffer/f64Min|inlined.0
7335
+ end
7336
+ local.get $data|1
7337
+ i32.const 0
7338
+ call $~lib/typedarray/Float64Array#__uget
7339
+ local.set $minVal
7340
+ i32.const 1
7341
+ local.set $i
7342
+ loop $for-loop|0
7344
7343
  local.get $i
7345
- call $~lib/typedarray/Float64Array#__uget
7346
- local.set $val
7347
- local.get $val
7348
- local.get $minVal
7349
- f64.lt
7344
+ local.get $len
7345
+ i32.lt_s
7350
7346
  if
7347
+ local.get $data|1
7348
+ local.get $i
7349
+ call $~lib/typedarray/Float64Array#__uget
7350
+ local.set $val
7351
7351
  local.get $val
7352
- local.set $minVal
7352
+ local.get $minVal
7353
+ f64.lt
7354
+ if
7355
+ local.get $val
7356
+ local.set $minVal
7357
+ end
7358
+ local.get $i
7359
+ i32.const 1
7360
+ i32.add
7361
+ local.set $i
7362
+ br $for-loop|0
7353
7363
  end
7354
- local.get $i
7355
- i32.const 1
7356
- i32.add
7357
- local.set $i
7358
- br $for-loop|0
7359
7364
  end
7365
+ local.get $minVal
7366
+ br $src/ops/f64-buffer/f64Min|inlined.0
7360
7367
  end
7361
- local.get $minVal
7362
7368
  return
7363
7369
  )
7364
7370
  (func $src/ops/array/array_max (param $data i32) (result f64)
7371
+ (local $data|1 i32)
7365
7372
  (local $len i32)
7366
7373
  (local $maxVal f64)
7367
7374
  (local $i i32)
7368
7375
  (local $val f64)
7369
- local.get $data
7370
- call $~lib/typedarray/Float64Array#get:length
7371
- local.set $len
7372
- local.get $len
7373
- i32.const 0
7374
- i32.eq
7375
- if
7376
- global.get $~lib/builtins/f64.NaN
7377
- return
7378
- end
7379
- local.get $data
7380
- i32.const 0
7381
- call $~lib/typedarray/Float64Array#__uget
7382
- local.set $maxVal
7383
- i32.const 1
7384
- local.set $i
7385
- loop $for-loop|0
7386
- local.get $i
7376
+ block $src/ops/f64-buffer/f64Max|inlined.0 (result f64)
7377
+ local.get $data
7378
+ local.set $data|1
7379
+ local.get $data|1
7380
+ call $~lib/typedarray/Float64Array#get:length
7381
+ local.set $len
7387
7382
  local.get $len
7388
- i32.lt_s
7383
+ i32.const 0
7384
+ i32.eq
7389
7385
  if
7390
- local.get $data
7386
+ global.get $~lib/builtins/f64.NaN
7387
+ br $src/ops/f64-buffer/f64Max|inlined.0
7388
+ end
7389
+ local.get $data|1
7390
+ i32.const 0
7391
+ call $~lib/typedarray/Float64Array#__uget
7392
+ local.set $maxVal
7393
+ i32.const 1
7394
+ local.set $i
7395
+ loop $for-loop|0
7391
7396
  local.get $i
7392
- call $~lib/typedarray/Float64Array#__uget
7393
- local.set $val
7394
- local.get $val
7395
- local.get $maxVal
7396
- f64.gt
7397
+ local.get $len
7398
+ i32.lt_s
7397
7399
  if
7400
+ local.get $data|1
7401
+ local.get $i
7402
+ call $~lib/typedarray/Float64Array#__uget
7403
+ local.set $val
7398
7404
  local.get $val
7399
- local.set $maxVal
7405
+ local.get $maxVal
7406
+ f64.gt
7407
+ if
7408
+ local.get $val
7409
+ local.set $maxVal
7410
+ end
7411
+ local.get $i
7412
+ i32.const 1
7413
+ i32.add
7414
+ local.set $i
7415
+ br $for-loop|0
7400
7416
  end
7401
- local.get $i
7402
- i32.const 1
7403
- i32.add
7404
- local.set $i
7405
- br $for-loop|0
7406
7417
  end
7418
+ local.get $maxVal
7419
+ br $src/ops/f64-buffer/f64Max|inlined.0
7407
7420
  end
7408
- local.get $maxVal
7409
7421
  return
7410
7422
  )
7411
7423
  (func $src/ops/array/array_argmin (param $data i32) (result i32)
@@ -7679,28 +7691,37 @@
7679
7691
  f64.store
7680
7692
  )
7681
7693
  (func $src/ops/array/array_add (param $a i32) (param $b i32) (param $result i32)
7682
- (local $3 i32)
7683
- (local $4 i32)
7684
- (local $5 i32)
7694
+ (local $a|3 i32)
7695
+ (local $b|4 i32)
7696
+ (local $result|5 i32)
7685
7697
  (local $6 i32)
7698
+ (local $7 i32)
7699
+ (local $8 i32)
7700
+ (local $9 i32)
7686
7701
  (local $len i32)
7687
7702
  (local $i i32)
7688
7703
  local.get $a
7689
- call $~lib/typedarray/Float64Array#get:length
7690
- local.tee $3
7704
+ local.set $a|3
7691
7705
  local.get $b
7692
- call $~lib/typedarray/Float64Array#get:length
7693
- local.tee $4
7694
- local.get $3
7695
- local.get $4
7696
- i32.lt_s
7697
- select
7698
- local.tee $5
7706
+ local.set $b|4
7699
7707
  local.get $result
7708
+ local.set $result|5
7709
+ local.get $a|3
7700
7710
  call $~lib/typedarray/Float64Array#get:length
7701
7711
  local.tee $6
7702
- local.get $5
7712
+ local.get $b|4
7713
+ call $~lib/typedarray/Float64Array#get:length
7714
+ local.tee $7
7703
7715
  local.get $6
7716
+ local.get $7
7717
+ i32.lt_s
7718
+ select
7719
+ local.tee $8
7720
+ local.get $result|5
7721
+ call $~lib/typedarray/Float64Array#get:length
7722
+ local.tee $9
7723
+ local.get $8
7724
+ local.get $9
7704
7725
  i32.lt_s
7705
7726
  select
7706
7727
  local.set $len
@@ -7711,12 +7732,12 @@
7711
7732
  local.get $len
7712
7733
  i32.lt_s
7713
7734
  if
7714
- local.get $result
7735
+ local.get $result|5
7715
7736
  local.get $i
7716
- local.get $a
7737
+ local.get $a|3
7717
7738
  local.get $i
7718
7739
  call $~lib/typedarray/Float64Array#__uget
7719
- local.get $b
7740
+ local.get $b|4
7720
7741
  local.get $i
7721
7742
  call $~lib/typedarray/Float64Array#__uget
7722
7743
  f64.add
@@ -7730,28 +7751,37 @@
7730
7751
  end
7731
7752
  )
7732
7753
  (func $src/ops/array/array_sub (param $a i32) (param $b i32) (param $result i32)
7733
- (local $3 i32)
7734
- (local $4 i32)
7735
- (local $5 i32)
7754
+ (local $a|3 i32)
7755
+ (local $b|4 i32)
7756
+ (local $result|5 i32)
7736
7757
  (local $6 i32)
7758
+ (local $7 i32)
7759
+ (local $8 i32)
7760
+ (local $9 i32)
7737
7761
  (local $len i32)
7738
7762
  (local $i i32)
7739
7763
  local.get $a
7740
- call $~lib/typedarray/Float64Array#get:length
7741
- local.tee $3
7764
+ local.set $a|3
7742
7765
  local.get $b
7743
- call $~lib/typedarray/Float64Array#get:length
7744
- local.tee $4
7745
- local.get $3
7746
- local.get $4
7747
- i32.lt_s
7748
- select
7749
- local.tee $5
7766
+ local.set $b|4
7750
7767
  local.get $result
7768
+ local.set $result|5
7769
+ local.get $a|3
7751
7770
  call $~lib/typedarray/Float64Array#get:length
7752
7771
  local.tee $6
7753
- local.get $5
7772
+ local.get $b|4
7773
+ call $~lib/typedarray/Float64Array#get:length
7774
+ local.tee $7
7754
7775
  local.get $6
7776
+ local.get $7
7777
+ i32.lt_s
7778
+ select
7779
+ local.tee $8
7780
+ local.get $result|5
7781
+ call $~lib/typedarray/Float64Array#get:length
7782
+ local.tee $9
7783
+ local.get $8
7784
+ local.get $9
7755
7785
  i32.lt_s
7756
7786
  select
7757
7787
  local.set $len
@@ -7762,12 +7792,12 @@
7762
7792
  local.get $len
7763
7793
  i32.lt_s
7764
7794
  if
7765
- local.get $result
7795
+ local.get $result|5
7766
7796
  local.get $i
7767
- local.get $a
7797
+ local.get $a|3
7768
7798
  local.get $i
7769
7799
  call $~lib/typedarray/Float64Array#__uget
7770
- local.get $b
7800
+ local.get $b|4
7771
7801
  local.get $i
7772
7802
  call $~lib/typedarray/Float64Array#__uget
7773
7803
  f64.sub
@@ -7781,28 +7811,37 @@
7781
7811
  end
7782
7812
  )
7783
7813
  (func $src/ops/array/array_mul (param $a i32) (param $b i32) (param $result i32)
7784
- (local $3 i32)
7785
- (local $4 i32)
7786
- (local $5 i32)
7814
+ (local $a|3 i32)
7815
+ (local $b|4 i32)
7816
+ (local $result|5 i32)
7787
7817
  (local $6 i32)
7818
+ (local $7 i32)
7819
+ (local $8 i32)
7820
+ (local $9 i32)
7788
7821
  (local $len i32)
7789
7822
  (local $i i32)
7790
7823
  local.get $a
7791
- call $~lib/typedarray/Float64Array#get:length
7792
- local.tee $3
7824
+ local.set $a|3
7793
7825
  local.get $b
7794
- call $~lib/typedarray/Float64Array#get:length
7795
- local.tee $4
7796
- local.get $3
7797
- local.get $4
7798
- i32.lt_s
7799
- select
7800
- local.tee $5
7826
+ local.set $b|4
7801
7827
  local.get $result
7828
+ local.set $result|5
7829
+ local.get $a|3
7802
7830
  call $~lib/typedarray/Float64Array#get:length
7803
7831
  local.tee $6
7804
- local.get $5
7832
+ local.get $b|4
7833
+ call $~lib/typedarray/Float64Array#get:length
7834
+ local.tee $7
7805
7835
  local.get $6
7836
+ local.get $7
7837
+ i32.lt_s
7838
+ select
7839
+ local.tee $8
7840
+ local.get $result|5
7841
+ call $~lib/typedarray/Float64Array#get:length
7842
+ local.tee $9
7843
+ local.get $8
7844
+ local.get $9
7806
7845
  i32.lt_s
7807
7846
  select
7808
7847
  local.set $len
@@ -7813,12 +7852,12 @@
7813
7852
  local.get $len
7814
7853
  i32.lt_s
7815
7854
  if
7816
- local.get $result
7855
+ local.get $result|5
7817
7856
  local.get $i
7818
- local.get $a
7857
+ local.get $a|3
7819
7858
  local.get $i
7820
7859
  call $~lib/typedarray/Float64Array#__uget
7821
- local.get $b
7860
+ local.get $b|4
7822
7861
  local.get $i
7823
7862
  call $~lib/typedarray/Float64Array#__uget
7824
7863
  f64.mul
@@ -7832,28 +7871,37 @@
7832
7871
  end
7833
7872
  )
7834
7873
  (func $src/ops/array/array_div (param $a i32) (param $b i32) (param $result i32)
7835
- (local $3 i32)
7836
- (local $4 i32)
7837
- (local $5 i32)
7874
+ (local $a|3 i32)
7875
+ (local $b|4 i32)
7876
+ (local $result|5 i32)
7838
7877
  (local $6 i32)
7878
+ (local $7 i32)
7879
+ (local $8 i32)
7880
+ (local $9 i32)
7839
7881
  (local $len i32)
7840
7882
  (local $i i32)
7841
7883
  local.get $a
7842
- call $~lib/typedarray/Float64Array#get:length
7843
- local.tee $3
7884
+ local.set $a|3
7844
7885
  local.get $b
7845
- call $~lib/typedarray/Float64Array#get:length
7846
- local.tee $4
7847
- local.get $3
7848
- local.get $4
7849
- i32.lt_s
7850
- select
7851
- local.tee $5
7886
+ local.set $b|4
7852
7887
  local.get $result
7888
+ local.set $result|5
7889
+ local.get $a|3
7853
7890
  call $~lib/typedarray/Float64Array#get:length
7854
7891
  local.tee $6
7855
- local.get $5
7892
+ local.get $b|4
7893
+ call $~lib/typedarray/Float64Array#get:length
7894
+ local.tee $7
7856
7895
  local.get $6
7896
+ local.get $7
7897
+ i32.lt_s
7898
+ select
7899
+ local.tee $8
7900
+ local.get $result|5
7901
+ call $~lib/typedarray/Float64Array#get:length
7902
+ local.tee $9
7903
+ local.get $8
7904
+ local.get $9
7857
7905
  i32.lt_s
7858
7906
  select
7859
7907
  local.set $len
@@ -7864,12 +7912,12 @@
7864
7912
  local.get $len
7865
7913
  i32.lt_s
7866
7914
  if
7867
- local.get $result
7915
+ local.get $result|5
7868
7916
  local.get $i
7869
- local.get $a
7917
+ local.get $a|3
7870
7918
  local.get $i
7871
7919
  call $~lib/typedarray/Float64Array#__uget
7872
- local.get $b
7920
+ local.get $b|4
7873
7921
  local.get $i
7874
7922
  call $~lib/typedarray/Float64Array#__uget
7875
7923
  f64.div
@@ -8990,28 +9038,37 @@
8990
9038
  return
8991
9039
  )
8992
9040
  (func $src/ops/matrix/matrix_add (param $a i32) (param $b i32) (param $result i32)
8993
- (local $3 i32)
8994
- (local $4 i32)
8995
- (local $5 i32)
9041
+ (local $a|3 i32)
9042
+ (local $b|4 i32)
9043
+ (local $result|5 i32)
8996
9044
  (local $6 i32)
9045
+ (local $7 i32)
9046
+ (local $8 i32)
9047
+ (local $9 i32)
8997
9048
  (local $len i32)
8998
9049
  (local $i i32)
8999
9050
  local.get $a
9000
- call $~lib/typedarray/Float64Array#get:length
9001
- local.tee $3
9051
+ local.set $a|3
9002
9052
  local.get $b
9003
- call $~lib/typedarray/Float64Array#get:length
9004
- local.tee $4
9005
- local.get $3
9006
- local.get $4
9007
- i32.lt_s
9008
- select
9009
- local.tee $5
9053
+ local.set $b|4
9010
9054
  local.get $result
9055
+ local.set $result|5
9056
+ local.get $a|3
9011
9057
  call $~lib/typedarray/Float64Array#get:length
9012
9058
  local.tee $6
9013
- local.get $5
9059
+ local.get $b|4
9060
+ call $~lib/typedarray/Float64Array#get:length
9061
+ local.tee $7
9014
9062
  local.get $6
9063
+ local.get $7
9064
+ i32.lt_s
9065
+ select
9066
+ local.tee $8
9067
+ local.get $result|5
9068
+ call $~lib/typedarray/Float64Array#get:length
9069
+ local.tee $9
9070
+ local.get $8
9071
+ local.get $9
9015
9072
  i32.lt_s
9016
9073
  select
9017
9074
  local.set $len
@@ -9022,12 +9079,12 @@
9022
9079
  local.get $len
9023
9080
  i32.lt_s
9024
9081
  if
9025
- local.get $result
9082
+ local.get $result|5
9026
9083
  local.get $i
9027
- local.get $a
9084
+ local.get $a|3
9028
9085
  local.get $i
9029
9086
  call $~lib/typedarray/Float64Array#__uget
9030
- local.get $b
9087
+ local.get $b|4
9031
9088
  local.get $i
9032
9089
  call $~lib/typedarray/Float64Array#__uget
9033
9090
  f64.add
@@ -9041,28 +9098,37 @@
9041
9098
  end
9042
9099
  )
9043
9100
  (func $src/ops/matrix/matrix_sub (param $a i32) (param $b i32) (param $result i32)
9044
- (local $3 i32)
9045
- (local $4 i32)
9046
- (local $5 i32)
9101
+ (local $a|3 i32)
9102
+ (local $b|4 i32)
9103
+ (local $result|5 i32)
9047
9104
  (local $6 i32)
9105
+ (local $7 i32)
9106
+ (local $8 i32)
9107
+ (local $9 i32)
9048
9108
  (local $len i32)
9049
9109
  (local $i i32)
9050
9110
  local.get $a
9051
- call $~lib/typedarray/Float64Array#get:length
9052
- local.tee $3
9111
+ local.set $a|3
9053
9112
  local.get $b
9054
- call $~lib/typedarray/Float64Array#get:length
9055
- local.tee $4
9056
- local.get $3
9057
- local.get $4
9058
- i32.lt_s
9059
- select
9060
- local.tee $5
9113
+ local.set $b|4
9061
9114
  local.get $result
9115
+ local.set $result|5
9116
+ local.get $a|3
9062
9117
  call $~lib/typedarray/Float64Array#get:length
9063
9118
  local.tee $6
9064
- local.get $5
9119
+ local.get $b|4
9120
+ call $~lib/typedarray/Float64Array#get:length
9121
+ local.tee $7
9065
9122
  local.get $6
9123
+ local.get $7
9124
+ i32.lt_s
9125
+ select
9126
+ local.tee $8
9127
+ local.get $result|5
9128
+ call $~lib/typedarray/Float64Array#get:length
9129
+ local.tee $9
9130
+ local.get $8
9131
+ local.get $9
9066
9132
  i32.lt_s
9067
9133
  select
9068
9134
  local.set $len
@@ -9073,12 +9139,12 @@
9073
9139
  local.get $len
9074
9140
  i32.lt_s
9075
9141
  if
9076
- local.get $result
9142
+ local.get $result|5
9077
9143
  local.get $i
9078
- local.get $a
9144
+ local.get $a|3
9079
9145
  local.get $i
9080
9146
  call $~lib/typedarray/Float64Array#__uget
9081
- local.get $b
9147
+ local.get $b|4
9082
9148
  local.get $i
9083
9149
  call $~lib/typedarray/Float64Array#__uget
9084
9150
  f64.sub
@@ -9092,28 +9158,37 @@
9092
9158
  end
9093
9159
  )
9094
9160
  (func $src/ops/matrix/matrix_mul_elementwise (param $a i32) (param $b i32) (param $result i32)
9095
- (local $3 i32)
9096
- (local $4 i32)
9097
- (local $5 i32)
9161
+ (local $a|3 i32)
9162
+ (local $b|4 i32)
9163
+ (local $result|5 i32)
9098
9164
  (local $6 i32)
9165
+ (local $7 i32)
9166
+ (local $8 i32)
9167
+ (local $9 i32)
9099
9168
  (local $len i32)
9100
9169
  (local $i i32)
9101
9170
  local.get $a
9102
- call $~lib/typedarray/Float64Array#get:length
9103
- local.tee $3
9171
+ local.set $a|3
9104
9172
  local.get $b
9105
- call $~lib/typedarray/Float64Array#get:length
9106
- local.tee $4
9107
- local.get $3
9108
- local.get $4
9109
- i32.lt_s
9110
- select
9111
- local.tee $5
9173
+ local.set $b|4
9112
9174
  local.get $result
9175
+ local.set $result|5
9176
+ local.get $a|3
9113
9177
  call $~lib/typedarray/Float64Array#get:length
9114
9178
  local.tee $6
9115
- local.get $5
9179
+ local.get $b|4
9180
+ call $~lib/typedarray/Float64Array#get:length
9181
+ local.tee $7
9116
9182
  local.get $6
9183
+ local.get $7
9184
+ i32.lt_s
9185
+ select
9186
+ local.tee $8
9187
+ local.get $result|5
9188
+ call $~lib/typedarray/Float64Array#get:length
9189
+ local.tee $9
9190
+ local.get $8
9191
+ local.get $9
9117
9192
  i32.lt_s
9118
9193
  select
9119
9194
  local.set $len
@@ -9124,12 +9199,12 @@
9124
9199
  local.get $len
9125
9200
  i32.lt_s
9126
9201
  if
9127
- local.get $result
9202
+ local.get $result|5
9128
9203
  local.get $i
9129
- local.get $a
9204
+ local.get $a|3
9130
9205
  local.get $i
9131
9206
  call $~lib/typedarray/Float64Array#__uget
9132
- local.get $b
9207
+ local.get $b|4
9133
9208
  local.get $i
9134
9209
  call $~lib/typedarray/Float64Array#__uget
9135
9210
  f64.mul
@@ -9143,28 +9218,37 @@
9143
9218
  end
9144
9219
  )
9145
9220
  (func $src/ops/matrix/matrix_div_elementwise (param $a i32) (param $b i32) (param $result i32)
9146
- (local $3 i32)
9147
- (local $4 i32)
9148
- (local $5 i32)
9221
+ (local $a|3 i32)
9222
+ (local $b|4 i32)
9223
+ (local $result|5 i32)
9149
9224
  (local $6 i32)
9225
+ (local $7 i32)
9226
+ (local $8 i32)
9227
+ (local $9 i32)
9150
9228
  (local $len i32)
9151
9229
  (local $i i32)
9152
9230
  local.get $a
9153
- call $~lib/typedarray/Float64Array#get:length
9154
- local.tee $3
9231
+ local.set $a|3
9155
9232
  local.get $b
9156
- call $~lib/typedarray/Float64Array#get:length
9157
- local.tee $4
9158
- local.get $3
9159
- local.get $4
9160
- i32.lt_s
9161
- select
9162
- local.tee $5
9233
+ local.set $b|4
9163
9234
  local.get $result
9235
+ local.set $result|5
9236
+ local.get $a|3
9164
9237
  call $~lib/typedarray/Float64Array#get:length
9165
9238
  local.tee $6
9166
- local.get $5
9239
+ local.get $b|4
9240
+ call $~lib/typedarray/Float64Array#get:length
9241
+ local.tee $7
9167
9242
  local.get $6
9243
+ local.get $7
9244
+ i32.lt_s
9245
+ select
9246
+ local.tee $8
9247
+ local.get $result|5
9248
+ call $~lib/typedarray/Float64Array#get:length
9249
+ local.tee $9
9250
+ local.get $8
9251
+ local.get $9
9168
9252
  i32.lt_s
9169
9253
  select
9170
9254
  local.set $len
@@ -9175,12 +9259,12 @@
9175
9259
  local.get $len
9176
9260
  i32.lt_s
9177
9261
  if
9178
- local.get $result
9262
+ local.get $result|5
9179
9263
  local.get $i
9180
- local.get $a
9264
+ local.get $a|3
9181
9265
  local.get $i
9182
9266
  call $~lib/typedarray/Float64Array#__uget
9183
- local.get $b
9267
+ local.get $b|4
9184
9268
  local.get $i
9185
9269
  call $~lib/typedarray/Float64Array#__uget
9186
9270
  f64.div
@@ -9873,97 +9957,109 @@
9873
9957
  return
9874
9958
  )
9875
9959
  (func $src/ops/matrix/matrix_min (param $data i32) (result f64)
9960
+ (local $data|1 i32)
9876
9961
  (local $len i32)
9877
9962
  (local $minVal f64)
9878
9963
  (local $i i32)
9879
9964
  (local $val f64)
9880
- local.get $data
9881
- call $~lib/typedarray/Float64Array#get:length
9882
- local.set $len
9883
- local.get $len
9884
- i32.const 0
9885
- i32.eq
9886
- if
9887
- global.get $~lib/builtins/f64.NaN
9888
- return
9889
- end
9890
- local.get $data
9891
- i32.const 0
9892
- call $~lib/typedarray/Float64Array#__uget
9893
- local.set $minVal
9894
- i32.const 1
9895
- local.set $i
9896
- loop $for-loop|0
9897
- local.get $i
9965
+ block $src/ops/f64-buffer/f64Min|inlined.1 (result f64)
9966
+ local.get $data
9967
+ local.set $data|1
9968
+ local.get $data|1
9969
+ call $~lib/typedarray/Float64Array#get:length
9970
+ local.set $len
9898
9971
  local.get $len
9899
- i32.lt_s
9972
+ i32.const 0
9973
+ i32.eq
9900
9974
  if
9901
- local.get $data
9975
+ global.get $~lib/builtins/f64.NaN
9976
+ br $src/ops/f64-buffer/f64Min|inlined.1
9977
+ end
9978
+ local.get $data|1
9979
+ i32.const 0
9980
+ call $~lib/typedarray/Float64Array#__uget
9981
+ local.set $minVal
9982
+ i32.const 1
9983
+ local.set $i
9984
+ loop $for-loop|0
9902
9985
  local.get $i
9903
- call $~lib/typedarray/Float64Array#__uget
9904
- local.set $val
9905
- local.get $val
9906
- local.get $minVal
9907
- f64.lt
9986
+ local.get $len
9987
+ i32.lt_s
9908
9988
  if
9989
+ local.get $data|1
9990
+ local.get $i
9991
+ call $~lib/typedarray/Float64Array#__uget
9992
+ local.set $val
9909
9993
  local.get $val
9910
- local.set $minVal
9994
+ local.get $minVal
9995
+ f64.lt
9996
+ if
9997
+ local.get $val
9998
+ local.set $minVal
9999
+ end
10000
+ local.get $i
10001
+ i32.const 1
10002
+ i32.add
10003
+ local.set $i
10004
+ br $for-loop|0
9911
10005
  end
9912
- local.get $i
9913
- i32.const 1
9914
- i32.add
9915
- local.set $i
9916
- br $for-loop|0
9917
10006
  end
10007
+ local.get $minVal
10008
+ br $src/ops/f64-buffer/f64Min|inlined.1
9918
10009
  end
9919
- local.get $minVal
9920
10010
  return
9921
10011
  )
9922
10012
  (func $src/ops/matrix/matrix_max (param $data i32) (result f64)
10013
+ (local $data|1 i32)
9923
10014
  (local $len i32)
9924
10015
  (local $maxVal f64)
9925
10016
  (local $i i32)
9926
10017
  (local $val f64)
9927
- local.get $data
9928
- call $~lib/typedarray/Float64Array#get:length
9929
- local.set $len
9930
- local.get $len
9931
- i32.const 0
9932
- i32.eq
9933
- if
9934
- global.get $~lib/builtins/f64.NaN
9935
- return
9936
- end
9937
- local.get $data
9938
- i32.const 0
9939
- call $~lib/typedarray/Float64Array#__uget
9940
- local.set $maxVal
9941
- i32.const 1
9942
- local.set $i
9943
- loop $for-loop|0
9944
- local.get $i
10018
+ block $src/ops/f64-buffer/f64Max|inlined.1 (result f64)
10019
+ local.get $data
10020
+ local.set $data|1
10021
+ local.get $data|1
10022
+ call $~lib/typedarray/Float64Array#get:length
10023
+ local.set $len
9945
10024
  local.get $len
9946
- i32.lt_s
10025
+ i32.const 0
10026
+ i32.eq
9947
10027
  if
9948
- local.get $data
10028
+ global.get $~lib/builtins/f64.NaN
10029
+ br $src/ops/f64-buffer/f64Max|inlined.1
10030
+ end
10031
+ local.get $data|1
10032
+ i32.const 0
10033
+ call $~lib/typedarray/Float64Array#__uget
10034
+ local.set $maxVal
10035
+ i32.const 1
10036
+ local.set $i
10037
+ loop $for-loop|0
9949
10038
  local.get $i
9950
- call $~lib/typedarray/Float64Array#__uget
9951
- local.set $val
9952
- local.get $val
9953
- local.get $maxVal
9954
- f64.gt
10039
+ local.get $len
10040
+ i32.lt_s
9955
10041
  if
10042
+ local.get $data|1
10043
+ local.get $i
10044
+ call $~lib/typedarray/Float64Array#__uget
10045
+ local.set $val
9956
10046
  local.get $val
9957
- local.set $maxVal
10047
+ local.get $maxVal
10048
+ f64.gt
10049
+ if
10050
+ local.get $val
10051
+ local.set $maxVal
10052
+ end
10053
+ local.get $i
10054
+ i32.const 1
10055
+ i32.add
10056
+ local.set $i
10057
+ br $for-loop|0
9958
10058
  end
9959
- local.get $i
9960
- i32.const 1
9961
- i32.add
9962
- local.set $i
9963
- br $for-loop|0
9964
10059
  end
10060
+ local.get $maxVal
10061
+ br $src/ops/f64-buffer/f64Max|inlined.1
9965
10062
  end
9966
- local.get $maxVal
9967
10063
  return
9968
10064
  )
9969
10065
  (func $src/ops/matrix/matrix_norm_frobenius (param $data i32) (result f64)
@@ -27823,6 +27919,13 @@
27823
27919
  return
27824
27920
  )
27825
27921
  (func $src/elementwise/_erfc (param $x f64) (result f64)
27922
+ local.get $x
27923
+ local.get $x
27924
+ f64.ne
27925
+ if
27926
+ local.get $x
27927
+ return
27928
+ end
27826
27929
  local.get $x
27827
27930
  local.get $x
27828
27931
  f64.sub
@@ -29913,7 +30016,7 @@
29913
30016
  end
29914
30017
  return
29915
30018
  )
29916
- (func $src/special/_airyAiSeries (param $x f64) (result f64)
30019
+ (func $src/special/_airySeries (param $x f64) (param $combine i32) (result f64)
29917
30020
  (local $x3 f64)
29918
30021
  (local $f f64)
29919
30022
  (local $g f64)
@@ -29927,10 +30030,11 @@
29927
30030
  (local $kf f64)
29928
30031
  (local $df f64)
29929
30032
  (local $dg f64)
29930
- (local $x|14 f64)
29931
30033
  (local $x|15 f64)
29932
30034
  (local $x|16 f64)
29933
30035
  (local $x|17 f64)
30036
+ (local $x|18 f64)
30037
+ (local $x|19 f64)
29934
30038
  local.get $x
29935
30039
  local.get $x
29936
30040
  f64.mul
@@ -30046,15 +30150,15 @@
30046
30150
  local.set $g
30047
30151
  block $~lib/math/NativeMath.abs|inlined.59 (result f64)
30048
30152
  local.get $df
30049
- local.set $x|14
30050
- local.get $x|14
30153
+ local.set $x|15
30154
+ local.get $x|15
30051
30155
  f64.abs
30052
30156
  br $~lib/math/NativeMath.abs|inlined.59
30053
30157
  end
30054
30158
  block $~lib/math/NativeMath.abs|inlined.60 (result f64)
30055
30159
  local.get $f
30056
- local.set $x|15
30057
- local.get $x|15
30160
+ local.set $x|16
30161
+ local.get $x|16
30058
30162
  f64.abs
30059
30163
  br $~lib/math/NativeMath.abs|inlined.60
30060
30164
  end
@@ -30064,15 +30168,15 @@
30064
30168
  if (result i32)
30065
30169
  block $~lib/math/NativeMath.abs|inlined.61 (result f64)
30066
30170
  local.get $dg
30067
- local.set $x|16
30068
- local.get $x|16
30171
+ local.set $x|17
30172
+ local.get $x|17
30069
30173
  f64.abs
30070
30174
  br $~lib/math/NativeMath.abs|inlined.61
30071
30175
  end
30072
30176
  block $~lib/math/NativeMath.abs|inlined.62 (result f64)
30073
30177
  local.get $g
30074
- local.set $x|17
30075
- local.get $x|17
30178
+ local.set $x|18
30179
+ local.get $x|18
30076
30180
  f64.abs
30077
30181
  br $~lib/math/NativeMath.abs|inlined.62
30078
30182
  end
@@ -30093,13 +30197,40 @@
30093
30197
  end
30094
30198
  end
30095
30199
  end
30200
+ local.get $combine
30201
+ i32.const 0
30202
+ i32.eq
30203
+ if
30204
+ global.get $src/special/AI0
30205
+ local.get $f
30206
+ f64.mul
30207
+ global.get $src/special/AI_PRIME0
30208
+ local.get $g
30209
+ f64.mul
30210
+ f64.sub
30211
+ return
30212
+ end
30213
+ block $~lib/math/NativeMath.sqrt|inlined.12 (result f64)
30214
+ f64.const 3
30215
+ local.set $x|19
30216
+ local.get $x|19
30217
+ f64.sqrt
30218
+ br $~lib/math/NativeMath.sqrt|inlined.12
30219
+ end
30096
30220
  global.get $src/special/AI0
30097
30221
  local.get $f
30098
30222
  f64.mul
30099
30223
  global.get $src/special/AI_PRIME0
30100
30224
  local.get $g
30101
30225
  f64.mul
30102
- f64.sub
30226
+ f64.add
30227
+ f64.mul
30228
+ return
30229
+ )
30230
+ (func $src/special/_airyAiSeries (param $x f64) (result f64)
30231
+ local.get $x
30232
+ i32.const 0
30233
+ call $src/special/_airySeries
30103
30234
  return
30104
30235
  )
30105
30236
  (func $src/special/_airyAi (param $x f64) (result f64)
@@ -30160,201 +30291,9 @@
30160
30291
  return
30161
30292
  )
30162
30293
  (func $src/special/_airyBiSeries (param $x f64) (result f64)
30163
- (local $x3 f64)
30164
- (local $f f64)
30165
- (local $g f64)
30166
- (local $fTerm f64)
30167
- (local $gTerm f64)
30168
- (local $factF f64)
30169
- (local $factG f64)
30170
- (local $prodF f64)
30171
- (local $prodG f64)
30172
- (local $k i32)
30173
- (local $kf f64)
30174
- (local $df f64)
30175
- (local $dg f64)
30176
- (local $x|14 f64)
30177
- (local $x|15 f64)
30178
- (local $x|16 f64)
30179
- (local $x|17 f64)
30180
- (local $x|18 f64)
30181
30294
  local.get $x
30182
- local.get $x
30183
- f64.mul
30184
- local.get $x
30185
- f64.mul
30186
- local.set $x3
30187
- f64.const 1
30188
- local.set $f
30189
- local.get $x
30190
- local.set $g
30191
- f64.const 1
30192
- local.set $fTerm
30193
- local.get $x
30194
- local.set $gTerm
30195
- f64.const 1
30196
- local.set $factF
30197
- f64.const 1
30198
- local.set $factG
30199
- f64.const 1
30200
- local.set $prodF
30201
- f64.const 1
30202
- local.set $prodG
30203
30295
  i32.const 1
30204
- local.set $k
30205
- block $for-break0
30206
- loop $for-loop|0
30207
- local.get $k
30208
- i32.const 30
30209
- i32.le_s
30210
- if
30211
- local.get $k
30212
- f64.convert_i32_s
30213
- local.set $kf
30214
- local.get $factF
30215
- f64.const 3
30216
- local.get $kf
30217
- f64.mul
30218
- f64.const 2
30219
- f64.sub
30220
- f64.const 3
30221
- local.get $kf
30222
- f64.mul
30223
- f64.const 1
30224
- f64.sub
30225
- f64.mul
30226
- f64.const 3
30227
- local.get $kf
30228
- f64.mul
30229
- f64.mul
30230
- f64.mul
30231
- local.set $factF
30232
- local.get $factG
30233
- f64.const 3
30234
- local.get $kf
30235
- f64.mul
30236
- f64.const 1
30237
- f64.sub
30238
- f64.const 3
30239
- local.get $kf
30240
- f64.mul
30241
- f64.mul
30242
- f64.const 3
30243
- local.get $kf
30244
- f64.mul
30245
- f64.const 1
30246
- f64.add
30247
- f64.mul
30248
- f64.mul
30249
- local.set $factG
30250
- local.get $prodF
30251
- f64.const 3
30252
- local.get $kf
30253
- f64.mul
30254
- f64.const 2
30255
- f64.sub
30256
- f64.mul
30257
- local.set $prodF
30258
- local.get $prodG
30259
- f64.const 3
30260
- local.get $kf
30261
- f64.mul
30262
- f64.const 1
30263
- f64.sub
30264
- f64.mul
30265
- local.set $prodG
30266
- local.get $fTerm
30267
- local.get $x3
30268
- f64.mul
30269
- local.set $fTerm
30270
- local.get $gTerm
30271
- local.get $x3
30272
- f64.mul
30273
- local.set $gTerm
30274
- local.get $fTerm
30275
- local.get $prodF
30276
- f64.mul
30277
- local.get $factF
30278
- f64.div
30279
- local.set $df
30280
- local.get $gTerm
30281
- local.get $prodG
30282
- f64.mul
30283
- local.get $factG
30284
- f64.div
30285
- local.set $dg
30286
- local.get $f
30287
- local.get $df
30288
- f64.add
30289
- local.set $f
30290
- local.get $g
30291
- local.get $dg
30292
- f64.add
30293
- local.set $g
30294
- block $~lib/math/NativeMath.abs|inlined.63 (result f64)
30295
- local.get $df
30296
- local.set $x|14
30297
- local.get $x|14
30298
- f64.abs
30299
- br $~lib/math/NativeMath.abs|inlined.63
30300
- end
30301
- block $~lib/math/NativeMath.abs|inlined.64 (result f64)
30302
- local.get $f
30303
- local.set $x|15
30304
- local.get $x|15
30305
- f64.abs
30306
- br $~lib/math/NativeMath.abs|inlined.64
30307
- end
30308
- f64.const 1e-16
30309
- f64.mul
30310
- f64.lt
30311
- if (result i32)
30312
- block $~lib/math/NativeMath.abs|inlined.65 (result f64)
30313
- local.get $dg
30314
- local.set $x|16
30315
- local.get $x|16
30316
- f64.abs
30317
- br $~lib/math/NativeMath.abs|inlined.65
30318
- end
30319
- block $~lib/math/NativeMath.abs|inlined.66 (result f64)
30320
- local.get $g
30321
- local.set $x|17
30322
- local.get $x|17
30323
- f64.abs
30324
- br $~lib/math/NativeMath.abs|inlined.66
30325
- end
30326
- f64.const 1e-16
30327
- f64.mul
30328
- f64.lt
30329
- else
30330
- i32.const 0
30331
- end
30332
- if
30333
- br $for-break0
30334
- end
30335
- local.get $k
30336
- i32.const 1
30337
- i32.add
30338
- local.set $k
30339
- br $for-loop|0
30340
- end
30341
- end
30342
- end
30343
- block $~lib/math/NativeMath.sqrt|inlined.12 (result f64)
30344
- f64.const 3
30345
- local.set $x|18
30346
- local.get $x|18
30347
- f64.sqrt
30348
- br $~lib/math/NativeMath.sqrt|inlined.12
30349
- end
30350
- global.get $src/special/AI0
30351
- local.get $f
30352
- f64.mul
30353
- global.get $src/special/AI_PRIME0
30354
- local.get $g
30355
- f64.mul
30356
- f64.add
30357
- f64.mul
30296
+ call $src/special/_airySeries
30358
30297
  return
30359
30298
  )
30360
30299
  (func $src/special/_airyBi (param $x f64) (result f64)
@@ -30496,14 +30435,14 @@
30496
30435
  br $~lib/math/NativeMath.sqrt|inlined.14
30497
30436
  end
30498
30437
  local.set $bNew
30499
- block $~lib/math/NativeMath.abs|inlined.67 (result f64)
30438
+ block $~lib/math/NativeMath.abs|inlined.63 (result f64)
30500
30439
  local.get $aNew
30501
30440
  local.get $bNew
30502
30441
  f64.sub
30503
30442
  local.set $x|8
30504
30443
  local.get $x|8
30505
30444
  f64.abs
30506
- br $~lib/math/NativeMath.abs|inlined.67
30445
+ br $~lib/math/NativeMath.abs|inlined.63
30507
30446
  end
30508
30447
  f64.const 1e-16
30509
30448
  local.get $aNew
@@ -30686,12 +30625,12 @@
30686
30625
  f64.mul
30687
30626
  f64.add
30688
30627
  local.set $sum
30689
- block $~lib/math/NativeMath.abs|inlined.68 (result f64)
30628
+ block $~lib/math/NativeMath.abs|inlined.64 (result f64)
30690
30629
  local.get $cNew
30691
30630
  local.set $x|13
30692
30631
  local.get $x|13
30693
30632
  f64.abs
30694
- br $~lib/math/NativeMath.abs|inlined.68
30633
+ br $~lib/math/NativeMath.abs|inlined.64
30695
30634
  end
30696
30635
  f64.const 1e-16
30697
30636
  local.get $aNew
@@ -30795,7 +30734,7 @@
30795
30734
  f64.const 0.5
30796
30735
  f64.lt
30797
30736
  if
30798
- block $~lib/math/NativeMath.abs|inlined.69 (result f64)
30737
+ block $~lib/math/NativeMath.abs|inlined.65 (result f64)
30799
30738
  global.get $~lib/math/NativeMath.PI
30800
30739
  local.get $x
30801
30740
  f64.mul
@@ -30803,7 +30742,7 @@
30803
30742
  local.set $x|2
30804
30743
  local.get $x|2
30805
30744
  f64.abs
30806
- br $~lib/math/NativeMath.abs|inlined.69
30745
+ br $~lib/math/NativeMath.abs|inlined.65
30807
30746
  end
30808
30747
  local.set $sinPiX
30809
30748
  local.get $sinPiX
@@ -31022,22 +30961,22 @@
31022
30961
  local.get $ave
31023
30962
  f64.div
31024
30963
  local.set $dy
31025
- block $~lib/math/NativeMath.abs|inlined.70 (result f64)
30964
+ block $~lib/math/NativeMath.abs|inlined.66 (result f64)
31026
30965
  local.get $dx
31027
30966
  local.set $x|10
31028
30967
  local.get $x|10
31029
30968
  f64.abs
31030
- br $~lib/math/NativeMath.abs|inlined.70
30969
+ br $~lib/math/NativeMath.abs|inlined.66
31031
30970
  end
31032
30971
  f64.const 1e-10
31033
30972
  f64.lt
31034
30973
  if (result i32)
31035
- block $~lib/math/NativeMath.abs|inlined.71 (result f64)
30974
+ block $~lib/math/NativeMath.abs|inlined.67 (result f64)
31036
30975
  local.get $dy
31037
30976
  local.set $x|11
31038
30977
  local.get $x|11
31039
30978
  f64.abs
31040
- br $~lib/math/NativeMath.abs|inlined.71
30979
+ br $~lib/math/NativeMath.abs|inlined.67
31041
30980
  end
31042
30981
  f64.const 1e-10
31043
30982
  f64.lt
@@ -31271,22 +31210,22 @@
31271
31210
  local.get $ave
31272
31211
  f64.div
31273
31212
  local.set $dz
31274
- block $~lib/math/NativeMath.abs|inlined.72 (result f64)
31213
+ block $~lib/math/NativeMath.abs|inlined.68 (result f64)
31275
31214
  local.get $dx
31276
31215
  local.set $x|18
31277
31216
  local.get $x|18
31278
31217
  f64.abs
31279
- br $~lib/math/NativeMath.abs|inlined.72
31218
+ br $~lib/math/NativeMath.abs|inlined.68
31280
31219
  end
31281
31220
  f64.const 1e-10
31282
31221
  f64.lt
31283
31222
  if (result i32)
31284
- block $~lib/math/NativeMath.abs|inlined.73 (result f64)
31223
+ block $~lib/math/NativeMath.abs|inlined.69 (result f64)
31285
31224
  local.get $dy
31286
31225
  local.set $x|19
31287
31226
  local.get $x|19
31288
31227
  f64.abs
31289
- br $~lib/math/NativeMath.abs|inlined.73
31228
+ br $~lib/math/NativeMath.abs|inlined.69
31290
31229
  end
31291
31230
  f64.const 1e-10
31292
31231
  f64.lt
@@ -31294,12 +31233,12 @@
31294
31233
  i32.const 0
31295
31234
  end
31296
31235
  if (result i32)
31297
- block $~lib/math/NativeMath.abs|inlined.74 (result f64)
31236
+ block $~lib/math/NativeMath.abs|inlined.70 (result f64)
31298
31237
  local.get $dz
31299
31238
  local.set $x|20
31300
31239
  local.get $x|20
31301
31240
  f64.abs
31302
- br $~lib/math/NativeMath.abs|inlined.74
31241
+ br $~lib/math/NativeMath.abs|inlined.70
31303
31242
  end
31304
31243
  f64.const 1e-10
31305
31244
  f64.lt
@@ -31606,22 +31545,22 @@
31606
31545
  local.get $ave
31607
31546
  f64.div
31608
31547
  local.set $dz
31609
- block $~lib/math/NativeMath.abs|inlined.75 (result f64)
31548
+ block $~lib/math/NativeMath.abs|inlined.71 (result f64)
31610
31549
  local.get $dx
31611
31550
  local.set $x|20
31612
31551
  local.get $x|20
31613
31552
  f64.abs
31614
- br $~lib/math/NativeMath.abs|inlined.75
31553
+ br $~lib/math/NativeMath.abs|inlined.71
31615
31554
  end
31616
31555
  f64.const 1e-10
31617
31556
  f64.lt
31618
31557
  if (result i32)
31619
- block $~lib/math/NativeMath.abs|inlined.76 (result f64)
31558
+ block $~lib/math/NativeMath.abs|inlined.72 (result f64)
31620
31559
  local.get $dy
31621
31560
  local.set $x|21
31622
31561
  local.get $x|21
31623
31562
  f64.abs
31624
- br $~lib/math/NativeMath.abs|inlined.76
31563
+ br $~lib/math/NativeMath.abs|inlined.72
31625
31564
  end
31626
31565
  f64.const 1e-10
31627
31566
  f64.lt
@@ -31629,12 +31568,12 @@
31629
31568
  i32.const 0
31630
31569
  end
31631
31570
  if (result i32)
31632
- block $~lib/math/NativeMath.abs|inlined.77 (result f64)
31571
+ block $~lib/math/NativeMath.abs|inlined.73 (result f64)
31633
31572
  local.get $dz
31634
31573
  local.set $x|22
31635
31574
  local.get $x|22
31636
31575
  f64.abs
31637
- br $~lib/math/NativeMath.abs|inlined.77
31576
+ br $~lib/math/NativeMath.abs|inlined.73
31638
31577
  end
31639
31578
  f64.const 1e-10
31640
31579
  f64.lt
@@ -32030,22 +31969,22 @@
32030
31969
  local.get $ave
32031
31970
  f64.div
32032
31971
  local.set $dp
32033
- block $~lib/math/NativeMath.abs|inlined.78 (result f64)
31972
+ block $~lib/math/NativeMath.abs|inlined.74 (result f64)
32034
31973
  local.get $dx
32035
31974
  local.set $x|26
32036
31975
  local.get $x|26
32037
31976
  f64.abs
32038
- br $~lib/math/NativeMath.abs|inlined.78
31977
+ br $~lib/math/NativeMath.abs|inlined.74
32039
31978
  end
32040
31979
  f64.const 1e-10
32041
31980
  f64.lt
32042
31981
  if (result i32)
32043
- block $~lib/math/NativeMath.abs|inlined.79 (result f64)
31982
+ block $~lib/math/NativeMath.abs|inlined.75 (result f64)
32044
31983
  local.get $dy
32045
31984
  local.set $x|27
32046
31985
  local.get $x|27
32047
31986
  f64.abs
32048
- br $~lib/math/NativeMath.abs|inlined.79
31987
+ br $~lib/math/NativeMath.abs|inlined.75
32049
31988
  end
32050
31989
  f64.const 1e-10
32051
31990
  f64.lt
@@ -32053,12 +31992,12 @@
32053
31992
  i32.const 0
32054
31993
  end
32055
31994
  if (result i32)
32056
- block $~lib/math/NativeMath.abs|inlined.80 (result f64)
31995
+ block $~lib/math/NativeMath.abs|inlined.76 (result f64)
32057
31996
  local.get $dz
32058
31997
  local.set $x|28
32059
31998
  local.get $x|28
32060
31999
  f64.abs
32061
- br $~lib/math/NativeMath.abs|inlined.80
32000
+ br $~lib/math/NativeMath.abs|inlined.76
32062
32001
  end
32063
32002
  f64.const 1e-10
32064
32003
  f64.lt
@@ -32066,12 +32005,12 @@
32066
32005
  i32.const 0
32067
32006
  end
32068
32007
  if (result i32)
32069
- block $~lib/math/NativeMath.abs|inlined.81 (result f64)
32008
+ block $~lib/math/NativeMath.abs|inlined.77 (result f64)
32070
32009
  local.get $dp
32071
32010
  local.set $x|29
32072
32011
  local.get $x|29
32073
32012
  f64.abs
32074
- br $~lib/math/NativeMath.abs|inlined.81
32013
+ br $~lib/math/NativeMath.abs|inlined.77
32075
32014
  end
32076
32015
  f64.const 1e-10
32077
32016
  f64.lt
@@ -32575,13 +32514,81 @@
32575
32514
  local.get $out
32576
32515
  return
32577
32516
  )
32517
+ (func $src/sort/ilog2 (param $n i32) (result i32)
32518
+ (local $v i32)
32519
+ (local $r i32)
32520
+ local.get $n
32521
+ local.set $v
32522
+ i32.const 0
32523
+ local.set $r
32524
+ loop $while-continue|0
32525
+ local.get $v
32526
+ i32.const 1
32527
+ i32.gt_s
32528
+ if
32529
+ local.get $v
32530
+ i32.const 1
32531
+ i32.shr_s
32532
+ local.set $v
32533
+ local.get $r
32534
+ i32.const 1
32535
+ i32.add
32536
+ local.set $r
32537
+ br $while-continue|0
32538
+ end
32539
+ end
32540
+ local.get $r
32541
+ return
32542
+ )
32543
+ (func $src/sort/cmpNanLast (param $a f64) (param $b f64) (result i32)
32544
+ local.get $a
32545
+ local.get $b
32546
+ f64.lt
32547
+ if
32548
+ i32.const -1
32549
+ return
32550
+ end
32551
+ local.get $a
32552
+ local.get $b
32553
+ f64.gt
32554
+ if
32555
+ i32.const 1
32556
+ return
32557
+ end
32558
+ local.get $a
32559
+ local.get $b
32560
+ f64.eq
32561
+ if
32562
+ i32.const 0
32563
+ return
32564
+ end
32565
+ local.get $a
32566
+ local.get $a
32567
+ f64.ne
32568
+ if (result i32)
32569
+ local.get $b
32570
+ local.get $b
32571
+ f64.ne
32572
+ else
32573
+ i32.const 0
32574
+ end
32575
+ if
32576
+ i32.const 0
32577
+ return
32578
+ end
32579
+ local.get $a
32580
+ local.get $a
32581
+ f64.ne
32582
+ if
32583
+ i32.const 1
32584
+ return
32585
+ end
32586
+ i32.const -1
32587
+ return
32588
+ )
32578
32589
  (func $src/sort/_siftDown (param $arr i32) (param $lo i32) (param $start i32) (param $n i32)
32579
32590
  (local $root i32)
32580
32591
  (local $child i32)
32581
- (local $a f64)
32582
- (local $b f64)
32583
- (local $a|8 f64)
32584
- (local $b|9 f64)
32585
32592
  (local $t f64)
32586
32593
  local.get $start
32587
32594
  local.set $root
@@ -32607,66 +32614,19 @@
32607
32614
  local.get $n
32608
32615
  i32.lt_s
32609
32616
  if (result i32)
32610
- block $src/sort/cmpNanLast|inlined.0 (result i32)
32611
- local.get $arr
32612
- local.get $lo
32613
- local.get $child
32614
- i32.add
32615
- call $~lib/typedarray/Float64Array#__get
32616
- local.set $a
32617
- local.get $arr
32618
- local.get $lo
32619
- local.get $child
32620
- i32.add
32621
- i32.const 1
32622
- i32.add
32623
- call $~lib/typedarray/Float64Array#__get
32624
- local.set $b
32625
- local.get $a
32626
- local.get $b
32627
- f64.lt
32628
- if
32629
- i32.const -1
32630
- br $src/sort/cmpNanLast|inlined.0
32631
- end
32632
- local.get $a
32633
- local.get $b
32634
- f64.gt
32635
- if
32636
- i32.const 1
32637
- br $src/sort/cmpNanLast|inlined.0
32638
- end
32639
- local.get $a
32640
- local.get $b
32641
- f64.eq
32642
- if
32643
- i32.const 0
32644
- br $src/sort/cmpNanLast|inlined.0
32645
- end
32646
- local.get $a
32647
- local.get $a
32648
- f64.ne
32649
- if (result i32)
32650
- local.get $b
32651
- local.get $b
32652
- f64.ne
32653
- else
32654
- i32.const 0
32655
- end
32656
- if
32657
- i32.const 0
32658
- br $src/sort/cmpNanLast|inlined.0
32659
- end
32660
- local.get $a
32661
- local.get $a
32662
- f64.ne
32663
- if
32664
- i32.const 1
32665
- br $src/sort/cmpNanLast|inlined.0
32666
- end
32667
- i32.const -1
32668
- br $src/sort/cmpNanLast|inlined.0
32669
- end
32617
+ local.get $arr
32618
+ local.get $lo
32619
+ local.get $child
32620
+ i32.add
32621
+ call $~lib/typedarray/Float64Array#__get
32622
+ local.get $arr
32623
+ local.get $lo
32624
+ local.get $child
32625
+ i32.add
32626
+ i32.const 1
32627
+ i32.add
32628
+ call $~lib/typedarray/Float64Array#__get
32629
+ call $src/sort/cmpNanLast
32670
32630
  i32.const 0
32671
32631
  i32.lt_s
32672
32632
  else
@@ -32678,64 +32638,17 @@
32678
32638
  i32.add
32679
32639
  local.set $child
32680
32640
  end
32681
- block $src/sort/cmpNanLast|inlined.1 (result i32)
32682
- local.get $arr
32683
- local.get $lo
32684
- local.get $root
32685
- i32.add
32686
- call $~lib/typedarray/Float64Array#__get
32687
- local.set $a|8
32688
- local.get $arr
32689
- local.get $lo
32690
- local.get $child
32691
- i32.add
32692
- call $~lib/typedarray/Float64Array#__get
32693
- local.set $b|9
32694
- local.get $a|8
32695
- local.get $b|9
32696
- f64.lt
32697
- if
32698
- i32.const -1
32699
- br $src/sort/cmpNanLast|inlined.1
32700
- end
32701
- local.get $a|8
32702
- local.get $b|9
32703
- f64.gt
32704
- if
32705
- i32.const 1
32706
- br $src/sort/cmpNanLast|inlined.1
32707
- end
32708
- local.get $a|8
32709
- local.get $b|9
32710
- f64.eq
32711
- if
32712
- i32.const 0
32713
- br $src/sort/cmpNanLast|inlined.1
32714
- end
32715
- local.get $a|8
32716
- local.get $a|8
32717
- f64.ne
32718
- if (result i32)
32719
- local.get $b|9
32720
- local.get $b|9
32721
- f64.ne
32722
- else
32723
- i32.const 0
32724
- end
32725
- if
32726
- i32.const 0
32727
- br $src/sort/cmpNanLast|inlined.1
32728
- end
32729
- local.get $a|8
32730
- local.get $a|8
32731
- f64.ne
32732
- if
32733
- i32.const 1
32734
- br $src/sort/cmpNanLast|inlined.1
32735
- end
32736
- i32.const -1
32737
- br $src/sort/cmpNanLast|inlined.1
32738
- end
32641
+ local.get $arr
32642
+ local.get $lo
32643
+ local.get $root
32644
+ i32.add
32645
+ call $~lib/typedarray/Float64Array#__get
32646
+ local.get $arr
32647
+ local.get $lo
32648
+ local.get $child
32649
+ i32.add
32650
+ call $~lib/typedarray/Float64Array#__get
32651
+ call $src/sort/cmpNanLast
32739
32652
  i32.const 0
32740
32653
  i32.lt_s
32741
32654
  if
@@ -32845,12 +32758,59 @@
32845
32758
  end
32846
32759
  end
32847
32760
  )
32761
+ (func $src/sort/_median3 (param $a f64) (param $b f64) (param $c f64) (result f64)
32762
+ local.get $a
32763
+ local.get $b
32764
+ call $src/sort/cmpNanLast
32765
+ i32.const 0
32766
+ i32.lt_s
32767
+ if
32768
+ local.get $b
32769
+ local.get $c
32770
+ call $src/sort/cmpNanLast
32771
+ i32.const 0
32772
+ i32.lt_s
32773
+ if
32774
+ local.get $b
32775
+ return
32776
+ end
32777
+ local.get $a
32778
+ local.get $c
32779
+ call $src/sort/cmpNanLast
32780
+ i32.const 0
32781
+ i32.lt_s
32782
+ if (result f64)
32783
+ local.get $c
32784
+ else
32785
+ local.get $a
32786
+ end
32787
+ return
32788
+ end
32789
+ local.get $a
32790
+ local.get $c
32791
+ call $src/sort/cmpNanLast
32792
+ i32.const 0
32793
+ i32.lt_s
32794
+ if
32795
+ local.get $a
32796
+ return
32797
+ end
32798
+ local.get $b
32799
+ local.get $c
32800
+ call $src/sort/cmpNanLast
32801
+ i32.const 0
32802
+ i32.lt_s
32803
+ if (result f64)
32804
+ local.get $c
32805
+ else
32806
+ local.get $b
32807
+ end
32808
+ return
32809
+ )
32848
32810
  (func $src/sort/_insertionSort (param $arr i32) (param $lo i32) (param $hi i32)
32849
32811
  (local $i i32)
32850
32812
  (local $key f64)
32851
32813
  (local $j i32)
32852
- (local $a f64)
32853
- (local $b f64)
32854
32814
  local.get $lo
32855
32815
  i32.const 1
32856
32816
  i32.add
@@ -32873,58 +32833,11 @@
32873
32833
  local.get $lo
32874
32834
  i32.ge_s
32875
32835
  if (result i32)
32876
- block $src/sort/cmpNanLast|inlined.8 (result i32)
32877
- local.get $arr
32878
- local.get $j
32879
- call $~lib/typedarray/Float64Array#__get
32880
- local.set $a
32881
- local.get $key
32882
- local.set $b
32883
- local.get $a
32884
- local.get $b
32885
- f64.lt
32886
- if
32887
- i32.const -1
32888
- br $src/sort/cmpNanLast|inlined.8
32889
- end
32890
- local.get $a
32891
- local.get $b
32892
- f64.gt
32893
- if
32894
- i32.const 1
32895
- br $src/sort/cmpNanLast|inlined.8
32896
- end
32897
- local.get $a
32898
- local.get $b
32899
- f64.eq
32900
- if
32901
- i32.const 0
32902
- br $src/sort/cmpNanLast|inlined.8
32903
- end
32904
- local.get $a
32905
- local.get $a
32906
- f64.ne
32907
- if (result i32)
32908
- local.get $b
32909
- local.get $b
32910
- f64.ne
32911
- else
32912
- i32.const 0
32913
- end
32914
- if
32915
- i32.const 0
32916
- br $src/sort/cmpNanLast|inlined.8
32917
- end
32918
- local.get $a
32919
- local.get $a
32920
- f64.ne
32921
- if
32922
- i32.const 1
32923
- br $src/sort/cmpNanLast|inlined.8
32924
- end
32925
- i32.const -1
32926
- br $src/sort/cmpNanLast|inlined.8
32927
- end
32836
+ local.get $arr
32837
+ local.get $j
32838
+ call $~lib/typedarray/Float64Array#__get
32839
+ local.get $key
32840
+ call $src/sort/cmpNanLast
32928
32841
  i32.const 0
32929
32842
  i32.gt_s
32930
32843
  else
@@ -32965,28 +32878,13 @@
32965
32878
  (local $h i32)
32966
32879
  (local $d i32)
32967
32880
  (local $mid i32)
32968
- (local $a f64)
32969
- (local $b f64)
32970
- (local $c f64)
32971
- (local $a|11 f64)
32972
- (local $b|12 f64)
32973
- (local $a|13 f64)
32974
- (local $b|14 f64)
32975
- (local $a|15 f64)
32976
- (local $b|16 f64)
32977
- (local $a|17 f64)
32978
- (local $b|18 f64)
32979
- (local $a|19 f64)
32980
- (local $b|20 f64)
32981
32881
  (local $pivot f64)
32982
32882
  (local $lt i32)
32983
32883
  (local $gt i32)
32984
32884
  (local $i i32)
32985
- (local $a|25 f64)
32986
- (local $b|26 f64)
32987
- (local $c|27 i32)
32885
+ (local $c i32)
32988
32886
  (local $t f64)
32989
- (local $t|29 f64)
32887
+ (local $t|14 f64)
32990
32888
  local.get $lo
32991
32889
  local.set $l
32992
32890
  local.get $hi
@@ -33022,302 +32920,16 @@
33022
32920
  i32.shr_s
33023
32921
  i32.add
33024
32922
  local.set $mid
33025
- block $src/sort/_median3|inlined.0 (result f64)
33026
- local.get $arr
33027
- local.get $l
33028
- call $~lib/typedarray/Float64Array#__get
33029
- local.set $a
33030
- local.get $arr
33031
- local.get $mid
33032
- call $~lib/typedarray/Float64Array#__get
33033
- local.set $b
33034
- local.get $arr
33035
- local.get $h
33036
- call $~lib/typedarray/Float64Array#__get
33037
- local.set $c
33038
- block $src/sort/cmpNanLast|inlined.2 (result i32)
33039
- local.get $a
33040
- local.set $a|11
33041
- local.get $b
33042
- local.set $b|12
33043
- local.get $a|11
33044
- local.get $b|12
33045
- f64.lt
33046
- if
33047
- i32.const -1
33048
- br $src/sort/cmpNanLast|inlined.2
33049
- end
33050
- local.get $a|11
33051
- local.get $b|12
33052
- f64.gt
33053
- if
33054
- i32.const 1
33055
- br $src/sort/cmpNanLast|inlined.2
33056
- end
33057
- local.get $a|11
33058
- local.get $b|12
33059
- f64.eq
33060
- if
33061
- i32.const 0
33062
- br $src/sort/cmpNanLast|inlined.2
33063
- end
33064
- local.get $a|11
33065
- local.get $a|11
33066
- f64.ne
33067
- if (result i32)
33068
- local.get $b|12
33069
- local.get $b|12
33070
- f64.ne
33071
- else
33072
- i32.const 0
33073
- end
33074
- if
33075
- i32.const 0
33076
- br $src/sort/cmpNanLast|inlined.2
33077
- end
33078
- local.get $a|11
33079
- local.get $a|11
33080
- f64.ne
33081
- if
33082
- i32.const 1
33083
- br $src/sort/cmpNanLast|inlined.2
33084
- end
33085
- i32.const -1
33086
- br $src/sort/cmpNanLast|inlined.2
33087
- end
33088
- i32.const 0
33089
- i32.lt_s
33090
- if
33091
- block $src/sort/cmpNanLast|inlined.3 (result i32)
33092
- local.get $b
33093
- local.set $a|13
33094
- local.get $c
33095
- local.set $b|14
33096
- local.get $a|13
33097
- local.get $b|14
33098
- f64.lt
33099
- if
33100
- i32.const -1
33101
- br $src/sort/cmpNanLast|inlined.3
33102
- end
33103
- local.get $a|13
33104
- local.get $b|14
33105
- f64.gt
33106
- if
33107
- i32.const 1
33108
- br $src/sort/cmpNanLast|inlined.3
33109
- end
33110
- local.get $a|13
33111
- local.get $b|14
33112
- f64.eq
33113
- if
33114
- i32.const 0
33115
- br $src/sort/cmpNanLast|inlined.3
33116
- end
33117
- local.get $a|13
33118
- local.get $a|13
33119
- f64.ne
33120
- if (result i32)
33121
- local.get $b|14
33122
- local.get $b|14
33123
- f64.ne
33124
- else
33125
- i32.const 0
33126
- end
33127
- if
33128
- i32.const 0
33129
- br $src/sort/cmpNanLast|inlined.3
33130
- end
33131
- local.get $a|13
33132
- local.get $a|13
33133
- f64.ne
33134
- if
33135
- i32.const 1
33136
- br $src/sort/cmpNanLast|inlined.3
33137
- end
33138
- i32.const -1
33139
- br $src/sort/cmpNanLast|inlined.3
33140
- end
33141
- i32.const 0
33142
- i32.lt_s
33143
- if
33144
- local.get $b
33145
- br $src/sort/_median3|inlined.0
33146
- end
33147
- block $src/sort/cmpNanLast|inlined.4 (result i32)
33148
- local.get $a
33149
- local.set $a|15
33150
- local.get $c
33151
- local.set $b|16
33152
- local.get $a|15
33153
- local.get $b|16
33154
- f64.lt
33155
- if
33156
- i32.const -1
33157
- br $src/sort/cmpNanLast|inlined.4
33158
- end
33159
- local.get $a|15
33160
- local.get $b|16
33161
- f64.gt
33162
- if
33163
- i32.const 1
33164
- br $src/sort/cmpNanLast|inlined.4
33165
- end
33166
- local.get $a|15
33167
- local.get $b|16
33168
- f64.eq
33169
- if
33170
- i32.const 0
33171
- br $src/sort/cmpNanLast|inlined.4
33172
- end
33173
- local.get $a|15
33174
- local.get $a|15
33175
- f64.ne
33176
- if (result i32)
33177
- local.get $b|16
33178
- local.get $b|16
33179
- f64.ne
33180
- else
33181
- i32.const 0
33182
- end
33183
- if
33184
- i32.const 0
33185
- br $src/sort/cmpNanLast|inlined.4
33186
- end
33187
- local.get $a|15
33188
- local.get $a|15
33189
- f64.ne
33190
- if
33191
- i32.const 1
33192
- br $src/sort/cmpNanLast|inlined.4
33193
- end
33194
- i32.const -1
33195
- br $src/sort/cmpNanLast|inlined.4
33196
- end
33197
- i32.const 0
33198
- i32.lt_s
33199
- if (result f64)
33200
- local.get $c
33201
- else
33202
- local.get $a
33203
- end
33204
- br $src/sort/_median3|inlined.0
33205
- end
33206
- block $src/sort/cmpNanLast|inlined.5 (result i32)
33207
- local.get $a
33208
- local.set $a|17
33209
- local.get $c
33210
- local.set $b|18
33211
- local.get $a|17
33212
- local.get $b|18
33213
- f64.lt
33214
- if
33215
- i32.const -1
33216
- br $src/sort/cmpNanLast|inlined.5
33217
- end
33218
- local.get $a|17
33219
- local.get $b|18
33220
- f64.gt
33221
- if
33222
- i32.const 1
33223
- br $src/sort/cmpNanLast|inlined.5
33224
- end
33225
- local.get $a|17
33226
- local.get $b|18
33227
- f64.eq
33228
- if
33229
- i32.const 0
33230
- br $src/sort/cmpNanLast|inlined.5
33231
- end
33232
- local.get $a|17
33233
- local.get $a|17
33234
- f64.ne
33235
- if (result i32)
33236
- local.get $b|18
33237
- local.get $b|18
33238
- f64.ne
33239
- else
33240
- i32.const 0
33241
- end
33242
- if
33243
- i32.const 0
33244
- br $src/sort/cmpNanLast|inlined.5
33245
- end
33246
- local.get $a|17
33247
- local.get $a|17
33248
- f64.ne
33249
- if
33250
- i32.const 1
33251
- br $src/sort/cmpNanLast|inlined.5
33252
- end
33253
- i32.const -1
33254
- br $src/sort/cmpNanLast|inlined.5
33255
- end
33256
- i32.const 0
33257
- i32.lt_s
33258
- if
33259
- local.get $a
33260
- br $src/sort/_median3|inlined.0
33261
- end
33262
- block $src/sort/cmpNanLast|inlined.6 (result i32)
33263
- local.get $b
33264
- local.set $a|19
33265
- local.get $c
33266
- local.set $b|20
33267
- local.get $a|19
33268
- local.get $b|20
33269
- f64.lt
33270
- if
33271
- i32.const -1
33272
- br $src/sort/cmpNanLast|inlined.6
33273
- end
33274
- local.get $a|19
33275
- local.get $b|20
33276
- f64.gt
33277
- if
33278
- i32.const 1
33279
- br $src/sort/cmpNanLast|inlined.6
33280
- end
33281
- local.get $a|19
33282
- local.get $b|20
33283
- f64.eq
33284
- if
33285
- i32.const 0
33286
- br $src/sort/cmpNanLast|inlined.6
33287
- end
33288
- local.get $a|19
33289
- local.get $a|19
33290
- f64.ne
33291
- if (result i32)
33292
- local.get $b|20
33293
- local.get $b|20
33294
- f64.ne
33295
- else
33296
- i32.const 0
33297
- end
33298
- if
33299
- i32.const 0
33300
- br $src/sort/cmpNanLast|inlined.6
33301
- end
33302
- local.get $a|19
33303
- local.get $a|19
33304
- f64.ne
33305
- if
33306
- i32.const 1
33307
- br $src/sort/cmpNanLast|inlined.6
33308
- end
33309
- i32.const -1
33310
- br $src/sort/cmpNanLast|inlined.6
33311
- end
33312
- i32.const 0
33313
- i32.lt_s
33314
- if (result f64)
33315
- local.get $c
33316
- else
33317
- local.get $b
33318
- end
33319
- br $src/sort/_median3|inlined.0
33320
- end
32923
+ local.get $arr
32924
+ local.get $l
32925
+ call $~lib/typedarray/Float64Array#__get
32926
+ local.get $arr
32927
+ local.get $mid
32928
+ call $~lib/typedarray/Float64Array#__get
32929
+ local.get $arr
32930
+ local.get $h
32931
+ call $~lib/typedarray/Float64Array#__get
32932
+ call $src/sort/_median3
33321
32933
  local.set $pivot
33322
32934
  local.get $l
33323
32935
  local.set $lt
@@ -33330,60 +32942,13 @@
33330
32942
  local.get $gt
33331
32943
  i32.le_s
33332
32944
  if
33333
- block $src/sort/cmpNanLast|inlined.7 (result i32)
33334
- local.get $arr
33335
- local.get $i
33336
- call $~lib/typedarray/Float64Array#__get
33337
- local.set $a|25
33338
- local.get $pivot
33339
- local.set $b|26
33340
- local.get $a|25
33341
- local.get $b|26
33342
- f64.lt
33343
- if
33344
- i32.const -1
33345
- br $src/sort/cmpNanLast|inlined.7
33346
- end
33347
- local.get $a|25
33348
- local.get $b|26
33349
- f64.gt
33350
- if
33351
- i32.const 1
33352
- br $src/sort/cmpNanLast|inlined.7
33353
- end
33354
- local.get $a|25
33355
- local.get $b|26
33356
- f64.eq
33357
- if
33358
- i32.const 0
33359
- br $src/sort/cmpNanLast|inlined.7
33360
- end
33361
- local.get $a|25
33362
- local.get $a|25
33363
- f64.ne
33364
- if (result i32)
33365
- local.get $b|26
33366
- local.get $b|26
33367
- f64.ne
33368
- else
33369
- i32.const 0
33370
- end
33371
- if
33372
- i32.const 0
33373
- br $src/sort/cmpNanLast|inlined.7
33374
- end
33375
- local.get $a|25
33376
- local.get $a|25
33377
- f64.ne
33378
- if
33379
- i32.const 1
33380
- br $src/sort/cmpNanLast|inlined.7
33381
- end
33382
- i32.const -1
33383
- br $src/sort/cmpNanLast|inlined.7
33384
- end
33385
- local.set $c|27
33386
- local.get $c|27
32945
+ local.get $arr
32946
+ local.get $i
32947
+ call $~lib/typedarray/Float64Array#__get
32948
+ local.get $pivot
32949
+ call $src/sort/cmpNanLast
32950
+ local.set $c
32951
+ local.get $c
33387
32952
  i32.const 0
33388
32953
  i32.lt_s
33389
32954
  if
@@ -33410,14 +32975,14 @@
33410
32975
  i32.add
33411
32976
  local.set $i
33412
32977
  else
33413
- local.get $c|27
32978
+ local.get $c
33414
32979
  i32.const 0
33415
32980
  i32.gt_s
33416
32981
  if
33417
32982
  local.get $arr
33418
32983
  local.get $i
33419
32984
  call $~lib/typedarray/Float64Array#__get
33420
- local.set $t|29
32985
+ local.set $t|14
33421
32986
  local.get $arr
33422
32987
  local.get $i
33423
32988
  local.get $arr
@@ -33426,7 +32991,7 @@
33426
32991
  call $~lib/typedarray/Float64Array#__set
33427
32992
  local.get $arr
33428
32993
  local.get $gt
33429
- local.get $t|29
32994
+ local.get $t|14
33430
32995
  call $~lib/typedarray/Float64Array#__set
33431
32996
  local.get $gt
33432
32997
  i32.const 1
@@ -33484,9 +33049,6 @@
33484
33049
  )
33485
33050
  (func $src/sort/sort_f64 (param $data i32) (result i32)
33486
33051
  (local $n i32)
33487
- (local $n|2 i32)
33488
- (local $v i32)
33489
- (local $r i32)
33490
33052
  local.get $data
33491
33053
  call $~lib/typedarray/Float64Array#get:length
33492
33054
  local.set $n
@@ -33500,53 +33062,51 @@
33500
33062
  i32.const 1
33501
33063
  i32.sub
33502
33064
  i32.const 2
33503
- block $src/sort/ilog2|inlined.0 (result i32)
33504
- local.get $n
33505
- local.set $n|2
33506
- local.get $n|2
33507
- local.set $v
33508
- i32.const 0
33509
- local.set $r
33510
- loop $while-continue|0
33511
- local.get $v
33512
- i32.const 1
33513
- i32.gt_s
33514
- if
33515
- local.get $v
33516
- i32.const 1
33517
- i32.shr_s
33518
- local.set $v
33519
- local.get $r
33520
- i32.const 1
33521
- i32.add
33522
- local.set $r
33523
- br $while-continue|0
33524
- end
33525
- end
33526
- local.get $r
33527
- br $src/sort/ilog2|inlined.0
33528
- end
33065
+ local.get $n
33066
+ call $src/sort/ilog2
33529
33067
  i32.mul
33530
33068
  call $src/sort/_introsort
33531
33069
  end
33532
33070
  local.get $data
33533
33071
  return
33534
33072
  )
33073
+ (func $src/sort/cmpIdxStable (param $data i32) (param $ia i32) (param $ib i32) (result i32)
33074
+ (local $c i32)
33075
+ local.get $data
33076
+ local.get $ia
33077
+ call $~lib/typedarray/Float64Array#__get
33078
+ local.get $data
33079
+ local.get $ib
33080
+ call $~lib/typedarray/Float64Array#__get
33081
+ call $src/sort/cmpNanLast
33082
+ local.set $c
33083
+ local.get $c
33084
+ i32.const 0
33085
+ i32.ne
33086
+ if
33087
+ local.get $c
33088
+ return
33089
+ end
33090
+ local.get $ia
33091
+ local.get $ib
33092
+ i32.lt_s
33093
+ if (result i32)
33094
+ i32.const -1
33095
+ else
33096
+ local.get $ia
33097
+ local.get $ib
33098
+ i32.gt_s
33099
+ if (result i32)
33100
+ i32.const 1
33101
+ else
33102
+ i32.const 0
33103
+ end
33104
+ end
33105
+ return
33106
+ )
33535
33107
  (func $src/sort/_siftDownIdx (param $data i32) (param $idx i32) (param $lo i32) (param $start i32) (param $n i32)
33536
33108
  (local $root i32)
33537
33109
  (local $child i32)
33538
- (local $data|7 i32)
33539
- (local $ia i32)
33540
- (local $ib i32)
33541
- (local $a f64)
33542
- (local $b f64)
33543
- (local $c i32)
33544
- (local $data|13 i32)
33545
- (local $ia|14 i32)
33546
- (local $ib|15 i32)
33547
- (local $a|16 f64)
33548
- (local $b|17 f64)
33549
- (local $c|18 i32)
33550
33110
  (local $t i32)
33551
33111
  local.get $start
33552
33112
  local.set $root
@@ -33572,207 +33132,43 @@
33572
33132
  local.get $n
33573
33133
  i32.lt_s
33574
33134
  if (result i32)
33575
- block $src/sort/cmpIdxStable|inlined.0 (result i32)
33576
- local.get $data
33577
- local.set $data|7
33578
- local.get $idx
33579
- local.get $lo
33580
- local.get $child
33581
- i32.add
33582
- call $~lib/typedarray/Int32Array#__get
33583
- local.set $ia
33584
- local.get $idx
33585
- local.get $lo
33586
- local.get $child
33587
- i32.add
33588
- i32.const 1
33589
- i32.add
33590
- call $~lib/typedarray/Int32Array#__get
33591
- local.set $ib
33592
- block $src/sort/cmpNanLast|inlined.9 (result i32)
33593
- local.get $data|7
33594
- local.get $ia
33595
- call $~lib/typedarray/Float64Array#__get
33596
- local.set $a
33597
- local.get $data|7
33598
- local.get $ib
33599
- call $~lib/typedarray/Float64Array#__get
33600
- local.set $b
33601
- local.get $a
33602
- local.get $b
33603
- f64.lt
33604
- if
33605
- i32.const -1
33606
- br $src/sort/cmpNanLast|inlined.9
33607
- end
33608
- local.get $a
33609
- local.get $b
33610
- f64.gt
33611
- if
33612
- i32.const 1
33613
- br $src/sort/cmpNanLast|inlined.9
33614
- end
33615
- local.get $a
33616
- local.get $b
33617
- f64.eq
33618
- if
33619
- i32.const 0
33620
- br $src/sort/cmpNanLast|inlined.9
33621
- end
33622
- local.get $a
33623
- local.get $a
33624
- f64.ne
33625
- if (result i32)
33626
- local.get $b
33627
- local.get $b
33628
- f64.ne
33629
- else
33630
- i32.const 0
33631
- end
33632
- if
33633
- i32.const 0
33634
- br $src/sort/cmpNanLast|inlined.9
33635
- end
33636
- local.get $a
33637
- local.get $a
33638
- f64.ne
33639
- if
33640
- i32.const 1
33641
- br $src/sort/cmpNanLast|inlined.9
33642
- end
33643
- i32.const -1
33644
- br $src/sort/cmpNanLast|inlined.9
33645
- end
33646
- local.set $c
33647
- local.get $c
33648
- i32.const 0
33649
- i32.ne
33650
- if
33651
- local.get $c
33652
- br $src/sort/cmpIdxStable|inlined.0
33653
- end
33654
- local.get $ia
33655
- local.get $ib
33656
- i32.lt_s
33657
- if (result i32)
33658
- i32.const -1
33659
- else
33660
- local.get $ia
33661
- local.get $ib
33662
- i32.gt_s
33663
- if (result i32)
33664
- i32.const 1
33665
- else
33666
- i32.const 0
33667
- end
33668
- end
33669
- br $src/sort/cmpIdxStable|inlined.0
33670
- end
33671
- i32.const 0
33672
- i32.lt_s
33673
- else
33674
- i32.const 0
33675
- end
33676
- if
33677
- local.get $child
33678
- i32.const 1
33679
- i32.add
33680
- local.set $child
33681
- end
33682
- block $src/sort/cmpIdxStable|inlined.1 (result i32)
33683
33135
  local.get $data
33684
- local.set $data|13
33685
33136
  local.get $idx
33686
33137
  local.get $lo
33687
- local.get $root
33138
+ local.get $child
33688
33139
  i32.add
33689
33140
  call $~lib/typedarray/Int32Array#__get
33690
- local.set $ia|14
33691
33141
  local.get $idx
33692
33142
  local.get $lo
33693
33143
  local.get $child
33694
33144
  i32.add
33145
+ i32.const 1
33146
+ i32.add
33695
33147
  call $~lib/typedarray/Int32Array#__get
33696
- local.set $ib|15
33697
- block $src/sort/cmpNanLast|inlined.10 (result i32)
33698
- local.get $data|13
33699
- local.get $ia|14
33700
- call $~lib/typedarray/Float64Array#__get
33701
- local.set $a|16
33702
- local.get $data|13
33703
- local.get $ib|15
33704
- call $~lib/typedarray/Float64Array#__get
33705
- local.set $b|17
33706
- local.get $a|16
33707
- local.get $b|17
33708
- f64.lt
33709
- if
33710
- i32.const -1
33711
- br $src/sort/cmpNanLast|inlined.10
33712
- end
33713
- local.get $a|16
33714
- local.get $b|17
33715
- f64.gt
33716
- if
33717
- i32.const 1
33718
- br $src/sort/cmpNanLast|inlined.10
33719
- end
33720
- local.get $a|16
33721
- local.get $b|17
33722
- f64.eq
33723
- if
33724
- i32.const 0
33725
- br $src/sort/cmpNanLast|inlined.10
33726
- end
33727
- local.get $a|16
33728
- local.get $a|16
33729
- f64.ne
33730
- if (result i32)
33731
- local.get $b|17
33732
- local.get $b|17
33733
- f64.ne
33734
- else
33735
- i32.const 0
33736
- end
33737
- if
33738
- i32.const 0
33739
- br $src/sort/cmpNanLast|inlined.10
33740
- end
33741
- local.get $a|16
33742
- local.get $a|16
33743
- f64.ne
33744
- if
33745
- i32.const 1
33746
- br $src/sort/cmpNanLast|inlined.10
33747
- end
33748
- i32.const -1
33749
- br $src/sort/cmpNanLast|inlined.10
33750
- end
33751
- local.set $c|18
33752
- local.get $c|18
33148
+ call $src/sort/cmpIdxStable
33753
33149
  i32.const 0
33754
- i32.ne
33755
- if
33756
- local.get $c|18
33757
- br $src/sort/cmpIdxStable|inlined.1
33758
- end
33759
- local.get $ia|14
33760
- local.get $ib|15
33761
33150
  i32.lt_s
33762
- if (result i32)
33763
- i32.const -1
33764
- else
33765
- local.get $ia|14
33766
- local.get $ib|15
33767
- i32.gt_s
33768
- if (result i32)
33769
- i32.const 1
33770
- else
33771
- i32.const 0
33772
- end
33773
- end
33774
- br $src/sort/cmpIdxStable|inlined.1
33151
+ else
33152
+ i32.const 0
33153
+ end
33154
+ if
33155
+ local.get $child
33156
+ i32.const 1
33157
+ i32.add
33158
+ local.set $child
33775
33159
  end
33160
+ local.get $data
33161
+ local.get $idx
33162
+ local.get $lo
33163
+ local.get $root
33164
+ i32.add
33165
+ call $~lib/typedarray/Int32Array#__get
33166
+ local.get $idx
33167
+ local.get $lo
33168
+ local.get $child
33169
+ i32.add
33170
+ call $~lib/typedarray/Int32Array#__get
33171
+ call $src/sort/cmpIdxStable
33776
33172
  i32.const 0
33777
33173
  i32.lt_s
33778
33174
  if
@@ -33884,16 +33280,79 @@
33884
33280
  end
33885
33281
  end
33886
33282
  )
33283
+ (func $src/sort/_median3Idx (param $data i32) (param $idx i32) (param $a i32) (param $b i32) (param $c i32) (result i32)
33284
+ (local $ia i32)
33285
+ (local $ib i32)
33286
+ (local $ic i32)
33287
+ local.get $idx
33288
+ local.get $a
33289
+ call $~lib/typedarray/Int32Array#__get
33290
+ local.set $ia
33291
+ local.get $idx
33292
+ local.get $b
33293
+ call $~lib/typedarray/Int32Array#__get
33294
+ local.set $ib
33295
+ local.get $idx
33296
+ local.get $c
33297
+ call $~lib/typedarray/Int32Array#__get
33298
+ local.set $ic
33299
+ local.get $data
33300
+ local.get $ia
33301
+ local.get $ib
33302
+ call $src/sort/cmpIdxStable
33303
+ i32.const 0
33304
+ i32.lt_s
33305
+ if
33306
+ local.get $data
33307
+ local.get $ib
33308
+ local.get $ic
33309
+ call $src/sort/cmpIdxStable
33310
+ i32.const 0
33311
+ i32.lt_s
33312
+ if
33313
+ local.get $ib
33314
+ return
33315
+ end
33316
+ local.get $data
33317
+ local.get $ia
33318
+ local.get $ic
33319
+ call $src/sort/cmpIdxStable
33320
+ i32.const 0
33321
+ i32.lt_s
33322
+ if (result i32)
33323
+ local.get $ic
33324
+ else
33325
+ local.get $ia
33326
+ end
33327
+ return
33328
+ end
33329
+ local.get $data
33330
+ local.get $ia
33331
+ local.get $ic
33332
+ call $src/sort/cmpIdxStable
33333
+ i32.const 0
33334
+ i32.lt_s
33335
+ if
33336
+ local.get $ia
33337
+ return
33338
+ end
33339
+ local.get $data
33340
+ local.get $ib
33341
+ local.get $ic
33342
+ call $src/sort/cmpIdxStable
33343
+ i32.const 0
33344
+ i32.lt_s
33345
+ if (result i32)
33346
+ local.get $ic
33347
+ else
33348
+ local.get $ib
33349
+ end
33350
+ return
33351
+ )
33887
33352
  (func $src/sort/_insertionSortIdx (param $data i32) (param $idx i32) (param $lo i32) (param $hi i32)
33888
33353
  (local $i i32)
33889
33354
  (local $key i32)
33890
33355
  (local $j i32)
33891
- (local $data|7 i32)
33892
- (local $ia i32)
33893
- (local $ib i32)
33894
- (local $a f64)
33895
- (local $b f64)
33896
- (local $c i32)
33897
33356
  local.get $lo
33898
33357
  i32.const 1
33899
33358
  i32.add
@@ -33916,94 +33375,12 @@
33916
33375
  local.get $lo
33917
33376
  i32.ge_s
33918
33377
  if (result i32)
33919
- block $src/sort/cmpIdxStable|inlined.8 (result i32)
33920
- local.get $data
33921
- local.set $data|7
33922
- local.get $idx
33923
- local.get $j
33924
- call $~lib/typedarray/Int32Array#__get
33925
- local.set $ia
33926
- local.get $key
33927
- local.set $ib
33928
- block $src/sort/cmpNanLast|inlined.17 (result i32)
33929
- local.get $data|7
33930
- local.get $ia
33931
- call $~lib/typedarray/Float64Array#__get
33932
- local.set $a
33933
- local.get $data|7
33934
- local.get $ib
33935
- call $~lib/typedarray/Float64Array#__get
33936
- local.set $b
33937
- local.get $a
33938
- local.get $b
33939
- f64.lt
33940
- if
33941
- i32.const -1
33942
- br $src/sort/cmpNanLast|inlined.17
33943
- end
33944
- local.get $a
33945
- local.get $b
33946
- f64.gt
33947
- if
33948
- i32.const 1
33949
- br $src/sort/cmpNanLast|inlined.17
33950
- end
33951
- local.get $a
33952
- local.get $b
33953
- f64.eq
33954
- if
33955
- i32.const 0
33956
- br $src/sort/cmpNanLast|inlined.17
33957
- end
33958
- local.get $a
33959
- local.get $a
33960
- f64.ne
33961
- if (result i32)
33962
- local.get $b
33963
- local.get $b
33964
- f64.ne
33965
- else
33966
- i32.const 0
33967
- end
33968
- if
33969
- i32.const 0
33970
- br $src/sort/cmpNanLast|inlined.17
33971
- end
33972
- local.get $a
33973
- local.get $a
33974
- f64.ne
33975
- if
33976
- i32.const 1
33977
- br $src/sort/cmpNanLast|inlined.17
33978
- end
33979
- i32.const -1
33980
- br $src/sort/cmpNanLast|inlined.17
33981
- end
33982
- local.set $c
33983
- local.get $c
33984
- i32.const 0
33985
- i32.ne
33986
- if
33987
- local.get $c
33988
- br $src/sort/cmpIdxStable|inlined.8
33989
- end
33990
- local.get $ia
33991
- local.get $ib
33992
- i32.lt_s
33993
- if (result i32)
33994
- i32.const -1
33995
- else
33996
- local.get $ia
33997
- local.get $ib
33998
- i32.gt_s
33999
- if (result i32)
34000
- i32.const 1
34001
- else
34002
- i32.const 0
34003
- end
34004
- end
34005
- br $src/sort/cmpIdxStable|inlined.8
34006
- end
33378
+ local.get $data
33379
+ local.get $idx
33380
+ local.get $j
33381
+ call $~lib/typedarray/Int32Array#__get
33382
+ local.get $key
33383
+ call $src/sort/cmpIdxStable
34007
33384
  i32.const 0
34008
33385
  i32.gt_s
34009
33386
  else
@@ -34044,57 +33421,13 @@
34044
33421
  (local $h i32)
34045
33422
  (local $dep i32)
34046
33423
  (local $mid i32)
34047
- (local $data|9 i32)
34048
- (local $idx|10 i32)
34049
- (local $a i32)
34050
- (local $b i32)
34051
- (local $c i32)
34052
- (local $ia i32)
34053
- (local $ib i32)
34054
- (local $ic i32)
34055
- (local $data|17 i32)
34056
- (local $ia|18 i32)
34057
- (local $ib|19 i32)
34058
- (local $a|20 f64)
34059
- (local $b|21 f64)
34060
- (local $c|22 i32)
34061
- (local $data|23 i32)
34062
- (local $ia|24 i32)
34063
- (local $ib|25 i32)
34064
- (local $a|26 f64)
34065
- (local $b|27 f64)
34066
- (local $c|28 i32)
34067
- (local $data|29 i32)
34068
- (local $ia|30 i32)
34069
- (local $ib|31 i32)
34070
- (local $a|32 f64)
34071
- (local $b|33 f64)
34072
- (local $c|34 i32)
34073
- (local $data|35 i32)
34074
- (local $ia|36 i32)
34075
- (local $ib|37 i32)
34076
- (local $a|38 f64)
34077
- (local $b|39 f64)
34078
- (local $c|40 i32)
34079
- (local $data|41 i32)
34080
- (local $ia|42 i32)
34081
- (local $ib|43 i32)
34082
- (local $a|44 f64)
34083
- (local $b|45 f64)
34084
- (local $c|46 i32)
34085
33424
  (local $pivotKey i32)
34086
33425
  (local $lt i32)
34087
33426
  (local $gt i32)
34088
33427
  (local $i i32)
34089
- (local $data|51 i32)
34090
- (local $ia|52 i32)
34091
- (local $ib|53 i32)
34092
- (local $a|54 f64)
34093
- (local $b|55 f64)
34094
- (local $c|56 i32)
34095
- (local $c|57 i32)
33428
+ (local $c i32)
34096
33429
  (local $t i32)
34097
- (local $t|59 i32)
33430
+ (local $t|15 i32)
34098
33431
  local.get $lo
34099
33432
  local.set $l
34100
33433
  local.get $hi
@@ -34131,492 +33464,12 @@
34131
33464
  i32.shr_s
34132
33465
  i32.add
34133
33466
  local.set $mid
34134
- block $src/sort/_median3Idx|inlined.0 (result i32)
34135
- local.get $data
34136
- local.set $data|9
34137
- local.get $idx
34138
- local.set $idx|10
34139
- local.get $l
34140
- local.set $a
34141
- local.get $mid
34142
- local.set $b
34143
- local.get $h
34144
- local.set $c
34145
- local.get $idx|10
34146
- local.get $a
34147
- call $~lib/typedarray/Int32Array#__get
34148
- local.set $ia
34149
- local.get $idx|10
34150
- local.get $b
34151
- call $~lib/typedarray/Int32Array#__get
34152
- local.set $ib
34153
- local.get $idx|10
34154
- local.get $c
34155
- call $~lib/typedarray/Int32Array#__get
34156
- local.set $ic
34157
- block $src/sort/cmpIdxStable|inlined.2 (result i32)
34158
- local.get $data|9
34159
- local.set $data|17
34160
- local.get $ia
34161
- local.set $ia|18
34162
- local.get $ib
34163
- local.set $ib|19
34164
- block $src/sort/cmpNanLast|inlined.11 (result i32)
34165
- local.get $data|17
34166
- local.get $ia|18
34167
- call $~lib/typedarray/Float64Array#__get
34168
- local.set $a|20
34169
- local.get $data|17
34170
- local.get $ib|19
34171
- call $~lib/typedarray/Float64Array#__get
34172
- local.set $b|21
34173
- local.get $a|20
34174
- local.get $b|21
34175
- f64.lt
34176
- if
34177
- i32.const -1
34178
- br $src/sort/cmpNanLast|inlined.11
34179
- end
34180
- local.get $a|20
34181
- local.get $b|21
34182
- f64.gt
34183
- if
34184
- i32.const 1
34185
- br $src/sort/cmpNanLast|inlined.11
34186
- end
34187
- local.get $a|20
34188
- local.get $b|21
34189
- f64.eq
34190
- if
34191
- i32.const 0
34192
- br $src/sort/cmpNanLast|inlined.11
34193
- end
34194
- local.get $a|20
34195
- local.get $a|20
34196
- f64.ne
34197
- if (result i32)
34198
- local.get $b|21
34199
- local.get $b|21
34200
- f64.ne
34201
- else
34202
- i32.const 0
34203
- end
34204
- if
34205
- i32.const 0
34206
- br $src/sort/cmpNanLast|inlined.11
34207
- end
34208
- local.get $a|20
34209
- local.get $a|20
34210
- f64.ne
34211
- if
34212
- i32.const 1
34213
- br $src/sort/cmpNanLast|inlined.11
34214
- end
34215
- i32.const -1
34216
- br $src/sort/cmpNanLast|inlined.11
34217
- end
34218
- local.set $c|22
34219
- local.get $c|22
34220
- i32.const 0
34221
- i32.ne
34222
- if
34223
- local.get $c|22
34224
- br $src/sort/cmpIdxStable|inlined.2
34225
- end
34226
- local.get $ia|18
34227
- local.get $ib|19
34228
- i32.lt_s
34229
- if (result i32)
34230
- i32.const -1
34231
- else
34232
- local.get $ia|18
34233
- local.get $ib|19
34234
- i32.gt_s
34235
- if (result i32)
34236
- i32.const 1
34237
- else
34238
- i32.const 0
34239
- end
34240
- end
34241
- br $src/sort/cmpIdxStable|inlined.2
34242
- end
34243
- i32.const 0
34244
- i32.lt_s
34245
- if
34246
- block $src/sort/cmpIdxStable|inlined.3 (result i32)
34247
- local.get $data|9
34248
- local.set $data|23
34249
- local.get $ib
34250
- local.set $ia|24
34251
- local.get $ic
34252
- local.set $ib|25
34253
- block $src/sort/cmpNanLast|inlined.12 (result i32)
34254
- local.get $data|23
34255
- local.get $ia|24
34256
- call $~lib/typedarray/Float64Array#__get
34257
- local.set $a|26
34258
- local.get $data|23
34259
- local.get $ib|25
34260
- call $~lib/typedarray/Float64Array#__get
34261
- local.set $b|27
34262
- local.get $a|26
34263
- local.get $b|27
34264
- f64.lt
34265
- if
34266
- i32.const -1
34267
- br $src/sort/cmpNanLast|inlined.12
34268
- end
34269
- local.get $a|26
34270
- local.get $b|27
34271
- f64.gt
34272
- if
34273
- i32.const 1
34274
- br $src/sort/cmpNanLast|inlined.12
34275
- end
34276
- local.get $a|26
34277
- local.get $b|27
34278
- f64.eq
34279
- if
34280
- i32.const 0
34281
- br $src/sort/cmpNanLast|inlined.12
34282
- end
34283
- local.get $a|26
34284
- local.get $a|26
34285
- f64.ne
34286
- if (result i32)
34287
- local.get $b|27
34288
- local.get $b|27
34289
- f64.ne
34290
- else
34291
- i32.const 0
34292
- end
34293
- if
34294
- i32.const 0
34295
- br $src/sort/cmpNanLast|inlined.12
34296
- end
34297
- local.get $a|26
34298
- local.get $a|26
34299
- f64.ne
34300
- if
34301
- i32.const 1
34302
- br $src/sort/cmpNanLast|inlined.12
34303
- end
34304
- i32.const -1
34305
- br $src/sort/cmpNanLast|inlined.12
34306
- end
34307
- local.set $c|28
34308
- local.get $c|28
34309
- i32.const 0
34310
- i32.ne
34311
- if
34312
- local.get $c|28
34313
- br $src/sort/cmpIdxStable|inlined.3
34314
- end
34315
- local.get $ia|24
34316
- local.get $ib|25
34317
- i32.lt_s
34318
- if (result i32)
34319
- i32.const -1
34320
- else
34321
- local.get $ia|24
34322
- local.get $ib|25
34323
- i32.gt_s
34324
- if (result i32)
34325
- i32.const 1
34326
- else
34327
- i32.const 0
34328
- end
34329
- end
34330
- br $src/sort/cmpIdxStable|inlined.3
34331
- end
34332
- i32.const 0
34333
- i32.lt_s
34334
- if
34335
- local.get $ib
34336
- br $src/sort/_median3Idx|inlined.0
34337
- end
34338
- block $src/sort/cmpIdxStable|inlined.4 (result i32)
34339
- local.get $data|9
34340
- local.set $data|29
34341
- local.get $ia
34342
- local.set $ia|30
34343
- local.get $ic
34344
- local.set $ib|31
34345
- block $src/sort/cmpNanLast|inlined.13 (result i32)
34346
- local.get $data|29
34347
- local.get $ia|30
34348
- call $~lib/typedarray/Float64Array#__get
34349
- local.set $a|32
34350
- local.get $data|29
34351
- local.get $ib|31
34352
- call $~lib/typedarray/Float64Array#__get
34353
- local.set $b|33
34354
- local.get $a|32
34355
- local.get $b|33
34356
- f64.lt
34357
- if
34358
- i32.const -1
34359
- br $src/sort/cmpNanLast|inlined.13
34360
- end
34361
- local.get $a|32
34362
- local.get $b|33
34363
- f64.gt
34364
- if
34365
- i32.const 1
34366
- br $src/sort/cmpNanLast|inlined.13
34367
- end
34368
- local.get $a|32
34369
- local.get $b|33
34370
- f64.eq
34371
- if
34372
- i32.const 0
34373
- br $src/sort/cmpNanLast|inlined.13
34374
- end
34375
- local.get $a|32
34376
- local.get $a|32
34377
- f64.ne
34378
- if (result i32)
34379
- local.get $b|33
34380
- local.get $b|33
34381
- f64.ne
34382
- else
34383
- i32.const 0
34384
- end
34385
- if
34386
- i32.const 0
34387
- br $src/sort/cmpNanLast|inlined.13
34388
- end
34389
- local.get $a|32
34390
- local.get $a|32
34391
- f64.ne
34392
- if
34393
- i32.const 1
34394
- br $src/sort/cmpNanLast|inlined.13
34395
- end
34396
- i32.const -1
34397
- br $src/sort/cmpNanLast|inlined.13
34398
- end
34399
- local.set $c|34
34400
- local.get $c|34
34401
- i32.const 0
34402
- i32.ne
34403
- if
34404
- local.get $c|34
34405
- br $src/sort/cmpIdxStable|inlined.4
34406
- end
34407
- local.get $ia|30
34408
- local.get $ib|31
34409
- i32.lt_s
34410
- if (result i32)
34411
- i32.const -1
34412
- else
34413
- local.get $ia|30
34414
- local.get $ib|31
34415
- i32.gt_s
34416
- if (result i32)
34417
- i32.const 1
34418
- else
34419
- i32.const 0
34420
- end
34421
- end
34422
- br $src/sort/cmpIdxStable|inlined.4
34423
- end
34424
- i32.const 0
34425
- i32.lt_s
34426
- if (result i32)
34427
- local.get $ic
34428
- else
34429
- local.get $ia
34430
- end
34431
- br $src/sort/_median3Idx|inlined.0
34432
- end
34433
- block $src/sort/cmpIdxStable|inlined.5 (result i32)
34434
- local.get $data|9
34435
- local.set $data|35
34436
- local.get $ia
34437
- local.set $ia|36
34438
- local.get $ic
34439
- local.set $ib|37
34440
- block $src/sort/cmpNanLast|inlined.14 (result i32)
34441
- local.get $data|35
34442
- local.get $ia|36
34443
- call $~lib/typedarray/Float64Array#__get
34444
- local.set $a|38
34445
- local.get $data|35
34446
- local.get $ib|37
34447
- call $~lib/typedarray/Float64Array#__get
34448
- local.set $b|39
34449
- local.get $a|38
34450
- local.get $b|39
34451
- f64.lt
34452
- if
34453
- i32.const -1
34454
- br $src/sort/cmpNanLast|inlined.14
34455
- end
34456
- local.get $a|38
34457
- local.get $b|39
34458
- f64.gt
34459
- if
34460
- i32.const 1
34461
- br $src/sort/cmpNanLast|inlined.14
34462
- end
34463
- local.get $a|38
34464
- local.get $b|39
34465
- f64.eq
34466
- if
34467
- i32.const 0
34468
- br $src/sort/cmpNanLast|inlined.14
34469
- end
34470
- local.get $a|38
34471
- local.get $a|38
34472
- f64.ne
34473
- if (result i32)
34474
- local.get $b|39
34475
- local.get $b|39
34476
- f64.ne
34477
- else
34478
- i32.const 0
34479
- end
34480
- if
34481
- i32.const 0
34482
- br $src/sort/cmpNanLast|inlined.14
34483
- end
34484
- local.get $a|38
34485
- local.get $a|38
34486
- f64.ne
34487
- if
34488
- i32.const 1
34489
- br $src/sort/cmpNanLast|inlined.14
34490
- end
34491
- i32.const -1
34492
- br $src/sort/cmpNanLast|inlined.14
34493
- end
34494
- local.set $c|40
34495
- local.get $c|40
34496
- i32.const 0
34497
- i32.ne
34498
- if
34499
- local.get $c|40
34500
- br $src/sort/cmpIdxStable|inlined.5
34501
- end
34502
- local.get $ia|36
34503
- local.get $ib|37
34504
- i32.lt_s
34505
- if (result i32)
34506
- i32.const -1
34507
- else
34508
- local.get $ia|36
34509
- local.get $ib|37
34510
- i32.gt_s
34511
- if (result i32)
34512
- i32.const 1
34513
- else
34514
- i32.const 0
34515
- end
34516
- end
34517
- br $src/sort/cmpIdxStable|inlined.5
34518
- end
34519
- i32.const 0
34520
- i32.lt_s
34521
- if
34522
- local.get $ia
34523
- br $src/sort/_median3Idx|inlined.0
34524
- end
34525
- block $src/sort/cmpIdxStable|inlined.6 (result i32)
34526
- local.get $data|9
34527
- local.set $data|41
34528
- local.get $ib
34529
- local.set $ia|42
34530
- local.get $ic
34531
- local.set $ib|43
34532
- block $src/sort/cmpNanLast|inlined.15 (result i32)
34533
- local.get $data|41
34534
- local.get $ia|42
34535
- call $~lib/typedarray/Float64Array#__get
34536
- local.set $a|44
34537
- local.get $data|41
34538
- local.get $ib|43
34539
- call $~lib/typedarray/Float64Array#__get
34540
- local.set $b|45
34541
- local.get $a|44
34542
- local.get $b|45
34543
- f64.lt
34544
- if
34545
- i32.const -1
34546
- br $src/sort/cmpNanLast|inlined.15
34547
- end
34548
- local.get $a|44
34549
- local.get $b|45
34550
- f64.gt
34551
- if
34552
- i32.const 1
34553
- br $src/sort/cmpNanLast|inlined.15
34554
- end
34555
- local.get $a|44
34556
- local.get $b|45
34557
- f64.eq
34558
- if
34559
- i32.const 0
34560
- br $src/sort/cmpNanLast|inlined.15
34561
- end
34562
- local.get $a|44
34563
- local.get $a|44
34564
- f64.ne
34565
- if (result i32)
34566
- local.get $b|45
34567
- local.get $b|45
34568
- f64.ne
34569
- else
34570
- i32.const 0
34571
- end
34572
- if
34573
- i32.const 0
34574
- br $src/sort/cmpNanLast|inlined.15
34575
- end
34576
- local.get $a|44
34577
- local.get $a|44
34578
- f64.ne
34579
- if
34580
- i32.const 1
34581
- br $src/sort/cmpNanLast|inlined.15
34582
- end
34583
- i32.const -1
34584
- br $src/sort/cmpNanLast|inlined.15
34585
- end
34586
- local.set $c|46
34587
- local.get $c|46
34588
- i32.const 0
34589
- i32.ne
34590
- if
34591
- local.get $c|46
34592
- br $src/sort/cmpIdxStable|inlined.6
34593
- end
34594
- local.get $ia|42
34595
- local.get $ib|43
34596
- i32.lt_s
34597
- if (result i32)
34598
- i32.const -1
34599
- else
34600
- local.get $ia|42
34601
- local.get $ib|43
34602
- i32.gt_s
34603
- if (result i32)
34604
- i32.const 1
34605
- else
34606
- i32.const 0
34607
- end
34608
- end
34609
- br $src/sort/cmpIdxStable|inlined.6
34610
- end
34611
- i32.const 0
34612
- i32.lt_s
34613
- if (result i32)
34614
- local.get $ic
34615
- else
34616
- local.get $ib
34617
- end
34618
- br $src/sort/_median3Idx|inlined.0
34619
- end
33467
+ local.get $data
33468
+ local.get $idx
33469
+ local.get $l
33470
+ local.get $mid
33471
+ local.get $h
33472
+ call $src/sort/_median3Idx
34620
33473
  local.set $pivotKey
34621
33474
  local.get $l
34622
33475
  local.set $lt
@@ -34629,96 +33482,14 @@
34629
33482
  local.get $gt
34630
33483
  i32.le_s
34631
33484
  if
34632
- block $src/sort/cmpIdxStable|inlined.7 (result i32)
34633
- local.get $data
34634
- local.set $data|51
34635
- local.get $idx
34636
- local.get $i
34637
- call $~lib/typedarray/Int32Array#__get
34638
- local.set $ia|52
34639
- local.get $pivotKey
34640
- local.set $ib|53
34641
- block $src/sort/cmpNanLast|inlined.16 (result i32)
34642
- local.get $data|51
34643
- local.get $ia|52
34644
- call $~lib/typedarray/Float64Array#__get
34645
- local.set $a|54
34646
- local.get $data|51
34647
- local.get $ib|53
34648
- call $~lib/typedarray/Float64Array#__get
34649
- local.set $b|55
34650
- local.get $a|54
34651
- local.get $b|55
34652
- f64.lt
34653
- if
34654
- i32.const -1
34655
- br $src/sort/cmpNanLast|inlined.16
34656
- end
34657
- local.get $a|54
34658
- local.get $b|55
34659
- f64.gt
34660
- if
34661
- i32.const 1
34662
- br $src/sort/cmpNanLast|inlined.16
34663
- end
34664
- local.get $a|54
34665
- local.get $b|55
34666
- f64.eq
34667
- if
34668
- i32.const 0
34669
- br $src/sort/cmpNanLast|inlined.16
34670
- end
34671
- local.get $a|54
34672
- local.get $a|54
34673
- f64.ne
34674
- if (result i32)
34675
- local.get $b|55
34676
- local.get $b|55
34677
- f64.ne
34678
- else
34679
- i32.const 0
34680
- end
34681
- if
34682
- i32.const 0
34683
- br $src/sort/cmpNanLast|inlined.16
34684
- end
34685
- local.get $a|54
34686
- local.get $a|54
34687
- f64.ne
34688
- if
34689
- i32.const 1
34690
- br $src/sort/cmpNanLast|inlined.16
34691
- end
34692
- i32.const -1
34693
- br $src/sort/cmpNanLast|inlined.16
34694
- end
34695
- local.set $c|56
34696
- local.get $c|56
34697
- i32.const 0
34698
- i32.ne
34699
- if
34700
- local.get $c|56
34701
- br $src/sort/cmpIdxStable|inlined.7
34702
- end
34703
- local.get $ia|52
34704
- local.get $ib|53
34705
- i32.lt_s
34706
- if (result i32)
34707
- i32.const -1
34708
- else
34709
- local.get $ia|52
34710
- local.get $ib|53
34711
- i32.gt_s
34712
- if (result i32)
34713
- i32.const 1
34714
- else
34715
- i32.const 0
34716
- end
34717
- end
34718
- br $src/sort/cmpIdxStable|inlined.7
34719
- end
34720
- local.set $c|57
34721
- local.get $c|57
33485
+ local.get $data
33486
+ local.get $idx
33487
+ local.get $i
33488
+ call $~lib/typedarray/Int32Array#__get
33489
+ local.get $pivotKey
33490
+ call $src/sort/cmpIdxStable
33491
+ local.set $c
33492
+ local.get $c
34722
33493
  i32.const 0
34723
33494
  i32.lt_s
34724
33495
  if
@@ -34745,14 +33516,14 @@
34745
33516
  i32.add
34746
33517
  local.set $i
34747
33518
  else
34748
- local.get $c|57
33519
+ local.get $c
34749
33520
  i32.const 0
34750
33521
  i32.gt_s
34751
33522
  if
34752
33523
  local.get $idx
34753
33524
  local.get $i
34754
33525
  call $~lib/typedarray/Int32Array#__get
34755
- local.set $t|59
33526
+ local.set $t|15
34756
33527
  local.get $idx
34757
33528
  local.get $i
34758
33529
  local.get $idx
@@ -34761,7 +33532,7 @@
34761
33532
  call $~lib/typedarray/Int32Array#__set
34762
33533
  local.get $idx
34763
33534
  local.get $gt
34764
- local.get $t|59
33535
+ local.get $t|15
34765
33536
  call $~lib/typedarray/Int32Array#__set
34766
33537
  local.get $gt
34767
33538
  i32.const 1
@@ -34824,9 +33595,6 @@
34824
33595
  (local $n i32)
34825
33596
  (local $idx i32)
34826
33597
  (local $i i32)
34827
- (local $n|4 i32)
34828
- (local $v i32)
34829
- (local $r i32)
34830
33598
  local.get $data
34831
33599
  call $~lib/typedarray/Float64Array#get:length
34832
33600
  local.set $n
@@ -34863,32 +33631,8 @@
34863
33631
  i32.const 1
34864
33632
  i32.sub
34865
33633
  i32.const 2
34866
- block $src/sort/ilog2|inlined.1 (result i32)
34867
- local.get $n
34868
- local.set $n|4
34869
- local.get $n|4
34870
- local.set $v
34871
- i32.const 0
34872
- local.set $r
34873
- loop $while-continue|1
34874
- local.get $v
34875
- i32.const 1
34876
- i32.gt_s
34877
- if
34878
- local.get $v
34879
- i32.const 1
34880
- i32.shr_s
34881
- local.set $v
34882
- local.get $r
34883
- i32.const 1
34884
- i32.add
34885
- local.set $r
34886
- br $while-continue|1
34887
- end
34888
- end
34889
- local.get $r
34890
- br $src/sort/ilog2|inlined.1
34891
- end
33634
+ local.get $n
33635
+ call $src/sort/ilog2
34892
33636
  i32.mul
34893
33637
  call $src/sort/_introsortIdx
34894
33638
  end
@@ -35096,28 +33840,37 @@
35096
33840
  return
35097
33841
  )
35098
33842
  (func $src/ops/complex-array/complex_array_add (param $a i32) (param $b i32) (param $result i32)
35099
- (local $3 i32)
35100
- (local $4 i32)
35101
- (local $5 i32)
33843
+ (local $a|3 i32)
33844
+ (local $b|4 i32)
33845
+ (local $result|5 i32)
35102
33846
  (local $6 i32)
33847
+ (local $7 i32)
33848
+ (local $8 i32)
33849
+ (local $9 i32)
35103
33850
  (local $len i32)
35104
33851
  (local $i i32)
35105
33852
  local.get $a
35106
- call $~lib/typedarray/Float64Array#get:length
35107
- local.tee $3
33853
+ local.set $a|3
35108
33854
  local.get $b
35109
- call $~lib/typedarray/Float64Array#get:length
35110
- local.tee $4
35111
- local.get $3
35112
- local.get $4
35113
- i32.lt_s
35114
- select
35115
- local.tee $5
33855
+ local.set $b|4
35116
33856
  local.get $result
33857
+ local.set $result|5
33858
+ local.get $a|3
35117
33859
  call $~lib/typedarray/Float64Array#get:length
35118
33860
  local.tee $6
35119
- local.get $5
33861
+ local.get $b|4
33862
+ call $~lib/typedarray/Float64Array#get:length
33863
+ local.tee $7
35120
33864
  local.get $6
33865
+ local.get $7
33866
+ i32.lt_s
33867
+ select
33868
+ local.tee $8
33869
+ local.get $result|5
33870
+ call $~lib/typedarray/Float64Array#get:length
33871
+ local.tee $9
33872
+ local.get $8
33873
+ local.get $9
35121
33874
  i32.lt_s
35122
33875
  select
35123
33876
  local.set $len
@@ -35128,12 +33881,12 @@
35128
33881
  local.get $len
35129
33882
  i32.lt_s
35130
33883
  if
35131
- local.get $result
33884
+ local.get $result|5
35132
33885
  local.get $i
35133
- local.get $a
33886
+ local.get $a|3
35134
33887
  local.get $i
35135
33888
  call $~lib/typedarray/Float64Array#__uget
35136
- local.get $b
33889
+ local.get $b|4
35137
33890
  local.get $i
35138
33891
  call $~lib/typedarray/Float64Array#__uget
35139
33892
  f64.add
@@ -35147,28 +33900,37 @@
35147
33900
  end
35148
33901
  )
35149
33902
  (func $src/ops/complex-array/complex_array_sub (param $a i32) (param $b i32) (param $result i32)
35150
- (local $3 i32)
35151
- (local $4 i32)
35152
- (local $5 i32)
33903
+ (local $a|3 i32)
33904
+ (local $b|4 i32)
33905
+ (local $result|5 i32)
35153
33906
  (local $6 i32)
33907
+ (local $7 i32)
33908
+ (local $8 i32)
33909
+ (local $9 i32)
35154
33910
  (local $len i32)
35155
33911
  (local $i i32)
35156
33912
  local.get $a
35157
- call $~lib/typedarray/Float64Array#get:length
35158
- local.tee $3
33913
+ local.set $a|3
35159
33914
  local.get $b
35160
- call $~lib/typedarray/Float64Array#get:length
35161
- local.tee $4
35162
- local.get $3
35163
- local.get $4
35164
- i32.lt_s
35165
- select
35166
- local.tee $5
33915
+ local.set $b|4
35167
33916
  local.get $result
33917
+ local.set $result|5
33918
+ local.get $a|3
35168
33919
  call $~lib/typedarray/Float64Array#get:length
35169
33920
  local.tee $6
35170
- local.get $5
33921
+ local.get $b|4
33922
+ call $~lib/typedarray/Float64Array#get:length
33923
+ local.tee $7
35171
33924
  local.get $6
33925
+ local.get $7
33926
+ i32.lt_s
33927
+ select
33928
+ local.tee $8
33929
+ local.get $result|5
33930
+ call $~lib/typedarray/Float64Array#get:length
33931
+ local.tee $9
33932
+ local.get $8
33933
+ local.get $9
35172
33934
  i32.lt_s
35173
33935
  select
35174
33936
  local.set $len
@@ -35179,12 +33941,12 @@
35179
33941
  local.get $len
35180
33942
  i32.lt_s
35181
33943
  if
35182
- local.get $result
33944
+ local.get $result|5
35183
33945
  local.get $i
35184
- local.get $a
33946
+ local.get $a|3
35185
33947
  local.get $i
35186
33948
  call $~lib/typedarray/Float64Array#__uget
35187
- local.get $b
33949
+ local.get $b|4
35188
33950
  local.get $i
35189
33951
  call $~lib/typedarray/Float64Array#__uget
35190
33952
  f64.sub