update examples

This commit is contained in:
dcode 2019-06-11 03:38:58 +02:00
parent 3f35a9209f
commit 740d54f8a2
13 changed files with 1352 additions and 1581 deletions

View File

@ -27,7 +27,7 @@
global.set $assembly/index/s
i32.const 0
local.set $0
loop $repeat|0
loop $loop|0
block $break|0
local.get $0
global.get $assembly/index/h
@ -35,7 +35,7 @@
br_if $break|0
i32.const 0
local.set $1
loop $repeat|1
loop $loop|1
block $break|1
local.get $1
global.get $assembly/index/w
@ -69,14 +69,14 @@
i32.const 1
i32.add
local.set $1
br $repeat|1
br $loop|1
end
end
local.get $0
i32.const 1
i32.add
local.set $0
br $repeat|0
br $loop|0
end
end
)
@ -97,7 +97,7 @@
i32.const 1
i32.sub
local.set $7
loop $repeat|0
loop $loop|0
block $break|0
local.get $0
global.get $assembly/index/h
@ -121,7 +121,7 @@
local.set $5
i32.const 0
local.set $1
loop $repeat|1
loop $loop|1
block $break|1
local.get $1
global.get $assembly/index/w
@ -341,20 +341,20 @@
i32.const 1
i32.add
local.set $1
br $repeat|1
br $loop|1
end
end
local.get $0
i32.const 1
i32.add
local.set $0
br $repeat|0
br $loop|0
end
end
)
(func $assembly/index/fill (; 3 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64)
(local $3 i32)
loop $repeat|0
loop $loop|0
block $break|0
local.get $3
global.get $assembly/index/w
@ -382,12 +382,12 @@
i32.const 1
i32.add
local.set $3
br $repeat|0
br $loop|0
end
end
i32.const 0
local.set $3
loop $repeat|1
loop $loop|1
block $break|1
local.get $3
global.get $assembly/index/h
@ -415,7 +415,7 @@
i32.const 1
i32.add
local.set $3
br $repeat|1
br $loop|1
end
end
)

View File

