mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-12 14:31:28 +00:00
Update Binaryen and other dependencies; Update dist files
This commit is contained in:
@ -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.
@ -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
|
||||
|
@ -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
|
||||
|
@ -13,6 +13,7 @@
|
||||
"test": "node tests"
|
||||
},
|
||||
"devDependencies": {
|
||||
"http-server": "^0.11.1"
|
||||
"http-server": "^0.11.1",
|
||||
"typescript": "^3.2.2"
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user