Update Binaryen and other dependencies; Update dist files

This commit is contained in:
dcode
2019-01-09 13:02:47 +01:00
parent f714afab3c
commit 20f4092eb2
52 changed files with 3970 additions and 4365 deletions

View File

@ -28,18 +28,18 @@
get_local $1
i32.mul
set_global $assembly/index/s
block $break|0
i32.const 0
set_local $0
loop $repeat|0
i32.const 0
set_local $0
loop $repeat|0
block $break|0
get_local $0
get_global $assembly/index/h
i32.ge_s
br_if $break|0
block $break|1
i32.const 0
set_local $1
loop $repeat|1
i32.const 0
set_local $1
loop $repeat|1
block $break|1
get_local $1
get_global $assembly/index/w
i32.ge_s
@ -58,8 +58,8 @@
end
set_local $2
get_global $assembly/index/s
get_local $0
get_global $assembly/index/w
get_local $0
i32.mul
i32.add
get_local $1
@ -73,18 +73,14 @@
i32.add
set_local $1
br $repeat|1
unreachable
end
unreachable
end
get_local $0
i32.const 1
i32.add
set_local $0
br $repeat|0
unreachable
end
unreachable
end
)
(func $assembly/index/step (; 2 ;) (type $v)
@ -104,61 +100,54 @@
i32.const 1
i32.sub
set_local $7
block $break|0
loop $repeat|0
loop $repeat|0
block $break|0
get_local $0
get_global $assembly/index/h
i32.ge_s
br_if $break|0
get_local $0
if (result i32)
get_local $0
i32.const 1
i32.sub
else
get_local $6
end
tee_local $2
i32.const 1
i32.sub
get_local $6
get_local $0
select
set_local $4
i32.const 0
get_local $0
i32.const 1
i32.add
get_local $0
get_local $6
i32.eq
if (result i32)
i32.const 0
else
get_local $0
i32.const 1
i32.add
end
select
set_local $5
block $break|1
i32.const 0
set_local $1
loop $repeat|1
i32.const 0
set_local $1
loop $repeat|1
block $break|1
get_local $1
get_global $assembly/index/w
i32.ge_s
br_if $break|1
get_local $4
get_global $assembly/index/w
i32.mul
get_local $1
if (result i32)
get_local $1
i32.const 1
i32.sub
else
get_local $7
end
i32.const 1
i32.sub
get_local $7
get_local $1
select
tee_local $2
get_global $assembly/index/w
get_local $4
i32.mul
i32.add
i32.const 2
i32.shl
i32.load
i32.const 1
i32.and
get_local $4
get_global $assembly/index/w
get_local $4
i32.mul
get_local $1
i32.add
@ -168,20 +157,18 @@
i32.const 1
i32.and
i32.add
get_local $4
get_global $assembly/index/w
i32.mul
i32.const 0
get_local $1
i32.const 1
i32.add
get_local $1
get_local $7
i32.eq
if (result i32)
i32.const 0
else
get_local $1
i32.const 1
i32.add
end
select
tee_local $3
get_global $assembly/index/w
get_local $4
i32.mul
i32.add
i32.const 2
i32.shl
@ -189,8 +176,8 @@
i32.const 1
i32.and
i32.add
get_local $0
get_global $assembly/index/w
get_local $0
i32.mul
get_local $2
i32.add
@ -200,8 +187,8 @@
i32.const 1
i32.and
i32.add
get_local $0
get_global $assembly/index/w
get_local $0
i32.mul
get_local $3
i32.add
@ -211,8 +198,8 @@
i32.const 1
i32.and
i32.add
get_local $5
get_global $assembly/index/w
get_local $5
i32.mul
get_local $2
i32.add
@ -222,8 +209,8 @@
i32.const 1
i32.and
i32.add
get_local $5
get_global $assembly/index/w
get_local $5
i32.mul
get_local $1
i32.add
@ -233,8 +220,8 @@
i32.const 1
i32.and
i32.add
get_local $5
get_global $assembly/index/w
get_local $5
i32.mul
get_local $3
i32.add
@ -245,8 +232,8 @@
i32.and
i32.add
set_local $2
get_local $0
get_global $assembly/index/w
get_local $0
i32.mul
get_local $1
i32.add
@ -264,8 +251,8 @@
i32.eq
if
get_global $assembly/index/s
get_local $0
get_global $assembly/index/w
get_local $0
i32.mul
i32.add
get_local $1
@ -273,6 +260,9 @@
i32.const 2
i32.shl
get_local $3
i32.const 16777215
i32.and
get_local $3
i32.const 24
i32.shr_u
get_global $assembly/config/BIT_ROT
@ -285,15 +275,12 @@
select
i32.const 24
i32.shl
get_local $3
i32.const 16777215
i32.and
i32.or
i32.store
else
get_global $assembly/index/s
get_local $0
get_global $assembly/index/w
get_local $0
i32.mul
i32.add
get_local $1
@ -311,8 +298,8 @@
i32.eq
if
get_global $assembly/index/s
get_local $0
get_global $assembly/index/w
get_local $0
i32.mul
i32.add
get_local $1
@ -325,8 +312,8 @@
i32.store
else
get_global $assembly/index/s
get_local $0
get_global $assembly/index/w
get_local $0
i32.mul
i32.add
get_local $1
@ -334,6 +321,9 @@
i32.const 2
i32.shl
get_local $3
i32.const 16777215
i32.and
get_local $3
i32.const 24
i32.shr_u
get_global $assembly/config/BIT_ROT
@ -346,9 +336,6 @@
select
i32.const 24
i32.shl
get_local $3
i32.const 16777215
i32.and
i32.or
i32.store
end
@ -358,24 +345,20 @@
i32.add
set_local $1
br $repeat|1
unreachable
end
unreachable
end
get_local $0
i32.const 1
i32.add
set_local $0
br $repeat|0
unreachable
end
unreachable
end
)
(func $assembly/index/fill (; 3 ;) (type $iiFv) (param $0 i32) (param $1 i32) (param $2 f64)
(local $3 i32)
block $break|0
loop $repeat|0
loop $repeat|0
block $break|0
get_local $3
get_global $assembly/index/w
i32.ge_s
@ -385,8 +368,8 @@
f64.lt
if
get_global $assembly/index/s
get_local $1
get_global $assembly/index/w
get_local $1
i32.mul
i32.add
get_local $3
@ -403,14 +386,12 @@
i32.add
set_local $3
br $repeat|0
unreachable
end
unreachable
end
block $break|1
i32.const 0
set_local $3
loop $repeat|1
i32.const 0
set_local $3
loop $repeat|1
block $break|1
get_local $3
get_global $assembly/index/h
i32.ge_s
@ -420,8 +401,8 @@
f64.lt
if
get_global $assembly/index/s
get_local $3
get_global $assembly/index/w
get_local $3
i32.mul
i32.add
get_local $0
@ -438,9 +419,7 @@
i32.add
set_local $3
br $repeat|1
unreachable
end
unreachable
end
)
(func $null (; 4 ;) (type $v)

View File

@ -49,7 +49,7 @@
i32.lt_s
i32.eqz
br_if $break|1
block $assembly/index/set|inlined.0
block
call $~lib/bindings/Math/random
f64.const 0.1
f64.gt
@ -317,7 +317,7 @@
i32.gt_s
select
set_local $10
block $assembly/index/set|inlined.1
block
get_local $10
i32.const 24
i32.shl
@ -389,7 +389,7 @@
i32.gt_s
select
set_local $10
block $assembly/index/set|inlined.4
block
get_local $10
i32.const 24
i32.shl

View File

@ -15,8 +15,8 @@
(local $4 f64)
(local $5 f64)
(local $6 f64)
(local $7 f64)
(local $8 i32)
(local $7 i32)
(local $8 f64)
(local $9 f64)
(local $10 f64)
(local $11 f64)
@ -26,73 +26,72 @@
tee_local $6
f64.const 1.6
f64.div
set_local $11
get_local $0
f64.convert_u/i32
get_local $2
f64.convert_u/i32
tee_local $4
f64.const 2
f64.div
tee_local $7
f64.sub
set_local $12
f64.const 10
f64.const 3
get_local $6
f64.mul
f64.const 4
get_local $4
get_local $2
f64.convert_u/i32
tee_local $4
f64.mul
f64.min
f64.div
tee_local $12
f64.mul
set_local $9
block $break|0
loop $repeat|0
get_local $8
get_local $1
i32.ge_u
br_if $break|0
get_local $8
get_local $0
f64.convert_u/i32
get_local $4
f64.const 2
f64.div
f64.sub
get_local $9
f64.mul
set_local $10
loop $repeat|0
get_local $7
get_local $1
i32.lt_u
if
get_local $7
f64.convert_u/i32
get_local $11
f64.sub
get_local $12
f64.sub
get_local $9
f64.mul
set_local $10
set_local $11
f64.const 0
set_local $4
f64.const 0
set_local $5
i32.const 0
set_local $2
block $break|1
loop $continue|1
get_local $4
get_local $4
f64.mul
tee_local $6
get_local $5
get_local $5
f64.mul
tee_local $7
f64.add
f64.const 4
f64.le
if
loop $continue|1
get_local $4
get_local $4
f64.mul
tee_local $6
get_local $5
get_local $5
f64.mul
tee_local $8
f64.add
f64.const 4
f64.le
if
block $break|1
f64.const 2
get_local $4
f64.mul
get_local $5
f64.mul
get_local $9
get_local $10
f64.add
set_local $5
get_local $6
get_local $7
get_local $8
f64.sub
get_local $10
get_local $11
f64.add
set_local $4
get_local $2
@ -107,19 +106,17 @@
end
end
end
block $break|2
f64.const 8
get_local $3
f64.const 8
get_local $3
f64.convert_u/i32
f64.min
set_local $6
loop $repeat|2
get_local $2
f64.convert_u/i32
f64.min
set_local $6
loop $repeat|2
get_local $2
f64.convert_u/i32
get_local $6
f64.lt
i32.eqz
br_if $break|2
get_local $6
f64.lt
if
get_local $4
get_local $4
f64.mul
@ -127,32 +124,30 @@
get_local $5
f64.mul
f64.sub
get_local $10
get_local $11
f64.add
set_local $7
set_local $8
f64.const 2
get_local $4
f64.mul
get_local $5
f64.mul
get_local $9
get_local $10
f64.add
set_local $5
get_local $7
get_local $8
set_local $4
get_local $2
i32.const 1
i32.add
set_local $2
br $repeat|2
unreachable
end
unreachable
end
get_local $0
get_local $1
i32.mul
get_local $8
get_local $7
i32.add
i32.const 1
i32.shl
@ -193,16 +188,13 @@
else
i32.const 2047
end
tee_local $2
i32.store16
get_local $8
get_local $7
i32.const 1
i32.add
set_local $8
set_local $7
br $repeat|0
unreachable
end
unreachable
end
)
(func $null (; 3 ;) (type $v)

View File

@ -107,12 +107,12 @@ function asmFunc(global, env, buffer) {
HEAP8[wasm2js_i32$0 >> 0] = wasm2js_i32$1;
if ($1 >>> 0 <= 8 >>> 0) return;
$2 = (0 - $0 | 0) & 3 | 0;
$0 = $0 + $2 | 0;
$0 = $2 + $0 | 0;
wasm2js_i32$0 = $0;
wasm2js_i32$1 = 0;
HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1;
$1 = ($1 - $2 | 0) & 4294967292 | 0;
wasm2js_i32$0 = ($0 + $1 | 0) - 4 | 0;
wasm2js_i32$0 = ($1 + $0 | 0) - 4 | 0;
wasm2js_i32$1 = 0;
HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1;
if ($1 >>> 0 <= 8 >>> 0) return;
@ -156,7 +156,7 @@ function asmFunc(global, env, buffer) {
wasm2js_i32$1 = 0;
HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1;
$2 = ($0 & 4 | 0) + 24 | 0;
$0 = $0 + $2 | 0;
$0 = $2 + $0 | 0;
$1 = $1 - $2 | 0;
continue_0 : do {
if ($1 >>> 0 >= 32 >>> 0) {
@ -227,9 +227,8 @@ function asmFunc(global, env, buffer) {
$0 = $0 | 0;
var $1 = 0, $2 = 0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0, $49 = 0, wasm2js_i32$0 = 0, wasm2js_f64$0 = 0.0, wasm2js_i32$1 = 0;
$7 = HEAP32[($0 + 4 | 0) >> 2] | 0;
break_0 : {
repeat_0 : do {
if (($1 | 0) >= ($7 | 0)) break break_0;
repeat_0 : do {
if (($1 | 0) < ($7 | 0)) {
$2 = HEAPU32[(((HEAPU32[$0 >> 2] | 0) + ($1 << 2 | 0) | 0) + 8 | 0) >> 2] | 0;
$3 = +HEAPF64[($2 + 48 | 0) >> 3];
$4 = $4 + +HEAPF64[($2 + 24 | 0) >> 3] * $3;
@ -237,9 +236,9 @@ function asmFunc(global, env, buffer) {
$6 = $6 + +HEAPF64[($2 + 40 | 0) >> 3] * $3;
$1 = $1 + 1 | 0;
continue repeat_0;
break repeat_0;
} while (1);
};
}
break repeat_0;
} while (1);
$1 = HEAPU32[$0 >> 2] | 0;
if (0 >>> 0 < ((HEAP32[$1 >> 2] | 0) >>> 2 | 0) >>> 0) $49 = HEAPU32[($1 + 8 | 0) >> 2] | 0; else abort();
$1 = $49;
@ -290,9 +289,8 @@ function asmFunc(global, env, buffer) {
var $1 = 0, $2 = 0.0, $8 = 0.0, $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0, $9 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0, $18 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, wasm2js_i32$0 = 0, wasm2js_f64$0 = 0.0;
$12 = HEAPU32[$0 >> 2] | 0;
$13 = HEAP32[($12 + 4 | 0) >> 2] | 0;
break_0 : {
repeat_0 : do {
if ($3 >>> 0 >= $13 >>> 0) break break_0;
repeat_0 : do {
if ($3 >>> 0 < $13 >>> 0) {
$0 = HEAPU32[(((HEAPU32[$12 >> 2] | 0) + ($3 << 2 | 0) | 0) + 8 | 0) >> 2] | 0;
$14 = +HEAPF64[$0 >> 3];
$15 = +HEAPF64[($0 + 8 | 0) >> 3];
@ -301,10 +299,9 @@ function asmFunc(global, env, buffer) {
$5 = +HEAPF64[($0 + 32 | 0) >> 3];
$6 = +HEAPF64[($0 + 40 | 0) >> 3];
$17 = +HEAPF64[($0 + 48 | 0) >> 3];
break_1 : {
$7 = $3 + 1 | 0;
repeat_1 : do {
if ($7 >>> 0 >= $13 >>> 0) break break_1;
$7 = $3 + 1 | 0;
repeat_1 : do {
if ($7 >>> 0 < $13 >>> 0) {
$1 = HEAPU32[(((HEAPU32[$12 >> 2] | 0) + ($7 << 2 | 0) | 0) + 8 | 0) >> 2] | 0;
$18 = $14 - +HEAPF64[$1 >> 3];
$2 = $18;
@ -329,9 +326,9 @@ function asmFunc(global, env, buffer) {
HEAPF64[(wasm2js_i32$0 + 40 | 0) >> 3] = wasm2js_f64$0;
$7 = $7 + 1 | 0;
continue repeat_1;
break repeat_1;
} while (1);
};
}
break repeat_1;
} while (1);
wasm2js_i32$0 = $0;
wasm2js_f64$0 = $4;
HEAPF64[(wasm2js_i32$0 + 24 | 0) >> 3] = wasm2js_f64$0;
@ -352,19 +349,18 @@ function asmFunc(global, env, buffer) {
HEAPF64[(wasm2js_i32$0 + 16 | 0) >> 3] = wasm2js_f64$0;
$3 = $3 + 1 | 0;
continue repeat_0;
break repeat_0;
} while (1);
};
}
break repeat_0;
} while (1);
}
function assembly_index_NBodySystem_energy($0) {
$0 = $0 | 0;
var $1 = 0.0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $10 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, $30 = 0.0, $39 = 0.0, $45 = 0.0, $69 = 0.0, $84 = 0.0;
break_0 : {
$4 = HEAPU32[$0 >> 2] | 0;
$5 = HEAP32[($4 + 4 | 0) >> 2] | 0;
repeat_0 : do {
if ($2 >>> 0 >= $5 >>> 0) break break_0;
$4 = HEAPU32[$0 >> 2] | 0;
$5 = HEAP32[($4 + 4 | 0) >> 2] | 0;
repeat_0 : do {
if ($2 >>> 0 < $5 >>> 0) {
$0 = HEAPU32[(((HEAPU32[$4 >> 2] | 0) + ($2 << 2 | 0) | 0) + 8 | 0) >> 2] | 0;
$7 = +HEAPF64[$0 >> 3];
$8 = +HEAPF64[($0 + 8 | 0) >> 3];
@ -377,10 +373,9 @@ function asmFunc(global, env, buffer) {
$45 = $39 + $1 * $1;
$1 = +HEAPF64[($0 + 40 | 0) >> 3];
$1 = $30 + .5 * $10 * ($45 + $1 * $1);
break_1 : {
$0 = $2 + 1 | 0;
repeat_1 : do {
if ($0 >>> 0 >= $5 >>> 0) break break_1;
$0 = $2 + 1 | 0;
repeat_1 : do {
if ($0 >>> 0 < $5 >>> 0) {
$3 = HEAPU32[(((HEAPU32[$4 >> 2] | 0) + ($0 << 2 | 0) | 0) + 8 | 0) >> 2] | 0;
$6 = $7 - +HEAPF64[$3 >> 3];
$69 = $1;
@ -390,14 +385,14 @@ function asmFunc(global, env, buffer) {
$1 = $69 - $10 * +HEAPF64[($3 + 48 | 0) >> 3] / Math_sqrt($84 + $1 * $1);
$0 = $0 + 1 | 0;
continue repeat_1;
break repeat_1;
} while (1);
};
}
break repeat_1;
} while (1);
$2 = $2 + 1 | 0;
continue repeat_0;
break repeat_0;
} while (1);
};
}
break repeat_0;
} while (1);
return +$1;
}
@ -426,11 +421,10 @@ function asmFunc(global, env, buffer) {
$1 = HEAPU32[assembly_index_system >> 2] | 0;
if ($0 >>> 0 < (HEAP32[($1 + 4 | 0) >> 2] | 0) >>> 0) {
$1 = HEAPU32[$1 >> 2] | 0;
if ($0 >>> 0 < ((HEAP32[$1 >> 2] | 0) >>> 2 | 0) >>> 0) $20 = HEAPU32[(($1 + ($0 << 2 | 0) | 0) + 8 | 0) >> 2] | 0; else abort();
if ($0 >>> 0 < ((HEAP32[$1 >> 2] | 0) >>> 2 | 0) >>> 0) $20 = HEAPU32[((($0 << 2 | 0) + $1 | 0) + 8 | 0) >> 2] | 0; else abort();
$22 = $20;
} else $22 = 0;
$0 = $22;
return $0 | 0;
return $22 | 0;
}
function start() {

Binary file not shown.

View File

@ -182,24 +182,24 @@
if
return
end
get_local $0
i32.const 0
get_local $0
i32.sub
i32.const 3
i32.and
tee_local $2
get_local $0
i32.add
tee_local $0
i32.const 0
i32.store
get_local $0
get_local $1
get_local $2
i32.sub
i32.const -4
i32.and
tee_local $1
get_local $0
i32.add
i32.const 4
i32.sub
@ -284,12 +284,12 @@
i32.const 0
i32.store
get_local $0
get_local $0
i32.const 4
i32.and
i32.const 24
i32.add
tee_local $2
get_local $0
i32.add
set_local $0
get_local $1
@ -371,12 +371,11 @@
get_local $0
i32.load offset=4
set_local $7
block $break|0
loop $repeat|0
get_local $1
get_local $7
i32.ge_s
br_if $break|0
loop $repeat|0
get_local $1
get_local $7
i32.lt_s
if
get_local $0
i32.load
get_local $1
@ -413,9 +412,7 @@
i32.add
set_local $1
br $repeat|0
unreachable
end
unreachable
end
i32.const 0
get_local $0
@ -562,12 +559,11 @@
tee_local $12
i32.load offset=4
set_local $13
block $break|0
loop $repeat|0
get_local $3
get_local $13
i32.ge_u
br_if $break|0
loop $repeat|0
get_local $3
get_local $13
i32.lt_u
if
get_local $12
i32.load
get_local $3
@ -596,16 +592,15 @@
get_local $0
f64.load offset=48
set_local $17
block $break|1
get_local $3
i32.const 1
i32.add
set_local $7
loop $repeat|1
get_local $7
get_local $13
i32.ge_u
br_if $break|1
get_local $3
i32.const 1
i32.add
set_local $7
loop $repeat|1
get_local $7
get_local $13
i32.lt_u
if
get_local $14
get_local $12
i32.load
@ -699,9 +694,7 @@
i32.add
set_local $7
br $repeat|1
unreachable
end
unreachable
end
get_local $0
get_local $4
@ -741,9 +734,7 @@
i32.add
set_local $3
br $repeat|0
unreachable
end
unreachable
end
)
(func $assembly/index/NBodySystem#energy (; 7 ;) (type $iF) (param $0 i32) (result f64)
@ -757,17 +748,16 @@
(local $8 f64)
(local $9 f64)
(local $10 f64)
block $break|0
get_local $0
i32.load
tee_local $4
i32.load offset=4
set_local $5
loop $repeat|0
get_local $2
get_local $5
i32.ge_u
br_if $break|0
get_local $0
i32.load
tee_local $4
i32.load offset=4
set_local $5
loop $repeat|0
get_local $2
get_local $5
i32.lt_u
if
get_local $4
i32.load
get_local $2
@ -810,16 +800,15 @@
f64.mul
f64.add
set_local $1
block $break|1
get_local $2
i32.const 1
i32.add
set_local $0
loop $repeat|1
get_local $0
get_local $5
i32.ge_u
br_if $break|1
get_local $2
i32.const 1
i32.add
set_local $0
loop $repeat|1
get_local $0
get_local $5
i32.lt_u
if
get_local $7
get_local $4
i32.load
@ -865,18 +854,14 @@
i32.add
set_local $0
br $repeat|1
unreachable
end
unreachable
end
get_local $2
i32.const 1
i32.add
set_local $2
br $repeat|0
unreachable
end
unreachable
end
get_local $1
)
@ -924,10 +909,10 @@
i32.shr_u
i32.lt_u
if (result i32)
get_local $1
get_local $0
i32.const 2
i32.shl
get_local $1
i32.add
i32.load offset=8
else
@ -936,7 +921,6 @@
else
i32.const 0
end
tee_local $0
)
(func $start (; 11 ;) (type $v)
i32.const 40

View File

@ -267,7 +267,7 @@
if
i32.const 0
i32.const 40
i32.const 23
i32.const 26
i32.const 2
call $~lib/env/abort
unreachable
@ -551,7 +551,7 @@
if
i32.const 0
i32.const 8
i32.const 37
i32.const 45
i32.const 39
call $~lib/env/abort
unreachable
@ -587,47 +587,56 @@
get_local $0
get_local $1
i32.store offset=4
block $~lib/memory/memory.fill|inlined.0
get_local $3
get_global $~lib/internal/arraybuffer/HEADER_SIZE
i32.add
set_local $4
i32.const 0
set_local $5
get_local $4
get_local $5
get_local $2
call $~lib/internal/memory/memset
end
get_local $3
get_global $~lib/internal/arraybuffer/HEADER_SIZE
i32.add
set_local $4
i32.const 0
set_local $5
get_local $4
get_local $5
get_local $2
call $~lib/internal/memory/memset
get_local $0
)
(func $~lib/array/Array<Body>#__unchecked_set (; 13 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32)
(local $4 i32)
get_local $0
i32.load
set_local $3
i32.const 0
set_local $4
get_local $3
get_local $1
i32.const 2
i32.shl
i32.add
get_local $4
i32.add
get_local $2
i32.store offset=8
)
(func $~lib/array/Array<Body>#__unchecked_get (; 14 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
get_local $0
i32.load
set_local $2
i32.const 0
set_local $3
get_local $2
get_local $1
i32.const 2
i32.shl
i32.add
get_local $3
i32.add
i32.load offset=8
)
(func $~lib/array/Array<Body>#__get (; 15 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
get_local $0
i32.load
set_local $2
@ -638,11 +647,15 @@
i32.shr_u
i32.lt_u
if (result i32)
i32.const 0
set_local $3
get_local $2
get_local $1
i32.const 2
i32.shl
i32.add
get_local $3
i32.add
i32.load offset=8
else
unreachable

View File

@ -13,6 +13,7 @@
"test": "node tests"
},
"devDependencies": {
"http-server": "^0.11.1"
"http-server": "^0.11.1",
"typescript": "^3.2.2"
}
}

View File

@ -45,34 +45,33 @@
(local $0 i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
loop $continue|0
get_global $assembly/pson/offset
tee_local $1
i32.const 1
i32.add
set_global $assembly/pson/offset
get_local $0
get_local $1
i32.load8_u
tee_local $3
i32.const 127
i32.and
block (result i32)
get_global $assembly/pson/offset
tee_local $0
get_local $2
tee_local $1
i32.const 1
i32.add
set_global $assembly/pson/offset
get_local $0
i32.load8_u
tee_local $2
i32.const 127
i32.and
block (result i32)
get_local $1
tee_local $0
i32.const 1
i32.add
set_local $1
get_local $0
i32.const 7
i32.mul
end
i32.shl
set_local $2
get_local $1
i32.const 7
i32.mul
end
i32.shl
i32.or
set_local $0
get_local $2
get_local $3
i32.const 128
i32.and
br_if $continue|0
@ -83,30 +82,29 @@
(local $0 i64)
(local $1 i32)
(local $2 i64)
(local $3 i64)
loop $continue|0
get_global $assembly/pson/offset
tee_local $1
i32.const 1
i32.add
set_global $assembly/pson/offset
get_local $2
tee_local $3
i64.const 1
i64.add
set_local $2
get_local $0
block (result i64)
get_global $assembly/pson/offset
tee_local $1
i32.const 1
i32.add
set_global $assembly/pson/offset
get_local $2
tee_local $0
i64.const 1
i64.add
set_local $2
get_local $1
i32.load8_u
tee_local $1
i32.const 127
i32.and
i64.extend_u/i32
get_local $0
i64.const 7
i64.mul
i64.shl
end
get_local $1
i32.load8_u
tee_local $1
i32.const 127
i32.and
i64.extend_u/i32
get_local $3
i64.const 7
i64.mul
i64.shl
i64.or
set_local $0
get_local $1
@ -138,33 +136,75 @@
block $case1|0
block (result i32)
get_global $assembly/pson/offset
tee_local $1
tee_local $0
i32.const 1
i32.add
set_global $assembly/pson/offset
get_local $1
get_local $0
i32.load8_u
tee_local $0
tee_local $1
tee_local $0
i32.const 240
i32.ne
end
if
block $tablify|0
get_local $1
i32.const 241
i32.sub
br_table $case1|0 $case2|0 $case3|0 $case4|0 $case5|0 $case6|0 $case7|0 $case8|0 $case9|0 $case10|0 $case11|0 $case12|0 $tablify|0
end
get_local $1
get_local $0
i32.const 241
i32.eq
br_if $case1|0
get_local $0
i32.const 242
i32.eq
br_if $case2|0
get_local $0
i32.const 243
i32.eq
br_if $case3|0
get_local $0
i32.const 244
i32.eq
br_if $case4|0
get_local $0
i32.const 245
i32.eq
br_if $case5|0
get_local $0
i32.const 246
i32.eq
br_if $case6|0
get_local $0
i32.const 247
i32.eq
br_if $case7|0
get_local $0
i32.const 248
i32.eq
br_if $case8|0
get_local $0
i32.const 249
i32.eq
br_if $case9|0
get_local $0
i32.const 250
i32.eq
br_if $case10|0
get_local $0
i32.const 251
i32.eq
br_if $case11|0
get_local $0
i32.const 252
i32.eq
br_if $case12|0
get_local $0
i32.const 253
i32.eq
get_local $1
get_local $0
i32.const 254
i32.eq
i32.or
br_if $case14|0
get_local $1
get_local $0
i32.const 255
i32.eq
br_if $case15|0
@ -189,16 +229,16 @@
br $break|0
end
call $assembly/pson/readVarint32
tee_local $0
tee_local $1
call $assembly/pson/onObject
loop $continue|1
block (result i32)
get_local $0
tee_local $1
get_local $1
tee_local $0
i32.const 1
i32.sub
set_local $0
get_local $1
set_local $1
get_local $0
end
if
call $assembly/pson/decodeValue
@ -209,16 +249,16 @@
br $break|0
end
call $assembly/pson/readVarint32
tee_local $0
tee_local $1
call $assembly/pson/onArray
loop $continue|2
block (result i32)
get_local $0
tee_local $1
get_local $1
tee_local $0
i32.const 1
i32.sub
set_local $0
get_local $1
set_local $1
get_local $0
end
if
call $assembly/pson/decodeValue
@ -228,11 +268,11 @@
br $break|0
end
call $assembly/pson/readVarint32
tee_local $0
tee_local $1
i32.const 1
i32.shr_u
i32.const 0
get_local $0
get_local $1
i32.const 1
i32.and
i32.sub
@ -278,12 +318,12 @@
br $break|0
end
call $assembly/pson/readVarint32
set_local $0
set_local $1
get_global $assembly/pson/offset
get_local $0
get_local $1
call $assembly/pson/onString
get_global $assembly/pson/offset
get_local $0
get_local $1
i32.add
set_global $assembly/pson/offset
br $break|0
@ -291,30 +331,30 @@
unreachable
end
call $assembly/pson/readVarint32
set_local $0
set_local $1
get_global $assembly/pson/offset
get_local $0
get_local $1
call $assembly/pson/onBinary
get_global $assembly/pson/offset
get_local $0
get_local $1
i32.add
set_global $assembly/pson/offset
br $break|0
end
get_local $0
get_local $1
i32.const 239
i32.gt_u
if
unreachable
end
get_local $0
i32.const 1
i32.shr_u
i32.const 0
get_local $0
get_local $1
i32.const 1
i32.and
i32.sub
get_local $1
i32.const 1
i32.shr_u
i32.xor
call $assembly/pson/onInteger
end