@ -34,7 +34,7 @@
block $break|0
i32.const 0
local.set $2
loop $repeat|0
loop $loop|0
local.get $2
global.get $assembly/index/h
i32.lt_s
@ -43,48 +43,45 @@
block $break|1
i32.const 0
local.set $3
loop $repeat|1
loop $loop|1
local.get $3
global.get $assembly/index/w
i32.lt_s
i32.eqz
br_if $break|1
block $assembly/index/set|inlined.0
local.get $3
local.set $6
local.get $2
local.set $5
call $~lib/bindings/Math/random
f64.const 0.1
f64.gt
if (result i32)
global.get $assembly/config/BGR_DEAD
i32.const 16777215
i32.and
else
global.get $assembly/config/BGR_ALIVE
i32.const -16777216
i32.or
end
local.set $4
global.get $assembly/index/s
local.get $5
global.get $assembly/index/w
i32.mul
i32.add
local.get $6
i32.add
i32.const 2
i32.shl
local.get $4
i32.store
local.get $3
local.set $6
local.get $2
local.set $5
call $~lib/bindings/Math/random
f64.const 0.1
f64.gt
if (result i32)
global.get $assembly/config/BGR_DEAD
i32.const 16777215
i32.and
else
global.get $assembly/config/BGR_ALIVE
i32.const -16777216
i32.or
end
local.set $4
global.get $assembly/index/s
local.get $5
global.get $assembly/index/w
i32.mul
i32.add
local.get $6
i32.add
i32.const 2
i32.shl
local.get $4
i32.store
local.get $3
i32.const 1
i32.add
local.set $3
br $repeat|1
unreachable
br $loop|1
end
unreachable
end
@ -92,8 +89,7 @@
i32.const 1
i32.add
local.set $2
br $repeat|0
unreachable
br $loop|0
end
unreachable
end
@ -127,7 +123,7 @@
block $break|0
i32.const 0
local.set $2
loop $repeat|0
loop $loop|0
local.get $2
global.get $assembly/index/h
i32.lt_s
@ -158,7 +154,7 @@
block $break|1
i32.const 0
local.set $5
loop $repeat|1
loop $loop|1
local.get $5
global.get $assembly/index/w
i32.lt_s
@ -186,156 +182,138 @@
i32.add
end
local.set $7
block $assembly/index/get|inlined.0 (result i32)
local.get $6
local.set $9
local.get $3
local.set $8
local.get $8
global.get $assembly/index/w
i32.mul
local.get $9
i32.add
i32.const 2
i32.shl
i32.load
end
local.get $6
local.set $9
local.get $3
local.set $8
local.get $8
global.get $assembly/index/w
i32.mul
local.get $9
i32.add
i32.const 2
i32.shl
i32.load
i32.const 1
i32.and
block $assembly/index/get|inlined.1 (result i32)
local.get $5
local.set $9
local.get $3
local.set $8
local.get $8
global.get $assembly/index/w
i32.mul
local.get $9
i32.add
i32.const 2
i32.shl
i32.load
end
local.get $5
local.set $9
local.get $3
local.set $8
local.get $8
global.get $assembly/index/w
i32.mul
local.get $9
i32.add
i32.const 2
i32.shl
i32.load
i32.const 1
i32.and
i32.add
block $assembly/index/get|inlined.2 (result i32)
local.get $7
local.set $9
local.get $3
local.set $8
local.get $8
global.get $assembly/index/w
i32.mul
local.get $9
i32.add
i32.const 2
i32.shl
i32.load
end
local.get $7
local.set $9
local.get $3
local.set $8
local.get $8
global.get $assembly/index/w
i32.mul
local.get $9
i32.add
i32.const 2
i32.shl
i32.load
i32.const 1
i32.and
i32.add
block $assembly/index/get|inlined.3 (result i32)
local.get $6
local.set $9
local.get $2
local.set $8
local.get $8
global.get $assembly/index/w
i32.mul
local.get $9
i32.add
i32.const 2
i32.shl
i32.load
end
local.get $6
local.set $9
local.get $2
local.set $8
local.get $8
global.get $assembly/index/w
i32.mul
local.get $9
i32.add
i32.const 2
i32.shl
i32.load
i32.const 1
i32.and
i32.add
block $assembly/index/get|inlined.4 (result i32)
local.get $7
local.set $9
local.get $2
local.set $8
local.get $8
global.get $assembly/index/w
i32.mul
local.get $9
i32.add
i32.const 2
i32.shl
i32.load
end
local.get $7
local.set $9
local.get $2
local.set $8
local.get $8
global.get $assembly/index/w
i32.mul
local.get $9
i32.add
i32.const 2
i32.shl
i32.load
i32.const 1
i32.and
i32.add
block $assembly/index/get|inlined.5 (result i32)
local.get $6
local.set $9
local.get $4
local.set $8
local.get $8
global.get $assembly/index/w
i32.mul
local.get $9
i32.add
i32.const 2
i32.shl
i32.load
end
local.get $6
local.set $9
local.get $4
local.set $8
local.get $8
global.get $assembly/index/w
i32.mul
local.get $9
i32.add
i32.const 2
i32.shl
i32.load
i32.const 1
i32.and
i32.add
block $assembly/index/get|inlined.6 (result i32)
local.get $5
local.set $9
local.get $4
local.set $8
local.get $8
global.get $assembly/index/w
i32.mul
local.get $9
i32.add
i32.const 2
i32.shl
i32.load
end
local.get $5
local.set $9
local.get $4
local.set $8
local.get $8
global.get $assembly/index/w
i32.mul
local.get $9
i32.add
i32.const 2
i32.shl
i32.load
i32.const 1
i32.and
i32.add
block $assembly/index/get|inlined.7 (result i32)
local.get $7
local.set $9
local.get $4
local.set $8
local.get $8
global.get $assembly/index/w
i32.mul
local.get $9
i32.add
i32.const 2
i32.shl
i32.load
end
local.get $7
local.set $9
local.get $4
local.set $8
local.get $8
global.get $assembly/index/w
i32.mul
local.get $9
i32.add
i32.const 2
i32.shl
i32.load
i32.const 1
i32.and
i32.add
local.set $9
block $assembly/index/get|inlined.8 (result i32)
local.get $5
local.set $10
local.get $2
local.set $8
local.get $8
global.get $assembly/index/w
i32.mul
local.get $10
i32.add
i32.const 2
i32.shl
i32.load
end
local.get $5
local.set $10
local.get $2
local.set $8
local.get $8
global.get $assembly/index/w
i32.mul
local.get $10
i32.add
i32.const 2
i32.shl
i32.load
local.set $10
local.get $10
i32.const 1
@ -366,31 +344,29 @@
i32.gt_s
select
local.set $13
block $assembly/index/set|inlined.1
local.get $12
local.set $16
local.get $11
local.set $15
local.get $13
i32.const 24
i32.shl
local.get $8
i32.const 16777215
i32.and
i32.or
local.set $14
global.get $assembly/index/s
local.get $15
global.get $assembly/index/w
i32.mul
i32.add
local.get $16
i32.add
i32.const 2
i32.shl
local.get $14
i32.store
end
local.get $12
local.set $16
local.get $11
local.set $15
local.get $13
i32.const 24
i32.shl
local.get $8
i32.const 16777215
i32.and
i32.or
local.set $14
global.get $assembly/index/s
local.get $15
global.get $assembly/index/w
i32.mul
i32.add
local.get $16
i32.add
i32.const 2
i32.shl
local.get $14
i32.store
else
local.get $5
local.set $16
@ -456,39 +432,36 @@
i32.gt_s
select
local.set $12
block $assembly/index/set|inlined.4
local.get $15
local.set $11
local.get $14
local.set $8
local.get $12
i32.const 24
i32.shl
local.get $13
i32.const 16777215
i32.and
i32.or
local.set $16
global.get $assembly/index/s
local.get $8
global.get $assembly/index/w
i32.mul
i32.add
local.get $11
i32.add
i32.const 2
i32.shl
local.get $16
i32.store
end
local.get $15
local.set $11
local.get $14
local.set $8
local.get $12
i32.const 24
i32.shl
local.get $13
i32.const 16777215
i32.and
i32.or
local.set $16
global.get $assembly/index/s
local.get $8
global.get $assembly/index/w
i32.mul
i32.add
local.get $11
i32.add
i32.const 2
i32.shl
local.get $16
i32.store
end
end
local.get $5
i32.const 1
i32.add
local.set $5
br $repeat|1
unreachable
br $loop|1
end
unreachable
end
@ -496,8 +469,7 @@
i32.const 1
i32.add
local.set $2
br $repeat|0
unreachable
br $loop|0
end
unreachable
end
@ -510,7 +482,7 @@
block $break|0
i32.const 0
local.set $3
loop $repeat|0
loop $loop|0
local.get $3
global.get $assembly/index/w
i32.lt_s
@ -544,15 +516,14 @@
i32.const 1
i32.add
local.set $3
br $repeat|0
unreachable
br $loop|0
end
unreachable
end
block $break|1
i32.const 0
local.set $3
loop $repeat|1
loop $loop|1
local.get $3
global.get $assembly/index/h
i32.lt_s
@ -586,8 +557,7 @@
i32.const 1
i32.add
local.set $3
br $repeat|1
unreachable
br $loop|1
end
unreachable
end

