Skip to content

Commit 28e32f9

Browse files
committed
minor refactoring again [skip ci]
1 parent bd35926 commit 28e32f9

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

src/glue/binaryen.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -917,28 +917,28 @@ export const {
917917
// parameters (built with -sWASM_BIGINT). In portable/JS mode AssemblyScript
918918
// represents i64 as Long, so we convert between Long and BigInt here.
919919

920-
function toBigInt(value) {
921-
return (BigInt(value.high | 0) << 32n) | BigInt(value.low >>> 0);
920+
function toBigInt(long) {
921+
return (BigInt(long.high | 0) << 32n) | BigInt(long.low >>> 0);
922922
}
923923

924-
function toLong(value) {
925-
return Long.fromBits(Number(value & 0xFFFFFFFFn) | 0, Number(value >> 32n) | 0);
924+
function toLong(bign) {
925+
return Long.fromBits(Number(bign & 0xFFFFFFFFn) | 0, Number(bign >> 32n) | 0);
926926
}
927927

928-
export function _BinaryenLiteralInt64(literalOut, value) {
929-
return binaryen._BinaryenLiteralInt64(literalOut, toBigInt(value));
928+
export function _BinaryenLiteralInt64(lit, val) {
929+
return binaryen._BinaryenLiteralInt64(lit, toBigInt(val));
930930
}
931931

932-
export function _BinaryenLiteralFloat64Bits(literalOut, value) {
933-
return binaryen._BinaryenLiteralFloat64Bits(literalOut, toBigInt(value));
932+
export function _BinaryenLiteralFloat64Bits(lit, val) {
933+
return binaryen._BinaryenLiteralFloat64Bits(lit, toBigInt(val));
934934
}
935935

936936
export function _BinaryenConstGetValueI64(expr) {
937937
return toLong(binaryen._BinaryenConstGetValueI64(expr));
938938
}
939939

940-
export function _BinaryenConstSetValueI64(expr, value) {
941-
binaryen._BinaryenConstSetValueI64(expr, toBigInt(value));
940+
export function _BinaryenConstSetValueI64(expr, val) {
941+
binaryen._BinaryenConstSetValueI64(expr, toBigInt(val));
942942
}
943943

944944
export default binaryen;

0 commit comments

Comments
 (0)