View File

@ -8,6 +8,6 @@ declare module ASModule {
type f32 = number;
type f64 = number;
type bool = any;
function computeLine(y: u32, width: u32, height: u32, limit: u32): void;
export function computeLine(y: u32, width: u32, height: u32, limit: u32): void;
}
export default ASModule;

View File

@ -25,7 +25,6 @@
local.tee $9
f64.const 0.625
f64.mul
local.set $4
local.get $0
f64.convert_i32_u
local.get $2
@ -46,7 +45,6 @@
local.tee $10
f64.mul
local.set $11
local.get $4
local.get $10
f64.mul
local.set $13
@ -66,7 +64,7 @@
local.get $6
f64.min
local.set $15
loop $repeat|0
loop $loop|0
block $break|0
local.get $8
local.get $1
@ -86,43 +84,43 @@
i32.const 0
local.set $7
loop $continue|1
local.get $4
local.get $4
f64.mul
local.tee $9
local.get $5
local.get $5
f64.mul
local.tee $6
f64.add
f64.const 4
f64.le
if
block $break|1
f64.const 2
local.get $4
f64.mul
local.get $5
f64.mul
local.get $11
f64.add
local.set $5
local.get $9
local.get $6
f64.sub
local.get $12
f64.add
local.set $4
local.get $7
local.get $3
i32.ge_u
br_if $break|1
local.get $7
i32.const 1
i32.add
local.set $7
br $continue|1
end
block $break|1
local.get $4
local.get $4
f64.mul
local.tee $9
local.get $5
local.get $5
f64.mul
local.tee $6
f64.add
f64.const 4
f64.le
i32.eqz
br_if $break|1
f64.const 2
local.get $4
f64.mul
local.get $5
f64.mul
local.get $11
f64.add
local.set $5
local.get $9
local.get $6
f64.sub
local.get $12
f64.add
local.set $4
local.get $7
local.get $3
i32.ge_u
br_if $break|1
local.get $7
i32.const 1
i32.add
local.set $7
br $continue|1
end
end
loop $continue|2
@ -140,7 +138,6 @@
f64.sub
local.get $12
f64.add
local.set $6
f64.const 2
local.get $4
f64.mul
@ -149,7 +146,6 @@
local.get $11
f64.add
local.set $5
local.get $6
local.set $4
local.get $7
i32.const 1
@ -203,7 +199,7 @@
i32.const 1
i32.add
local.set $8
br $repeat|0
br $loop|0
end
end
)

View File

@ -88,7 +88,7 @@
block $break|0
i32.const 0
local.set $12
loop $repeat|0
loop $loop|0
local.get $12
local.get $1
i32.lt_u
@ -120,34 +120,35 @@
f64.add
f64.const 4
f64.le
i32.eqz
br_if $break|1
f64.const 2
local.get $14
f64.mul
local.get $15
f64.mul
local.get $7
f64.add
local.set $15
local.get $16
local.get $17
f64.sub
local.get $13
f64.add
local.set $14
local.get $18
local.get $3
i32.ge_u
if
f64.const 2
local.get $14
f64.mul
local.get $15
f64.mul
local.get $7
f64.add
local.set $15
local.get $16
local.get $17
f64.sub
local.get $13
f64.add
local.set $14
local.get $18
local.get $3
i32.ge_u
if
br $break|1
end
local.get $18
i32.const 1
i32.add
local.set $18
br $continue|1
br $break|1
end
local.get $18
i32.const 1
i32.add
local.set $18
br $continue|1
end
unreachable
end
block $break|2
loop $continue|2
@ -155,34 +156,35 @@
f64.convert_i32_u
local.get $11
f64.lt
if
local.get $14
local.get $14
f64.mul
local.get $15
local.get $15
f64.mul
f64.sub
local.get $13
f64.add
local.set $19
f64.const 2
local.get $14
f64.mul
local.get $15
f64.mul
local.get $7
f64.add
local.set $15
local.get $19
local.set $14
local.get $18
i32.const 1
i32.add
local.set $18
br $continue|2
end
i32.eqz
br_if $break|2
local.get $14
local.get $14
f64.mul
local.get $15
local.get $15
f64.mul
f64.sub
local.get $13
f64.add
local.set $19
f64.const 2
local.get $14
f64.mul
local.get $15
f64.mul
local.get $7
f64.add
local.set $15
local.get $19
local.set $14
local.get $18
i32.const 1
i32.add
local.set $18
br $continue|2
end
unreachable
end
global.get $assembly/index/NUM_COLORS
i32.const 1
@ -210,26 +212,24 @@
i32.const 1
i32.sub
f64.convert_i32_s
block $assembly/index/clamp<f64>|inlined.0 (result f64)
local.get $18
i32.const 1
i32.add
f64.convert_i32_u
local.get $21
f64.sub
local.get $10
f64.mul
local.set $24
f64.const 0
local.set $23
f64.const 1
local.set $22
local.get $24
local.get $23
f64.max
local.get $22
f64.min
end
local.get $18
i32.const 1
i32.add
f64.convert_i32_u
local.get $21
f64.sub
local.get $10
f64.mul
local.set $24
f64.const 0
local.set $23
f64.const 1
local.set $22
local.get $24
local.get $23
f64.max
local.get $22
f64.min
f64.mul
i32.trunc_f64_u
local.set $20
@ -245,8 +245,7 @@
i32.const 1
i32.add
local.set $12
br $repeat|0
unreachable
br $loop|0
end
unreachable
end

View File

@ -50,7 +50,7 @@ function asmFunc(global, env, buffer) {
function assembly_index_NBodySystem_constructor($0) {
var $1 = 0, $2 = 0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0;
$7 = HEAP32[($0 + 12 | 0) >> 2];
repeat_0 : while (1) {
loop_0 : while (1) {
if (($1 | 0) < ($7 | 0)) {
$2 = HEAP32[(HEAP32[($0 + 4 | 0) >> 2] + ($1 << 2 | 0) | 0) >> 2];
$3 = HEAPF64[($2 + 48 | 0) >> 3];
@ -58,9 +58,9 @@ function asmFunc(global, env, buffer) {
$5 = $5 + HEAPF64[($2 + 32 | 0) >> 3] * $3;
$6 = $6 + HEAPF64[($2 + 40 | 0) >> 3] * $3;
$1 = $1 + 1 | 0;
continue repeat_0;
continue loop_0;
}
break repeat_0;
break loop_0;
};
$1 = HEAP32[HEAP32[($0 + 4 | 0) >> 2] >> 2];
HEAPF64[($1 + 24 | 0) >> 3] = -$4 / 39.47841760435743;
@ -111,7 +111,7 @@ function asmFunc(global, env, buffer) {
var $1 = 0, $2 = 0.0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0, $9 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0;
$12 = HEAP32[$0 >> 2];
$13 = HEAP32[($12 + 12 | 0) >> 2];
repeat_0 : while (1) {
loop_0 : while (1) {
if ($4 >>> 0 < $13 >>> 0) {
$0 = HEAP32[(HEAP32[($12 + 4 | 0) >> 2] + ($4 << 2 | 0) | 0) >> 2];
$14 = HEAPF64[$0 >> 3];
@ -122,7 +122,7 @@ function asmFunc(global, env, buffer) {
$7 = HEAPF64[($0 + 40 | 0) >> 3];
$17 = HEAPF64[($0 + 48 | 0) >> 3];
$8 = $4 + 1 | 0;
repeat_1 : while (1) {
loop_1 : while (1) {
if ($8 >>> 0 < $13 >>> 0) {
$1 = HEAP32[(HEAP32[($12 + 4 | 0) >> 2] + ($8 << 2 | 0) | 0) >> 2];
$2 = $14 - HEAPF64[$1 >> 3];
@ -141,9 +141,9 @@ function asmFunc(global, env, buffer) {
HEAPF64[($1 + 32 | 0) >> 3] = HEAPF64[($1 + 32 | 0) >> 3] + $9 * $2;
HEAPF64[($1 + 40 | 0) >> 3] = HEAPF64[($1 + 40 | 0) >> 3] + $10 * $2;
$8 = $8 + 1 | 0;
continue repeat_1;
continue loop_1;
}
break repeat_1;
break loop_1;
};
HEAPF64[($0 + 24 | 0) >> 3] = $5;
HEAPF64[($0 + 32 | 0) >> 3] = $6;
@ -152,9 +152,9 @@ function asmFunc(global, env, buffer) {
HEAPF64[($0 + 8 | 0) >> 3] = HEAPF64[($0 + 8 | 0) >> 3] + .01 * $6;
HEAPF64[($0 + 16 | 0) >> 3] = HEAPF64[($0 + 16 | 0) >> 3] + .01 * $7;
$4 = $4 + 1 | 0;
continue repeat_0;
continue loop_0;
}
break repeat_0;
break loop_0;
};
}
@ -162,7 +162,7 @@ function asmFunc(global, env, buffer) {
var $1 = 0.0, $2 = 0.0, $3 = 0, $4 = 0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, $10 = 0.0, $11 = 0.0;
$5 = HEAP32[$0 >> 2];
$7 = HEAP32[($5 + 12 | 0) >> 2];
repeat_0 : while (1) {
loop_0 : while (1) {
if ($3 >>> 0 < $7 >>> 0) {
$0 = HEAP32[(HEAP32[($5 + 4 | 0) >> 2] + ($3 << 2 | 0) | 0) >> 2];
$9 = HEAPF64[$0 >> 3];
@ -177,7 +177,7 @@ function asmFunc(global, env, buffer) {
$1 = HEAPF64[($0 + 40 | 0) >> 3];
$1 = $6 + .5 * $8 * ($2 + $1 * $1);
$0 = $3 + 1 | 0;
repeat_1 : while (1) {
loop_1 : while (1) {
if ($0 >>> 0 < $7 >>> 0) {
$4 = HEAP32[(HEAP32[($5 + 4 | 0) >> 2] + ($0 << 2 | 0) | 0) >> 2];
$6 = $1;
@ -188,14 +188,14 @@ function asmFunc(global, env, buffer) {
$1 = $11 - HEAPF64[($4 + 16 | 0) >> 3];
$1 = $6 - $8 * HEAPF64[($4 + 48 | 0) >> 3] / Math_sqrt($2 + $1 * $1);
$0 = $0 + 1 | 0;
continue repeat_1;
continue loop_1;
}
break repeat_1;
break loop_1;
};
$3 = $3 + 1 | 0;
continue repeat_0;
continue loop_0;
}
break repeat_0;
break loop_0;
};
return $1;
}
@ -208,13 +208,13 @@ function asmFunc(global, env, buffer) {
function assembly_index_bench($0) {
$0 = $0 | 0;
var $1 = 0;
repeat_0 : while (1) {
loop_0 : while (1) {
if (!($1 >>> 0 >= $0 >>> 0)) {
assembly_index_NBodySystem_advance(assembly_index_system);
$1 = $1 + 1 | 0;
continue repeat_0;
continue loop_0;
}
break repeat_0;
break loop_0;
};
}

View File

@ -102,7 +102,7 @@
local.get $0
i32.load offset=12
local.set $7
loop $repeat|0
loop $loop|0
local.get $1
local.get $7
i32.lt_s
@ -142,7 +142,7 @@
i32.const 1
i32.add
local.set $1
br $repeat|0
br $loop|0
end
end
local.get $0
@ -308,7 +308,7 @@
local.tee $12
i32.load offset=12
local.set $13
loop $repeat|0
loop $loop|0
local.get $3
local.get $13
i32.lt_u
@ -345,7 +345,7 @@
i32.const 1
i32.add
local.set $7
loop $repeat|1
loop $loop|1
local.get $7
local.get $13
i32.lt_u
@ -441,7 +441,7 @@
i32.const 1
i32.add
local.set $7
br $repeat|1
br $loop|1
end
end
local.get $0
@ -481,7 +481,7 @@
i32.const 1
i32.add
local.set $3
br $repeat|0
br $loop|0
end
end
)
@ -501,7 +501,7 @@
local.tee $4
i32.load offset=12
local.set $5
loop $repeat|0
loop $loop|0
local.get $2
local.get $5
i32.lt_u
@ -552,7 +552,7 @@
i32.const 1
i32.add
local.set $0
loop $repeat|1
loop $loop|1
local.get $0
local.get $5
i32.lt_u
@ -601,14 +601,14 @@
i32.const 1
i32.add
local.set $0
br $repeat|1
br $loop|1
end
end
local.get $2
i32.const 1
i32.add
local.set $2
br $repeat|0
br $loop|0
end
end
local.get $1
@ -622,7 +622,7 @@
(func $assembly/index/bench (; 8 ;) (type $FUNCSIG$vi) (param $0 i32)
(local $1 i32)
block $break|0
loop $repeat|0
loop $loop|0
local.get $1
local.get $0
i32.ge_u
@ -633,8 +633,7 @@
i32.const 1
i32.add
local.set $1
br $repeat|0
unreachable
br $loop|0
end
unreachable
end

File diff suppressed because it is too large Load Diff

View File

@ -8,36 +8,36 @@ declare module ASModule {
type f32 = number;
type f64 = number;
type bool = any;
function getLo(): u32;
function getHi(): u32;
function clz(loLeft: u32, hiLeft: u32): void;
function ctz(loLeft: u32, hiLeft: u32): void;
function popcnt(loLeft: u32, hiLeft: u32): void;
function eqz(loLeft: u32, hiLeft: u32): void;
function add(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
function sub(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
function mul(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
function div_s(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
function div_u(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
function rem_s(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
function rem_u(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
function and(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
function or(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
function xor(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
function shl(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
function shr_s(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
function shr_u(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
function rotl(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
function rotr(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
function eq(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
function ne(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
function lt_s(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
function lt_u(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
function le_s(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
function le_u(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
function gt_s(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
function gt_u(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
function ge_s(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
function ge_u(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
export function getLo(): u32;
export function getHi(): u32;
export function clz(loLeft: u32, hiLeft: u32): void;
export function ctz(loLeft: u32, hiLeft: u32): void;
export function popcnt(loLeft: u32, hiLeft: u32): void;
export function eqz(loLeft: u32, hiLeft: u32): void;
export function add(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
export function sub(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
export function mul(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
export function div_s(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
export function div_u(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
export function rem_s(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
export function rem_u(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
export function and(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
export function or(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
export function xor(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
export function shl(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
export function shr_s(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
export function shr_u(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
export function rotl(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
export function rotr(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
export function eq(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
export function ne(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
export function lt_s(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
export function lt_u(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
export function le_s(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
export function le_u(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
export function gt_s(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
export function gt_u(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
export function ge_s(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
export function ge_u(loLeft: u32, hiLeft: u32, loRight: u32, hiRight: u32): void;
}
export default ASModule;

View File

@ -2174,10 +2174,8 @@
i64.lt_u
if
local.get $4
local.set $11
local.get $2
local.set $4
local.get $11
local.set $2
end
local.get $4

View File

@ -2382,10 +2382,8 @@
i32.lt_u
if
local.get $3
local.set $6
local.get $2
local.set $3
local.get $6
local.set $2
end
local.get $3

View File

@ -236,12 +236,10 @@
global.get $assembly/index/off
local.tee $1
i32.load8_u
local.set $0
local.get $1
i32.const 1
i32.add
global.set $assembly/index/off
local.get $0
i32.const 11
i32.ne
if
@ -267,12 +265,10 @@
global.get $assembly/index/off
local.tee $0
i32.load
local.set $2
local.get $0
i32.const 4
i32.add
global.set $assembly/index/off
local.get $2
i32.const 1836278016
i32.ne
if
@ -281,12 +277,10 @@
global.get $assembly/index/off
local.tee $0
i32.load
local.set $2
local.get $0
i32.const 4
i32.add
global.set $assembly/index/off
local.get $2
i32.const 1
i32.ne
if
@ -368,7 +362,7 @@
local.set $4
i32.const 0
local.set $2
loop $repeat|2
loop $loop|2
local.get $2
local.get $4
i32.lt_u
@ -383,7 +377,7 @@
local.set $5
i32.const 0
local.set $3
loop $repeat|3
loop $loop|3
local.get $3
local.get $5
i32.lt_u
@ -399,14 +393,14 @@
i32.const 1
i32.add
local.set $3
br $repeat|3
br $loop|3
end
end
call $assembly/index/readVaruint
local.set $5
i32.const 0
local.set $3
loop $repeat|4
loop $loop|4
local.get $3
local.get $5
i32.lt_u
@ -422,14 +416,14 @@
i32.const 1
i32.add
local.set $3
br $repeat|4
br $loop|4
end
end
local.get $2
i32.const 1
i32.add
local.set $2
br $repeat|2
br $loop|2
end
end
br $break|1
@ -438,7 +432,7 @@
local.set $7
i32.const 0
local.set $4
loop $repeat|5
loop $loop|5
local.get $4
local.get $7
i32.lt_u
@ -560,7 +554,7 @@
i32.const 1
i32.add
local.set $4
br $repeat|5
br $loop|5
end
end
br $break|1
@ -569,7 +563,7 @@
local.set $4
i32.const 0
local.set $3
loop $repeat|7
loop $loop|7
local.get $3
local.get $4
i32.lt_u
@ -586,7 +580,7 @@
i32.const 1
i32.add
local.set $3
br $repeat|7
br $loop|7
end
end
br $break|1
@ -595,7 +589,7 @@
local.set $7
i32.const 0
local.set $4
loop $repeat|8
loop $loop|8
local.get $4
local.get $7
i32.lt_u
@ -628,7 +622,7 @@
i32.const 1
i32.add
local.set $4
br $repeat|8
br $loop|8
end
end
br $break|1
@ -637,7 +631,7 @@
local.set $6
i32.const 0
local.set $3
loop $repeat|9
loop $loop|9
local.get $3
local.get $6
i32.lt_u
@ -665,7 +659,7 @@
i32.const 1
i32.add
local.set $3
br $repeat|9
br $loop|9
end
end
br $break|1
@ -674,7 +668,7 @@
local.set $4
i32.const 0
local.set $3
loop $repeat|10
loop $loop|10
local.get $3
local.get $4
i32.lt_u
@ -700,7 +694,7 @@
i32.const 1
i32.add
local.set $3
br $repeat|10
br $loop|10
end
end
br $break|1
@ -709,7 +703,7 @@
local.set $3
i32.const 0
local.set $2
loop $repeat|11
loop $loop|11
local.get $2
local.get $3
i32.lt_u
@ -738,7 +732,7 @@
i32.const 1
i32.add
local.set $2
br $repeat|11
br $loop|11
end
end
br $break|1
@ -762,9 +756,7 @@
call $assembly/index/readVaruint
local.set $2
call $assembly/index/readVaruint
local.set $4
global.get $assembly/index/off
local.set $5
block $break|12
block $case3|12
block $case2|12
@ -792,20 +784,18 @@
local.set $2
i32.const 0
local.set $3
loop $repeat|13
loop $loop|13
local.get $3
local.get $2
i32.lt_u
if
call $assembly/index/readVaruint
local.set $6
call $assembly/index/readVaruint
local.tee $7
global.get $assembly/index/off
local.tee $8
i32.add
global.set $assembly/index/off
local.get $6
local.get $8
local.get $7
call $assembly/options/onFunctionName
@ -813,7 +803,7 @@
i32.const 1
i32.add
local.set $3
br $repeat|13
br $loop|13
end
end
br $break|12
@ -822,7 +812,7 @@
local.set $6
i32.const 0
local.set $2
loop $repeat|14
loop $loop|14
local.get $2
local.get $6
i32.lt_u
@ -833,7 +823,7 @@
local.set $8
i32.const 0
local.set $3
loop $repeat|15
loop $loop|15
local.get $3
local.get $8
i32.lt_u
@ -855,22 +845,20 @@
i32.const 1
i32.add
local.set $3
br $repeat|15
br $loop|15
end
end
local.get $2
i32.const 1
i32.add
local.set $2
br $repeat|14
br $loop|14
end
end
br $break|12
end
unreachable
end
local.get $4
local.get $5
i32.add
global.set $assembly/index/off
br $break|1