mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-04-25 07:02:13 +00:00
Rework inlining logic (#463)
This commit is contained in:
parent
01cade13f9
commit
831054dfd3
130
src/builtins.ts
130
src/builtins.ts
@ -154,7 +154,7 @@ export function compileCall(
|
|||||||
}
|
}
|
||||||
let element = compiler.resolver.resolveExpression(
|
let element = compiler.resolver.resolveExpression(
|
||||||
operands[0],
|
operands[0],
|
||||||
compiler.currentFunction,
|
compiler.currentFlow,
|
||||||
Type.void,
|
Type.void,
|
||||||
ReportMode.SWALLOW
|
ReportMode.SWALLOW
|
||||||
);
|
);
|
||||||
@ -639,11 +639,11 @@ export function compileCall(
|
|||||||
case TypeKind.I8:
|
case TypeKind.I8:
|
||||||
case TypeKind.I16:
|
case TypeKind.I16:
|
||||||
case TypeKind.I32: {
|
case TypeKind.I32: {
|
||||||
let currentFunction = compiler.currentFunction;
|
let flow = compiler.currentFlow;
|
||||||
|
|
||||||
// possibly overflows, e.g. abs<i8>(-128) == 128
|
// possibly overflows, e.g. abs<i8>(-128) == 128
|
||||||
let tempLocal1 = currentFunction.getTempLocal(Type.i32, false);
|
let tempLocal1 = flow.getTempLocal(Type.i32, false);
|
||||||
let tempLocalIndex2 = currentFunction.getAndFreeTempLocal(Type.i32, false).index;
|
let tempLocalIndex2 = flow.getAndFreeTempLocal(Type.i32, false).index;
|
||||||
let tempLocalIndex1 = tempLocal1.index;
|
let tempLocalIndex1 = tempLocal1.index;
|
||||||
|
|
||||||
// (x + (x >> 31)) ^ (x >> 31)
|
// (x + (x >> 31)) ^ (x >> 31)
|
||||||
@ -661,16 +661,16 @@ export function compileCall(
|
|||||||
module.createGetLocal(tempLocalIndex2, NativeType.I32)
|
module.createGetLocal(tempLocalIndex2, NativeType.I32)
|
||||||
);
|
);
|
||||||
|
|
||||||
currentFunction.freeTempLocal(tempLocal1);
|
flow.freeTempLocal(tempLocal1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TypeKind.ISIZE: {
|
case TypeKind.ISIZE: {
|
||||||
let options = compiler.options;
|
let options = compiler.options;
|
||||||
let currentFunction = compiler.currentFunction;
|
let flow = compiler.currentFlow;
|
||||||
let wasm64 = options.isWasm64;
|
let wasm64 = options.isWasm64;
|
||||||
|
|
||||||
let tempLocal1 = currentFunction.getTempLocal(options.usizeType, false);
|
let tempLocal1 = flow.getTempLocal(options.usizeType, false);
|
||||||
let tempLocalIndex2 = currentFunction.getAndFreeTempLocal(options.usizeType, false).index;
|
let tempLocalIndex2 = flow.getAndFreeTempLocal(options.usizeType, false).index;
|
||||||
let tempLocalIndex1 = tempLocal1.index;
|
let tempLocalIndex1 = tempLocal1.index;
|
||||||
|
|
||||||
ret = module.createBinary(wasm64 ? BinaryOp.XorI64 : BinaryOp.XorI32,
|
ret = module.createBinary(wasm64 ? BinaryOp.XorI64 : BinaryOp.XorI32,
|
||||||
@ -687,14 +687,14 @@ export function compileCall(
|
|||||||
module.createGetLocal(tempLocalIndex2, options.nativeSizeType)
|
module.createGetLocal(tempLocalIndex2, options.nativeSizeType)
|
||||||
);
|
);
|
||||||
|
|
||||||
currentFunction.freeTempLocal(tempLocal1);
|
flow.freeTempLocal(tempLocal1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TypeKind.I64: {
|
case TypeKind.I64: {
|
||||||
let currentFunction = compiler.currentFunction;
|
let flow = compiler.currentFlow;
|
||||||
|
|
||||||
let tempLocal1 = currentFunction.getTempLocal(Type.i64, false);
|
let tempLocal1 = flow.getTempLocal(Type.i64, false);
|
||||||
let tempLocalIndex2 = currentFunction.getAndFreeTempLocal(Type.i64, false).index;
|
let tempLocalIndex2 = flow.getAndFreeTempLocal(Type.i64, false).index;
|
||||||
let tempLocalIndex1 = tempLocal1.index;
|
let tempLocalIndex1 = tempLocal1.index;
|
||||||
|
|
||||||
// (x + (x >> 63)) ^ (x >> 63)
|
// (x + (x >> 63)) ^ (x >> 63)
|
||||||
@ -712,7 +712,7 @@ export function compileCall(
|
|||||||
module.createGetLocal(tempLocalIndex2, NativeType.I64)
|
module.createGetLocal(tempLocalIndex2, NativeType.I64)
|
||||||
);
|
);
|
||||||
|
|
||||||
currentFunction.freeTempLocal(tempLocal1);
|
flow.freeTempLocal(tempLocal1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TypeKind.USIZE: {
|
case TypeKind.USIZE: {
|
||||||
@ -792,16 +792,16 @@ export function compileCall(
|
|||||||
case TypeKind.I8:
|
case TypeKind.I8:
|
||||||
case TypeKind.I16:
|
case TypeKind.I16:
|
||||||
case TypeKind.I32: {
|
case TypeKind.I32: {
|
||||||
let flow = compiler.currentFunction.flow;
|
let flow = compiler.currentFlow;
|
||||||
let tempLocal0 = compiler.currentFunction.getTempLocal(
|
let tempLocal0 = flow.getTempLocal(
|
||||||
compiler.currentType,
|
compiler.currentType,
|
||||||
!flow.canOverflow(arg0, compiler.currentType)
|
!flow.canOverflow(arg0, compiler.currentType)
|
||||||
);
|
);
|
||||||
let tempLocal1 = compiler.currentFunction.getAndFreeTempLocal(
|
let tempLocal1 = flow.getAndFreeTempLocal(
|
||||||
compiler.currentType,
|
compiler.currentType,
|
||||||
!flow.canOverflow(arg1, compiler.currentType)
|
!flow.canOverflow(arg1, compiler.currentType)
|
||||||
);
|
);
|
||||||
compiler.currentFunction.freeTempLocal(tempLocal0);
|
flow.freeTempLocal(tempLocal0);
|
||||||
ret = module.createSelect(
|
ret = module.createSelect(
|
||||||
module.createTeeLocal(tempLocal0.index, arg0),
|
module.createTeeLocal(tempLocal0.index, arg0),
|
||||||
module.createTeeLocal(tempLocal1.index, arg1),
|
module.createTeeLocal(tempLocal1.index, arg1),
|
||||||
@ -816,16 +816,16 @@ export function compileCall(
|
|||||||
case TypeKind.U16:
|
case TypeKind.U16:
|
||||||
case TypeKind.U32:
|
case TypeKind.U32:
|
||||||
case TypeKind.BOOL: {
|
case TypeKind.BOOL: {
|
||||||
let flow = compiler.currentFunction.flow;
|
let flow = compiler.currentFlow;
|
||||||
let tempLocal0 = compiler.currentFunction.getTempLocal(
|
let tempLocal0 = flow.getTempLocal(
|
||||||
compiler.currentType,
|
compiler.currentType,
|
||||||
!flow.canOverflow(arg0, compiler.currentType)
|
!flow.canOverflow(arg0, compiler.currentType)
|
||||||
);
|
);
|
||||||
let tempLocal1 = compiler.currentFunction.getAndFreeTempLocal(
|
let tempLocal1 = flow.getAndFreeTempLocal(
|
||||||
compiler.currentType,
|
compiler.currentType,
|
||||||
!flow.canOverflow(arg1, compiler.currentType)
|
!flow.canOverflow(arg1, compiler.currentType)
|
||||||
);
|
);
|
||||||
compiler.currentFunction.freeTempLocal(tempLocal0);
|
flow.freeTempLocal(tempLocal0);
|
||||||
ret = module.createSelect(
|
ret = module.createSelect(
|
||||||
module.createTeeLocal(tempLocal0.index, arg0),
|
module.createTeeLocal(tempLocal0.index, arg0),
|
||||||
module.createTeeLocal(tempLocal1.index, arg1),
|
module.createTeeLocal(tempLocal1.index, arg1),
|
||||||
@ -837,9 +837,10 @@ export function compileCall(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TypeKind.I64: {
|
case TypeKind.I64: {
|
||||||
let tempLocal0 = compiler.currentFunction.getTempLocal(Type.i64, false);
|
let flow = compiler.currentFlow;
|
||||||
let tempLocal1 = compiler.currentFunction.getAndFreeTempLocal(Type.i64, false);
|
let tempLocal0 = flow.getTempLocal(Type.i64, false);
|
||||||
compiler.currentFunction.freeTempLocal(tempLocal0);
|
let tempLocal1 = flow.getAndFreeTempLocal(Type.i64, false);
|
||||||
|
flow.freeTempLocal(tempLocal0);
|
||||||
ret = module.createSelect(
|
ret = module.createSelect(
|
||||||
module.createTeeLocal(tempLocal0.index, arg0),
|
module.createTeeLocal(tempLocal0.index, arg0),
|
||||||
module.createTeeLocal(tempLocal1.index, arg1),
|
module.createTeeLocal(tempLocal1.index, arg1),
|
||||||
@ -851,9 +852,10 @@ export function compileCall(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TypeKind.U64: {
|
case TypeKind.U64: {
|
||||||
let tempLocal0 = compiler.currentFunction.getTempLocal(Type.i64, false);
|
let flow = compiler.currentFlow;
|
||||||
let tempLocal1 = compiler.currentFunction.getAndFreeTempLocal(Type.i64, false);
|
let tempLocal0 = flow.getTempLocal(Type.i64, false);
|
||||||
compiler.currentFunction.freeTempLocal(tempLocal0);
|
let tempLocal1 = flow.getAndFreeTempLocal(Type.i64, false);
|
||||||
|
flow.freeTempLocal(tempLocal0);
|
||||||
ret = module.createSelect(
|
ret = module.createSelect(
|
||||||
module.createTeeLocal(tempLocal0.index, arg0),
|
module.createTeeLocal(tempLocal0.index, arg0),
|
||||||
module.createTeeLocal(tempLocal1.index, arg1),
|
module.createTeeLocal(tempLocal1.index, arg1),
|
||||||
@ -865,9 +867,10 @@ export function compileCall(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TypeKind.ISIZE: {
|
case TypeKind.ISIZE: {
|
||||||
let tempLocal0 = compiler.currentFunction.getTempLocal(compiler.options.usizeType, false);
|
let flow = compiler.currentFlow;
|
||||||
let tempLocal1 = compiler.currentFunction.getAndFreeTempLocal(compiler.options.usizeType, false);
|
let tempLocal0 = flow.getTempLocal(compiler.options.usizeType, false);
|
||||||
compiler.currentFunction.freeTempLocal(tempLocal0);
|
let tempLocal1 = flow.getAndFreeTempLocal(compiler.options.usizeType, false);
|
||||||
|
flow.freeTempLocal(tempLocal0);
|
||||||
ret = module.createSelect(
|
ret = module.createSelect(
|
||||||
module.createTeeLocal(tempLocal0.index, arg0),
|
module.createTeeLocal(tempLocal0.index, arg0),
|
||||||
module.createTeeLocal(tempLocal1.index, arg1),
|
module.createTeeLocal(tempLocal1.index, arg1),
|
||||||
@ -890,9 +893,10 @@ export function compileCall(
|
|||||||
ret = module.createUnreachable();
|
ret = module.createUnreachable();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
let tempLocal0 = compiler.currentFunction.getTempLocal(compiler.options.usizeType, false);
|
let flow = compiler.currentFlow;
|
||||||
let tempLocal1 = compiler.currentFunction.getAndFreeTempLocal(compiler.options.usizeType, false);
|
let tempLocal0 = flow.getTempLocal(compiler.options.usizeType, false);
|
||||||
compiler.currentFunction.freeTempLocal(tempLocal0);
|
let tempLocal1 = flow.getAndFreeTempLocal(compiler.options.usizeType, false);
|
||||||
|
flow.freeTempLocal(tempLocal0);
|
||||||
ret = module.createSelect(
|
ret = module.createSelect(
|
||||||
module.createTeeLocal(tempLocal0.index, arg0),
|
module.createTeeLocal(tempLocal0.index, arg0),
|
||||||
module.createTeeLocal(tempLocal1.index, arg1),
|
module.createTeeLocal(tempLocal1.index, arg1),
|
||||||
@ -960,16 +964,16 @@ export function compileCall(
|
|||||||
case TypeKind.I8:
|
case TypeKind.I8:
|
||||||
case TypeKind.I16:
|
case TypeKind.I16:
|
||||||
case TypeKind.I32: {
|
case TypeKind.I32: {
|
||||||
let flow = compiler.currentFunction.flow;
|
let flow = compiler.currentFlow;
|
||||||
let tempLocal0 = compiler.currentFunction.getTempLocal(
|
let tempLocal0 = flow.getTempLocal(
|
||||||
compiler.currentType,
|
compiler.currentType,
|
||||||
!flow.canOverflow(arg0, compiler.currentType)
|
!flow.canOverflow(arg0, compiler.currentType)
|
||||||
);
|
);
|
||||||
let tempLocal1 = compiler.currentFunction.getAndFreeTempLocal(
|
let tempLocal1 = flow.getAndFreeTempLocal(
|
||||||
compiler.currentType,
|
compiler.currentType,
|
||||||
!flow.canOverflow(arg1, compiler.currentType)
|
!flow.canOverflow(arg1, compiler.currentType)
|
||||||
);
|
);
|
||||||
compiler.currentFunction.freeTempLocal(tempLocal0);
|
flow.freeTempLocal(tempLocal0);
|
||||||
ret = module.createSelect(
|
ret = module.createSelect(
|
||||||
module.createTeeLocal(tempLocal0.index, arg0),
|
module.createTeeLocal(tempLocal0.index, arg0),
|
||||||
module.createTeeLocal(tempLocal1.index, arg1),
|
module.createTeeLocal(tempLocal1.index, arg1),
|
||||||
@ -984,16 +988,16 @@ export function compileCall(
|
|||||||
case TypeKind.U16:
|
case TypeKind.U16:
|
||||||
case TypeKind.U32:
|
case TypeKind.U32:
|
||||||
case TypeKind.BOOL: {
|
case TypeKind.BOOL: {
|
||||||
let flow = compiler.currentFunction.flow;
|
let flow = compiler.currentFlow;
|
||||||
let tempLocal0 = compiler.currentFunction.getTempLocal(
|
let tempLocal0 = flow.getTempLocal(
|
||||||
compiler.currentType,
|
compiler.currentType,
|
||||||
!flow.canOverflow(arg0, compiler.currentType)
|
!flow.canOverflow(arg0, compiler.currentType)
|
||||||
);
|
);
|
||||||
let tempLocal1 = compiler.currentFunction.getAndFreeTempLocal(
|
let tempLocal1 = flow.getAndFreeTempLocal(
|
||||||
compiler.currentType,
|
compiler.currentType,
|
||||||
!flow.canOverflow(arg1, compiler.currentType)
|
!flow.canOverflow(arg1, compiler.currentType)
|
||||||
);
|
);
|
||||||
compiler.currentFunction.freeTempLocal(tempLocal0);
|
flow.freeTempLocal(tempLocal0);
|
||||||
ret = module.createSelect(
|
ret = module.createSelect(
|
||||||
module.createTeeLocal(tempLocal0.index, arg0),
|
module.createTeeLocal(tempLocal0.index, arg0),
|
||||||
module.createTeeLocal(tempLocal1.index, arg1),
|
module.createTeeLocal(tempLocal1.index, arg1),
|
||||||
@ -1005,9 +1009,10 @@ export function compileCall(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TypeKind.I64: {
|
case TypeKind.I64: {
|
||||||
let tempLocal0 = compiler.currentFunction.getTempLocal(Type.i64, false);
|
let flow = compiler.currentFlow;
|
||||||
let tempLocal1 = compiler.currentFunction.getAndFreeTempLocal(Type.i64, false);
|
let tempLocal0 = flow.getTempLocal(Type.i64, false);
|
||||||
compiler.currentFunction.freeTempLocal(tempLocal0);
|
let tempLocal1 = flow.getAndFreeTempLocal(Type.i64, false);
|
||||||
|
flow.freeTempLocal(tempLocal0);
|
||||||
ret = module.createSelect(
|
ret = module.createSelect(
|
||||||
module.createTeeLocal(tempLocal0.index, arg0),
|
module.createTeeLocal(tempLocal0.index, arg0),
|
||||||
module.createTeeLocal(tempLocal1.index, arg1),
|
module.createTeeLocal(tempLocal1.index, arg1),
|
||||||
@ -1019,9 +1024,10 @@ export function compileCall(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TypeKind.U64: {
|
case TypeKind.U64: {
|
||||||
let tempLocal0 = compiler.currentFunction.getTempLocal(Type.i64, false);
|
let flow = compiler.currentFlow;
|
||||||
let tempLocal1 = compiler.currentFunction.getAndFreeTempLocal(Type.i64, false);
|
let tempLocal0 = flow.getTempLocal(Type.i64, false);
|
||||||
compiler.currentFunction.freeTempLocal(tempLocal0);
|
let tempLocal1 = flow.getAndFreeTempLocal(Type.i64, false);
|
||||||
|
flow.freeTempLocal(tempLocal0);
|
||||||
ret = module.createSelect(
|
ret = module.createSelect(
|
||||||
module.createTeeLocal(tempLocal0.index, arg0),
|
module.createTeeLocal(tempLocal0.index, arg0),
|
||||||
module.createTeeLocal(tempLocal1.index, arg1),
|
module.createTeeLocal(tempLocal1.index, arg1),
|
||||||
@ -1033,9 +1039,10 @@ export function compileCall(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TypeKind.ISIZE: {
|
case TypeKind.ISIZE: {
|
||||||
let tempLocal0 = compiler.currentFunction.getTempLocal(compiler.options.usizeType, false);
|
let flow = compiler.currentFlow;
|
||||||
let tempLocal1 = compiler.currentFunction.getAndFreeTempLocal(compiler.options.usizeType, false);
|
let tempLocal0 = flow.getTempLocal(compiler.options.usizeType, false);
|
||||||
compiler.currentFunction.freeTempLocal(tempLocal0);
|
let tempLocal1 = flow.getAndFreeTempLocal(compiler.options.usizeType, false);
|
||||||
|
flow.freeTempLocal(tempLocal0);
|
||||||
ret = module.createSelect(
|
ret = module.createSelect(
|
||||||
module.createTeeLocal(tempLocal0.index, arg0),
|
module.createTeeLocal(tempLocal0.index, arg0),
|
||||||
module.createTeeLocal(tempLocal1.index, arg1),
|
module.createTeeLocal(tempLocal1.index, arg1),
|
||||||
@ -1058,9 +1065,10 @@ export function compileCall(
|
|||||||
ret = module.createUnreachable();
|
ret = module.createUnreachable();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
let tempLocal0 = compiler.currentFunction.getTempLocal(compiler.options.usizeType, false);
|
let flow = compiler.currentFlow;
|
||||||
let tempLocal1 = compiler.currentFunction.getAndFreeTempLocal(compiler.options.usizeType, false);
|
let tempLocal0 = flow.getTempLocal(compiler.options.usizeType, false);
|
||||||
compiler.currentFunction.freeTempLocal(tempLocal0);
|
let tempLocal1 = flow.getAndFreeTempLocal(compiler.options.usizeType, false);
|
||||||
|
flow.freeTempLocal(tempLocal0);
|
||||||
ret = module.createSelect(
|
ret = module.createSelect(
|
||||||
module.createTeeLocal(tempLocal0.index, arg0),
|
module.createTeeLocal(tempLocal0.index, arg0),
|
||||||
module.createTeeLocal(tempLocal1.index, arg1),
|
module.createTeeLocal(tempLocal1.index, arg1),
|
||||||
@ -2186,8 +2194,8 @@ export function compileCall(
|
|||||||
case TypeKind.U8:
|
case TypeKind.U8:
|
||||||
case TypeKind.U16:
|
case TypeKind.U16:
|
||||||
case TypeKind.BOOL: {
|
case TypeKind.BOOL: {
|
||||||
let flow = compiler.currentFunction.flow;
|
let flow = compiler.currentFlow;
|
||||||
let tempLocal = compiler.currentFunction.getAndFreeTempLocal(
|
let tempLocal = flow.getAndFreeTempLocal(
|
||||||
compiler.currentType,
|
compiler.currentType,
|
||||||
!flow.canOverflow(arg0, compiler.currentType)
|
!flow.canOverflow(arg0, compiler.currentType)
|
||||||
);
|
);
|
||||||
@ -2201,7 +2209,7 @@ export function compileCall(
|
|||||||
case TypeKind.I32:
|
case TypeKind.I32:
|
||||||
case TypeKind.U32:
|
case TypeKind.U32:
|
||||||
default: {
|
default: {
|
||||||
let tempLocal = compiler.currentFunction.getAndFreeTempLocal(Type.i32, false);
|
let tempLocal = compiler.currentFlow.getAndFreeTempLocal(Type.i32, false);
|
||||||
ret = module.createIf(
|
ret = module.createIf(
|
||||||
module.createTeeLocal(tempLocal.index, arg0),
|
module.createTeeLocal(tempLocal.index, arg0),
|
||||||
module.createGetLocal(tempLocal.index, NativeType.I32),
|
module.createGetLocal(tempLocal.index, NativeType.I32),
|
||||||
@ -2211,7 +2219,7 @@ export function compileCall(
|
|||||||
}
|
}
|
||||||
case TypeKind.I64:
|
case TypeKind.I64:
|
||||||
case TypeKind.U64: {
|
case TypeKind.U64: {
|
||||||
let tempLocal = compiler.currentFunction.getAndFreeTempLocal(Type.i64, false);
|
let tempLocal = compiler.currentFlow.getAndFreeTempLocal(Type.i64, false);
|
||||||
ret = module.createIf(
|
ret = module.createIf(
|
||||||
module.createUnary(UnaryOp.EqzI64,
|
module.createUnary(UnaryOp.EqzI64,
|
||||||
module.createTeeLocal(tempLocal.index, arg0)
|
module.createTeeLocal(tempLocal.index, arg0)
|
||||||
@ -2223,7 +2231,7 @@ export function compileCall(
|
|||||||
}
|
}
|
||||||
case TypeKind.ISIZE:
|
case TypeKind.ISIZE:
|
||||||
case TypeKind.USIZE: {
|
case TypeKind.USIZE: {
|
||||||
let tempLocal = compiler.currentFunction.getAndFreeTempLocal(compiler.options.usizeType, false);
|
let tempLocal = compiler.currentFlow.getAndFreeTempLocal(compiler.options.usizeType, false);
|
||||||
ret = module.createIf(
|
ret = module.createIf(
|
||||||
module.createUnary(
|
module.createUnary(
|
||||||
compiler.options.isWasm64
|
compiler.options.isWasm64
|
||||||
@ -2237,7 +2245,7 @@ export function compileCall(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TypeKind.F32: {
|
case TypeKind.F32: {
|
||||||
let tempLocal = compiler.currentFunction.getAndFreeTempLocal(Type.f32, false);
|
let tempLocal = compiler.currentFlow.getAndFreeTempLocal(Type.f32, false);
|
||||||
ret = module.createIf(
|
ret = module.createIf(
|
||||||
module.createBinary(BinaryOp.EqF32,
|
module.createBinary(BinaryOp.EqF32,
|
||||||
module.createTeeLocal(tempLocal.index, arg0),
|
module.createTeeLocal(tempLocal.index, arg0),
|
||||||
@ -2249,7 +2257,7 @@ export function compileCall(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TypeKind.F64: {
|
case TypeKind.F64: {
|
||||||
let tempLocal = compiler.currentFunction.getAndFreeTempLocal(Type.f64, false);
|
let tempLocal = compiler.currentFlow.getAndFreeTempLocal(Type.f64, false);
|
||||||
ret = module.createIf(
|
ret = module.createIf(
|
||||||
module.createBinary(BinaryOp.EqF64,
|
module.createBinary(BinaryOp.EqF64,
|
||||||
module.createTeeLocal(tempLocal.index, arg0),
|
module.createTeeLocal(tempLocal.index, arg0),
|
||||||
@ -2286,7 +2294,7 @@ export function compileCall(
|
|||||||
);
|
);
|
||||||
return module.createUnreachable();
|
return module.createUnreachable();
|
||||||
}
|
}
|
||||||
let flow = compiler.currentFunction.flow;
|
let flow = compiler.currentFlow;
|
||||||
flow.set(FlowFlags.UNCHECKED_CONTEXT);
|
flow.set(FlowFlags.UNCHECKED_CONTEXT);
|
||||||
ret = compiler.compileExpressionRetainType(operands[0], contextualType, WrapMode.NONE);
|
ret = compiler.compileExpressionRetainType(operands[0], contextualType, WrapMode.NONE);
|
||||||
flow.unset(FlowFlags.UNCHECKED_CONTEXT);
|
flow.unset(FlowFlags.UNCHECKED_CONTEXT);
|
||||||
|
915
src/compiler.ts
915
src/compiler.ts
File diff suppressed because it is too large
Load Diff
498
src/program.ts
498
src/program.ts
@ -584,7 +584,7 @@ export class Program extends DiagnosticEmitter {
|
|||||||
let derivedPrototype = queuedExtends[i];
|
let derivedPrototype = queuedExtends[i];
|
||||||
let derivedDeclaration = derivedPrototype.declaration;
|
let derivedDeclaration = derivedPrototype.declaration;
|
||||||
let derivedType = assert(derivedDeclaration.extendsType);
|
let derivedType = assert(derivedDeclaration.extendsType);
|
||||||
let baseElement = resolver.resolveIdentifier(derivedType.name, null); // reports
|
let baseElement = resolver.resolveIdentifier(derivedType.name, null, null); // reports
|
||||||
if (!baseElement) continue;
|
if (!baseElement) continue;
|
||||||
if (baseElement.kind == ElementKind.CLASS_PROTOTYPE) {
|
if (baseElement.kind == ElementKind.CLASS_PROTOTYPE) {
|
||||||
let basePrototype = <ClassPrototype>baseElement;
|
let basePrototype = <ClassPrototype>baseElement;
|
||||||
@ -2473,8 +2473,6 @@ export class Function extends Element {
|
|||||||
localsByIndex: Local[] = [];
|
localsByIndex: Local[] = [];
|
||||||
/** List of additional non-parameter locals. */
|
/** List of additional non-parameter locals. */
|
||||||
additionalLocals: Type[] = [];
|
additionalLocals: Type[] = [];
|
||||||
/** Current break context label. */
|
|
||||||
breakContext: string | null = null;
|
|
||||||
/** Contextual type arguments. */
|
/** Contextual type arguments. */
|
||||||
contextualTypeArguments: Map<string,Type> | null;
|
contextualTypeArguments: Map<string,Type> | null;
|
||||||
/** Current control flow. */
|
/** Current control flow. */
|
||||||
@ -2490,8 +2488,6 @@ export class Function extends Element {
|
|||||||
/** The outer scope, if a function expression. */
|
/** The outer scope, if a function expression. */
|
||||||
outerScope: Flow | null = null;
|
outerScope: Flow | null = null;
|
||||||
|
|
||||||
private nextBreakId: i32 = 0;
|
|
||||||
private breakStack: i32[] | null = null;
|
|
||||||
nextInlineId: i32 = 0;
|
nextInlineId: i32 = 0;
|
||||||
|
|
||||||
/** Constructs a new concrete function. */
|
/** Constructs a new concrete function. */
|
||||||
@ -2509,45 +2505,42 @@ export class Function extends Element {
|
|||||||
this.flags = prototype.flags;
|
this.flags = prototype.flags;
|
||||||
this.decoratorFlags = prototype.decoratorFlags;
|
this.decoratorFlags = prototype.decoratorFlags;
|
||||||
this.contextualTypeArguments = contextualTypeArguments;
|
this.contextualTypeArguments = contextualTypeArguments;
|
||||||
if (prototype.internalName != "NATIVE_CODE") { // e.g. generated constructor without a real prototype
|
if (!prototype.is(CommonFlags.AMBIENT)) {
|
||||||
if (!(prototype.is(CommonFlags.AMBIENT))) {
|
let localIndex = 0;
|
||||||
let localIndex = 0;
|
if (parent && parent.kind == ElementKind.CLASS) {
|
||||||
if (parent && parent.kind == ElementKind.CLASS) {
|
let local = new Local(
|
||||||
assert(this.is(CommonFlags.INSTANCE));
|
prototype.program,
|
||||||
let local = new Local(
|
"this",
|
||||||
prototype.program,
|
localIndex++,
|
||||||
"this",
|
assert(signature.thisType)
|
||||||
localIndex++,
|
);
|
||||||
assert(signature.thisType)
|
this.localsByName.set("this", local);
|
||||||
);
|
this.localsByIndex[local.index] = local;
|
||||||
this.localsByName.set("this", local);
|
let inheritedTypeArguments = (<Class>parent).contextualTypeArguments;
|
||||||
this.localsByIndex[local.index] = local;
|
if (inheritedTypeArguments) {
|
||||||
let inheritedTypeArguments = (<Class>parent).contextualTypeArguments;
|
if (!this.contextualTypeArguments) this.contextualTypeArguments = new Map();
|
||||||
if (inheritedTypeArguments) {
|
for (let [inheritedName, inheritedType] of inheritedTypeArguments) {
|
||||||
if (!this.contextualTypeArguments) this.contextualTypeArguments = new Map();
|
if (!this.contextualTypeArguments.has(inheritedName)) {
|
||||||
for (let [inheritedName, inheritedType] of inheritedTypeArguments) {
|
this.contextualTypeArguments.set(inheritedName, inheritedType);
|
||||||
if (!this.contextualTypeArguments.has(inheritedName)) {
|
|
||||||
this.contextualTypeArguments.set(inheritedName, inheritedType);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
assert(!this.is(CommonFlags.INSTANCE)); // internal error
|
|
||||||
}
|
|
||||||
let parameterTypes = signature.parameterTypes;
|
|
||||||
for (let i = 0, k = parameterTypes.length; i < k; ++i) {
|
|
||||||
let parameterType = parameterTypes[i];
|
|
||||||
let parameterName = signature.getParameterName(i);
|
|
||||||
let local = new Local(
|
|
||||||
prototype.program,
|
|
||||||
parameterName,
|
|
||||||
localIndex++,
|
|
||||||
parameterType
|
|
||||||
// FIXME: declaration?
|
|
||||||
);
|
|
||||||
this.localsByName.set(parameterName, local);
|
|
||||||
this.localsByIndex[local.index] = local;
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
assert(!this.is(CommonFlags.INSTANCE)); // internal error
|
||||||
|
}
|
||||||
|
let parameterTypes = signature.parameterTypes;
|
||||||
|
for (let i = 0, k = parameterTypes.length; i < k; ++i) {
|
||||||
|
let parameterType = parameterTypes[i];
|
||||||
|
let parameterName = signature.getParameterName(i);
|
||||||
|
let local = new Local(
|
||||||
|
prototype.program,
|
||||||
|
parameterName,
|
||||||
|
localIndex++,
|
||||||
|
parameterType
|
||||||
|
// FIXME: declaration?
|
||||||
|
);
|
||||||
|
this.localsByName.set(parameterName, local);
|
||||||
|
this.localsByIndex[local.index] = local;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.flow = Flow.create(this);
|
this.flow = Flow.create(this);
|
||||||
@ -2576,140 +2569,23 @@ export class Function extends Element {
|
|||||||
return local;
|
return local;
|
||||||
}
|
}
|
||||||
|
|
||||||
private tempI32s: Local[] | null = null;
|
// used by flows to keep track of temporary locals
|
||||||
private tempI64s: Local[] | null = null;
|
tempI32s: Local[] | null = null;
|
||||||
private tempF32s: Local[] | null = null;
|
tempI64s: Local[] | null = null;
|
||||||
private tempF64s: Local[] | null = null;
|
tempF32s: Local[] | null = null;
|
||||||
|
tempF64s: Local[] | null = null;
|
||||||
|
|
||||||
/** Gets a free temporary local of the specified type. */
|
// used by flows to keep track of break labels
|
||||||
getTempLocal(type: Type, wrapped: bool = false): Local {
|
nextBreakId: i32 = 0;
|
||||||
var temps: Local[] | null;
|
breakStack: i32[] | null = null;
|
||||||
switch (type.toNativeType()) {
|
breakLabel: string | null = null;
|
||||||
case NativeType.I32: {
|
|
||||||
temps = this.tempI32s;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case NativeType.I64: {
|
|
||||||
temps = this.tempI64s;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case NativeType.F32: {
|
|
||||||
temps = this.tempF32s;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case NativeType.F64: {
|
|
||||||
temps = this.tempF64s;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default: throw new Error("concrete type expected");
|
|
||||||
}
|
|
||||||
var local: Local;
|
|
||||||
if (temps && temps.length) {
|
|
||||||
local = temps.pop();
|
|
||||||
local.type = type;
|
|
||||||
local.flags = CommonFlags.NONE;
|
|
||||||
} else {
|
|
||||||
local = this.addLocal(type);
|
|
||||||
}
|
|
||||||
if (type.is(TypeFlags.SHORT | TypeFlags.INTEGER)) {
|
|
||||||
this.flow.setLocalWrapped(local.index, wrapped);
|
|
||||||
}
|
|
||||||
return local;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Frees the temporary local for reuse. */
|
|
||||||
freeTempLocal(local: Local): void {
|
|
||||||
if (local.is(CommonFlags.INLINED)) return;
|
|
||||||
assert(local.index >= 0);
|
|
||||||
var temps: Local[];
|
|
||||||
assert(local.type != null); // internal error
|
|
||||||
switch ((<Type>local.type).toNativeType()) {
|
|
||||||
case NativeType.I32: {
|
|
||||||
temps = this.tempI32s || (this.tempI32s = []);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case NativeType.I64: {
|
|
||||||
temps = this.tempI64s || (this.tempI64s = []);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case NativeType.F32: {
|
|
||||||
temps = this.tempF32s || (this.tempF32s = []);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case NativeType.F64: {
|
|
||||||
temps = this.tempF64s || (this.tempF64s = []);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default: throw new Error("concrete type expected");
|
|
||||||
}
|
|
||||||
assert(local.index >= 0);
|
|
||||||
temps.push(local);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Gets and immediately frees a temporary local of the specified type. */
|
|
||||||
getAndFreeTempLocal(type: Type, wrapped: bool): Local {
|
|
||||||
var temps: Local[];
|
|
||||||
switch (type.toNativeType()) {
|
|
||||||
case NativeType.I32: {
|
|
||||||
temps = this.tempI32s || (this.tempI32s = []);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case NativeType.I64: {
|
|
||||||
temps = this.tempI64s || (this.tempI64s = []);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case NativeType.F32: {
|
|
||||||
temps = this.tempF32s || (this.tempF32s = []);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case NativeType.F64: {
|
|
||||||
temps = this.tempF64s || (this.tempF64s = []);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default: throw new Error("concrete type expected");
|
|
||||||
}
|
|
||||||
var local: Local;
|
|
||||||
if (temps.length) {
|
|
||||||
local = temps[temps.length - 1];
|
|
||||||
local.type = type;
|
|
||||||
} else {
|
|
||||||
local = this.addLocal(type);
|
|
||||||
temps.push(local);
|
|
||||||
}
|
|
||||||
if (type.is(TypeFlags.SHORT | TypeFlags.INTEGER)) {
|
|
||||||
this.flow.setLocalWrapped(local.index, wrapped);
|
|
||||||
}
|
|
||||||
return local;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Enters a(nother) break context. */
|
|
||||||
enterBreakContext(): string {
|
|
||||||
var id = this.nextBreakId++;
|
|
||||||
if (!this.breakStack) this.breakStack = [ id ];
|
|
||||||
else this.breakStack.push(id);
|
|
||||||
return this.breakContext = id.toString(10);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Leaves the current break context. */
|
|
||||||
leaveBreakContext(): void {
|
|
||||||
assert(this.breakStack != null);
|
|
||||||
var length = (<i32[]>this.breakStack).length;
|
|
||||||
assert(length > 0);
|
|
||||||
(<i32[]>this.breakStack).pop();
|
|
||||||
if (length > 1) {
|
|
||||||
this.breakContext = (<i32[]>this.breakStack)[length - 2].toString(10);
|
|
||||||
} else {
|
|
||||||
this.breakContext = null;
|
|
||||||
this.breakStack = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Finalizes the function once compiled, releasing no longer needed resources. */
|
/** Finalizes the function once compiled, releasing no longer needed resources. */
|
||||||
finalize(module: Module, ref: FunctionRef): void {
|
finalize(module: Module, ref: FunctionRef): void {
|
||||||
this.ref = ref;
|
this.ref = ref;
|
||||||
assert(!this.breakStack || !this.breakStack.length); // internal error
|
assert(!this.breakStack || !this.breakStack.length); // internal error
|
||||||
this.breakStack = null;
|
this.breakStack = null;
|
||||||
this.breakContext = null;
|
this.breakLabel = null;
|
||||||
this.tempI32s = this.tempI64s = this.tempF32s = this.tempF64s = null;
|
this.tempI32s = this.tempI64s = this.tempF32s = this.tempF64s = null;
|
||||||
if (this.program.options.sourceMap) {
|
if (this.program.options.sourceMap) {
|
||||||
let debugLocations = this.debugLocations;
|
let debugLocations = this.debugLocations;
|
||||||
@ -3049,39 +2925,39 @@ export const enum FlowFlags {
|
|||||||
|
|
||||||
// categorical
|
// categorical
|
||||||
|
|
||||||
/** This branch always returns. */
|
/** This flow returns. */
|
||||||
RETURNS = 1 << 0,
|
RETURNS = 1 << 0,
|
||||||
/** This branch always returns a wrapped value. */
|
/** This flow returns a wrapped value. */
|
||||||
RETURNS_WRAPPED = 1 << 1,
|
RETURNS_WRAPPED = 1 << 1,
|
||||||
/** This branch always throws. */
|
/** This flow throws. */
|
||||||
THROWS = 1 << 2,
|
THROWS = 1 << 2,
|
||||||
/** This branch always breaks. */
|
/** This flow breaks. */
|
||||||
BREAKS = 1 << 3,
|
BREAKS = 1 << 3,
|
||||||
/** This branch always continues. */
|
/** This flow continues. */
|
||||||
CONTINUES = 1 << 4,
|
CONTINUES = 1 << 4,
|
||||||
/** This branch always allocates. Constructors only. */
|
/** This flow allocates. Constructors only. */
|
||||||
ALLOCATES = 1 << 5,
|
ALLOCATES = 1 << 5,
|
||||||
/** This branch always calls super. Constructors only. */
|
/** This flow calls super. Constructors only. */
|
||||||
CALLS_SUPER = 1 << 6,
|
CALLS_SUPER = 1 << 6,
|
||||||
|
|
||||||
// conditional
|
// conditional
|
||||||
|
|
||||||
/** This branch conditionally returns in a child branch. */
|
/** This flow conditionally returns in a child flow. */
|
||||||
CONDITIONALLY_RETURNS = 1 << 7,
|
CONDITIONALLY_RETURNS = 1 << 7,
|
||||||
/** This branch conditionally throws in a child branch. */
|
/** This flow conditionally throws in a child flow. */
|
||||||
CONDITIONALLY_THROWS = 1 << 8,
|
CONDITIONALLY_THROWS = 1 << 8,
|
||||||
/** This branch conditionally breaks in a child branch. */
|
/** This flow conditionally breaks in a child flow. */
|
||||||
CONDITIONALLY_BREAKS = 1 << 9,
|
CONDITIONALLY_BREAKS = 1 << 9,
|
||||||
/** This branch conditionally continues in a child branch. */
|
/** This flow conditionally continues in a child flow. */
|
||||||
CONDITIONALLY_CONTINUES = 1 << 10,
|
CONDITIONALLY_CONTINUES = 1 << 10,
|
||||||
/** This branch conditionally allocates in a child branch. Constructors only. */
|
/** This flow conditionally allocates in a child flow. Constructors only. */
|
||||||
CONDITIONALLY_ALLOCATES = 1 << 11,
|
CONDITIONALLY_ALLOCATES = 1 << 11,
|
||||||
|
|
||||||
// special
|
// special
|
||||||
|
|
||||||
/** This branch is part of inlining a function. */
|
/** This is an inlining flow. */
|
||||||
INLINE_CONTEXT = 1 << 12,
|
INLINE_CONTEXT = 1 << 12,
|
||||||
/** This branch explicitly requests no bounds checking. */
|
/** This is a flow with explicitly disabled bounds checking. */
|
||||||
UNCHECKED_CONTEXT = 1 << 13,
|
UNCHECKED_CONTEXT = 1 << 13,
|
||||||
|
|
||||||
// masks
|
// masks
|
||||||
@ -3117,13 +2993,11 @@ export class Flow {
|
|||||||
/** Flow flags indicating specific conditions. */
|
/** Flow flags indicating specific conditions. */
|
||||||
flags: FlowFlags;
|
flags: FlowFlags;
|
||||||
/** Function this flow belongs to. */
|
/** Function this flow belongs to. */
|
||||||
currentFunction: Function;
|
parentFunction: Function;
|
||||||
/** The label we break to when encountering a continue statement. */
|
/** The label we break to when encountering a continue statement. */
|
||||||
continueLabel: string | null;
|
continueLabel: string | null;
|
||||||
/** The label we break to when encountering a break statement. */
|
/** The label we break to when encountering a break statement. */
|
||||||
breakLabel: string | null;
|
breakLabel: string | null;
|
||||||
/** The label we break to when encountering a return statement, when inlining. */
|
|
||||||
returnLabel: string | null;
|
|
||||||
/** The current return type. */
|
/** The current return type. */
|
||||||
returnType: Type;
|
returnType: Type;
|
||||||
/** The current contextual type arguments. */
|
/** The current contextual type arguments. */
|
||||||
@ -3134,25 +3008,46 @@ export class Flow {
|
|||||||
wrappedLocals: I64;
|
wrappedLocals: I64;
|
||||||
/** Local variable wrap states for locals with index >= 64. */
|
/** Local variable wrap states for locals with index >= 64. */
|
||||||
wrappedLocalsExt: I64[] | null;
|
wrappedLocalsExt: I64[] | null;
|
||||||
|
/** Function being inlined, when inlining. */
|
||||||
|
inlineFunction: Function | null;
|
||||||
|
/** The label we break to when encountering a return statement, when inlining. */
|
||||||
|
inlineReturnLabel: string | null;
|
||||||
|
|
||||||
/** Creates the parent flow of the specified function. */
|
/** Creates the parent flow of the specified function. */
|
||||||
static create(currentFunction: Function): Flow {
|
static create(parentFunction: Function): Flow {
|
||||||
var parentFlow = new Flow();
|
var flow = new Flow();
|
||||||
parentFlow.parent = null;
|
flow.parent = null;
|
||||||
parentFlow.flags = FlowFlags.NONE;
|
flow.flags = FlowFlags.NONE;
|
||||||
parentFlow.currentFunction = currentFunction;
|
flow.parentFunction = parentFunction;
|
||||||
parentFlow.continueLabel = null;
|
flow.continueLabel = null;
|
||||||
parentFlow.breakLabel = null;
|
flow.breakLabel = null;
|
||||||
parentFlow.returnLabel = null;
|
flow.returnType = parentFunction.signature.returnType;
|
||||||
parentFlow.returnType = currentFunction.signature.returnType;
|
flow.contextualTypeArguments = parentFunction.contextualTypeArguments;
|
||||||
parentFlow.contextualTypeArguments = currentFunction.contextualTypeArguments;
|
flow.wrappedLocals = i64_new(0);
|
||||||
parentFlow.wrappedLocals = i64_new(0);
|
flow.wrappedLocalsExt = null;
|
||||||
parentFlow.wrappedLocalsExt = null;
|
flow.inlineFunction = null;
|
||||||
return parentFlow;
|
flow.inlineReturnLabel = null;
|
||||||
|
return flow;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Creates an inline flow within `currentFunction`. */
|
||||||
|
static createInline(parentFunction: Function, inlineFunction: Function): Flow {
|
||||||
|
var flow = Flow.create(parentFunction);
|
||||||
|
flow.set(FlowFlags.INLINE_CONTEXT);
|
||||||
|
flow.inlineFunction = inlineFunction;
|
||||||
|
flow.inlineReturnLabel = inlineFunction.internalName + "|inlined." + (inlineFunction.nextInlineId++).toString(10);
|
||||||
|
flow.returnType = inlineFunction.signature.returnType;
|
||||||
|
flow.contextualTypeArguments = inlineFunction.contextualTypeArguments;
|
||||||
|
return flow;
|
||||||
}
|
}
|
||||||
|
|
||||||
private constructor() { }
|
private constructor() { }
|
||||||
|
|
||||||
|
/** Gets the actual function being compiled, The inlined function when inlining, otherwise the parent function. */
|
||||||
|
get actualFunction(): Function {
|
||||||
|
return this.inlineFunction || this.parentFunction;
|
||||||
|
}
|
||||||
|
|
||||||
/** Tests if this flow has the specified flag or flags. */
|
/** Tests if this flow has the specified flag or flags. */
|
||||||
is(flag: FlowFlags): bool { return (this.flags & flag) == flag; }
|
is(flag: FlowFlags): bool { return (this.flags & flag) == flag; }
|
||||||
/** Tests if this flow has one of the specified flags. */
|
/** Tests if this flow has one of the specified flags. */
|
||||||
@ -3167,44 +3062,119 @@ export class Flow {
|
|||||||
var branch = new Flow();
|
var branch = new Flow();
|
||||||
branch.parent = this;
|
branch.parent = this;
|
||||||
branch.flags = this.flags;
|
branch.flags = this.flags;
|
||||||
branch.currentFunction = this.currentFunction;
|
branch.parentFunction = this.parentFunction;
|
||||||
branch.continueLabel = this.continueLabel;
|
branch.continueLabel = this.continueLabel;
|
||||||
branch.breakLabel = this.breakLabel;
|
branch.breakLabel = this.breakLabel;
|
||||||
branch.returnLabel = this.returnLabel;
|
|
||||||
branch.returnType = this.returnType;
|
branch.returnType = this.returnType;
|
||||||
branch.contextualTypeArguments = this.contextualTypeArguments;
|
branch.contextualTypeArguments = this.contextualTypeArguments;
|
||||||
branch.wrappedLocals = this.wrappedLocals;
|
branch.wrappedLocals = this.wrappedLocals;
|
||||||
branch.wrappedLocalsExt = this.wrappedLocalsExt ? this.wrappedLocalsExt.slice() : null;
|
branch.wrappedLocalsExt = this.wrappedLocalsExt ? this.wrappedLocalsExt.slice() : null;
|
||||||
|
branch.inlineFunction = this.inlineFunction;
|
||||||
|
branch.inlineReturnLabel = this.inlineReturnLabel;
|
||||||
return branch;
|
return branch;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Frees this flow's scoped variables. */
|
/** Gets a free temporary local of the specified type. */
|
||||||
free(): Flow {
|
getTempLocal(type: Type, wrapped: bool = false): Local {
|
||||||
var parent = assert(this.parent);
|
var parentFunction = this.parentFunction;
|
||||||
if (this.scopedLocals) { // free block-scoped locals
|
var temps: Local[] | null;
|
||||||
for (let scopedLocal of this.scopedLocals.values()) {
|
switch (type.toNativeType()) {
|
||||||
if (scopedLocal.is(CommonFlags.SCOPED)) { // otherwise an alias
|
case NativeType.I32: { temps = parentFunction.tempI32s; break; }
|
||||||
this.currentFunction.freeTempLocal(scopedLocal);
|
case NativeType.I64: { temps = parentFunction.tempI64s; break; }
|
||||||
}
|
case NativeType.F32: { temps = parentFunction.tempF32s; break; }
|
||||||
}
|
case NativeType.F64: { temps = parentFunction.tempF64s; break; }
|
||||||
this.scopedLocals = null;
|
default: throw new Error("concrete type expected");
|
||||||
}
|
}
|
||||||
return parent;
|
var local: Local;
|
||||||
|
if (temps && temps.length) {
|
||||||
|
local = temps.pop();
|
||||||
|
local.type = type;
|
||||||
|
local.flags = CommonFlags.NONE;
|
||||||
|
} else {
|
||||||
|
local = parentFunction.addLocal(type);
|
||||||
|
}
|
||||||
|
if (type.is(TypeFlags.SHORT | TypeFlags.INTEGER)) this.setLocalWrapped(local.index, wrapped);
|
||||||
|
return local;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Frees the temporary local for reuse. */
|
||||||
|
freeTempLocal(local: Local): void {
|
||||||
|
if (local.is(CommonFlags.INLINED)) return;
|
||||||
|
assert(local.index >= 0);
|
||||||
|
var parentFunction = this.parentFunction;
|
||||||
|
var temps: Local[];
|
||||||
|
assert(local.type != null); // internal error
|
||||||
|
switch ((<Type>local.type).toNativeType()) {
|
||||||
|
case NativeType.I32: {
|
||||||
|
temps = parentFunction.tempI32s || (parentFunction.tempI32s = []);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case NativeType.I64: {
|
||||||
|
temps = parentFunction.tempI64s || (parentFunction.tempI64s = []);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case NativeType.F32: {
|
||||||
|
temps = parentFunction.tempF32s || (parentFunction.tempF32s = []);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case NativeType.F64: {
|
||||||
|
temps = parentFunction.tempF64s || (parentFunction.tempF64s = []);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: throw new Error("concrete type expected");
|
||||||
|
}
|
||||||
|
assert(local.index >= 0);
|
||||||
|
temps.push(local);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Gets and immediately frees a temporary local of the specified type. */
|
||||||
|
getAndFreeTempLocal(type: Type, wrapped: bool): Local {
|
||||||
|
var parentFunction = this.parentFunction;
|
||||||
|
var temps: Local[];
|
||||||
|
switch (type.toNativeType()) {
|
||||||
|
case NativeType.I32: {
|
||||||
|
temps = parentFunction.tempI32s || (parentFunction.tempI32s = []);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case NativeType.I64: {
|
||||||
|
temps = parentFunction.tempI64s || (parentFunction.tempI64s = []);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case NativeType.F32: {
|
||||||
|
temps = parentFunction.tempF32s || (parentFunction.tempF32s = []);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case NativeType.F64: {
|
||||||
|
temps = parentFunction.tempF64s || (parentFunction.tempF64s = []);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: throw new Error("concrete type expected");
|
||||||
|
}
|
||||||
|
var local: Local;
|
||||||
|
if (temps.length) {
|
||||||
|
local = temps[temps.length - 1];
|
||||||
|
local.type = type;
|
||||||
|
} else {
|
||||||
|
local = parentFunction.addLocal(type);
|
||||||
|
temps.push(local);
|
||||||
|
}
|
||||||
|
if (type.is(TypeFlags.SHORT | TypeFlags.INTEGER)) this.setLocalWrapped(local.index, wrapped);
|
||||||
|
return local;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Adds a new scoped local of the specified name. */
|
/** Adds a new scoped local of the specified name. */
|
||||||
addScopedLocal(type: Type, name: string, wrapped: bool, declaration?: VariableDeclaration): Local {
|
addScopedLocal(name: string, type: Type, wrapped: bool, reportNode: Node | null = null): Local {
|
||||||
var scopedLocal = this.currentFunction.getTempLocal(type, false);
|
var scopedLocal = this.getTempLocal(type, false);
|
||||||
if (!this.scopedLocals) this.scopedLocals = new Map();
|
if (!this.scopedLocals) this.scopedLocals = new Map();
|
||||||
else {
|
else {
|
||||||
let existingLocal = this.scopedLocals.get(name);
|
let existingLocal = this.scopedLocals.get(name);
|
||||||
if (existingLocal) {
|
if (existingLocal) {
|
||||||
if (declaration) {
|
if (reportNode) {
|
||||||
this.currentFunction.program.error(
|
this.parentFunction.program.error(
|
||||||
DiagnosticCode.Duplicate_identifier_0,
|
DiagnosticCode.Duplicate_identifier_0,
|
||||||
declaration.name.range
|
reportNode.range
|
||||||
);
|
);
|
||||||
} else assert(false);
|
}
|
||||||
return existingLocal;
|
return existingLocal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3216,47 +3186,56 @@ export class Flow {
|
|||||||
return scopedLocal;
|
return scopedLocal;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Adds a new scoped alias for the specified local. */
|
/** Adds a new scoped alias for the specified local. For example `super` aliased to the `this` local. */
|
||||||
addScopedLocalAlias(index: i32, type: Type, name: string): Local {
|
addScopedAlias(name: string, type: Type, index: i32, reportNode: Node | null = null): Local {
|
||||||
if (!this.scopedLocals) this.scopedLocals = new Map();
|
if (!this.scopedLocals) this.scopedLocals = new Map();
|
||||||
else {
|
else {
|
||||||
let existingLocal = this.scopedLocals.get(name);
|
let existingLocal = this.scopedLocals.get(name);
|
||||||
if (existingLocal) {
|
if (existingLocal) {
|
||||||
let declaration = existingLocal.declaration;
|
if (reportNode) {
|
||||||
if (declaration) {
|
this.parentFunction.program.error(
|
||||||
this.currentFunction.program.error(
|
|
||||||
DiagnosticCode.Duplicate_identifier_0,
|
DiagnosticCode.Duplicate_identifier_0,
|
||||||
declaration.name.range
|
reportNode.range
|
||||||
);
|
);
|
||||||
} else assert(false);
|
}
|
||||||
return existingLocal;
|
return existingLocal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
assert(index < this.currentFunction.localsByIndex.length);
|
assert(index < this.parentFunction.localsByIndex.length);
|
||||||
var scopedAlias = new Local( // not SCOPED as an indicator that it isn't automatically free'd
|
var scopedAlias = new Local(
|
||||||
this.currentFunction.program,
|
this.parentFunction.program,
|
||||||
name,
|
name,
|
||||||
index,
|
index,
|
||||||
type,
|
type,
|
||||||
null
|
null
|
||||||
);
|
);
|
||||||
|
// not flagged as SCOPED as it must not be free'd when the flow is finalized
|
||||||
this.scopedLocals.set(name, scopedAlias);
|
this.scopedLocals.set(name, scopedAlias);
|
||||||
return scopedAlias;
|
return scopedAlias;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Gets the local of the specified name in the current scope. */
|
/** Frees this flow's scoped variables and returns its parent flow. */
|
||||||
getScopedLocal(name: string): Local | null {
|
freeScopedLocals(): void {
|
||||||
var local: Local | null;
|
if (this.scopedLocals) {
|
||||||
var current: Flow | null = this;
|
for (let scopedLocal of this.scopedLocals.values()) {
|
||||||
do {
|
if (scopedLocal.is(CommonFlags.SCOPED)) { // otherwise an alias
|
||||||
if (current.scopedLocals && (local = current.scopedLocals.get(name))) {
|
this.freeTempLocal(scopedLocal);
|
||||||
return local;
|
}
|
||||||
}
|
}
|
||||||
} while (current = current.parent);
|
this.scopedLocals = null;
|
||||||
return this.currentFunction.localsByName.get(name);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Tests if the local with the specified index is considered wrapped. */
|
/** Looks up the local of the specified name in the current scope. */
|
||||||
|
lookupLocal(name: string): Local | null {
|
||||||
|
var local: Local | null;
|
||||||
|
var current: Flow | null = this;
|
||||||
|
do if (current.scopedLocals && (local = current.scopedLocals.get(name))) return local;
|
||||||
|
while (current = current.parent);
|
||||||
|
return this.parentFunction.localsByName.get(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Tests if the value of the local at the specified index is considered wrapped. */
|
||||||
isLocalWrapped(index: i32): bool {
|
isLocalWrapped(index: i32): bool {
|
||||||
var map: I64;
|
var map: I64;
|
||||||
var ext: I64[] | null;
|
var ext: I64[] | null;
|
||||||
@ -3283,7 +3262,7 @@ export class Flow {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Sets if the local with the specified index is considered wrapped. */
|
/** Sets if the value of the local at the specified index is considered wrapped. */
|
||||||
setLocalWrapped(index: i32, wrapped: bool): void {
|
setLocalWrapped(index: i32, wrapped: bool): void {
|
||||||
var map: I64;
|
var map: I64;
|
||||||
var off: i32 = -1;
|
var off: i32 = -1;
|
||||||
@ -3322,6 +3301,30 @@ export class Flow {
|
|||||||
else this.wrappedLocals = map;
|
else this.wrappedLocals = map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Pushes a new break label to the stack, for example when entering a loop that one can `break` from. */
|
||||||
|
pushBreakLabel(): string {
|
||||||
|
var parentFunction = this.parentFunction;
|
||||||
|
var id = parentFunction.nextBreakId++;
|
||||||
|
var stack = parentFunction.breakStack;
|
||||||
|
if (!stack) parentFunction.breakStack = [ id ];
|
||||||
|
else stack.push(id);
|
||||||
|
return parentFunction.breakLabel = id.toString(10);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Pops the most recent break label from the stack. */
|
||||||
|
popBreakLabel(): void {
|
||||||
|
var parentFunction = this.parentFunction;
|
||||||
|
var stack = assert(parentFunction.breakStack);
|
||||||
|
var length = assert(stack.length);
|
||||||
|
stack.pop();
|
||||||
|
if (length > 1) {
|
||||||
|
parentFunction.breakLabel = stack[length - 2].toString(10);
|
||||||
|
} else {
|
||||||
|
parentFunction.breakLabel = null;
|
||||||
|
parentFunction.breakStack = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/** Inherits flags and local wrap states from the specified flow (e.g. blocks). */
|
/** Inherits flags and local wrap states from the specified flow (e.g. blocks). */
|
||||||
inherit(other: Flow): void {
|
inherit(other: Flow): void {
|
||||||
this.flags |= other.flags & (FlowFlags.ANY_CATEGORICAL | FlowFlags.ANY_CONDITIONAL);
|
this.flags |= other.flags & (FlowFlags.ANY_CATEGORICAL | FlowFlags.ANY_CONDITIONAL);
|
||||||
@ -3395,9 +3398,8 @@ export class Flow {
|
|||||||
|
|
||||||
// overflows if the local isn't wrapped or the conversion does
|
// overflows if the local isn't wrapped or the conversion does
|
||||||
case ExpressionId.GetLocal: {
|
case ExpressionId.GetLocal: {
|
||||||
let currentFunction = this.currentFunction;
|
let local = this.parentFunction.localsByIndex[getGetLocalIndex(expr)];
|
||||||
let local = currentFunction.localsByIndex[getGetLocalIndex(expr)];
|
return !this.isLocalWrapped(local.index)
|
||||||
return !currentFunction.flow.isLocalWrapped(local.index)
|
|
||||||
|| canConversionOverflow(local.type, type);
|
|| canConversionOverflow(local.type, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3410,7 +3412,7 @@ export class Flow {
|
|||||||
// overflows if the conversion does (globals are wrapped on set)
|
// overflows if the conversion does (globals are wrapped on set)
|
||||||
case ExpressionId.GetGlobal: {
|
case ExpressionId.GetGlobal: {
|
||||||
// TODO: this is inefficient because it has to read a string
|
// TODO: this is inefficient because it has to read a string
|
||||||
let global = assert(this.currentFunction.program.elementsLookup.get(assert(getGetGlobalName(expr))));
|
let global = assert(this.parentFunction.program.elementsLookup.get(assert(getGetGlobalName(expr))));
|
||||||
assert(global.kind == ElementKind.GLOBAL);
|
assert(global.kind == ElementKind.GLOBAL);
|
||||||
return canConversionOverflow(assert((<Global>global).type), type);
|
return canConversionOverflow(assert((<Global>global).type), type);
|
||||||
}
|
}
|
||||||
@ -3594,7 +3596,6 @@ export class Flow {
|
|||||||
let last = getBlockChild(expr, size - 1);
|
let last = getBlockChild(expr, size - 1);
|
||||||
return this.canOverflow(last, type);
|
return this.canOverflow(last, type);
|
||||||
}
|
}
|
||||||
// actually, brs with a value that'd be handled here is not emitted atm
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3612,7 +3613,7 @@ export class Flow {
|
|||||||
|
|
||||||
// overflows if the call does not return a wrapped value or the conversion does
|
// overflows if the call does not return a wrapped value or the conversion does
|
||||||
case ExpressionId.Call: {
|
case ExpressionId.Call: {
|
||||||
let program = this.currentFunction.program;
|
let program = this.parentFunction.program;
|
||||||
let instance = assert(program.instancesLookup.get(assert(getCallTarget(expr))));
|
let instance = assert(program.instancesLookup.get(assert(getCallTarget(expr))));
|
||||||
assert(instance.kind == ElementKind.FUNCTION);
|
assert(instance.kind == ElementKind.FUNCTION);
|
||||||
let returnType = (<Function>instance).signature.returnType;
|
let returnType = (<Function>instance).signature.returnType;
|
||||||
@ -3625,15 +3626,6 @@ export class Flow {
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Finalizes this flow. Must be the topmost parent flow of the function. */
|
|
||||||
finalize(): void {
|
|
||||||
assert(this.parent == null); // must be the topmost parent flow
|
|
||||||
this.continueLabel = null;
|
|
||||||
this.breakLabel = null;
|
|
||||||
this.returnLabel = null;
|
|
||||||
this.contextualTypeArguments = null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Tests if a conversion from one type to another can technically overflow. */
|
/** Tests if a conversion from one type to another can technically overflow. */
|
||||||
|
@ -25,7 +25,8 @@ import {
|
|||||||
DecoratorFlags,
|
DecoratorFlags,
|
||||||
FieldPrototype,
|
FieldPrototype,
|
||||||
Field,
|
Field,
|
||||||
Global
|
Global,
|
||||||
|
Flow
|
||||||
} from "./program";
|
} from "./program";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@ -355,22 +356,26 @@ export class Resolver extends DiagnosticEmitter {
|
|||||||
/** Resolves an identifier to the element it refers to. */
|
/** Resolves an identifier to the element it refers to. */
|
||||||
resolveIdentifier(
|
resolveIdentifier(
|
||||||
identifier: IdentifierExpression,
|
identifier: IdentifierExpression,
|
||||||
|
flow: Flow | null,
|
||||||
context: Element | null,
|
context: Element | null,
|
||||||
reportMode: ReportMode = ReportMode.REPORT
|
reportMode: ReportMode = ReportMode.REPORT
|
||||||
): Element | null {
|
): Element | null {
|
||||||
var name = identifier.text;
|
var name = identifier.text;
|
||||||
var element: Element | null;
|
var element: Element | null;
|
||||||
|
|
||||||
|
if (flow) {
|
||||||
|
let local = flow.lookupLocal(name);
|
||||||
|
if (local) {
|
||||||
|
this.currentThisExpression = null;
|
||||||
|
this.currentElementExpression = null;
|
||||||
|
return local;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (context) {
|
if (context) {
|
||||||
|
|
||||||
switch (context.kind) {
|
switch (context.kind) {
|
||||||
case ElementKind.FUNCTION: { // search locals, use prototype
|
case ElementKind.FUNCTION: { // use prototype
|
||||||
element = (<Function>context).flow.getScopedLocal(name);
|
|
||||||
if (element) {
|
|
||||||
this.currentThisExpression = null;
|
|
||||||
this.currentElementExpression = null;
|
|
||||||
return element;
|
|
||||||
}
|
|
||||||
context = (<Function>context).prototype.parent;
|
context = (<Function>context).prototype.parent;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -433,13 +438,13 @@ export class Resolver extends DiagnosticEmitter {
|
|||||||
/** Resolves a property access to the element it refers to. */
|
/** Resolves a property access to the element it refers to. */
|
||||||
resolvePropertyAccess(
|
resolvePropertyAccess(
|
||||||
propertyAccess: PropertyAccessExpression,
|
propertyAccess: PropertyAccessExpression,
|
||||||
contextualFunction: Function,
|
flow: Flow,
|
||||||
contextualType: Type,
|
contextualType: Type,
|
||||||
reportMode: ReportMode = ReportMode.REPORT
|
reportMode: ReportMode = ReportMode.REPORT
|
||||||
): Element | null {
|
): Element | null {
|
||||||
// start by resolving the lhs target (expression before the last dot)
|
// start by resolving the lhs target (expression before the last dot)
|
||||||
var targetExpression = propertyAccess.expression;
|
var targetExpression = propertyAccess.expression;
|
||||||
var target = this.resolveExpression(targetExpression, contextualFunction, contextualType, reportMode); // reports
|
var target = this.resolveExpression(targetExpression, flow, contextualType, reportMode); // reports
|
||||||
if (!target) return null;
|
if (!target) return null;
|
||||||
|
|
||||||
// at this point we know exactly what the target is, so look up the element within
|
// at this point we know exactly what the target is, so look up the element within
|
||||||
@ -565,12 +570,12 @@ export class Resolver extends DiagnosticEmitter {
|
|||||||
|
|
||||||
resolveElementAccess(
|
resolveElementAccess(
|
||||||
elementAccess: ElementAccessExpression,
|
elementAccess: ElementAccessExpression,
|
||||||
contextualFunction: Function,
|
flow: Flow,
|
||||||
contextualType: Type,
|
contextualType: Type,
|
||||||
reportMode: ReportMode = ReportMode.REPORT
|
reportMode: ReportMode = ReportMode.REPORT
|
||||||
): Element | null {
|
): Element | null {
|
||||||
var targetExpression = elementAccess.expression;
|
var targetExpression = elementAccess.expression;
|
||||||
var target = this.resolveExpression(targetExpression, contextualFunction, contextualType, reportMode);
|
var target = this.resolveExpression(targetExpression, flow, contextualType, reportMode);
|
||||||
if (!target) return null;
|
if (!target) return null;
|
||||||
switch (target.kind) {
|
switch (target.kind) {
|
||||||
case ElementKind.GLOBAL: if (!this.ensureResolvedLazyGlobal(<Global>target, reportMode)) return null;
|
case ElementKind.GLOBAL: if (!this.ensureResolvedLazyGlobal(<Global>target, reportMode)) return null;
|
||||||
@ -685,7 +690,7 @@ export class Resolver extends DiagnosticEmitter {
|
|||||||
|
|
||||||
resolveExpression(
|
resolveExpression(
|
||||||
expression: Expression,
|
expression: Expression,
|
||||||
contextualFunction: Function,
|
flow: Flow,
|
||||||
contextualType: Type = Type.void,
|
contextualType: Type = Type.void,
|
||||||
reportMode: ReportMode = ReportMode.REPORT
|
reportMode: ReportMode = ReportMode.REPORT
|
||||||
): Element | null {
|
): Element | null {
|
||||||
@ -697,14 +702,14 @@ export class Resolver extends DiagnosticEmitter {
|
|||||||
if ((<AssertionExpression>expression).assertionKind == AssertionKind.NONNULL) {
|
if ((<AssertionExpression>expression).assertionKind == AssertionKind.NONNULL) {
|
||||||
return this.resolveExpression(
|
return this.resolveExpression(
|
||||||
(<AssertionExpression>expression).expression,
|
(<AssertionExpression>expression).expression,
|
||||||
contextualFunction,
|
flow,
|
||||||
contextualType,
|
contextualType,
|
||||||
reportMode
|
reportMode
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
let type = this.resolveType(
|
let type = this.resolveType(
|
||||||
assert((<AssertionExpression>expression).toType),
|
assert((<AssertionExpression>expression).toType),
|
||||||
contextualFunction.flow.contextualTypeArguments,
|
flow.contextualTypeArguments,
|
||||||
reportMode
|
reportMode
|
||||||
);
|
);
|
||||||
if (!type) return null;
|
if (!type) return null;
|
||||||
@ -733,7 +738,7 @@ export class Resolver extends DiagnosticEmitter {
|
|||||||
}
|
}
|
||||||
return this.resolveExpression(
|
return this.resolveExpression(
|
||||||
operand,
|
operand,
|
||||||
contextualFunction,
|
flow,
|
||||||
contextualType,
|
contextualType,
|
||||||
reportMode
|
reportMode
|
||||||
);
|
);
|
||||||
@ -743,7 +748,7 @@ export class Resolver extends DiagnosticEmitter {
|
|||||||
case Token.MINUS_MINUS: {
|
case Token.MINUS_MINUS: {
|
||||||
return this.resolveExpression(
|
return this.resolveExpression(
|
||||||
(<UnaryPrefixExpression>expression).operand,
|
(<UnaryPrefixExpression>expression).operand,
|
||||||
contextualFunction,
|
flow,
|
||||||
contextualType,
|
contextualType,
|
||||||
reportMode
|
reportMode
|
||||||
);
|
);
|
||||||
@ -754,7 +759,7 @@ export class Resolver extends DiagnosticEmitter {
|
|||||||
case Token.TILDE: {
|
case Token.TILDE: {
|
||||||
let resolvedOperand = this.resolveExpression(
|
let resolvedOperand = this.resolveExpression(
|
||||||
(<UnaryPrefixExpression>expression).operand,
|
(<UnaryPrefixExpression>expression).operand,
|
||||||
contextualFunction,
|
flow,
|
||||||
contextualType,
|
contextualType,
|
||||||
reportMode
|
reportMode
|
||||||
);
|
);
|
||||||
@ -772,7 +777,7 @@ export class Resolver extends DiagnosticEmitter {
|
|||||||
case Token.MINUS_MINUS: {
|
case Token.MINUS_MINUS: {
|
||||||
return this.resolveExpression(
|
return this.resolveExpression(
|
||||||
(<UnaryPostfixExpression>expression).operand,
|
(<UnaryPostfixExpression>expression).operand,
|
||||||
contextualFunction,
|
flow,
|
||||||
contextualType,
|
contextualType,
|
||||||
reportMode
|
reportMode
|
||||||
);
|
);
|
||||||
@ -788,15 +793,15 @@ export class Resolver extends DiagnosticEmitter {
|
|||||||
throw new Error("not implemented");
|
throw new Error("not implemented");
|
||||||
}
|
}
|
||||||
case NodeKind.THIS: { // -> Class / ClassPrototype
|
case NodeKind.THIS: { // -> Class / ClassPrototype
|
||||||
if (contextualFunction.flow.is(FlowFlags.INLINE_CONTEXT)) {
|
if (flow.is(FlowFlags.INLINE_CONTEXT)) {
|
||||||
let explicitLocal = contextualFunction.flow.getScopedLocal("this");
|
let explicitLocal = flow.lookupLocal("this");
|
||||||
if (explicitLocal) {
|
if (explicitLocal) {
|
||||||
this.currentThisExpression = null;
|
this.currentThisExpression = null;
|
||||||
this.currentElementExpression = null;
|
this.currentElementExpression = null;
|
||||||
return explicitLocal;
|
return explicitLocal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let parent = contextualFunction.parent;
|
let parent = flow.parentFunction.parent;
|
||||||
if (parent) {
|
if (parent) {
|
||||||
this.currentThisExpression = null;
|
this.currentThisExpression = null;
|
||||||
this.currentElementExpression = null;
|
this.currentElementExpression = null;
|
||||||
@ -811,15 +816,15 @@ export class Resolver extends DiagnosticEmitter {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
case NodeKind.SUPER: { // -> Class
|
case NodeKind.SUPER: { // -> Class
|
||||||
if (contextualFunction.flow.is(FlowFlags.INLINE_CONTEXT)) {
|
if (flow.is(FlowFlags.INLINE_CONTEXT)) {
|
||||||
let explicitLocal = contextualFunction.flow.getScopedLocal("super");
|
let explicitLocal = flow.lookupLocal("super");
|
||||||
if (explicitLocal) {
|
if (explicitLocal) {
|
||||||
this.currentThisExpression = null;
|
this.currentThisExpression = null;
|
||||||
this.currentElementExpression = null;
|
this.currentElementExpression = null;
|
||||||
return explicitLocal;
|
return explicitLocal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let parent = contextualFunction.parent;
|
let parent = flow.actualFunction.parent;
|
||||||
if (parent && parent.kind == ElementKind.CLASS && (parent = (<Class>parent).base)) {
|
if (parent && parent.kind == ElementKind.CLASS && (parent = (<Class>parent).base)) {
|
||||||
this.currentThisExpression = null;
|
this.currentThisExpression = null;
|
||||||
this.currentElementExpression = null;
|
this.currentElementExpression = null;
|
||||||
@ -834,7 +839,7 @@ export class Resolver extends DiagnosticEmitter {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
case NodeKind.IDENTIFIER: {
|
case NodeKind.IDENTIFIER: {
|
||||||
return this.resolveIdentifier(<IdentifierExpression>expression, contextualFunction, reportMode);
|
return this.resolveIdentifier(<IdentifierExpression>expression, flow, flow.actualFunction, reportMode);
|
||||||
}
|
}
|
||||||
case NodeKind.LITERAL: {
|
case NodeKind.LITERAL: {
|
||||||
switch ((<LiteralExpression>expression).literalKind) {
|
switch ((<LiteralExpression>expression).literalKind) {
|
||||||
@ -871,7 +876,7 @@ export class Resolver extends DiagnosticEmitter {
|
|||||||
case NodeKind.PROPERTYACCESS: {
|
case NodeKind.PROPERTYACCESS: {
|
||||||
return this.resolvePropertyAccess(
|
return this.resolvePropertyAccess(
|
||||||
<PropertyAccessExpression>expression,
|
<PropertyAccessExpression>expression,
|
||||||
contextualFunction,
|
flow,
|
||||||
contextualType,
|
contextualType,
|
||||||
reportMode
|
reportMode
|
||||||
);
|
);
|
||||||
@ -879,20 +884,20 @@ export class Resolver extends DiagnosticEmitter {
|
|||||||
case NodeKind.ELEMENTACCESS: {
|
case NodeKind.ELEMENTACCESS: {
|
||||||
return this.resolveElementAccess(
|
return this.resolveElementAccess(
|
||||||
<ElementAccessExpression>expression,
|
<ElementAccessExpression>expression,
|
||||||
contextualFunction,
|
flow,
|
||||||
contextualType,
|
contextualType,
|
||||||
reportMode
|
reportMode
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
case NodeKind.CALL: {
|
case NodeKind.CALL: {
|
||||||
let targetExpression = (<CallExpression>expression).expression;
|
let targetExpression = (<CallExpression>expression).expression;
|
||||||
let target = this.resolveExpression(targetExpression, contextualFunction, contextualType, reportMode);
|
let target = this.resolveExpression(targetExpression, flow, contextualType, reportMode);
|
||||||
if (!target) return null;
|
if (!target) return null;
|
||||||
if (target.kind == ElementKind.FUNCTION_PROTOTYPE) {
|
if (target.kind == ElementKind.FUNCTION_PROTOTYPE) {
|
||||||
let instance = this.resolveFunctionInclTypeArguments(
|
let instance = this.resolveFunctionInclTypeArguments(
|
||||||
<FunctionPrototype>target,
|
<FunctionPrototype>target,
|
||||||
(<CallExpression>expression).typeArguments,
|
(<CallExpression>expression).typeArguments,
|
||||||
makeMap<string,Type>(contextualFunction.flow.contextualTypeArguments),
|
makeMap<string,Type>(flow.contextualTypeArguments),
|
||||||
expression,
|
expression,
|
||||||
reportMode
|
reportMode
|
||||||
);
|
);
|
||||||
|
@ -1249,7 +1249,9 @@
|
|||||||
local.get $8
|
local.get $8
|
||||||
else
|
else
|
||||||
local.get $1
|
local.get $1
|
||||||
local.get $1
|
local.set $9
|
||||||
|
local.get $9
|
||||||
|
local.get $9
|
||||||
f32.ne
|
f32.ne
|
||||||
end
|
end
|
||||||
i32.const 0
|
i32.const 0
|
||||||
@ -2531,7 +2533,9 @@
|
|||||||
local.get $8
|
local.get $8
|
||||||
else
|
else
|
||||||
local.get $1
|
local.get $1
|
||||||
local.get $1
|
local.set $9
|
||||||
|
local.get $9
|
||||||
|
local.get $9
|
||||||
f64.ne
|
f64.ne
|
||||||
end
|
end
|
||||||
i32.const 0
|
i32.const 0
|
||||||
|
@ -16,7 +16,9 @@
|
|||||||
call $inlining-recursive/bar
|
call $inlining-recursive/bar
|
||||||
)
|
)
|
||||||
(func $inlining-recursive/bar (; 2 ;) (type $v)
|
(func $inlining-recursive/bar (; 2 ;) (type $v)
|
||||||
call $inlining-recursive/baz
|
block $inlining-recursive/bar|inlined.0
|
||||||
|
call $inlining-recursive/baz
|
||||||
|
end
|
||||||
)
|
)
|
||||||
(func $null (; 3 ;) (type $v)
|
(func $null (; 3 ;) (type $v)
|
||||||
)
|
)
|
||||||
|
@ -7,8 +7,10 @@
|
|||||||
(memory $0 1)
|
(memory $0 1)
|
||||||
(data (i32.const 8) "\0b\00\00\00i\00n\00l\00i\00n\00i\00n\00g\00.\00t\00s")
|
(data (i32.const 8) "\0b\00\00\00i\00n\00l\00i\00n\00i\00n\00g\00.\00t\00s")
|
||||||
(table $0 2 funcref)
|
(table $0 2 funcref)
|
||||||
(elem (i32.const 0) $null $inlining/test_funcs~anonymous|1)
|
(elem (i32.const 0) $null $inlining/func_fe~anonymous|1)
|
||||||
(global $~argc (mut i32) (i32.const 0))
|
(global $~argc (mut i32) (i32.const 0))
|
||||||
|
(global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0))
|
||||||
|
(global $~lib/allocator/arena/offset (mut i32) (i32.const 0))
|
||||||
(export "memory" (memory $0))
|
(export "memory" (memory $0))
|
||||||
(export "table" (table $0))
|
(export "table" (table $0))
|
||||||
(export "test" (func $inlining/test))
|
(export "test" (func $inlining/test))
|
||||||
@ -16,7 +18,7 @@
|
|||||||
(func $inlining/test (; 1 ;) (type $i) (result i32)
|
(func $inlining/test (; 1 ;) (type $i) (result i32)
|
||||||
i32.const 3
|
i32.const 3
|
||||||
)
|
)
|
||||||
(func $inlining/test_funcs~anonymous|1 (; 2 ;) (type $ii) (param $0 i32) (result i32)
|
(func $inlining/func_fe~anonymous|1 (; 2 ;) (type $ii) (param $0 i32) (result i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
)
|
)
|
||||||
(func $inlining/test_funcs (; 3 ;) (type $v)
|
(func $inlining/test_funcs (; 3 ;) (type $v)
|
||||||
@ -36,10 +38,155 @@
|
|||||||
unreachable
|
unreachable
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
(func $start (; 4 ;) (type $v)
|
(func $~lib/allocator/arena/__memory_allocate (; 4 ;) (type $ii) (param $0 i32) (result i32)
|
||||||
call $inlining/test_funcs
|
(local $1 i32)
|
||||||
|
(local $2 i32)
|
||||||
|
(local $3 i32)
|
||||||
|
local.get $0
|
||||||
|
i32.const 1073741824
|
||||||
|
i32.gt_u
|
||||||
|
if
|
||||||
|
unreachable
|
||||||
|
end
|
||||||
|
global.get $~lib/allocator/arena/offset
|
||||||
|
local.tee $1
|
||||||
|
local.get $0
|
||||||
|
i32.const 1
|
||||||
|
local.get $0
|
||||||
|
i32.const 1
|
||||||
|
i32.gt_u
|
||||||
|
select
|
||||||
|
i32.add
|
||||||
|
i32.const 7
|
||||||
|
i32.add
|
||||||
|
i32.const -8
|
||||||
|
i32.and
|
||||||
|
local.tee $2
|
||||||
|
current_memory
|
||||||
|
local.tee $3
|
||||||
|
i32.const 16
|
||||||
|
i32.shl
|
||||||
|
i32.gt_u
|
||||||
|
if
|
||||||
|
local.get $3
|
||||||
|
local.get $2
|
||||||
|
local.get $1
|
||||||
|
i32.sub
|
||||||
|
i32.const 65535
|
||||||
|
i32.add
|
||||||
|
i32.const -65536
|
||||||
|
i32.and
|
||||||
|
i32.const 16
|
||||||
|
i32.shr_u
|
||||||
|
local.tee $0
|
||||||
|
local.get $3
|
||||||
|
local.get $0
|
||||||
|
i32.gt_s
|
||||||
|
select
|
||||||
|
grow_memory
|
||||||
|
i32.const 0
|
||||||
|
i32.lt_s
|
||||||
|
if
|
||||||
|
local.get $0
|
||||||
|
grow_memory
|
||||||
|
i32.const 0
|
||||||
|
i32.lt_s
|
||||||
|
if
|
||||||
|
unreachable
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local.get $2
|
||||||
|
global.set $~lib/allocator/arena/offset
|
||||||
|
local.get $1
|
||||||
)
|
)
|
||||||
(func $null (; 5 ;) (type $v)
|
(func $inlining/test_ctor (; 5 ;) (type $v)
|
||||||
|
(local $0 i32)
|
||||||
|
i32.const 16
|
||||||
|
call $~lib/allocator/arena/__memory_allocate
|
||||||
|
local.tee $0
|
||||||
|
i32.eqz
|
||||||
|
if
|
||||||
|
i32.const 8
|
||||||
|
call $~lib/allocator/arena/__memory_allocate
|
||||||
|
local.set $0
|
||||||
|
end
|
||||||
|
local.get $0
|
||||||
|
i32.const 1
|
||||||
|
i32.store
|
||||||
|
local.get $0
|
||||||
|
i32.const 0
|
||||||
|
i32.store offset=4
|
||||||
|
local.get $0
|
||||||
|
i32.const 2
|
||||||
|
i32.store offset=4
|
||||||
|
local.get $0
|
||||||
|
i32.const 3
|
||||||
|
i32.store offset=8
|
||||||
|
local.get $0
|
||||||
|
i32.const 0
|
||||||
|
i32.store offset=12
|
||||||
|
local.get $0
|
||||||
|
i32.const 4
|
||||||
|
i32.store offset=12
|
||||||
|
local.get $0
|
||||||
|
i32.load
|
||||||
|
i32.const 1
|
||||||
|
i32.ne
|
||||||
|
if
|
||||||
|
i32.const 0
|
||||||
|
i32.const 8
|
||||||
|
i32.const 97
|
||||||
|
i32.const 2
|
||||||
|
call $~lib/env/abort
|
||||||
|
unreachable
|
||||||
|
end
|
||||||
|
local.get $0
|
||||||
|
i32.load offset=4
|
||||||
|
i32.const 2
|
||||||
|
i32.ne
|
||||||
|
if
|
||||||
|
i32.const 0
|
||||||
|
i32.const 8
|
||||||
|
i32.const 98
|
||||||
|
i32.const 2
|
||||||
|
call $~lib/env/abort
|
||||||
|
unreachable
|
||||||
|
end
|
||||||
|
local.get $0
|
||||||
|
i32.load offset=8
|
||||||
|
i32.const 3
|
||||||
|
i32.ne
|
||||||
|
if
|
||||||
|
i32.const 0
|
||||||
|
i32.const 8
|
||||||
|
i32.const 99
|
||||||
|
i32.const 2
|
||||||
|
call $~lib/env/abort
|
||||||
|
unreachable
|
||||||
|
end
|
||||||
|
local.get $0
|
||||||
|
i32.load offset=12
|
||||||
|
i32.const 4
|
||||||
|
i32.ne
|
||||||
|
if
|
||||||
|
i32.const 0
|
||||||
|
i32.const 8
|
||||||
|
i32.const 100
|
||||||
|
i32.const 2
|
||||||
|
call $~lib/env/abort
|
||||||
|
unreachable
|
||||||
|
end
|
||||||
|
)
|
||||||
|
(func $start (; 6 ;) (type $v)
|
||||||
|
call $inlining/test_funcs
|
||||||
|
i32.const 40
|
||||||
|
global.set $~lib/allocator/arena/startOffset
|
||||||
|
global.get $~lib/allocator/arena/startOffset
|
||||||
|
global.set $~lib/allocator/arena/offset
|
||||||
|
call $inlining/test_ctor
|
||||||
|
)
|
||||||
|
(func $null (; 7 ;) (type $v)
|
||||||
nop
|
nop
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -72,3 +72,32 @@ function test_funcs(): void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
test_funcs();
|
test_funcs();
|
||||||
|
|
||||||
|
import "allocator/arena";
|
||||||
|
|
||||||
|
class Baz {
|
||||||
|
a: i32 = 1;
|
||||||
|
b: i32;
|
||||||
|
@inline constructor(c: i32) {
|
||||||
|
this.b = c;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Bar extends Baz {
|
||||||
|
d: i32 = 3;
|
||||||
|
e: i32;
|
||||||
|
@inline constructor(f: i32) {
|
||||||
|
super(2);
|
||||||
|
this.e = f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_ctor(): void {
|
||||||
|
var bar = new Bar(4);
|
||||||
|
assert(bar.a == 1);
|
||||||
|
assert(bar.b == 2);
|
||||||
|
assert(bar.d == 3);
|
||||||
|
assert(bar.e == 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
test_ctor();
|
||||||
|
@ -7,9 +7,15 @@
|
|||||||
(memory $0 1)
|
(memory $0 1)
|
||||||
(data (i32.const 8) "\0b\00\00\00i\00n\00l\00i\00n\00i\00n\00g\00.\00t\00s\00")
|
(data (i32.const 8) "\0b\00\00\00i\00n\00l\00i\00n\00i\00n\00g\00.\00t\00s\00")
|
||||||
(table $0 2 funcref)
|
(table $0 2 funcref)
|
||||||
(elem (i32.const 0) $null $inlining/test_funcs~anonymous|1)
|
(elem (i32.const 0) $null $inlining/func_fe~anonymous|1)
|
||||||
(global $inlining/constantGlobal i32 (i32.const 1))
|
(global $inlining/constantGlobal i32 (i32.const 1))
|
||||||
(global $~argc (mut i32) (i32.const 0))
|
(global $~argc (mut i32) (i32.const 0))
|
||||||
|
(global $~lib/internal/allocator/AL_BITS i32 (i32.const 3))
|
||||||
|
(global $~lib/internal/allocator/AL_SIZE i32 (i32.const 8))
|
||||||
|
(global $~lib/internal/allocator/AL_MASK i32 (i32.const 7))
|
||||||
|
(global $~lib/internal/allocator/MAX_SIZE_32 i32 (i32.const 1073741824))
|
||||||
|
(global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0))
|
||||||
|
(global $~lib/allocator/arena/offset (mut i32) (i32.const 0))
|
||||||
(global $HEAP_BASE i32 (i32.const 36))
|
(global $HEAP_BASE i32 (i32.const 36))
|
||||||
(export "memory" (memory $0))
|
(export "memory" (memory $0))
|
||||||
(export "table" (table $0))
|
(export "table" (table $0))
|
||||||
@ -20,7 +26,7 @@
|
|||||||
i32.const 2
|
i32.const 2
|
||||||
i32.add
|
i32.add
|
||||||
)
|
)
|
||||||
(func $inlining/test_funcs~anonymous|1 (; 2 ;) (type $ii) (param $0 i32) (result i32)
|
(func $inlining/func_fe~anonymous|1 (; 2 ;) (type $ii) (param $0 i32) (result i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
)
|
)
|
||||||
(func $inlining/test_funcs (; 3 ;) (type $v)
|
(func $inlining/test_funcs (; 3 ;) (type $v)
|
||||||
@ -163,16 +169,14 @@
|
|||||||
local.set $2
|
local.set $2
|
||||||
local.get $2
|
local.get $2
|
||||||
local.set $3
|
local.set $3
|
||||||
block
|
local.get $3
|
||||||
local.get $3
|
local.set $5
|
||||||
local.set $5
|
local.get $5
|
||||||
local.get $5
|
local.set $6
|
||||||
local.set $6
|
local.get $6
|
||||||
local.get $6
|
i32.const 1
|
||||||
i32.const 1
|
i32.add
|
||||||
i32.add
|
local.set $4
|
||||||
local.set $4
|
|
||||||
end
|
|
||||||
local.get $4
|
local.get $4
|
||||||
end
|
end
|
||||||
i32.const 3
|
i32.const 3
|
||||||
@ -191,16 +195,14 @@
|
|||||||
local.set $4
|
local.set $4
|
||||||
local.get $4
|
local.get $4
|
||||||
local.set $3
|
local.set $3
|
||||||
block
|
local.get $3
|
||||||
local.get $3
|
local.set $6
|
||||||
local.set $6
|
local.get $6
|
||||||
local.get $6
|
local.set $5
|
||||||
local.set $5
|
local.get $5
|
||||||
local.get $5
|
i32.const 1
|
||||||
i32.const 1
|
i32.add
|
||||||
i32.add
|
local.set $2
|
||||||
local.set $2
|
|
||||||
end
|
|
||||||
local.get $2
|
local.get $2
|
||||||
end
|
end
|
||||||
i32.const 4
|
i32.const 4
|
||||||
@ -214,8 +216,10 @@
|
|||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
end
|
end
|
||||||
i32.const 0
|
block $inlining/func_iv|inlined.0
|
||||||
local.set $2
|
i32.const 0
|
||||||
|
local.set $2
|
||||||
|
end
|
||||||
block (result i32)
|
block (result i32)
|
||||||
i32.const 1
|
i32.const 1
|
||||||
global.set $~argc
|
global.set $~argc
|
||||||
@ -259,11 +263,13 @@
|
|||||||
i32.const 123
|
i32.const 123
|
||||||
local.set $7
|
local.set $7
|
||||||
block $inlining/Foo#method_this|inlined.0 (result i32)
|
block $inlining/Foo#method_this|inlined.0 (result i32)
|
||||||
i32.const 43
|
|
||||||
local.set $3
|
|
||||||
i32.const 3
|
|
||||||
local.set $2
|
|
||||||
local.get $7
|
local.get $7
|
||||||
|
local.set $3
|
||||||
|
i32.const 43
|
||||||
|
local.set $2
|
||||||
|
i32.const 3
|
||||||
|
local.set $4
|
||||||
|
local.get $3
|
||||||
end
|
end
|
||||||
i32.const 123
|
i32.const 123
|
||||||
i32.eq
|
i32.eq
|
||||||
@ -277,7 +283,199 @@
|
|||||||
unreachable
|
unreachable
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
(func $start (; 4 ;) (type $v)
|
(func $~lib/allocator/arena/__memory_allocate (; 4 ;) (type $ii) (param $0 i32) (result i32)
|
||||||
|
(local $1 i32)
|
||||||
|
(local $2 i32)
|
||||||
|
(local $3 i32)
|
||||||
|
(local $4 i32)
|
||||||
|
(local $5 i32)
|
||||||
|
(local $6 i32)
|
||||||
|
local.get $0
|
||||||
|
global.get $~lib/internal/allocator/MAX_SIZE_32
|
||||||
|
i32.gt_u
|
||||||
|
if
|
||||||
|
unreachable
|
||||||
|
end
|
||||||
|
global.get $~lib/allocator/arena/offset
|
||||||
|
local.set $1
|
||||||
|
local.get $1
|
||||||
|
local.get $0
|
||||||
|
local.tee $2
|
||||||
|
i32.const 1
|
||||||
|
local.tee $3
|
||||||
|
local.get $2
|
||||||
|
local.get $3
|
||||||
|
i32.gt_u
|
||||||
|
select
|
||||||
|
i32.add
|
||||||
|
global.get $~lib/internal/allocator/AL_MASK
|
||||||
|
i32.add
|
||||||
|
global.get $~lib/internal/allocator/AL_MASK
|
||||||
|
i32.const -1
|
||||||
|
i32.xor
|
||||||
|
i32.and
|
||||||
|
local.set $4
|
||||||
|
current_memory
|
||||||
|
local.set $5
|
||||||
|
local.get $4
|
||||||
|
local.get $5
|
||||||
|
i32.const 16
|
||||||
|
i32.shl
|
||||||
|
i32.gt_u
|
||||||
|
if
|
||||||
|
local.get $4
|
||||||
|
local.get $1
|
||||||
|
i32.sub
|
||||||
|
i32.const 65535
|
||||||
|
i32.add
|
||||||
|
i32.const 65535
|
||||||
|
i32.const -1
|
||||||
|
i32.xor
|
||||||
|
i32.and
|
||||||
|
i32.const 16
|
||||||
|
i32.shr_u
|
||||||
|
local.set $2
|
||||||
|
local.get $5
|
||||||
|
local.tee $3
|
||||||
|
local.get $2
|
||||||
|
local.tee $6
|
||||||
|
local.get $3
|
||||||
|
local.get $6
|
||||||
|
i32.gt_s
|
||||||
|
select
|
||||||
|
local.set $3
|
||||||
|
local.get $3
|
||||||
|
grow_memory
|
||||||
|
i32.const 0
|
||||||
|
i32.lt_s
|
||||||
|
if
|
||||||
|
local.get $2
|
||||||
|
grow_memory
|
||||||
|
i32.const 0
|
||||||
|
i32.lt_s
|
||||||
|
if
|
||||||
|
unreachable
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local.get $4
|
||||||
|
global.set $~lib/allocator/arena/offset
|
||||||
|
local.get $1
|
||||||
|
)
|
||||||
|
(func $~lib/memory/memory.allocate (; 5 ;) (type $ii) (param $0 i32) (result i32)
|
||||||
|
local.get $0
|
||||||
|
call $~lib/allocator/arena/__memory_allocate
|
||||||
|
return
|
||||||
|
)
|
||||||
|
(func $inlining/test_ctor (; 6 ;) (type $v)
|
||||||
|
(local $0 i32)
|
||||||
|
(local $1 i32)
|
||||||
|
(local $2 i32)
|
||||||
|
(local $3 i32)
|
||||||
|
(local $4 i32)
|
||||||
|
block $inlining/Bar#constructor|inlined.0 (result i32)
|
||||||
|
i32.const 0
|
||||||
|
local.set $0
|
||||||
|
i32.const 4
|
||||||
|
local.set $1
|
||||||
|
block $inlining/Baz#constructor|inlined.0 (result i32)
|
||||||
|
local.get $0
|
||||||
|
if (result i32)
|
||||||
|
local.get $0
|
||||||
|
else
|
||||||
|
i32.const 16
|
||||||
|
call $~lib/memory/memory.allocate
|
||||||
|
end
|
||||||
|
local.set $2
|
||||||
|
i32.const 2
|
||||||
|
local.set $3
|
||||||
|
block (result i32)
|
||||||
|
local.get $2
|
||||||
|
i32.eqz
|
||||||
|
if
|
||||||
|
i32.const 8
|
||||||
|
call $~lib/memory/memory.allocate
|
||||||
|
local.set $2
|
||||||
|
end
|
||||||
|
local.get $2
|
||||||
|
i32.const 1
|
||||||
|
i32.store
|
||||||
|
local.get $2
|
||||||
|
i32.const 0
|
||||||
|
i32.store offset=4
|
||||||
|
local.get $2
|
||||||
|
end
|
||||||
|
local.get $3
|
||||||
|
i32.store offset=4
|
||||||
|
local.get $2
|
||||||
|
end
|
||||||
|
local.set $0
|
||||||
|
local.get $0
|
||||||
|
i32.const 3
|
||||||
|
i32.store offset=8
|
||||||
|
local.get $0
|
||||||
|
i32.const 0
|
||||||
|
i32.store offset=12
|
||||||
|
local.get $0
|
||||||
|
local.get $1
|
||||||
|
i32.store offset=12
|
||||||
|
local.get $0
|
||||||
|
end
|
||||||
|
local.set $4
|
||||||
|
local.get $4
|
||||||
|
i32.load
|
||||||
|
i32.const 1
|
||||||
|
i32.eq
|
||||||
|
i32.eqz
|
||||||
|
if
|
||||||
|
i32.const 0
|
||||||
|
i32.const 8
|
||||||
|
i32.const 97
|
||||||
|
i32.const 2
|
||||||
|
call $~lib/env/abort
|
||||||
|
unreachable
|
||||||
|
end
|
||||||
|
local.get $4
|
||||||
|
i32.load offset=4
|
||||||
|
i32.const 2
|
||||||
|
i32.eq
|
||||||
|
i32.eqz
|
||||||
|
if
|
||||||
|
i32.const 0
|
||||||
|
i32.const 8
|
||||||
|
i32.const 98
|
||||||
|
i32.const 2
|
||||||
|
call $~lib/env/abort
|
||||||
|
unreachable
|
||||||
|
end
|
||||||
|
local.get $4
|
||||||
|
i32.load offset=8
|
||||||
|
i32.const 3
|
||||||
|
i32.eq
|
||||||
|
i32.eqz
|
||||||
|
if
|
||||||
|
i32.const 0
|
||||||
|
i32.const 8
|
||||||
|
i32.const 99
|
||||||
|
i32.const 2
|
||||||
|
call $~lib/env/abort
|
||||||
|
unreachable
|
||||||
|
end
|
||||||
|
local.get $4
|
||||||
|
i32.load offset=12
|
||||||
|
i32.const 4
|
||||||
|
i32.eq
|
||||||
|
i32.eqz
|
||||||
|
if
|
||||||
|
i32.const 0
|
||||||
|
i32.const 8
|
||||||
|
i32.const 100
|
||||||
|
i32.const 2
|
||||||
|
call $~lib/env/abort
|
||||||
|
unreachable
|
||||||
|
end
|
||||||
|
)
|
||||||
|
(func $start (; 7 ;) (type $v)
|
||||||
call $inlining/test
|
call $inlining/test
|
||||||
i32.const 3
|
i32.const 3
|
||||||
i32.eq
|
i32.eq
|
||||||
@ -291,7 +489,18 @@
|
|||||||
unreachable
|
unreachable
|
||||||
end
|
end
|
||||||
call $inlining/test_funcs
|
call $inlining/test_funcs
|
||||||
|
global.get $HEAP_BASE
|
||||||
|
global.get $~lib/internal/allocator/AL_MASK
|
||||||
|
i32.add
|
||||||
|
global.get $~lib/internal/allocator/AL_MASK
|
||||||
|
i32.const -1
|
||||||
|
i32.xor
|
||||||
|
i32.and
|
||||||
|
global.set $~lib/allocator/arena/startOffset
|
||||||
|
global.get $~lib/allocator/arena/startOffset
|
||||||
|
global.set $~lib/allocator/arena/offset
|
||||||
|
call $inlining/test_ctor
|
||||||
)
|
)
|
||||||
(func $null (; 5 ;) (type $v)
|
(func $null (; 8 ;) (type $v)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -44,6 +44,8 @@
|
|||||||
(func $~lib/array/Array<Foo>#__get (; 3 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
(func $~lib/array/Array<Foo>#__get (; 3 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||||
(local $2 i32)
|
(local $2 i32)
|
||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
|
(local $4 i32)
|
||||||
|
(local $5 i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load
|
i32.load
|
||||||
local.set $2
|
local.set $2
|
||||||
@ -54,14 +56,18 @@
|
|||||||
i32.shr_u
|
i32.shr_u
|
||||||
i32.lt_u
|
i32.lt_u
|
||||||
if (result i32)
|
if (result i32)
|
||||||
i32.const 0
|
|
||||||
local.set $3
|
|
||||||
local.get $2
|
local.get $2
|
||||||
|
local.set $3
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.set $4
|
||||||
|
i32.const 0
|
||||||
|
local.set $5
|
||||||
|
local.get $3
|
||||||
|
local.get $4
|
||||||
i32.const 2
|
i32.const 2
|
||||||
i32.shl
|
i32.shl
|
||||||
i32.add
|
i32.add
|
||||||
local.get $3
|
local.get $5
|
||||||
i32.add
|
i32.add
|
||||||
i32.load offset=8
|
i32.load offset=8
|
||||||
else
|
else
|
||||||
@ -76,6 +82,8 @@
|
|||||||
(func $~lib/array/Array<Foo | null>#__get (; 5 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
(func $~lib/array/Array<Foo | null>#__get (; 5 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||||
(local $2 i32)
|
(local $2 i32)
|
||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
|
(local $4 i32)
|
||||||
|
(local $5 i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load
|
i32.load
|
||||||
local.set $2
|
local.set $2
|
||||||
@ -86,14 +94,18 @@
|
|||||||
i32.shr_u
|
i32.shr_u
|
||||||
i32.lt_u
|
i32.lt_u
|
||||||
if (result i32)
|
if (result i32)
|
||||||
i32.const 0
|
|
||||||
local.set $3
|
|
||||||
local.get $2
|
local.get $2
|
||||||
|
local.set $3
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.set $4
|
||||||
|
i32.const 0
|
||||||
|
local.set $5
|
||||||
|
local.get $3
|
||||||
|
local.get $4
|
||||||
i32.const 2
|
i32.const 2
|
||||||
i32.shl
|
i32.shl
|
||||||
i32.add
|
i32.add
|
||||||
local.get $3
|
local.get $5
|
||||||
i32.add
|
i32.add
|
||||||
i32.load offset=8
|
i32.load offset=8
|
||||||
else
|
else
|
||||||
|
@ -423,32 +423,32 @@
|
|||||||
(local $7 i32)
|
(local $7 i32)
|
||||||
(local $8 i64)
|
(local $8 i64)
|
||||||
(local $9 i32)
|
(local $9 i32)
|
||||||
(local $10 i64)
|
(local $10 i32)
|
||||||
(local $11 i32)
|
(local $11 i32)
|
||||||
(local $12 i32)
|
(local $12 i64)
|
||||||
(local $13 i64)
|
(local $13 i64)
|
||||||
(local $14 i64)
|
(local $14 i64)
|
||||||
local.get $3
|
local.get $3
|
||||||
local.get $1
|
local.get $1
|
||||||
i64.sub
|
i64.sub
|
||||||
local.set $8
|
local.set $12
|
||||||
i64.const 1
|
i64.const 1
|
||||||
i32.const 0
|
i32.const 0
|
||||||
local.get $4
|
local.get $4
|
||||||
i32.sub
|
i32.sub
|
||||||
local.tee $11
|
local.tee $11
|
||||||
i64.extend_i32_s
|
i64.extend_i32_s
|
||||||
local.tee $13
|
local.tee $1
|
||||||
i64.shl
|
i64.shl
|
||||||
local.tee $10
|
local.tee $13
|
||||||
i64.const 1
|
i64.const 1
|
||||||
i64.sub
|
i64.sub
|
||||||
local.tee $14
|
local.tee $14
|
||||||
local.get $3
|
local.get $3
|
||||||
i64.and
|
i64.and
|
||||||
local.set $1
|
local.set $8
|
||||||
local.get $3
|
local.get $3
|
||||||
local.get $13
|
local.get $1
|
||||||
i64.shr_u
|
i64.shr_u
|
||||||
i32.wrap_i64
|
i32.wrap_i64
|
||||||
local.tee $7
|
local.tee $7
|
||||||
@ -456,7 +456,7 @@
|
|||||||
local.set $9
|
local.set $9
|
||||||
i32.const 2064
|
i32.const 2064
|
||||||
i32.load
|
i32.load
|
||||||
local.set $12
|
local.set $10
|
||||||
loop $continue|0
|
loop $continue|0
|
||||||
local.get $9
|
local.get $9
|
||||||
i32.const 0
|
i32.const 0
|
||||||
@ -612,9 +612,9 @@
|
|||||||
local.get $11
|
local.get $11
|
||||||
i64.extend_i32_s
|
i64.extend_i32_s
|
||||||
i64.shl
|
i64.shl
|
||||||
local.get $1
|
local.get $8
|
||||||
i64.add
|
i64.add
|
||||||
local.tee $3
|
local.tee $1
|
||||||
local.get $5
|
local.get $5
|
||||||
i64.le_u
|
i64.le_u
|
||||||
if
|
if
|
||||||
@ -622,7 +622,9 @@
|
|||||||
local.get $9
|
local.get $9
|
||||||
i32.add
|
i32.add
|
||||||
global.set $~lib/internal/number/_K
|
global.set $~lib/internal/number/_K
|
||||||
local.get $12
|
local.get $5
|
||||||
|
local.set $3
|
||||||
|
local.get $10
|
||||||
local.get $9
|
local.get $9
|
||||||
i32.const 2
|
i32.const 2
|
||||||
i32.shl
|
i32.shl
|
||||||
@ -631,7 +633,9 @@
|
|||||||
local.get $11
|
local.get $11
|
||||||
i64.extend_i32_s
|
i64.extend_i32_s
|
||||||
i64.shl
|
i64.shl
|
||||||
local.set $1
|
local.set $8
|
||||||
|
local.get $12
|
||||||
|
local.set $5
|
||||||
local.get $6
|
local.get $6
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.sub
|
i32.sub
|
||||||
@ -641,37 +645,37 @@
|
|||||||
i32.add
|
i32.add
|
||||||
local.tee $2
|
local.tee $2
|
||||||
i32.load16_u offset=4
|
i32.load16_u offset=4
|
||||||
local.set $7
|
local.set $10
|
||||||
loop $continue|2
|
loop $continue|2
|
||||||
local.get $3
|
local.get $1
|
||||||
local.get $8
|
local.get $5
|
||||||
i64.lt_u
|
i64.lt_u
|
||||||
local.tee $0
|
local.tee $0
|
||||||
if
|
if
|
||||||
local.get $5
|
|
||||||
local.get $3
|
local.get $3
|
||||||
i64.sub
|
|
||||||
local.get $1
|
local.get $1
|
||||||
|
i64.sub
|
||||||
|
local.get $8
|
||||||
i64.ge_u
|
i64.ge_u
|
||||||
local.set $0
|
local.set $0
|
||||||
end
|
end
|
||||||
local.get $0
|
local.get $0
|
||||||
if
|
if
|
||||||
local.get $1
|
local.get $1
|
||||||
local.get $3
|
|
||||||
i64.add
|
|
||||||
local.get $8
|
local.get $8
|
||||||
|
i64.add
|
||||||
|
local.get $5
|
||||||
i64.lt_u
|
i64.lt_u
|
||||||
local.tee $0
|
local.tee $0
|
||||||
i32.eqz
|
i32.eqz
|
||||||
if
|
if
|
||||||
local.get $8
|
local.get $5
|
||||||
local.get $3
|
local.get $1
|
||||||
i64.sub
|
i64.sub
|
||||||
local.get $1
|
local.get $1
|
||||||
local.get $3
|
|
||||||
i64.add
|
|
||||||
local.get $8
|
local.get $8
|
||||||
|
i64.add
|
||||||
|
local.get $5
|
||||||
i64.sub
|
i64.sub
|
||||||
i64.gt_u
|
i64.gt_u
|
||||||
local.set $0
|
local.set $0
|
||||||
@ -679,19 +683,19 @@
|
|||||||
end
|
end
|
||||||
local.get $0
|
local.get $0
|
||||||
if
|
if
|
||||||
local.get $7
|
local.get $10
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.sub
|
i32.sub
|
||||||
local.set $7
|
local.set $10
|
||||||
local.get $1
|
local.get $1
|
||||||
local.get $3
|
local.get $8
|
||||||
i64.add
|
i64.add
|
||||||
local.set $3
|
local.set $1
|
||||||
br $continue|2
|
br $continue|2
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local.get $2
|
local.get $2
|
||||||
local.get $7
|
local.get $10
|
||||||
i32.store16 offset=4
|
i32.store16 offset=4
|
||||||
local.get $6
|
local.get $6
|
||||||
return
|
return
|
||||||
@ -704,14 +708,14 @@
|
|||||||
i64.const 10
|
i64.const 10
|
||||||
i64.mul
|
i64.mul
|
||||||
local.set $5
|
local.set $5
|
||||||
local.get $1
|
local.get $8
|
||||||
i64.const 10
|
i64.const 10
|
||||||
i64.mul
|
i64.mul
|
||||||
local.tee $1
|
local.tee $8
|
||||||
local.get $11
|
local.get $11
|
||||||
i64.extend_i32_s
|
i64.extend_i32_s
|
||||||
i64.shr_u
|
i64.shr_u
|
||||||
local.tee $3
|
local.tee $1
|
||||||
local.get $6
|
local.get $6
|
||||||
i64.extend_i32_s
|
i64.extend_i32_s
|
||||||
i64.or
|
i64.or
|
||||||
@ -728,7 +732,7 @@
|
|||||||
i32.shl
|
i32.shl
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.add
|
i32.add
|
||||||
local.get $3
|
local.get $1
|
||||||
i32.wrap_i64
|
i32.wrap_i64
|
||||||
i32.const 65535
|
i32.const 65535
|
||||||
i32.and
|
i32.and
|
||||||
@ -740,10 +744,10 @@
|
|||||||
i32.const 1
|
i32.const 1
|
||||||
i32.sub
|
i32.sub
|
||||||
local.set $9
|
local.set $9
|
||||||
local.get $1
|
local.get $8
|
||||||
local.get $14
|
local.get $14
|
||||||
i64.and
|
i64.and
|
||||||
local.tee $1
|
local.tee $8
|
||||||
local.get $5
|
local.get $5
|
||||||
i64.ge_u
|
i64.ge_u
|
||||||
br_if $continue|3
|
br_if $continue|3
|
||||||
@ -751,7 +755,9 @@
|
|||||||
local.get $9
|
local.get $9
|
||||||
i32.add
|
i32.add
|
||||||
global.set $~lib/internal/number/_K
|
global.set $~lib/internal/number/_K
|
||||||
local.get $12
|
local.get $13
|
||||||
|
local.set $1
|
||||||
|
local.get $10
|
||||||
i32.const 0
|
i32.const 0
|
||||||
local.get $9
|
local.get $9
|
||||||
i32.sub
|
i32.sub
|
||||||
@ -759,49 +765,50 @@
|
|||||||
i32.shl
|
i32.shl
|
||||||
i32.add
|
i32.add
|
||||||
i64.load32_u offset=8
|
i64.load32_u offset=8
|
||||||
local.get $8
|
local.get $12
|
||||||
i64.mul
|
i64.mul
|
||||||
local.set $8
|
local.set $3
|
||||||
local.get $6
|
local.get $6
|
||||||
|
local.tee $10
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.sub
|
i32.sub
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.shl
|
i32.shl
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.add
|
i32.add
|
||||||
local.tee $7
|
local.tee $4
|
||||||
i32.load16_u offset=4
|
i32.load16_u offset=4
|
||||||
local.set $4
|
local.set $6
|
||||||
loop $continue|4
|
loop $continue|4
|
||||||
local.get $1
|
|
||||||
local.get $8
|
local.get $8
|
||||||
|
local.get $3
|
||||||
i64.lt_u
|
i64.lt_u
|
||||||
local.tee $2
|
local.tee $2
|
||||||
if
|
if
|
||||||
local.get $5
|
local.get $5
|
||||||
local.get $1
|
local.get $8
|
||||||
i64.sub
|
i64.sub
|
||||||
local.get $10
|
local.get $1
|
||||||
i64.ge_u
|
i64.ge_u
|
||||||
local.set $2
|
local.set $2
|
||||||
end
|
end
|
||||||
local.get $2
|
local.get $2
|
||||||
if
|
if
|
||||||
local.get $1
|
local.get $1
|
||||||
local.get $10
|
|
||||||
i64.add
|
|
||||||
local.get $8
|
local.get $8
|
||||||
|
i64.add
|
||||||
|
local.get $3
|
||||||
i64.lt_u
|
i64.lt_u
|
||||||
local.tee $2
|
local.tee $2
|
||||||
i32.eqz
|
i32.eqz
|
||||||
if
|
if
|
||||||
|
local.get $3
|
||||||
local.get $8
|
local.get $8
|
||||||
local.get $1
|
|
||||||
i64.sub
|
i64.sub
|
||||||
local.get $1
|
local.get $1
|
||||||
local.get $10
|
|
||||||
i64.add
|
|
||||||
local.get $8
|
local.get $8
|
||||||
|
i64.add
|
||||||
|
local.get $3
|
||||||
i64.sub
|
i64.sub
|
||||||
i64.gt_u
|
i64.gt_u
|
||||||
local.set $2
|
local.set $2
|
||||||
@ -809,21 +816,21 @@
|
|||||||
end
|
end
|
||||||
local.get $2
|
local.get $2
|
||||||
if
|
if
|
||||||
local.get $4
|
local.get $6
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.sub
|
i32.sub
|
||||||
local.set $4
|
local.set $6
|
||||||
local.get $1
|
local.get $1
|
||||||
local.get $10
|
local.get $8
|
||||||
i64.add
|
i64.add
|
||||||
local.set $1
|
local.set $8
|
||||||
br $continue|4
|
br $continue|4
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local.get $7
|
|
||||||
local.get $4
|
local.get $4
|
||||||
i32.store16 offset=4
|
|
||||||
local.get $6
|
local.get $6
|
||||||
|
i32.store16 offset=4
|
||||||
|
local.get $10
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
(func $~lib/internal/memory/memcpy (; 9 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
|
(func $~lib/internal/memory/memcpy (; 9 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
|
||||||
@ -1944,74 +1951,73 @@
|
|||||||
local.get $1
|
local.get $1
|
||||||
local.get $2
|
local.get $2
|
||||||
i32.add
|
i32.add
|
||||||
local.tee $5
|
|
||||||
i32.le_s
|
|
||||||
local.tee $3
|
local.tee $3
|
||||||
|
i32.le_s
|
||||||
|
local.tee $4
|
||||||
if
|
if
|
||||||
local.get $5
|
local.get $3
|
||||||
i32.const 21
|
i32.const 21
|
||||||
i32.le_s
|
i32.le_s
|
||||||
local.set $3
|
local.set $4
|
||||||
end
|
end
|
||||||
local.get $3
|
local.get $4
|
||||||
if (result i32)
|
if (result i32)
|
||||||
local.get $1
|
local.get $1
|
||||||
local.set $3
|
local.set $4
|
||||||
loop $repeat|0
|
loop $repeat|0
|
||||||
block $break|0
|
block $break|0
|
||||||
|
local.get $4
|
||||||
local.get $3
|
local.get $3
|
||||||
local.get $5
|
|
||||||
i32.ge_s
|
i32.ge_s
|
||||||
br_if $break|0
|
br_if $break|0
|
||||||
local.get $3
|
local.get $4
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.shl
|
i32.shl
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.add
|
i32.add
|
||||||
i32.const 48
|
i32.const 48
|
||||||
i32.store16 offset=4
|
i32.store16 offset=4
|
||||||
local.get $3
|
local.get $4
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.add
|
i32.add
|
||||||
local.set $3
|
local.set $4
|
||||||
br $repeat|0
|
br $repeat|0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local.get $5
|
local.get $3
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.shl
|
i32.shl
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.add
|
i32.add
|
||||||
i32.const 3145774
|
i32.const 3145774
|
||||||
i32.store offset=4
|
i32.store offset=4
|
||||||
local.get $5
|
local.get $3
|
||||||
i32.const 2
|
i32.const 2
|
||||||
i32.add
|
i32.add
|
||||||
else
|
else
|
||||||
local.get $5
|
local.get $3
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.gt_s
|
i32.gt_s
|
||||||
local.tee $3
|
local.tee $4
|
||||||
if
|
if
|
||||||
local.get $5
|
local.get $3
|
||||||
i32.const 21
|
i32.const 21
|
||||||
i32.le_s
|
i32.le_s
|
||||||
local.set $3
|
local.set $4
|
||||||
end
|
end
|
||||||
local.get $3
|
local.get $4
|
||||||
if (result i32)
|
if (result i32)
|
||||||
local.get $5
|
local.get $3
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.shl
|
i32.shl
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.add
|
i32.add
|
||||||
local.tee $3
|
|
||||||
i32.const 4
|
i32.const 4
|
||||||
i32.add
|
i32.add
|
||||||
local.tee $0
|
local.tee $4
|
||||||
i32.const 2
|
i32.const 2
|
||||||
i32.add
|
i32.add
|
||||||
local.get $0
|
local.get $4
|
||||||
i32.const 0
|
i32.const 0
|
||||||
local.get $2
|
local.get $2
|
||||||
i32.sub
|
i32.sub
|
||||||
@ -2019,6 +2025,10 @@
|
|||||||
i32.shl
|
i32.shl
|
||||||
call $~lib/internal/memory/memmove
|
call $~lib/internal/memory/memmove
|
||||||
local.get $3
|
local.get $3
|
||||||
|
i32.const 1
|
||||||
|
i32.shl
|
||||||
|
local.get $0
|
||||||
|
i32.add
|
||||||
i32.const 46
|
i32.const 46
|
||||||
i32.store16 offset=4
|
i32.store16 offset=4
|
||||||
local.get $1
|
local.get $1
|
||||||
@ -2026,25 +2036,25 @@
|
|||||||
i32.add
|
i32.add
|
||||||
else
|
else
|
||||||
i32.const -6
|
i32.const -6
|
||||||
local.get $5
|
local.get $3
|
||||||
i32.lt_s
|
i32.lt_s
|
||||||
local.tee $3
|
local.tee $4
|
||||||
if
|
if
|
||||||
local.get $5
|
local.get $3
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.le_s
|
i32.le_s
|
||||||
local.set $3
|
local.set $4
|
||||||
end
|
end
|
||||||
local.get $3
|
local.get $4
|
||||||
if (result i32)
|
if (result i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.const 4
|
i32.const 4
|
||||||
i32.add
|
i32.add
|
||||||
local.tee $2
|
local.tee $2
|
||||||
i32.const 2
|
i32.const 2
|
||||||
local.get $5
|
local.get $3
|
||||||
i32.sub
|
i32.sub
|
||||||
local.tee $3
|
local.tee $4
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.shl
|
i32.shl
|
||||||
i32.add
|
i32.add
|
||||||
@ -2057,29 +2067,29 @@
|
|||||||
i32.const 3014704
|
i32.const 3014704
|
||||||
i32.store offset=4
|
i32.store offset=4
|
||||||
i32.const 2
|
i32.const 2
|
||||||
local.set $4
|
local.set $3
|
||||||
loop $repeat|1
|
loop $repeat|1
|
||||||
block $break|1
|
block $break|1
|
||||||
local.get $4
|
|
||||||
local.get $3
|
local.get $3
|
||||||
|
local.get $4
|
||||||
i32.ge_s
|
i32.ge_s
|
||||||
br_if $break|1
|
br_if $break|1
|
||||||
local.get $4
|
local.get $3
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.shl
|
i32.shl
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.add
|
i32.add
|
||||||
i32.const 48
|
i32.const 48
|
||||||
i32.store16 offset=4
|
i32.store16 offset=4
|
||||||
local.get $4
|
local.get $3
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.add
|
i32.add
|
||||||
local.set $4
|
local.set $3
|
||||||
br $repeat|1
|
br $repeat|1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local.get $1
|
local.get $1
|
||||||
local.get $3
|
local.get $4
|
||||||
i32.add
|
i32.add
|
||||||
else
|
else
|
||||||
local.get $1
|
local.get $1
|
||||||
@ -2092,52 +2102,52 @@
|
|||||||
local.get $0
|
local.get $0
|
||||||
i32.const 4
|
i32.const 4
|
||||||
i32.add
|
i32.add
|
||||||
local.tee $3
|
local.tee $4
|
||||||
block (result i32)
|
block (result i32)
|
||||||
local.get $5
|
local.get $3
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.sub
|
i32.sub
|
||||||
local.tee $4
|
local.tee $3
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.lt_s
|
i32.lt_s
|
||||||
local.tee $2
|
local.tee $2
|
||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
local.get $4
|
local.get $3
|
||||||
i32.sub
|
i32.sub
|
||||||
local.set $4
|
local.set $3
|
||||||
end
|
end
|
||||||
local.get $4
|
local.get $3
|
||||||
end
|
end
|
||||||
local.get $4
|
local.get $3
|
||||||
call $~lib/internal/number/decimalCount32
|
call $~lib/internal/number/decimalCount32
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.add
|
i32.add
|
||||||
local.tee $4
|
local.tee $5
|
||||||
call $~lib/internal/number/utoa32_lut
|
call $~lib/internal/number/utoa32_lut
|
||||||
local.get $3
|
local.get $4
|
||||||
i32.const 45
|
i32.const 45
|
||||||
i32.const 43
|
i32.const 43
|
||||||
local.get $2
|
local.get $2
|
||||||
select
|
select
|
||||||
i32.store16 offset=4
|
i32.store16 offset=4
|
||||||
local.get $4
|
local.get $5
|
||||||
i32.const 2
|
i32.const 2
|
||||||
i32.add
|
i32.add
|
||||||
else
|
else
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.const 4
|
i32.const 4
|
||||||
i32.add
|
i32.add
|
||||||
local.tee $3
|
local.tee $4
|
||||||
i32.const 4
|
i32.const 4
|
||||||
i32.add
|
i32.add
|
||||||
local.get $3
|
local.get $4
|
||||||
i32.const 2
|
i32.const 2
|
||||||
i32.add
|
i32.add
|
||||||
local.get $1
|
local.get $1
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.shl
|
i32.shl
|
||||||
local.tee $4
|
local.tee $5
|
||||||
i32.const 2
|
i32.const 2
|
||||||
i32.sub
|
i32.sub
|
||||||
call $~lib/internal/memory/memmove
|
call $~lib/internal/memory/memmove
|
||||||
@ -2145,7 +2155,7 @@
|
|||||||
i32.const 46
|
i32.const 46
|
||||||
i32.store16 offset=6
|
i32.store16 offset=6
|
||||||
local.get $0
|
local.get $0
|
||||||
local.get $4
|
local.get $5
|
||||||
i32.add
|
i32.add
|
||||||
local.tee $0
|
local.tee $0
|
||||||
i32.const 101
|
i32.const 101
|
||||||
@ -2153,30 +2163,30 @@
|
|||||||
local.get $0
|
local.get $0
|
||||||
i32.const 4
|
i32.const 4
|
||||||
i32.add
|
i32.add
|
||||||
local.tee $3
|
local.tee $4
|
||||||
block (result i32)
|
block (result i32)
|
||||||
local.get $5
|
local.get $3
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.sub
|
i32.sub
|
||||||
local.tee $4
|
local.tee $3
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.lt_s
|
i32.lt_s
|
||||||
local.tee $2
|
local.tee $2
|
||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
local.get $4
|
local.get $3
|
||||||
i32.sub
|
i32.sub
|
||||||
local.set $4
|
local.set $3
|
||||||
end
|
end
|
||||||
local.get $4
|
local.get $3
|
||||||
end
|
end
|
||||||
local.get $4
|
local.get $3
|
||||||
call $~lib/internal/number/decimalCount32
|
call $~lib/internal/number/decimalCount32
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.add
|
i32.add
|
||||||
local.tee $0
|
local.tee $0
|
||||||
call $~lib/internal/number/utoa32_lut
|
call $~lib/internal/number/utoa32_lut
|
||||||
local.get $3
|
local.get $4
|
||||||
i32.const 45
|
i32.const 45
|
||||||
i32.const 43
|
i32.const 43
|
||||||
local.get $2
|
local.get $2
|
||||||
@ -2198,19 +2208,18 @@
|
|||||||
(local $4 i32)
|
(local $4 i32)
|
||||||
(local $5 i64)
|
(local $5 i64)
|
||||||
(local $6 i32)
|
(local $6 i32)
|
||||||
(local $7 i64)
|
(local $7 i32)
|
||||||
(local $8 i32)
|
(local $8 i64)
|
||||||
(local $9 i64)
|
(local $9 i64)
|
||||||
(local $10 i64)
|
(local $10 i64)
|
||||||
(local $11 i64)
|
(local $11 i64)
|
||||||
(local $12 i64)
|
(local $12 i32)
|
||||||
(local $13 i32)
|
(local $13 i64)
|
||||||
(local $14 i32)
|
(local $14 i32)
|
||||||
(local $15 i64)
|
|
||||||
local.get $1
|
local.get $1
|
||||||
f64.const 0
|
f64.const 0
|
||||||
f64.lt
|
f64.lt
|
||||||
local.tee $13
|
local.tee $12
|
||||||
if (result f64)
|
if (result f64)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.const 45
|
i32.const 45
|
||||||
@ -2221,32 +2230,32 @@
|
|||||||
local.get $1
|
local.get $1
|
||||||
end
|
end
|
||||||
i64.reinterpret_f64
|
i64.reinterpret_f64
|
||||||
local.tee $2
|
local.tee $13
|
||||||
i64.const 9218868437227405312
|
i64.const 9218868437227405312
|
||||||
i64.and
|
i64.and
|
||||||
i64.const 52
|
i64.const 52
|
||||||
i64.shr_u
|
i64.shr_u
|
||||||
i32.wrap_i64
|
i32.wrap_i64
|
||||||
local.set $8
|
local.set $7
|
||||||
local.get $2
|
local.get $13
|
||||||
i64.const 4503599627370495
|
i64.const 4503599627370495
|
||||||
i64.and
|
i64.and
|
||||||
local.get $8
|
local.get $7
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.ne
|
i32.ne
|
||||||
local.tee $6
|
local.tee $4
|
||||||
i64.extend_i32_u
|
i64.extend_i32_u
|
||||||
i64.const 52
|
i64.const 52
|
||||||
i64.shl
|
i64.shl
|
||||||
i64.add
|
i64.add
|
||||||
local.set $2
|
local.set $2
|
||||||
local.get $8
|
local.get $7
|
||||||
i32.const 1
|
i32.const 1
|
||||||
local.get $6
|
local.get $4
|
||||||
select
|
select
|
||||||
i32.const 1075
|
i32.const 1075
|
||||||
i32.sub
|
i32.sub
|
||||||
local.tee $8
|
local.tee $7
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.sub
|
i32.sub
|
||||||
local.set $6
|
local.set $6
|
||||||
@ -2275,7 +2284,7 @@
|
|||||||
i64.shl
|
i64.shl
|
||||||
i64.const 1
|
i64.const 1
|
||||||
i64.sub
|
i64.sub
|
||||||
local.get $8
|
local.get $7
|
||||||
local.get $14
|
local.get $14
|
||||||
i32.sub
|
i32.sub
|
||||||
local.get $6
|
local.get $6
|
||||||
@ -2342,27 +2351,27 @@
|
|||||||
local.tee $2
|
local.tee $2
|
||||||
i64.const 4294967295
|
i64.const 4294967295
|
||||||
i64.and
|
i64.and
|
||||||
local.tee $7
|
local.tee $8
|
||||||
global.get $~lib/internal/number/_frc_pow
|
global.get $~lib/internal/number/_frc_pow
|
||||||
local.tee $5
|
local.tee $5
|
||||||
i64.const 4294967295
|
i64.const 4294967295
|
||||||
i64.and
|
i64.and
|
||||||
local.tee $9
|
local.tee $9
|
||||||
i64.mul
|
i64.mul
|
||||||
local.set $10
|
local.set $3
|
||||||
local.get $5
|
local.get $5
|
||||||
i64.const 32
|
i64.const 32
|
||||||
i64.shr_u
|
i64.shr_u
|
||||||
local.tee $11
|
local.tee $10
|
||||||
local.get $7
|
local.get $8
|
||||||
i64.mul
|
i64.mul
|
||||||
local.get $2
|
local.get $2
|
||||||
i64.const 32
|
i64.const 32
|
||||||
i64.shr_u
|
i64.shr_u
|
||||||
local.tee $12
|
local.tee $2
|
||||||
local.get $9
|
local.get $9
|
||||||
i64.mul
|
i64.mul
|
||||||
local.get $10
|
local.get $3
|
||||||
i64.const 32
|
i64.const 32
|
||||||
i64.shr_u
|
i64.shr_u
|
||||||
i64.add
|
i64.add
|
||||||
@ -2374,43 +2383,43 @@
|
|||||||
i64.add
|
i64.add
|
||||||
i64.const 32
|
i64.const 32
|
||||||
i64.shr_u
|
i64.shr_u
|
||||||
local.get $11
|
local.get $2
|
||||||
local.get $12
|
local.get $10
|
||||||
i64.mul
|
i64.mul
|
||||||
local.get $3
|
local.get $3
|
||||||
i64.const 32
|
i64.const 32
|
||||||
i64.shr_u
|
i64.shr_u
|
||||||
i64.add
|
i64.add
|
||||||
i64.add
|
i64.add
|
||||||
local.set $2
|
local.set $13
|
||||||
local.get $5
|
local.get $5
|
||||||
i64.const 4294967295
|
i64.const 4294967295
|
||||||
i64.and
|
i64.and
|
||||||
local.tee $11
|
local.tee $2
|
||||||
global.get $~lib/internal/number/_frc_plus
|
global.get $~lib/internal/number/_frc_plus
|
||||||
local.tee $3
|
local.tee $3
|
||||||
i64.const 4294967295
|
i64.const 4294967295
|
||||||
i64.and
|
i64.and
|
||||||
local.tee $10
|
local.tee $10
|
||||||
i64.mul
|
i64.mul
|
||||||
local.set $7
|
local.set $11
|
||||||
local.get $10
|
local.get $10
|
||||||
local.get $5
|
local.get $5
|
||||||
i64.const 32
|
i64.const 32
|
||||||
i64.shr_u
|
i64.shr_u
|
||||||
|
local.tee $8
|
||||||
|
i64.mul
|
||||||
|
local.get $2
|
||||||
|
local.get $3
|
||||||
|
i64.const 32
|
||||||
|
i64.shr_u
|
||||||
local.tee $9
|
local.tee $9
|
||||||
i64.mul
|
i64.mul
|
||||||
local.get $11
|
local.get $11
|
||||||
local.get $3
|
|
||||||
i64.const 32
|
|
||||||
i64.shr_u
|
|
||||||
local.tee $12
|
|
||||||
i64.mul
|
|
||||||
local.get $7
|
|
||||||
i64.const 32
|
i64.const 32
|
||||||
i64.shr_u
|
i64.shr_u
|
||||||
i64.add
|
i64.add
|
||||||
local.tee $3
|
local.tee $2
|
||||||
i64.const 4294967295
|
i64.const 4294967295
|
||||||
i64.and
|
i64.and
|
||||||
i64.add
|
i64.add
|
||||||
@ -2418,97 +2427,95 @@
|
|||||||
i64.add
|
i64.add
|
||||||
i64.const 32
|
i64.const 32
|
||||||
i64.shr_u
|
i64.shr_u
|
||||||
|
local.get $8
|
||||||
local.get $9
|
local.get $9
|
||||||
local.get $12
|
|
||||||
i64.mul
|
i64.mul
|
||||||
local.get $3
|
local.get $2
|
||||||
i64.const 32
|
i64.const 32
|
||||||
i64.shr_u
|
i64.shr_u
|
||||||
i64.add
|
i64.add
|
||||||
i64.add
|
i64.add
|
||||||
local.set $15
|
local.set $11
|
||||||
global.get $~lib/internal/number/_frc_minus
|
global.get $~lib/internal/number/_frc_minus
|
||||||
local.tee $3
|
local.tee $2
|
||||||
i64.const 4294967295
|
i64.const 4294967295
|
||||||
i64.and
|
i64.and
|
||||||
local.tee $7
|
local.tee $8
|
||||||
local.get $5
|
local.get $5
|
||||||
i64.const 4294967295
|
i64.const 4294967295
|
||||||
i64.and
|
i64.and
|
||||||
local.tee $9
|
local.tee $9
|
||||||
i64.mul
|
i64.mul
|
||||||
local.set $10
|
local.set $3
|
||||||
local.get $5
|
local.get $11
|
||||||
i64.const 32
|
|
||||||
i64.shr_u
|
|
||||||
local.tee $11
|
|
||||||
local.get $7
|
|
||||||
i64.mul
|
|
||||||
local.get $3
|
|
||||||
i64.const 32
|
|
||||||
i64.shr_u
|
|
||||||
local.tee $12
|
|
||||||
local.get $9
|
|
||||||
i64.mul
|
|
||||||
local.get $10
|
|
||||||
i64.const 32
|
|
||||||
i64.shr_u
|
|
||||||
i64.add
|
|
||||||
local.tee $3
|
|
||||||
i64.const 4294967295
|
|
||||||
i64.and
|
|
||||||
i64.add
|
|
||||||
local.set $5
|
|
||||||
local.get $15
|
|
||||||
i64.const 1
|
i64.const 1
|
||||||
i64.sub
|
i64.sub
|
||||||
local.tee $7
|
local.tee $11
|
||||||
local.get $11
|
local.get $5
|
||||||
local.get $12
|
i64.const 32
|
||||||
|
i64.shr_u
|
||||||
|
local.tee $10
|
||||||
|
local.get $8
|
||||||
|
i64.mul
|
||||||
|
local.get $2
|
||||||
|
i64.const 32
|
||||||
|
i64.shr_u
|
||||||
|
local.tee $2
|
||||||
|
local.get $9
|
||||||
i64.mul
|
i64.mul
|
||||||
local.get $3
|
local.get $3
|
||||||
i64.const 32
|
i64.const 32
|
||||||
i64.shr_u
|
i64.shr_u
|
||||||
i64.add
|
i64.add
|
||||||
local.get $5
|
local.tee $3
|
||||||
|
i64.const 4294967295
|
||||||
|
i64.and
|
||||||
|
i64.add
|
||||||
i64.const 2147483647
|
i64.const 2147483647
|
||||||
i64.add
|
i64.add
|
||||||
i64.const 32
|
i64.const 32
|
||||||
i64.shr_u
|
i64.shr_u
|
||||||
|
local.get $2
|
||||||
|
local.get $10
|
||||||
|
i64.mul
|
||||||
|
local.get $3
|
||||||
|
i64.const 32
|
||||||
|
i64.shr_u
|
||||||
|
i64.add
|
||||||
i64.add
|
i64.add
|
||||||
i64.const 1
|
i64.const 1
|
||||||
i64.add
|
i64.add
|
||||||
i64.sub
|
i64.sub
|
||||||
local.set $3
|
local.set $3
|
||||||
local.get $13
|
local.get $12
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.shl
|
i32.shl
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.add
|
i32.add
|
||||||
local.get $0
|
local.get $0
|
||||||
local.get $2
|
local.get $13
|
||||||
local.get $8
|
global.get $~lib/internal/number/_exp_pow
|
||||||
|
local.tee $14
|
||||||
|
local.get $7
|
||||||
local.get $4
|
local.get $4
|
||||||
i32.sub
|
i32.sub
|
||||||
global.get $~lib/internal/number/_exp_pow
|
|
||||||
local.tee $4
|
|
||||||
i32.add
|
i32.add
|
||||||
i32.const -64
|
i32.const -64
|
||||||
i32.sub
|
i32.sub
|
||||||
local.get $7
|
local.get $11
|
||||||
local.get $4
|
|
||||||
global.get $~lib/internal/number/_exp
|
global.get $~lib/internal/number/_exp
|
||||||
|
local.get $14
|
||||||
i32.add
|
i32.add
|
||||||
i32.const -64
|
i32.const -64
|
||||||
i32.sub
|
i32.sub
|
||||||
local.get $3
|
local.get $3
|
||||||
local.get $13
|
local.get $12
|
||||||
call $~lib/internal/number/genDigits
|
call $~lib/internal/number/genDigits
|
||||||
local.get $13
|
local.get $12
|
||||||
i32.sub
|
i32.sub
|
||||||
global.get $~lib/internal/number/_K
|
global.get $~lib/internal/number/_K
|
||||||
call $~lib/internal/number/prettify
|
call $~lib/internal/number/prettify
|
||||||
local.get $13
|
local.get $12
|
||||||
i32.add
|
i32.add
|
||||||
)
|
)
|
||||||
(func $~lib/string/String#substring (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
(func $~lib/string/String#substring (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1888,7 +1888,7 @@
|
|||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
end
|
end
|
||||||
block
|
block $~lib/memory/memory.fill|inlined.0
|
||||||
global.get $std/allocator_arena/ptr1
|
global.get $std/allocator_arena/ptr1
|
||||||
local.set $0
|
local.set $0
|
||||||
i32.const 18
|
i32.const 18
|
||||||
@ -1933,7 +1933,7 @@
|
|||||||
end
|
end
|
||||||
unreachable
|
unreachable
|
||||||
end
|
end
|
||||||
block
|
block $~lib/memory/memory.copy|inlined.0
|
||||||
global.get $std/allocator_arena/ptr2
|
global.get $std/allocator_arena/ptr2
|
||||||
local.set $2
|
local.set $2
|
||||||
global.get $std/allocator_arena/ptr1
|
global.get $std/allocator_arena/ptr1
|
||||||
@ -2004,32 +2004,20 @@
|
|||||||
block $~lib/memory/memory.free|inlined.0
|
block $~lib/memory/memory.free|inlined.0
|
||||||
global.get $std/allocator_arena/ptr1
|
global.get $std/allocator_arena/ptr1
|
||||||
local.set $2
|
local.set $2
|
||||||
block
|
local.get $2
|
||||||
local.get $2
|
call $~lib/allocator/arena/__memory_free
|
||||||
call $~lib/allocator/arena/__memory_free
|
br $~lib/memory/memory.free|inlined.0
|
||||||
br $~lib/memory/memory.free|inlined.0
|
|
||||||
unreachable
|
|
||||||
end
|
|
||||||
unreachable
|
|
||||||
end
|
end
|
||||||
block $~lib/memory/memory.free|inlined.1
|
block $~lib/memory/memory.free|inlined.1
|
||||||
global.get $std/allocator_arena/ptr2
|
global.get $std/allocator_arena/ptr2
|
||||||
local.set $2
|
local.set $2
|
||||||
block
|
local.get $2
|
||||||
local.get $2
|
call $~lib/allocator/arena/__memory_free
|
||||||
call $~lib/allocator/arena/__memory_free
|
br $~lib/memory/memory.free|inlined.1
|
||||||
br $~lib/memory/memory.free|inlined.1
|
|
||||||
unreachable
|
|
||||||
end
|
|
||||||
unreachable
|
|
||||||
end
|
end
|
||||||
block $~lib/memory/memory.reset|inlined.0
|
block $~lib/memory/memory.reset|inlined.0
|
||||||
block
|
call $~lib/allocator/arena/__memory_reset
|
||||||
call $~lib/allocator/arena/__memory_reset
|
br $~lib/memory/memory.reset|inlined.0
|
||||||
br $~lib/memory/memory.reset|inlined.0
|
|
||||||
unreachable
|
|
||||||
end
|
|
||||||
unreachable
|
|
||||||
end
|
end
|
||||||
block $~lib/memory/memory.allocate|inlined.2 (result i32)
|
block $~lib/memory/memory.allocate|inlined.2 (result i32)
|
||||||
global.get $std/allocator_arena/size
|
global.get $std/allocator_arena/size
|
||||||
|
@ -28,6 +28,8 @@
|
|||||||
(func $~lib/array/Array<Array<i32>>#__get (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
(func $~lib/array/Array<Array<i32>>#__get (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||||
(local $2 i32)
|
(local $2 i32)
|
||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
|
(local $4 i32)
|
||||||
|
(local $5 i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load
|
i32.load
|
||||||
local.set $2
|
local.set $2
|
||||||
@ -38,14 +40,18 @@
|
|||||||
i32.shr_u
|
i32.shr_u
|
||||||
i32.lt_u
|
i32.lt_u
|
||||||
if (result i32)
|
if (result i32)
|
||||||
i32.const 0
|
|
||||||
local.set $3
|
|
||||||
local.get $2
|
local.get $2
|
||||||
|
local.set $3
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.set $4
|
||||||
|
i32.const 0
|
||||||
|
local.set $5
|
||||||
|
local.get $3
|
||||||
|
local.get $4
|
||||||
i32.const 2
|
i32.const 2
|
||||||
i32.shl
|
i32.shl
|
||||||
i32.add
|
i32.add
|
||||||
local.get $3
|
local.get $5
|
||||||
i32.add
|
i32.add
|
||||||
i32.load offset=8
|
i32.load offset=8
|
||||||
else
|
else
|
||||||
@ -55,6 +61,8 @@
|
|||||||
(func $~lib/array/Array<i32>#__get (; 2 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
(func $~lib/array/Array<i32>#__get (; 2 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||||
(local $2 i32)
|
(local $2 i32)
|
||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
|
(local $4 i32)
|
||||||
|
(local $5 i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load
|
i32.load
|
||||||
local.set $2
|
local.set $2
|
||||||
@ -65,14 +73,18 @@
|
|||||||
i32.shr_u
|
i32.shr_u
|
||||||
i32.lt_u
|
i32.lt_u
|
||||||
if (result i32)
|
if (result i32)
|
||||||
i32.const 0
|
|
||||||
local.set $3
|
|
||||||
local.get $2
|
local.get $2
|
||||||
|
local.set $3
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.set $4
|
||||||
|
i32.const 0
|
||||||
|
local.set $5
|
||||||
|
local.get $3
|
||||||
|
local.get $4
|
||||||
i32.const 2
|
i32.const 2
|
||||||
i32.shl
|
i32.shl
|
||||||
i32.add
|
i32.add
|
||||||
local.get $3
|
local.get $5
|
||||||
i32.add
|
i32.add
|
||||||
i32.load offset=8
|
i32.load offset=8
|
||||||
else
|
else
|
||||||
@ -89,6 +101,8 @@
|
|||||||
(func $~lib/array/Array<String>#__get (; 4 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
(func $~lib/array/Array<String>#__get (; 4 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||||
(local $2 i32)
|
(local $2 i32)
|
||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
|
(local $4 i32)
|
||||||
|
(local $5 i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load
|
i32.load
|
||||||
local.set $2
|
local.set $2
|
||||||
@ -99,14 +113,18 @@
|
|||||||
i32.shr_u
|
i32.shr_u
|
||||||
i32.lt_u
|
i32.lt_u
|
||||||
if (result i32)
|
if (result i32)
|
||||||
i32.const 0
|
|
||||||
local.set $3
|
|
||||||
local.get $2
|
local.get $2
|
||||||
|
local.set $3
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.set $4
|
||||||
|
i32.const 0
|
||||||
|
local.set $5
|
||||||
|
local.get $3
|
||||||
|
local.get $4
|
||||||
i32.const 2
|
i32.const 2
|
||||||
i32.shl
|
i32.shl
|
||||||
i32.add
|
i32.add
|
||||||
local.get $3
|
local.get $5
|
||||||
i32.add
|
i32.add
|
||||||
i32.load offset=8
|
i32.load offset=8
|
||||||
else
|
else
|
||||||
@ -250,6 +268,8 @@
|
|||||||
(func $~lib/array/Array<Array<String>>#__get (; 9 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
(func $~lib/array/Array<Array<String>>#__get (; 9 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||||
(local $2 i32)
|
(local $2 i32)
|
||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
|
(local $4 i32)
|
||||||
|
(local $5 i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load
|
i32.load
|
||||||
local.set $2
|
local.set $2
|
||||||
@ -260,14 +280,18 @@
|
|||||||
i32.shr_u
|
i32.shr_u
|
||||||
i32.lt_u
|
i32.lt_u
|
||||||
if (result i32)
|
if (result i32)
|
||||||
i32.const 0
|
|
||||||
local.set $3
|
|
||||||
local.get $2
|
local.get $2
|
||||||
|
local.set $3
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.set $4
|
||||||
|
i32.const 0
|
||||||
|
local.set $5
|
||||||
|
local.get $3
|
||||||
|
local.get $4
|
||||||
i32.const 2
|
i32.const 2
|
||||||
i32.shl
|
i32.shl
|
||||||
i32.add
|
i32.add
|
||||||
local.get $3
|
local.get $5
|
||||||
i32.add
|
i32.add
|
||||||
i32.load offset=8
|
i32.load offset=8
|
||||||
else
|
else
|
||||||
|
@ -40,6 +40,8 @@
|
|||||||
(func $~lib/array/Array<i8>#__get (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
(func $~lib/array/Array<i8>#__get (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||||
(local $2 i32)
|
(local $2 i32)
|
||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
|
(local $4 i32)
|
||||||
|
(local $5 i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load
|
i32.load
|
||||||
local.set $2
|
local.set $2
|
||||||
@ -50,14 +52,18 @@
|
|||||||
i32.shr_u
|
i32.shr_u
|
||||||
i32.lt_u
|
i32.lt_u
|
||||||
if (result i32)
|
if (result i32)
|
||||||
i32.const 0
|
|
||||||
local.set $3
|
|
||||||
local.get $2
|
local.get $2
|
||||||
|
local.set $3
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.set $4
|
||||||
|
i32.const 0
|
||||||
|
local.set $5
|
||||||
|
local.get $3
|
||||||
|
local.get $4
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.shl
|
i32.shl
|
||||||
i32.add
|
i32.add
|
||||||
local.get $3
|
local.get $5
|
||||||
i32.add
|
i32.add
|
||||||
i32.load8_s offset=8
|
i32.load8_s offset=8
|
||||||
else
|
else
|
||||||
@ -67,6 +73,8 @@
|
|||||||
(func $~lib/array/Array<i32>#__get (; 2 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
(func $~lib/array/Array<i32>#__get (; 2 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||||
(local $2 i32)
|
(local $2 i32)
|
||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
|
(local $4 i32)
|
||||||
|
(local $5 i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load
|
i32.load
|
||||||
local.set $2
|
local.set $2
|
||||||
@ -77,14 +85,18 @@
|
|||||||
i32.shr_u
|
i32.shr_u
|
||||||
i32.lt_u
|
i32.lt_u
|
||||||
if (result i32)
|
if (result i32)
|
||||||
i32.const 0
|
|
||||||
local.set $3
|
|
||||||
local.get $2
|
local.get $2
|
||||||
|
local.set $3
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.set $4
|
||||||
|
i32.const 0
|
||||||
|
local.set $5
|
||||||
|
local.get $3
|
||||||
|
local.get $4
|
||||||
i32.const 2
|
i32.const 2
|
||||||
i32.shl
|
i32.shl
|
||||||
i32.add
|
i32.add
|
||||||
local.get $3
|
local.get $5
|
||||||
i32.add
|
i32.add
|
||||||
i32.load offset=8
|
i32.load offset=8
|
||||||
else
|
else
|
||||||
@ -475,6 +487,7 @@
|
|||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
(local $4 i32)
|
(local $4 i32)
|
||||||
(local $5 i32)
|
(local $5 i32)
|
||||||
|
(local $6 i32)
|
||||||
local.get $1
|
local.get $1
|
||||||
i32.const 1073741816
|
i32.const 1073741816
|
||||||
i32.gt_u
|
i32.gt_u
|
||||||
@ -514,34 +527,44 @@
|
|||||||
local.get $0
|
local.get $0
|
||||||
local.get $1
|
local.get $1
|
||||||
i32.store offset=4
|
i32.store offset=4
|
||||||
local.get $3
|
block $~lib/memory/memory.fill|inlined.0
|
||||||
global.get $~lib/internal/arraybuffer/HEADER_SIZE
|
local.get $3
|
||||||
i32.add
|
global.get $~lib/internal/arraybuffer/HEADER_SIZE
|
||||||
local.set $4
|
i32.add
|
||||||
i32.const 0
|
local.set $4
|
||||||
local.set $5
|
i32.const 0
|
||||||
local.get $4
|
local.set $5
|
||||||
local.get $5
|
local.get $2
|
||||||
local.get $2
|
local.set $6
|
||||||
call $~lib/internal/memory/memset
|
local.get $4
|
||||||
|
local.get $5
|
||||||
|
local.get $6
|
||||||
|
call $~lib/internal/memory/memset
|
||||||
|
end
|
||||||
local.get $0
|
local.get $0
|
||||||
)
|
)
|
||||||
(func $~lib/array/Array<i8>#__unchecked_set (; 9 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
|
(func $~lib/array/Array<i8>#__unchecked_set (; 9 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
|
||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
(local $4 i32)
|
(local $4 i32)
|
||||||
|
(local $5 i32)
|
||||||
|
(local $6 i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load
|
i32.load
|
||||||
local.set $3
|
local.set $3
|
||||||
i32.const 0
|
|
||||||
local.set $4
|
|
||||||
local.get $3
|
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.set $4
|
||||||
|
local.get $2
|
||||||
|
local.set $5
|
||||||
|
i32.const 0
|
||||||
|
local.set $6
|
||||||
|
local.get $3
|
||||||
|
local.get $4
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.shl
|
i32.shl
|
||||||
i32.add
|
i32.add
|
||||||
local.get $4
|
local.get $6
|
||||||
i32.add
|
i32.add
|
||||||
local.get $2
|
local.get $5
|
||||||
i32.store8 offset=8
|
i32.store8 offset=8
|
||||||
)
|
)
|
||||||
(func $~lib/array/Array<i32>#constructor (; 10 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
(func $~lib/array/Array<i32>#constructor (; 10 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||||
@ -549,6 +572,7 @@
|
|||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
(local $4 i32)
|
(local $4 i32)
|
||||||
(local $5 i32)
|
(local $5 i32)
|
||||||
|
(local $6 i32)
|
||||||
local.get $1
|
local.get $1
|
||||||
i32.const 268435454
|
i32.const 268435454
|
||||||
i32.gt_u
|
i32.gt_u
|
||||||
@ -588,34 +612,44 @@
|
|||||||
local.get $0
|
local.get $0
|
||||||
local.get $1
|
local.get $1
|
||||||
i32.store offset=4
|
i32.store offset=4
|
||||||
local.get $3
|
block $~lib/memory/memory.fill|inlined.1
|
||||||
global.get $~lib/internal/arraybuffer/HEADER_SIZE
|
local.get $3
|
||||||
i32.add
|
global.get $~lib/internal/arraybuffer/HEADER_SIZE
|
||||||
local.set $4
|
i32.add
|
||||||
i32.const 0
|
local.set $4
|
||||||
local.set $5
|
i32.const 0
|
||||||
local.get $4
|
local.set $5
|
||||||
local.get $5
|
local.get $2
|
||||||
local.get $2
|
local.set $6
|
||||||
call $~lib/internal/memory/memset
|
local.get $4
|
||||||
|
local.get $5
|
||||||
|
local.get $6
|
||||||
|
call $~lib/internal/memory/memset
|
||||||
|
end
|
||||||
local.get $0
|
local.get $0
|
||||||
)
|
)
|
||||||
(func $~lib/array/Array<i32>#__unchecked_set (; 11 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
|
(func $~lib/array/Array<i32>#__unchecked_set (; 11 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
|
||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
(local $4 i32)
|
(local $4 i32)
|
||||||
|
(local $5 i32)
|
||||||
|
(local $6 i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load
|
i32.load
|
||||||
local.set $3
|
local.set $3
|
||||||
i32.const 0
|
|
||||||
local.set $4
|
|
||||||
local.get $3
|
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.set $4
|
||||||
|
local.get $2
|
||||||
|
local.set $5
|
||||||
|
i32.const 0
|
||||||
|
local.set $6
|
||||||
|
local.get $3
|
||||||
|
local.get $4
|
||||||
i32.const 2
|
i32.const 2
|
||||||
i32.shl
|
i32.shl
|
||||||
i32.add
|
i32.add
|
||||||
local.get $4
|
local.get $6
|
||||||
i32.add
|
i32.add
|
||||||
local.get $2
|
local.get $5
|
||||||
i32.store offset=8
|
i32.store offset=8
|
||||||
)
|
)
|
||||||
(func $std/array-literal/Ref#constructor (; 12 ;) (type $ii) (param $0 i32) (result i32)
|
(func $std/array-literal/Ref#constructor (; 12 ;) (type $ii) (param $0 i32) (result i32)
|
||||||
@ -633,6 +667,7 @@
|
|||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
(local $4 i32)
|
(local $4 i32)
|
||||||
(local $5 i32)
|
(local $5 i32)
|
||||||
|
(local $6 i32)
|
||||||
local.get $1
|
local.get $1
|
||||||
i32.const 268435454
|
i32.const 268435454
|
||||||
i32.gt_u
|
i32.gt_u
|
||||||
@ -672,34 +707,44 @@
|
|||||||
local.get $0
|
local.get $0
|
||||||
local.get $1
|
local.get $1
|
||||||
i32.store offset=4
|
i32.store offset=4
|
||||||
local.get $3
|
block $~lib/memory/memory.fill|inlined.2
|
||||||
global.get $~lib/internal/arraybuffer/HEADER_SIZE
|
local.get $3
|
||||||
i32.add
|
global.get $~lib/internal/arraybuffer/HEADER_SIZE
|
||||||
local.set $4
|
i32.add
|
||||||
i32.const 0
|
local.set $4
|
||||||
local.set $5
|
i32.const 0
|
||||||
local.get $4
|
local.set $5
|
||||||
local.get $5
|
local.get $2
|
||||||
local.get $2
|
local.set $6
|
||||||
call $~lib/internal/memory/memset
|
local.get $4
|
||||||
|
local.get $5
|
||||||
|
local.get $6
|
||||||
|
call $~lib/internal/memory/memset
|
||||||
|
end
|
||||||
local.get $0
|
local.get $0
|
||||||
)
|
)
|
||||||
(func $~lib/array/Array<Ref>#__unchecked_set (; 14 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
|
(func $~lib/array/Array<Ref>#__unchecked_set (; 14 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
|
||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
(local $4 i32)
|
(local $4 i32)
|
||||||
|
(local $5 i32)
|
||||||
|
(local $6 i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load
|
i32.load
|
||||||
local.set $3
|
local.set $3
|
||||||
i32.const 0
|
|
||||||
local.set $4
|
|
||||||
local.get $3
|
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.set $4
|
||||||
|
local.get $2
|
||||||
|
local.set $5
|
||||||
|
i32.const 0
|
||||||
|
local.set $6
|
||||||
|
local.get $3
|
||||||
|
local.get $4
|
||||||
i32.const 2
|
i32.const 2
|
||||||
i32.shl
|
i32.shl
|
||||||
i32.add
|
i32.add
|
||||||
local.get $4
|
local.get $6
|
||||||
i32.add
|
i32.add
|
||||||
local.get $2
|
local.get $5
|
||||||
i32.store offset=8
|
i32.store offset=8
|
||||||
)
|
)
|
||||||
(func $std/array-literal/RefWithCtor#constructor (; 15 ;) (type $ii) (param $0 i32) (result i32)
|
(func $std/array-literal/RefWithCtor#constructor (; 15 ;) (type $ii) (param $0 i32) (result i32)
|
||||||
@ -717,6 +762,7 @@
|
|||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
(local $4 i32)
|
(local $4 i32)
|
||||||
(local $5 i32)
|
(local $5 i32)
|
||||||
|
(local $6 i32)
|
||||||
local.get $1
|
local.get $1
|
||||||
i32.const 268435454
|
i32.const 268435454
|
||||||
i32.gt_u
|
i32.gt_u
|
||||||
@ -756,34 +802,44 @@
|
|||||||
local.get $0
|
local.get $0
|
||||||
local.get $1
|
local.get $1
|
||||||
i32.store offset=4
|
i32.store offset=4
|
||||||
local.get $3
|
block $~lib/memory/memory.fill|inlined.3
|
||||||
global.get $~lib/internal/arraybuffer/HEADER_SIZE
|
local.get $3
|
||||||
i32.add
|
global.get $~lib/internal/arraybuffer/HEADER_SIZE
|
||||||
local.set $4
|
i32.add
|
||||||
i32.const 0
|
local.set $4
|
||||||
local.set $5
|
i32.const 0
|
||||||
local.get $4
|
local.set $5
|
||||||
local.get $5
|
local.get $2
|
||||||
local.get $2
|
local.set $6
|
||||||
call $~lib/internal/memory/memset
|
local.get $4
|
||||||
|
local.get $5
|
||||||
|
local.get $6
|
||||||
|
call $~lib/internal/memory/memset
|
||||||
|
end
|
||||||
local.get $0
|
local.get $0
|
||||||
)
|
)
|
||||||
(func $~lib/array/Array<RefWithCtor>#__unchecked_set (; 17 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
|
(func $~lib/array/Array<RefWithCtor>#__unchecked_set (; 17 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
|
||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
(local $4 i32)
|
(local $4 i32)
|
||||||
|
(local $5 i32)
|
||||||
|
(local $6 i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load
|
i32.load
|
||||||
local.set $3
|
local.set $3
|
||||||
i32.const 0
|
|
||||||
local.set $4
|
|
||||||
local.get $3
|
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.set $4
|
||||||
|
local.get $2
|
||||||
|
local.set $5
|
||||||
|
i32.const 0
|
||||||
|
local.set $6
|
||||||
|
local.get $3
|
||||||
|
local.get $4
|
||||||
i32.const 2
|
i32.const 2
|
||||||
i32.shl
|
i32.shl
|
||||||
i32.add
|
i32.add
|
||||||
local.get $4
|
local.get $6
|
||||||
i32.add
|
i32.add
|
||||||
local.get $2
|
local.get $5
|
||||||
i32.store offset=8
|
i32.store offset=8
|
||||||
)
|
)
|
||||||
(func $start (; 18 ;) (type $v)
|
(func $start (; 18 ;) (type $v)
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1437,25 +1437,26 @@
|
|||||||
(local $4 i32)
|
(local $4 i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load
|
i32.load
|
||||||
local.set $3
|
local.set $4
|
||||||
local.get $1
|
local.get $1
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.lt_s
|
i32.lt_s
|
||||||
if (result i32)
|
if (result i32)
|
||||||
local.get $1
|
local.get $1
|
||||||
local.get $3
|
|
||||||
i32.add
|
|
||||||
local.tee $4
|
|
||||||
i32.const 0
|
|
||||||
local.get $4
|
local.get $4
|
||||||
|
i32.add
|
||||||
|
local.tee $3
|
||||||
|
i32.const 0
|
||||||
|
local.get $3
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.gt_s
|
i32.gt_s
|
||||||
select
|
select
|
||||||
else
|
else
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.tee $3
|
||||||
|
local.get $4
|
||||||
local.get $3
|
local.get $3
|
||||||
local.get $1
|
local.get $4
|
||||||
local.get $3
|
|
||||||
i32.lt_s
|
i32.lt_s
|
||||||
select
|
select
|
||||||
end
|
end
|
||||||
@ -1465,33 +1466,34 @@
|
|||||||
i32.lt_s
|
i32.lt_s
|
||||||
if (result i32)
|
if (result i32)
|
||||||
local.get $2
|
local.get $2
|
||||||
local.get $3
|
|
||||||
i32.add
|
|
||||||
local.tee $4
|
|
||||||
i32.const 0
|
|
||||||
local.get $4
|
local.get $4
|
||||||
|
i32.add
|
||||||
|
local.tee $3
|
||||||
|
i32.const 0
|
||||||
|
local.get $3
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.gt_s
|
i32.gt_s
|
||||||
select
|
select
|
||||||
else
|
else
|
||||||
local.get $2
|
local.get $2
|
||||||
|
local.tee $3
|
||||||
|
local.get $4
|
||||||
local.get $3
|
local.get $3
|
||||||
local.get $2
|
local.get $4
|
||||||
local.get $3
|
|
||||||
i32.lt_s
|
i32.lt_s
|
||||||
select
|
select
|
||||||
end
|
end
|
||||||
local.get $1
|
local.get $1
|
||||||
i32.sub
|
i32.sub
|
||||||
local.tee $4
|
local.tee $3
|
||||||
i32.const 0
|
i32.const 0
|
||||||
local.get $4
|
local.get $3
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.gt_s
|
i32.gt_s
|
||||||
select
|
select
|
||||||
local.tee $2
|
|
||||||
call $~lib/internal/arraybuffer/allocateUnsafe
|
|
||||||
local.tee $3
|
local.tee $3
|
||||||
|
call $~lib/internal/arraybuffer/allocateUnsafe
|
||||||
|
local.tee $2
|
||||||
i32.const 8
|
i32.const 8
|
||||||
i32.add
|
i32.add
|
||||||
local.get $0
|
local.get $0
|
||||||
@ -1499,9 +1501,9 @@
|
|||||||
i32.add
|
i32.add
|
||||||
local.get $1
|
local.get $1
|
||||||
i32.add
|
i32.add
|
||||||
local.get $2
|
|
||||||
call $~lib/internal/memory/memmove
|
|
||||||
local.get $3
|
local.get $3
|
||||||
|
call $~lib/internal/memory/memmove
|
||||||
|
local.get $2
|
||||||
)
|
)
|
||||||
(func $~lib/arraybuffer/ArrayBuffer#slice|trampoline (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
(func $~lib/arraybuffer/ArrayBuffer#slice|trampoline (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||||
(local $2 i32)
|
(local $2 i32)
|
||||||
|
@ -412,6 +412,7 @@
|
|||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
(local $4 i32)
|
(local $4 i32)
|
||||||
(local $5 i32)
|
(local $5 i32)
|
||||||
|
(local $6 i32)
|
||||||
local.get $1
|
local.get $1
|
||||||
global.get $~lib/internal/arraybuffer/MAX_BLENGTH
|
global.get $~lib/internal/arraybuffer/MAX_BLENGTH
|
||||||
i32.gt_u
|
i32.gt_u
|
||||||
@ -437,9 +438,11 @@
|
|||||||
local.set $4
|
local.set $4
|
||||||
i32.const 0
|
i32.const 0
|
||||||
local.set $5
|
local.set $5
|
||||||
|
local.get $1
|
||||||
|
local.set $6
|
||||||
local.get $4
|
local.get $4
|
||||||
local.get $5
|
local.get $5
|
||||||
local.get $1
|
local.get $6
|
||||||
call $~lib/internal/memory/memset
|
call $~lib/internal/memory/memset
|
||||||
end
|
end
|
||||||
local.get $3
|
local.get $3
|
||||||
@ -1878,6 +1881,7 @@
|
|||||||
(local $5 i32)
|
(local $5 i32)
|
||||||
(local $6 i32)
|
(local $6 i32)
|
||||||
(local $7 i32)
|
(local $7 i32)
|
||||||
|
(local $8 i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load
|
i32.load
|
||||||
local.set $3
|
local.set $3
|
||||||
@ -1947,20 +1951,24 @@
|
|||||||
local.get $6
|
local.get $6
|
||||||
call $~lib/internal/arraybuffer/allocateUnsafe
|
call $~lib/internal/arraybuffer/allocateUnsafe
|
||||||
local.set $7
|
local.set $7
|
||||||
local.get $7
|
block $~lib/memory/memory.copy|inlined.0
|
||||||
global.get $~lib/internal/arraybuffer/HEADER_SIZE
|
local.get $7
|
||||||
i32.add
|
global.get $~lib/internal/arraybuffer/HEADER_SIZE
|
||||||
local.set $4
|
i32.add
|
||||||
local.get $0
|
local.set $4
|
||||||
global.get $~lib/internal/arraybuffer/HEADER_SIZE
|
local.get $0
|
||||||
i32.add
|
global.get $~lib/internal/arraybuffer/HEADER_SIZE
|
||||||
local.get $1
|
i32.add
|
||||||
i32.add
|
local.get $1
|
||||||
local.set $5
|
i32.add
|
||||||
local.get $4
|
local.set $5
|
||||||
local.get $5
|
local.get $6
|
||||||
local.get $6
|
local.set $8
|
||||||
call $~lib/internal/memory/memmove
|
local.get $4
|
||||||
|
local.get $5
|
||||||
|
local.get $8
|
||||||
|
call $~lib/internal/memory/memmove
|
||||||
|
end
|
||||||
local.get $7
|
local.get $7
|
||||||
)
|
)
|
||||||
(func $~lib/arraybuffer/ArrayBuffer#slice|trampoline (; 9 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
(func $~lib/arraybuffer/ArrayBuffer#slice|trampoline (; 9 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||||
@ -2047,6 +2055,7 @@
|
|||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
(local $4 i32)
|
(local $4 i32)
|
||||||
(local $5 i32)
|
(local $5 i32)
|
||||||
|
(local $6 i32)
|
||||||
local.get $1
|
local.get $1
|
||||||
i32.const 1073741816
|
i32.const 1073741816
|
||||||
i32.gt_u
|
i32.gt_u
|
||||||
@ -2065,16 +2074,20 @@
|
|||||||
local.get $2
|
local.get $2
|
||||||
call $~lib/internal/arraybuffer/allocateUnsafe
|
call $~lib/internal/arraybuffer/allocateUnsafe
|
||||||
local.set $3
|
local.set $3
|
||||||
local.get $3
|
block $~lib/memory/memory.fill|inlined.1
|
||||||
global.get $~lib/internal/arraybuffer/HEADER_SIZE
|
local.get $3
|
||||||
i32.add
|
global.get $~lib/internal/arraybuffer/HEADER_SIZE
|
||||||
local.set $4
|
i32.add
|
||||||
i32.const 0
|
local.set $4
|
||||||
local.set $5
|
i32.const 0
|
||||||
local.get $4
|
local.set $5
|
||||||
local.get $5
|
local.get $2
|
||||||
local.get $2
|
local.set $6
|
||||||
call $~lib/internal/memory/memset
|
local.get $4
|
||||||
|
local.get $5
|
||||||
|
local.get $6
|
||||||
|
call $~lib/internal/memory/memset
|
||||||
|
end
|
||||||
block (result i32)
|
block (result i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.eqz
|
i32.eqz
|
||||||
@ -2123,6 +2136,7 @@
|
|||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
(local $4 i32)
|
(local $4 i32)
|
||||||
(local $5 i32)
|
(local $5 i32)
|
||||||
|
(local $6 i32)
|
||||||
local.get $1
|
local.get $1
|
||||||
i32.const 268435454
|
i32.const 268435454
|
||||||
i32.gt_u
|
i32.gt_u
|
||||||
@ -2141,16 +2155,20 @@
|
|||||||
local.get $2
|
local.get $2
|
||||||
call $~lib/internal/arraybuffer/allocateUnsafe
|
call $~lib/internal/arraybuffer/allocateUnsafe
|
||||||
local.set $3
|
local.set $3
|
||||||
local.get $3
|
block $~lib/memory/memory.fill|inlined.2
|
||||||
global.get $~lib/internal/arraybuffer/HEADER_SIZE
|
local.get $3
|
||||||
i32.add
|
global.get $~lib/internal/arraybuffer/HEADER_SIZE
|
||||||
local.set $4
|
i32.add
|
||||||
i32.const 0
|
local.set $4
|
||||||
local.set $5
|
i32.const 0
|
||||||
local.get $4
|
local.set $5
|
||||||
local.get $5
|
local.get $2
|
||||||
local.get $2
|
local.set $6
|
||||||
call $~lib/internal/memory/memset
|
local.get $4
|
||||||
|
local.get $5
|
||||||
|
local.get $6
|
||||||
|
call $~lib/internal/memory/memset
|
||||||
|
end
|
||||||
block (result i32)
|
block (result i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.eqz
|
i32.eqz
|
||||||
|
@ -474,18 +474,19 @@
|
|||||||
(local $4 i32)
|
(local $4 i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load offset=8
|
i32.load offset=8
|
||||||
local.set $3
|
local.set $4
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.tee $3
|
||||||
i32.const 1073741816
|
i32.const 1073741816
|
||||||
i32.gt_u
|
i32.gt_u
|
||||||
local.tee $4
|
local.tee $1
|
||||||
if (result i32)
|
if (result i32)
|
||||||
local.get $4
|
|
||||||
else
|
|
||||||
local.get $1
|
local.get $1
|
||||||
|
else
|
||||||
|
local.get $3
|
||||||
i32.const 4
|
i32.const 4
|
||||||
i32.add
|
i32.add
|
||||||
local.get $3
|
local.get $4
|
||||||
i32.gt_s
|
i32.gt_s
|
||||||
end
|
end
|
||||||
if
|
if
|
||||||
@ -503,7 +504,7 @@
|
|||||||
local.get $0
|
local.get $0
|
||||||
i32.load offset=4
|
i32.load offset=4
|
||||||
i32.add
|
i32.add
|
||||||
local.get $1
|
local.get $3
|
||||||
i32.add
|
i32.add
|
||||||
f32.load offset=8
|
f32.load offset=8
|
||||||
else
|
else
|
||||||
@ -512,7 +513,7 @@
|
|||||||
local.get $0
|
local.get $0
|
||||||
i32.load offset=4
|
i32.load offset=4
|
||||||
i32.add
|
i32.add
|
||||||
local.get $1
|
local.get $3
|
||||||
i32.add
|
i32.add
|
||||||
i32.load offset=8
|
i32.load offset=8
|
||||||
local.tee $0
|
local.tee $0
|
||||||
@ -595,19 +596,20 @@
|
|||||||
i32.load offset=8
|
i32.load offset=8
|
||||||
local.set $3
|
local.set $3
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.tee $2
|
||||||
i32.const 1073741816
|
i32.const 1073741816
|
||||||
i32.gt_u
|
i32.gt_u
|
||||||
local.tee $2
|
local.tee $1
|
||||||
i32.eqz
|
i32.eqz
|
||||||
if
|
if
|
||||||
local.get $1
|
local.get $2
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.add
|
i32.add
|
||||||
local.get $3
|
local.get $3
|
||||||
i32.gt_s
|
i32.gt_s
|
||||||
local.set $2
|
local.set $1
|
||||||
end
|
end
|
||||||
local.get $2
|
local.get $1
|
||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 136
|
i32.const 136
|
||||||
@ -621,7 +623,7 @@
|
|||||||
local.get $0
|
local.get $0
|
||||||
i32.load offset=4
|
i32.load offset=4
|
||||||
i32.add
|
i32.add
|
||||||
local.get $1
|
local.get $2
|
||||||
i32.add
|
i32.add
|
||||||
i32.load8_s offset=8
|
i32.load8_s offset=8
|
||||||
)
|
)
|
||||||
@ -630,18 +632,19 @@
|
|||||||
(local $4 i32)
|
(local $4 i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load offset=8
|
i32.load offset=8
|
||||||
local.set $3
|
local.set $4
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.tee $3
|
||||||
i32.const 1073741816
|
i32.const 1073741816
|
||||||
i32.gt_u
|
i32.gt_u
|
||||||
local.tee $4
|
local.tee $1
|
||||||
if (result i32)
|
if (result i32)
|
||||||
local.get $4
|
|
||||||
else
|
|
||||||
local.get $1
|
local.get $1
|
||||||
|
else
|
||||||
|
local.get $3
|
||||||
i32.const 2
|
i32.const 2
|
||||||
i32.add
|
i32.add
|
||||||
local.get $3
|
local.get $4
|
||||||
i32.gt_s
|
i32.gt_s
|
||||||
end
|
end
|
||||||
if
|
if
|
||||||
@ -657,7 +660,7 @@
|
|||||||
local.get $0
|
local.get $0
|
||||||
i32.load offset=4
|
i32.load offset=4
|
||||||
i32.add
|
i32.add
|
||||||
local.get $1
|
local.get $3
|
||||||
i32.add
|
i32.add
|
||||||
i32.load16_s offset=8
|
i32.load16_s offset=8
|
||||||
local.set $0
|
local.set $0
|
||||||
@ -683,18 +686,19 @@
|
|||||||
(local $4 i32)
|
(local $4 i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load offset=8
|
i32.load offset=8
|
||||||
local.set $3
|
local.set $4
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.tee $3
|
||||||
i32.const 1073741816
|
i32.const 1073741816
|
||||||
i32.gt_u
|
i32.gt_u
|
||||||
local.tee $4
|
local.tee $1
|
||||||
if (result i32)
|
if (result i32)
|
||||||
local.get $4
|
|
||||||
else
|
|
||||||
local.get $1
|
local.get $1
|
||||||
|
else
|
||||||
|
local.get $3
|
||||||
i32.const 4
|
i32.const 4
|
||||||
i32.add
|
i32.add
|
||||||
local.get $3
|
local.get $4
|
||||||
i32.gt_s
|
i32.gt_s
|
||||||
end
|
end
|
||||||
if
|
if
|
||||||
@ -710,7 +714,7 @@
|
|||||||
local.get $0
|
local.get $0
|
||||||
i32.load offset=4
|
i32.load offset=4
|
||||||
i32.add
|
i32.add
|
||||||
local.get $1
|
local.get $3
|
||||||
i32.add
|
i32.add
|
||||||
i32.load offset=8
|
i32.load offset=8
|
||||||
local.set $0
|
local.set $0
|
||||||
@ -767,19 +771,20 @@
|
|||||||
i32.load offset=8
|
i32.load offset=8
|
||||||
local.set $3
|
local.set $3
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.tee $2
|
||||||
i32.const 1073741816
|
i32.const 1073741816
|
||||||
i32.gt_u
|
i32.gt_u
|
||||||
local.tee $2
|
local.tee $1
|
||||||
i32.eqz
|
i32.eqz
|
||||||
if
|
if
|
||||||
local.get $1
|
local.get $2
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.add
|
i32.add
|
||||||
local.get $3
|
local.get $3
|
||||||
i32.gt_s
|
i32.gt_s
|
||||||
local.set $2
|
local.set $1
|
||||||
end
|
end
|
||||||
local.get $2
|
local.get $1
|
||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 136
|
i32.const 136
|
||||||
@ -793,7 +798,7 @@
|
|||||||
local.get $0
|
local.get $0
|
||||||
i32.load offset=4
|
i32.load offset=4
|
||||||
i32.add
|
i32.add
|
||||||
local.get $1
|
local.get $2
|
||||||
i32.add
|
i32.add
|
||||||
i32.load8_u offset=8
|
i32.load8_u offset=8
|
||||||
)
|
)
|
||||||
@ -802,18 +807,19 @@
|
|||||||
(local $4 i32)
|
(local $4 i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load offset=8
|
i32.load offset=8
|
||||||
local.set $3
|
local.set $4
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.tee $3
|
||||||
i32.const 1073741816
|
i32.const 1073741816
|
||||||
i32.gt_u
|
i32.gt_u
|
||||||
local.tee $4
|
local.tee $1
|
||||||
if (result i32)
|
if (result i32)
|
||||||
local.get $4
|
|
||||||
else
|
|
||||||
local.get $1
|
local.get $1
|
||||||
|
else
|
||||||
|
local.get $3
|
||||||
i32.const 2
|
i32.const 2
|
||||||
i32.add
|
i32.add
|
||||||
local.get $3
|
local.get $4
|
||||||
i32.gt_s
|
i32.gt_s
|
||||||
end
|
end
|
||||||
if
|
if
|
||||||
@ -829,7 +835,7 @@
|
|||||||
local.get $0
|
local.get $0
|
||||||
i32.load offset=4
|
i32.load offset=4
|
||||||
i32.add
|
i32.add
|
||||||
local.get $1
|
local.get $3
|
||||||
i32.add
|
i32.add
|
||||||
i32.load16_u offset=8
|
i32.load16_u offset=8
|
||||||
local.set $0
|
local.set $0
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -139,6 +139,8 @@
|
|||||||
if
|
if
|
||||||
block $~lib/collector/itcm/refToObj|inlined.0 (result i32)
|
block $~lib/collector/itcm/refToObj|inlined.0 (result i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
|
local.set $1
|
||||||
|
local.get $1
|
||||||
global.get $~lib/collector/itcm/HEADER_SIZE
|
global.get $~lib/collector/itcm/HEADER_SIZE
|
||||||
i32.sub
|
i32.sub
|
||||||
end
|
end
|
||||||
@ -382,6 +384,8 @@
|
|||||||
global.set $~argc
|
global.set $~argc
|
||||||
block $~lib/collector/itcm/objToRef|inlined.0 (result i32)
|
block $~lib/collector/itcm/objToRef|inlined.0 (result i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
|
local.set $1
|
||||||
|
local.get $1
|
||||||
global.get $~lib/collector/itcm/HEADER_SIZE
|
global.get $~lib/collector/itcm/HEADER_SIZE
|
||||||
i32.add
|
i32.add
|
||||||
end
|
end
|
||||||
@ -434,13 +438,11 @@
|
|||||||
i32.ge_u
|
i32.ge_u
|
||||||
if
|
if
|
||||||
block $~lib/memory/memory.free|inlined.0
|
block $~lib/memory/memory.free|inlined.0
|
||||||
block
|
local.get $0
|
||||||
local.get $0
|
local.set $1
|
||||||
call $~lib/allocator/arena/__memory_free
|
local.get $1
|
||||||
br $~lib/memory/memory.free|inlined.0
|
call $~lib/allocator/arena/__memory_free
|
||||||
unreachable
|
br $~lib/memory/memory.free|inlined.0
|
||||||
end
|
|
||||||
unreachable
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -524,6 +526,8 @@
|
|||||||
call $~lib/collector/itcm/ManagedObjectList#push
|
call $~lib/collector/itcm/ManagedObjectList#push
|
||||||
block $~lib/collector/itcm/objToRef|inlined.1 (result i32)
|
block $~lib/collector/itcm/objToRef|inlined.1 (result i32)
|
||||||
local.get $3
|
local.get $3
|
||||||
|
local.set $2
|
||||||
|
local.get $2
|
||||||
global.get $~lib/collector/itcm/HEADER_SIZE
|
global.get $~lib/collector/itcm/HEADER_SIZE
|
||||||
i32.add
|
i32.add
|
||||||
end
|
end
|
||||||
@ -2272,6 +2276,7 @@
|
|||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
(local $4 i32)
|
(local $4 i32)
|
||||||
(local $5 i32)
|
(local $5 i32)
|
||||||
|
(local $6 i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load
|
i32.load
|
||||||
local.set $2
|
local.set $2
|
||||||
@ -2305,37 +2310,43 @@
|
|||||||
local.get $1
|
local.get $1
|
||||||
call $~lib/internal/arraybuffer/allocateUnsafe
|
call $~lib/internal/arraybuffer/allocateUnsafe
|
||||||
local.set $3
|
local.set $3
|
||||||
local.get $3
|
block $~lib/memory/memory.copy|inlined.0
|
||||||
global.get $~lib/internal/arraybuffer/HEADER_SIZE
|
local.get $3
|
||||||
i32.add
|
global.get $~lib/internal/arraybuffer/HEADER_SIZE
|
||||||
local.set $4
|
i32.add
|
||||||
local.get $0
|
local.set $4
|
||||||
global.get $~lib/internal/arraybuffer/HEADER_SIZE
|
local.get $0
|
||||||
i32.add
|
global.get $~lib/internal/arraybuffer/HEADER_SIZE
|
||||||
local.set $5
|
i32.add
|
||||||
local.get $4
|
local.set $5
|
||||||
local.get $5
|
local.get $2
|
||||||
local.get $2
|
local.set $6
|
||||||
call $~lib/internal/memory/memmove
|
local.get $4
|
||||||
|
local.get $5
|
||||||
|
local.get $6
|
||||||
|
call $~lib/internal/memory/memmove
|
||||||
|
end
|
||||||
local.get $3
|
local.get $3
|
||||||
local.set $0
|
local.set $0
|
||||||
end
|
end
|
||||||
local.get $0
|
block $~lib/memory/memory.fill|inlined.0
|
||||||
global.get $~lib/internal/arraybuffer/HEADER_SIZE
|
local.get $0
|
||||||
i32.add
|
global.get $~lib/internal/arraybuffer/HEADER_SIZE
|
||||||
local.get $2
|
i32.add
|
||||||
i32.add
|
local.get $2
|
||||||
local.set $3
|
i32.add
|
||||||
i32.const 0
|
local.set $3
|
||||||
local.set $5
|
i32.const 0
|
||||||
local.get $1
|
local.set $6
|
||||||
local.get $2
|
local.get $1
|
||||||
i32.sub
|
local.get $2
|
||||||
local.set $4
|
i32.sub
|
||||||
local.get $3
|
local.set $5
|
||||||
local.get $5
|
local.get $3
|
||||||
local.get $4
|
local.get $6
|
||||||
call $~lib/internal/memory/memset
|
local.get $5
|
||||||
|
call $~lib/internal/memory/memset
|
||||||
|
end
|
||||||
else
|
else
|
||||||
local.get $1
|
local.get $1
|
||||||
local.get $2
|
local.get $2
|
||||||
@ -2365,19 +2376,23 @@
|
|||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
block $~lib/collector/itcm/refToObj|inlined.1 (result i32)
|
block $~lib/collector/itcm/refToObj|inlined.1 (result i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
|
local.set $2
|
||||||
|
local.get $2
|
||||||
global.get $~lib/collector/itcm/HEADER_SIZE
|
global.get $~lib/collector/itcm/HEADER_SIZE
|
||||||
i32.sub
|
i32.sub
|
||||||
end
|
end
|
||||||
local.set $2
|
local.set $3
|
||||||
local.get $2
|
local.get $3
|
||||||
call $~lib/collector/itcm/ManagedObject#get:color
|
call $~lib/collector/itcm/ManagedObject#get:color
|
||||||
global.get $~lib/collector/itcm/white
|
global.get $~lib/collector/itcm/white
|
||||||
i32.eqz
|
i32.eqz
|
||||||
i32.eq
|
i32.eq
|
||||||
local.tee $3
|
local.tee $2
|
||||||
if (result i32)
|
if (result i32)
|
||||||
block $~lib/collector/itcm/refToObj|inlined.3 (result i32)
|
block $~lib/collector/itcm/refToObj|inlined.3 (result i32)
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.set $2
|
||||||
|
local.get $2
|
||||||
global.get $~lib/collector/itcm/HEADER_SIZE
|
global.get $~lib/collector/itcm/HEADER_SIZE
|
||||||
i32.sub
|
i32.sub
|
||||||
end
|
end
|
||||||
@ -2385,10 +2400,10 @@
|
|||||||
global.get $~lib/collector/itcm/white
|
global.get $~lib/collector/itcm/white
|
||||||
i32.eq
|
i32.eq
|
||||||
else
|
else
|
||||||
local.get $3
|
local.get $2
|
||||||
end
|
end
|
||||||
if
|
if
|
||||||
local.get $2
|
local.get $3
|
||||||
call $~lib/collector/itcm/ManagedObject#makeGray
|
call $~lib/collector/itcm/ManagedObject#makeGray
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
@ -2396,6 +2411,9 @@
|
|||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
(local $4 i32)
|
(local $4 i32)
|
||||||
(local $5 i32)
|
(local $5 i32)
|
||||||
|
(local $6 i32)
|
||||||
|
(local $7 i32)
|
||||||
|
(local $8 i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load
|
i32.load
|
||||||
local.set $3
|
local.set $3
|
||||||
@ -2436,17 +2454,25 @@
|
|||||||
i32.add
|
i32.add
|
||||||
i32.store offset=4
|
i32.store offset=4
|
||||||
end
|
end
|
||||||
i32.const 0
|
block $~lib/internal/arraybuffer/STORE<Foo,Foo>|inlined.0
|
||||||
local.set $5
|
local.get $3
|
||||||
local.get $3
|
local.set $5
|
||||||
local.get $1
|
local.get $1
|
||||||
i32.const 2
|
local.set $6
|
||||||
i32.shl
|
local.get $2
|
||||||
i32.add
|
local.set $7
|
||||||
local.get $5
|
i32.const 0
|
||||||
i32.add
|
local.set $8
|
||||||
local.get $2
|
local.get $5
|
||||||
i32.store offset=8
|
local.get $6
|
||||||
|
i32.const 2
|
||||||
|
i32.shl
|
||||||
|
i32.add
|
||||||
|
local.get $8
|
||||||
|
i32.add
|
||||||
|
local.get $7
|
||||||
|
i32.store offset=8
|
||||||
|
end
|
||||||
local.get $0
|
local.get $0
|
||||||
local.get $2
|
local.get $2
|
||||||
call $~lib/collector/itcm/__gc_link
|
call $~lib/collector/itcm/__gc_link
|
||||||
|
@ -215,6 +215,8 @@
|
|||||||
if
|
if
|
||||||
block $~lib/collector/itcm/refToObj|inlined.0 (result i32)
|
block $~lib/collector/itcm/refToObj|inlined.0 (result i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
|
local.set $1
|
||||||
|
local.get $1
|
||||||
global.get $~lib/collector/itcm/HEADER_SIZE
|
global.get $~lib/collector/itcm/HEADER_SIZE
|
||||||
i32.sub
|
i32.sub
|
||||||
end
|
end
|
||||||
@ -333,6 +335,8 @@
|
|||||||
global.set $~argc
|
global.set $~argc
|
||||||
block $~lib/collector/itcm/objToRef|inlined.0 (result i32)
|
block $~lib/collector/itcm/objToRef|inlined.0 (result i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
|
local.set $1
|
||||||
|
local.get $1
|
||||||
global.get $~lib/collector/itcm/HEADER_SIZE
|
global.get $~lib/collector/itcm/HEADER_SIZE
|
||||||
i32.add
|
i32.add
|
||||||
end
|
end
|
||||||
@ -385,13 +389,11 @@
|
|||||||
i32.ge_u
|
i32.ge_u
|
||||||
if
|
if
|
||||||
block $~lib/memory/memory.free|inlined.0
|
block $~lib/memory/memory.free|inlined.0
|
||||||
block
|
local.get $0
|
||||||
local.get $0
|
local.set $1
|
||||||
call $~lib/allocator/arena/__memory_free
|
local.get $1
|
||||||
br $~lib/memory/memory.free|inlined.0
|
call $~lib/allocator/arena/__memory_free
|
||||||
unreachable
|
br $~lib/memory/memory.free|inlined.0
|
||||||
end
|
|
||||||
unreachable
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -439,6 +441,8 @@
|
|||||||
call $~lib/collector/itcm/ManagedObjectList#push
|
call $~lib/collector/itcm/ManagedObjectList#push
|
||||||
block $~lib/collector/itcm/objToRef|inlined.1 (result i32)
|
block $~lib/collector/itcm/objToRef|inlined.1 (result i32)
|
||||||
local.get $3
|
local.get $3
|
||||||
|
local.set $2
|
||||||
|
local.get $2
|
||||||
global.get $~lib/collector/itcm/HEADER_SIZE
|
global.get $~lib/collector/itcm/HEADER_SIZE
|
||||||
i32.add
|
i32.add
|
||||||
end
|
end
|
||||||
|
@ -207,6 +207,8 @@
|
|||||||
if
|
if
|
||||||
block $~lib/collector/itcm/refToObj|inlined.0 (result i32)
|
block $~lib/collector/itcm/refToObj|inlined.0 (result i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
|
local.set $1
|
||||||
|
local.get $1
|
||||||
global.get $~lib/collector/itcm/HEADER_SIZE
|
global.get $~lib/collector/itcm/HEADER_SIZE
|
||||||
i32.sub
|
i32.sub
|
||||||
end
|
end
|
||||||
@ -325,6 +327,8 @@
|
|||||||
global.set $~argc
|
global.set $~argc
|
||||||
block $~lib/collector/itcm/objToRef|inlined.0 (result i32)
|
block $~lib/collector/itcm/objToRef|inlined.0 (result i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
|
local.set $1
|
||||||
|
local.get $1
|
||||||
global.get $~lib/collector/itcm/HEADER_SIZE
|
global.get $~lib/collector/itcm/HEADER_SIZE
|
||||||
i32.add
|
i32.add
|
||||||
end
|
end
|
||||||
@ -377,13 +381,11 @@
|
|||||||
i32.ge_u
|
i32.ge_u
|
||||||
if
|
if
|
||||||
block $~lib/memory/memory.free|inlined.0
|
block $~lib/memory/memory.free|inlined.0
|
||||||
block
|
local.get $0
|
||||||
local.get $0
|
local.set $1
|
||||||
call $~lib/allocator/arena/__memory_free
|
local.get $1
|
||||||
br $~lib/memory/memory.free|inlined.0
|
call $~lib/allocator/arena/__memory_free
|
||||||
unreachable
|
br $~lib/memory/memory.free|inlined.0
|
||||||
end
|
|
||||||
unreachable
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -431,6 +433,8 @@
|
|||||||
call $~lib/collector/itcm/ManagedObjectList#push
|
call $~lib/collector/itcm/ManagedObjectList#push
|
||||||
block $~lib/collector/itcm/objToRef|inlined.1 (result i32)
|
block $~lib/collector/itcm/objToRef|inlined.1 (result i32)
|
||||||
local.get $3
|
local.get $3
|
||||||
|
local.set $2
|
||||||
|
local.get $2
|
||||||
global.get $~lib/collector/itcm/HEADER_SIZE
|
global.get $~lib/collector/itcm/HEADER_SIZE
|
||||||
i32.add
|
i32.add
|
||||||
end
|
end
|
||||||
|
@ -72,7 +72,10 @@
|
|||||||
(export "tanh" (func $std/libm/tanh))
|
(export "tanh" (func $std/libm/tanh))
|
||||||
(export "trunc" (func $std/libm/trunc))
|
(export "trunc" (func $std/libm/trunc))
|
||||||
(func $std/libm/abs (; 0 ;) (type $FF) (param $0 f64) (result f64)
|
(func $std/libm/abs (; 0 ;) (type $FF) (param $0 f64) (result f64)
|
||||||
|
(local $1 f64)
|
||||||
local.get $0
|
local.get $0
|
||||||
|
local.set $1
|
||||||
|
local.get $1
|
||||||
f64.abs
|
f64.abs
|
||||||
)
|
)
|
||||||
(func $~lib/math/R (; 1 ;) (type $FF) (param $0 f64) (result f64)
|
(func $~lib/math/R (; 1 ;) (type $FF) (param $0 f64) (result f64)
|
||||||
@ -1915,11 +1918,17 @@
|
|||||||
call $~lib/math/NativeMath.cbrt
|
call $~lib/math/NativeMath.cbrt
|
||||||
)
|
)
|
||||||
(func $std/libm/ceil (; 21 ;) (type $FF) (param $0 f64) (result f64)
|
(func $std/libm/ceil (; 21 ;) (type $FF) (param $0 f64) (result f64)
|
||||||
|
(local $1 f64)
|
||||||
local.get $0
|
local.get $0
|
||||||
|
local.set $1
|
||||||
|
local.get $1
|
||||||
f64.ceil
|
f64.ceil
|
||||||
)
|
)
|
||||||
(func $std/libm/clz32 (; 22 ;) (type $FF) (param $0 f64) (result f64)
|
(func $std/libm/clz32 (; 22 ;) (type $FF) (param $0 f64) (result f64)
|
||||||
|
(local $1 f64)
|
||||||
local.get $0
|
local.get $0
|
||||||
|
local.set $1
|
||||||
|
local.get $1
|
||||||
i32.trunc_f64_s
|
i32.trunc_f64_s
|
||||||
i32.clz
|
i32.clz
|
||||||
f64.convert_i32_s
|
f64.convert_i32_s
|
||||||
@ -2507,6 +2516,7 @@
|
|||||||
(local $2 i32)
|
(local $2 i32)
|
||||||
(local $3 f64)
|
(local $3 f64)
|
||||||
(local $4 f64)
|
(local $4 f64)
|
||||||
|
(local $5 f64)
|
||||||
local.get $0
|
local.get $0
|
||||||
i64.reinterpret_f64
|
i64.reinterpret_f64
|
||||||
local.set $1
|
local.set $1
|
||||||
@ -2570,6 +2580,8 @@
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
block $~lib/math/expo2|inlined.0 (result f64)
|
block $~lib/math/expo2|inlined.0 (result f64)
|
||||||
|
local.get $0
|
||||||
|
local.set $4
|
||||||
i32.const 1023
|
i32.const 1023
|
||||||
i32.const 2043
|
i32.const 2043
|
||||||
i32.const 2
|
i32.const 2
|
||||||
@ -2581,14 +2593,14 @@
|
|||||||
i64.const 32
|
i64.const 32
|
||||||
i64.shl
|
i64.shl
|
||||||
f64.reinterpret_i64
|
f64.reinterpret_i64
|
||||||
local.set $4
|
local.set $5
|
||||||
local.get $0
|
local.get $4
|
||||||
f64.const 1416.0996898839683
|
f64.const 1416.0996898839683
|
||||||
f64.sub
|
f64.sub
|
||||||
call $~lib/math/NativeMath.exp
|
call $~lib/math/NativeMath.exp
|
||||||
local.get $4
|
local.get $5
|
||||||
f64.mul
|
f64.mul
|
||||||
local.get $4
|
local.get $5
|
||||||
f64.mul
|
f64.mul
|
||||||
end
|
end
|
||||||
local.set $3
|
local.set $3
|
||||||
@ -2607,11 +2619,17 @@
|
|||||||
call $~lib/math/NativeMath.expm1
|
call $~lib/math/NativeMath.expm1
|
||||||
)
|
)
|
||||||
(func $std/libm/floor (; 32 ;) (type $FF) (param $0 f64) (result f64)
|
(func $std/libm/floor (; 32 ;) (type $FF) (param $0 f64) (result f64)
|
||||||
|
(local $1 f64)
|
||||||
local.get $0
|
local.get $0
|
||||||
|
local.set $1
|
||||||
|
local.get $1
|
||||||
f64.floor
|
f64.floor
|
||||||
)
|
)
|
||||||
(func $std/libm/fround (; 33 ;) (type $Ff) (param $0 f64) (result f32)
|
(func $std/libm/fround (; 33 ;) (type $Ff) (param $0 f64) (result f32)
|
||||||
|
(local $1 f64)
|
||||||
local.get $0
|
local.get $0
|
||||||
|
local.set $1
|
||||||
|
local.get $1
|
||||||
f32.demote_f64
|
f32.demote_f64
|
||||||
)
|
)
|
||||||
(func $~lib/math/NativeMath.hypot (; 34 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
|
(func $~lib/math/NativeMath.hypot (; 34 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
|
||||||
@ -3401,13 +3419,25 @@
|
|||||||
call $~lib/math/NativeMath.log2
|
call $~lib/math/NativeMath.log2
|
||||||
)
|
)
|
||||||
(func $std/libm/max (; 45 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
|
(func $std/libm/max (; 45 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
|
||||||
|
(local $2 f64)
|
||||||
|
(local $3 f64)
|
||||||
local.get $0
|
local.get $0
|
||||||
|
local.set $2
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.set $3
|
||||||
|
local.get $2
|
||||||
|
local.get $3
|
||||||
f64.max
|
f64.max
|
||||||
)
|
)
|
||||||
(func $std/libm/min (; 46 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
|
(func $std/libm/min (; 46 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
|
||||||
|
(local $2 f64)
|
||||||
|
(local $3 f64)
|
||||||
local.get $0
|
local.get $0
|
||||||
|
local.set $2
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.set $3
|
||||||
|
local.get $2
|
||||||
|
local.get $3
|
||||||
f64.min
|
f64.min
|
||||||
)
|
)
|
||||||
(func $~lib/math/NativeMath.pow (; 47 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
|
(func $~lib/math/NativeMath.pow (; 47 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
|
||||||
@ -4504,28 +4534,34 @@
|
|||||||
call $~lib/math/NativeMath.pow
|
call $~lib/math/NativeMath.pow
|
||||||
)
|
)
|
||||||
(func $std/libm/round (; 49 ;) (type $FF) (param $0 f64) (result f64)
|
(func $std/libm/round (; 49 ;) (type $FF) (param $0 f64) (result f64)
|
||||||
|
(local $1 f64)
|
||||||
local.get $0
|
local.get $0
|
||||||
|
local.set $1
|
||||||
|
local.get $1
|
||||||
f64.const 0.5
|
f64.const 0.5
|
||||||
f64.add
|
f64.add
|
||||||
f64.floor
|
f64.floor
|
||||||
local.get $0
|
local.get $1
|
||||||
f64.copysign
|
f64.copysign
|
||||||
)
|
)
|
||||||
(func $std/libm/sign (; 50 ;) (type $FF) (param $0 f64) (result f64)
|
(func $std/libm/sign (; 50 ;) (type $FF) (param $0 f64) (result f64)
|
||||||
|
(local $1 f64)
|
||||||
block $~lib/math/NativeMath.sign|inlined.0 (result f64)
|
block $~lib/math/NativeMath.sign|inlined.0 (result f64)
|
||||||
local.get $0
|
local.get $0
|
||||||
|
local.set $1
|
||||||
|
local.get $1
|
||||||
f64.const 0
|
f64.const 0
|
||||||
f64.gt
|
f64.gt
|
||||||
if (result f64)
|
if (result f64)
|
||||||
f64.const 1
|
f64.const 1
|
||||||
else
|
else
|
||||||
local.get $0
|
local.get $1
|
||||||
f64.const 0
|
f64.const 0
|
||||||
f64.lt
|
f64.lt
|
||||||
if (result f64)
|
if (result f64)
|
||||||
f64.const -1
|
f64.const -1
|
||||||
else
|
else
|
||||||
local.get $0
|
local.get $1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
br $~lib/math/NativeMath.sign|inlined.0
|
br $~lib/math/NativeMath.sign|inlined.0
|
||||||
@ -4546,6 +4582,7 @@
|
|||||||
(local $4 f64)
|
(local $4 f64)
|
||||||
(local $5 f64)
|
(local $5 f64)
|
||||||
(local $6 f64)
|
(local $6 f64)
|
||||||
|
(local $7 f64)
|
||||||
local.get $0
|
local.get $0
|
||||||
i64.reinterpret_f64
|
i64.reinterpret_f64
|
||||||
i64.const 9223372036854775807
|
i64.const 9223372036854775807
|
||||||
@ -4615,6 +4652,8 @@
|
|||||||
local.get $5
|
local.get $5
|
||||||
f64.mul
|
f64.mul
|
||||||
block $~lib/math/expo2|inlined.1 (result f64)
|
block $~lib/math/expo2|inlined.1 (result f64)
|
||||||
|
local.get $2
|
||||||
|
local.set $6
|
||||||
i32.const 1023
|
i32.const 1023
|
||||||
i32.const 2043
|
i32.const 2043
|
||||||
i32.const 2
|
i32.const 2
|
||||||
@ -4626,14 +4665,14 @@
|
|||||||
i64.const 32
|
i64.const 32
|
||||||
i64.shl
|
i64.shl
|
||||||
f64.reinterpret_i64
|
f64.reinterpret_i64
|
||||||
local.set $6
|
local.set $7
|
||||||
local.get $2
|
local.get $6
|
||||||
f64.const 1416.0996898839683
|
f64.const 1416.0996898839683
|
||||||
f64.sub
|
f64.sub
|
||||||
call $~lib/math/NativeMath.exp
|
call $~lib/math/NativeMath.exp
|
||||||
local.get $6
|
local.get $7
|
||||||
f64.mul
|
f64.mul
|
||||||
local.get $6
|
local.get $7
|
||||||
f64.mul
|
f64.mul
|
||||||
end
|
end
|
||||||
f64.mul
|
f64.mul
|
||||||
@ -4645,7 +4684,10 @@
|
|||||||
call $~lib/math/NativeMath.sinh
|
call $~lib/math/NativeMath.sinh
|
||||||
)
|
)
|
||||||
(func $std/libm/sqrt (; 55 ;) (type $FF) (param $0 f64) (result f64)
|
(func $std/libm/sqrt (; 55 ;) (type $FF) (param $0 f64) (result f64)
|
||||||
|
(local $1 f64)
|
||||||
local.get $0
|
local.get $0
|
||||||
|
local.set $1
|
||||||
|
local.get $1
|
||||||
f64.sqrt
|
f64.sqrt
|
||||||
)
|
)
|
||||||
(func $~lib/math/NativeMath.tan (; 56 ;) (type $FF) (param $0 f64) (result f64)
|
(func $~lib/math/NativeMath.tan (; 56 ;) (type $FF) (param $0 f64) (result f64)
|
||||||
@ -4753,7 +4795,10 @@
|
|||||||
call $~lib/math/NativeMath.tanh
|
call $~lib/math/NativeMath.tanh
|
||||||
)
|
)
|
||||||
(func $std/libm/trunc (; 60 ;) (type $FF) (param $0 f64) (result f64)
|
(func $std/libm/trunc (; 60 ;) (type $FF) (param $0 f64) (result f64)
|
||||||
|
(local $1 f64)
|
||||||
local.get $0
|
local.get $0
|
||||||
|
local.set $1
|
||||||
|
local.get $1
|
||||||
f64.trunc
|
f64.trunc
|
||||||
)
|
)
|
||||||
(func $null (; 61 ;) (type $v)
|
(func $null (; 61 ;) (type $v)
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -5795,8 +5795,8 @@
|
|||||||
local.get $0
|
local.get $0
|
||||||
local.get $1
|
local.get $1
|
||||||
f64.mul
|
f64.mul
|
||||||
local.tee $0
|
local.tee $1
|
||||||
local.get $0
|
local.get $1
|
||||||
f64.div
|
f64.div
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@ -6020,8 +6020,8 @@
|
|||||||
local.get $0
|
local.get $0
|
||||||
local.get $1
|
local.get $1
|
||||||
f32.mul
|
f32.mul
|
||||||
local.tee $0
|
local.tee $1
|
||||||
local.get $0
|
local.get $1
|
||||||
f32.div
|
f32.div
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@ -8175,11 +8175,14 @@
|
|||||||
call $std/math/check<f32>
|
call $std/math/check<f32>
|
||||||
)
|
)
|
||||||
(func $std/math/test_sign (; 127 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32)
|
(func $std/math/test_sign (; 127 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32)
|
||||||
(local $2 i32)
|
(local $2 f64)
|
||||||
|
(local $3 i32)
|
||||||
|
local.get $0
|
||||||
|
local.set $2
|
||||||
f64.const 1
|
f64.const 1
|
||||||
f64.const -1
|
f64.const -1
|
||||||
local.get $0
|
local.get $2
|
||||||
local.get $0
|
local.get $2
|
||||||
f64.const 0
|
f64.const 0
|
||||||
f64.lt
|
f64.lt
|
||||||
select
|
select
|
||||||
@ -8190,16 +8193,16 @@
|
|||||||
local.get $1
|
local.get $1
|
||||||
f64.const 0
|
f64.const 0
|
||||||
call $std/math/check<f64>
|
call $std/math/check<f64>
|
||||||
local.tee $2
|
local.tee $3
|
||||||
if
|
if
|
||||||
local.get $0
|
local.get $0
|
||||||
call $~lib/bindings/Math/sign
|
call $~lib/bindings/Math/sign
|
||||||
local.get $1
|
local.get $1
|
||||||
f64.const 0
|
f64.const 0
|
||||||
call $std/math/check<f64>
|
call $std/math/check<f64>
|
||||||
local.set $2
|
local.set $3
|
||||||
end
|
end
|
||||||
local.get $2
|
local.get $3
|
||||||
)
|
)
|
||||||
(func $std/math/test_signf (; 128 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32)
|
(func $std/math/test_signf (; 128 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32)
|
||||||
f32.const 1
|
f32.const 1
|
||||||
|
@ -233,6 +233,7 @@
|
|||||||
)
|
)
|
||||||
(func $std/math/ulperr (; 34 ;) (type $FFFF) (param $0 f64) (param $1 f64) (param $2 f64) (result f64)
|
(func $std/math/ulperr (; 34 ;) (type $FFFF) (param $0 f64) (param $1 f64) (param $2 f64) (result f64)
|
||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
|
(local $4 f64)
|
||||||
local.get $0
|
local.get $0
|
||||||
call $~lib/builtins/isNaN<f64>
|
call $~lib/builtins/isNaN<f64>
|
||||||
local.tee $3
|
local.tee $3
|
||||||
@ -252,12 +253,14 @@
|
|||||||
if
|
if
|
||||||
block $~lib/math/NativeMath.signbit|inlined.2 (result i32)
|
block $~lib/math/NativeMath.signbit|inlined.2 (result i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
|
local.set $4
|
||||||
|
local.get $4
|
||||||
i64.reinterpret_f64
|
i64.reinterpret_f64
|
||||||
i64.const 63
|
i64.const 63
|
||||||
i64.shr_u
|
i64.shr_u
|
||||||
i32.wrap_i64
|
i32.wrap_i64
|
||||||
local.get $0
|
local.get $4
|
||||||
local.get $0
|
local.get $4
|
||||||
f64.eq
|
f64.eq
|
||||||
i32.and
|
i32.and
|
||||||
end
|
end
|
||||||
@ -265,12 +268,14 @@
|
|||||||
i32.ne
|
i32.ne
|
||||||
block $~lib/math/NativeMath.signbit|inlined.3 (result i32)
|
block $~lib/math/NativeMath.signbit|inlined.3 (result i32)
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.set $4
|
||||||
|
local.get $4
|
||||||
i64.reinterpret_f64
|
i64.reinterpret_f64
|
||||||
i64.const 63
|
i64.const 63
|
||||||
i64.shr_u
|
i64.shr_u
|
||||||
i32.wrap_i64
|
i32.wrap_i64
|
||||||
local.get $1
|
local.get $4
|
||||||
local.get $1
|
local.get $4
|
||||||
f64.eq
|
f64.eq
|
||||||
i32.and
|
i32.and
|
||||||
end
|
end
|
||||||
@ -469,6 +474,7 @@
|
|||||||
)
|
)
|
||||||
(func $std/math/ulperrf (; 40 ;) (type $ffff) (param $0 f32) (param $1 f32) (param $2 f32) (result f32)
|
(func $std/math/ulperrf (; 40 ;) (type $ffff) (param $0 f32) (param $1 f32) (param $2 f32) (result f32)
|
||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
|
(local $4 f32)
|
||||||
local.get $0
|
local.get $0
|
||||||
call $~lib/builtins/isNaN<f32>
|
call $~lib/builtins/isNaN<f32>
|
||||||
local.tee $3
|
local.tee $3
|
||||||
@ -488,11 +494,13 @@
|
|||||||
if
|
if
|
||||||
block $~lib/math/NativeMathf.signbit|inlined.2 (result i32)
|
block $~lib/math/NativeMathf.signbit|inlined.2 (result i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
|
local.set $4
|
||||||
|
local.get $4
|
||||||
i32.reinterpret_f32
|
i32.reinterpret_f32
|
||||||
i32.const 31
|
i32.const 31
|
||||||
i32.shr_u
|
i32.shr_u
|
||||||
local.get $0
|
local.get $4
|
||||||
local.get $0
|
local.get $4
|
||||||
f32.eq
|
f32.eq
|
||||||
i32.and
|
i32.and
|
||||||
end
|
end
|
||||||
@ -500,11 +508,13 @@
|
|||||||
i32.ne
|
i32.ne
|
||||||
block $~lib/math/NativeMathf.signbit|inlined.3 (result i32)
|
block $~lib/math/NativeMathf.signbit|inlined.3 (result i32)
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.set $4
|
||||||
|
local.get $4
|
||||||
i32.reinterpret_f32
|
i32.reinterpret_f32
|
||||||
i32.const 31
|
i32.const 31
|
||||||
i32.shr_u
|
i32.shr_u
|
||||||
local.get $1
|
local.get $4
|
||||||
local.get $1
|
local.get $4
|
||||||
f32.eq
|
f32.eq
|
||||||
i32.and
|
i32.and
|
||||||
end
|
end
|
||||||
@ -592,22 +602,25 @@
|
|||||||
call $std/math/check<f32>
|
call $std/math/check<f32>
|
||||||
)
|
)
|
||||||
(func $std/math/test_abs (; 44 ;) (type $FFFii) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32)
|
(func $std/math/test_abs (; 44 ;) (type $FFFii) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32)
|
||||||
(local $4 i32)
|
(local $4 f64)
|
||||||
|
(local $5 i32)
|
||||||
block $~lib/math/NativeMath.abs|inlined.0 (result f64)
|
block $~lib/math/NativeMath.abs|inlined.0 (result f64)
|
||||||
local.get $0
|
local.get $0
|
||||||
|
local.set $4
|
||||||
|
local.get $4
|
||||||
f64.abs
|
f64.abs
|
||||||
end
|
end
|
||||||
local.get $1
|
local.get $1
|
||||||
local.get $2
|
local.get $2
|
||||||
local.get $3
|
local.get $3
|
||||||
call $std/math/check<f64>
|
call $std/math/check<f64>
|
||||||
local.tee $4
|
local.tee $5
|
||||||
if (result i32)
|
if (result i32)
|
||||||
global.get $std/math/js
|
global.get $std/math/js
|
||||||
i32.eqz
|
i32.eqz
|
||||||
local.tee $4
|
local.tee $5
|
||||||
if (result i32)
|
if (result i32)
|
||||||
local.get $4
|
local.get $5
|
||||||
else
|
else
|
||||||
local.get $0
|
local.get $0
|
||||||
call $~lib/bindings/Math/abs
|
call $~lib/bindings/Math/abs
|
||||||
@ -617,12 +630,15 @@
|
|||||||
call $std/math/check<f64>
|
call $std/math/check<f64>
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
local.get $4
|
local.get $5
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
(func $std/math/test_absf (; 45 ;) (type $fffii) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32)
|
(func $std/math/test_absf (; 45 ;) (type $fffii) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32)
|
||||||
|
(local $4 f32)
|
||||||
block $~lib/math/NativeMathf.abs|inlined.0 (result f32)
|
block $~lib/math/NativeMathf.abs|inlined.0 (result f32)
|
||||||
local.get $0
|
local.get $0
|
||||||
|
local.set $4
|
||||||
|
local.get $4
|
||||||
f32.abs
|
f32.abs
|
||||||
end
|
end
|
||||||
local.get $1
|
local.get $1
|
||||||
@ -4244,22 +4260,25 @@
|
|||||||
call $std/math/check<f32>
|
call $std/math/check<f32>
|
||||||
)
|
)
|
||||||
(func $std/math/test_ceil (; 84 ;) (type $FFFii) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32)
|
(func $std/math/test_ceil (; 84 ;) (type $FFFii) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32)
|
||||||
(local $4 i32)
|
(local $4 f64)
|
||||||
|
(local $5 i32)
|
||||||
block $~lib/math/NativeMath.ceil|inlined.0 (result f64)
|
block $~lib/math/NativeMath.ceil|inlined.0 (result f64)
|
||||||
local.get $0
|
local.get $0
|
||||||
|
local.set $4
|
||||||
|
local.get $4
|
||||||
f64.ceil
|
f64.ceil
|
||||||
end
|
end
|
||||||
local.get $1
|
local.get $1
|
||||||
local.get $2
|
local.get $2
|
||||||
local.get $3
|
local.get $3
|
||||||
call $std/math/check<f64>
|
call $std/math/check<f64>
|
||||||
local.tee $4
|
local.tee $5
|
||||||
if (result i32)
|
if (result i32)
|
||||||
global.get $std/math/js
|
global.get $std/math/js
|
||||||
i32.eqz
|
i32.eqz
|
||||||
local.tee $4
|
local.tee $5
|
||||||
if (result i32)
|
if (result i32)
|
||||||
local.get $4
|
local.get $5
|
||||||
else
|
else
|
||||||
local.get $0
|
local.get $0
|
||||||
call $~lib/bindings/Math/ceil
|
call $~lib/bindings/Math/ceil
|
||||||
@ -4269,12 +4288,15 @@
|
|||||||
call $std/math/check<f64>
|
call $std/math/check<f64>
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
local.get $4
|
local.get $5
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
(func $std/math/test_ceilf (; 85 ;) (type $fffii) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32)
|
(func $std/math/test_ceilf (; 85 ;) (type $fffii) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32)
|
||||||
|
(local $4 f32)
|
||||||
block $~lib/math/NativeMathf.ceil|inlined.0 (result f32)
|
block $~lib/math/NativeMathf.ceil|inlined.0 (result f32)
|
||||||
local.get $0
|
local.get $0
|
||||||
|
local.set $4
|
||||||
|
local.get $4
|
||||||
f32.ceil
|
f32.ceil
|
||||||
end
|
end
|
||||||
local.get $1
|
local.get $1
|
||||||
@ -4766,6 +4788,7 @@
|
|||||||
(local $2 i32)
|
(local $2 i32)
|
||||||
(local $3 f64)
|
(local $3 f64)
|
||||||
(local $4 f64)
|
(local $4 f64)
|
||||||
|
(local $5 f64)
|
||||||
local.get $0
|
local.get $0
|
||||||
i64.reinterpret_f64
|
i64.reinterpret_f64
|
||||||
local.set $1
|
local.set $1
|
||||||
@ -4829,6 +4852,8 @@
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
block $~lib/math/expo2|inlined.0 (result f64)
|
block $~lib/math/expo2|inlined.0 (result f64)
|
||||||
|
local.get $0
|
||||||
|
local.set $4
|
||||||
i32.const 1023
|
i32.const 1023
|
||||||
i32.const 2043
|
i32.const 2043
|
||||||
i32.const 2
|
i32.const 2
|
||||||
@ -4840,14 +4865,14 @@
|
|||||||
i64.const 32
|
i64.const 32
|
||||||
i64.shl
|
i64.shl
|
||||||
f64.reinterpret_i64
|
f64.reinterpret_i64
|
||||||
local.set $4
|
local.set $5
|
||||||
local.get $0
|
local.get $4
|
||||||
f64.const 1416.0996898839683
|
f64.const 1416.0996898839683
|
||||||
f64.sub
|
f64.sub
|
||||||
call $~lib/math/NativeMath.exp
|
call $~lib/math/NativeMath.exp
|
||||||
local.get $4
|
local.get $5
|
||||||
f64.mul
|
f64.mul
|
||||||
local.get $4
|
local.get $5
|
||||||
f64.mul
|
f64.mul
|
||||||
end
|
end
|
||||||
local.set $3
|
local.set $3
|
||||||
@ -5322,6 +5347,7 @@
|
|||||||
(func $~lib/math/NativeMathf.cosh (; 92 ;) (type $ff) (param $0 f32) (result f32)
|
(func $~lib/math/NativeMathf.cosh (; 92 ;) (type $ff) (param $0 f32) (result f32)
|
||||||
(local $1 i32)
|
(local $1 i32)
|
||||||
(local $2 f32)
|
(local $2 f32)
|
||||||
|
(local $3 f32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.reinterpret_f32
|
i32.reinterpret_f32
|
||||||
local.set $1
|
local.set $1
|
||||||
@ -5380,6 +5406,8 @@
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
block $~lib/math/expo2f|inlined.0 (result f32)
|
block $~lib/math/expo2f|inlined.0 (result f32)
|
||||||
|
local.get $0
|
||||||
|
local.set $2
|
||||||
i32.const 127
|
i32.const 127
|
||||||
i32.const 235
|
i32.const 235
|
||||||
i32.const 1
|
i32.const 1
|
||||||
@ -5388,14 +5416,14 @@
|
|||||||
i32.const 23
|
i32.const 23
|
||||||
i32.shl
|
i32.shl
|
||||||
f32.reinterpret_i32
|
f32.reinterpret_i32
|
||||||
local.set $2
|
local.set $3
|
||||||
local.get $0
|
local.get $2
|
||||||
f32.const 162.88958740234375
|
f32.const 162.88958740234375
|
||||||
f32.sub
|
f32.sub
|
||||||
call $~lib/math/NativeMathf.exp
|
call $~lib/math/NativeMathf.exp
|
||||||
local.get $2
|
local.get $3
|
||||||
f32.mul
|
f32.mul
|
||||||
local.get $2
|
local.get $3
|
||||||
f32.mul
|
f32.mul
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
@ -5478,22 +5506,25 @@
|
|||||||
call $std/math/check<f32>
|
call $std/math/check<f32>
|
||||||
)
|
)
|
||||||
(func $std/math/test_floor (; 98 ;) (type $FFFii) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32)
|
(func $std/math/test_floor (; 98 ;) (type $FFFii) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32)
|
||||||
(local $4 i32)
|
(local $4 f64)
|
||||||
|
(local $5 i32)
|
||||||
block $~lib/math/NativeMath.floor|inlined.0 (result f64)
|
block $~lib/math/NativeMath.floor|inlined.0 (result f64)
|
||||||
local.get $0
|
local.get $0
|
||||||
|
local.set $4
|
||||||
|
local.get $4
|
||||||
f64.floor
|
f64.floor
|
||||||
end
|
end
|
||||||
local.get $1
|
local.get $1
|
||||||
local.get $2
|
local.get $2
|
||||||
local.get $3
|
local.get $3
|
||||||
call $std/math/check<f64>
|
call $std/math/check<f64>
|
||||||
local.tee $4
|
local.tee $5
|
||||||
if (result i32)
|
if (result i32)
|
||||||
global.get $std/math/js
|
global.get $std/math/js
|
||||||
i32.eqz
|
i32.eqz
|
||||||
local.tee $4
|
local.tee $5
|
||||||
if (result i32)
|
if (result i32)
|
||||||
local.get $4
|
local.get $5
|
||||||
else
|
else
|
||||||
local.get $0
|
local.get $0
|
||||||
call $~lib/bindings/Math/floor
|
call $~lib/bindings/Math/floor
|
||||||
@ -5503,12 +5534,15 @@
|
|||||||
call $std/math/check<f64>
|
call $std/math/check<f64>
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
local.get $4
|
local.get $5
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
(func $std/math/test_floorf (; 99 ;) (type $fffii) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32)
|
(func $std/math/test_floorf (; 99 ;) (type $fffii) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32)
|
||||||
|
(local $4 f32)
|
||||||
block $~lib/math/NativeMathf.floor|inlined.0 (result f32)
|
block $~lib/math/NativeMathf.floor|inlined.0 (result f32)
|
||||||
local.get $0
|
local.get $0
|
||||||
|
local.set $4
|
||||||
|
local.get $4
|
||||||
f32.floor
|
f32.floor
|
||||||
end
|
end
|
||||||
local.get $1
|
local.get $1
|
||||||
@ -6947,23 +6981,29 @@
|
|||||||
call $std/math/check<f32>
|
call $std/math/check<f32>
|
||||||
)
|
)
|
||||||
(func $std/math/test_max (; 116 ;) (type $FFFFii) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32)
|
(func $std/math/test_max (; 116 ;) (type $FFFFii) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32)
|
||||||
(local $5 i32)
|
(local $5 f64)
|
||||||
|
(local $6 f64)
|
||||||
|
(local $7 i32)
|
||||||
block $~lib/math/NativeMath.max|inlined.0 (result f64)
|
block $~lib/math/NativeMath.max|inlined.0 (result f64)
|
||||||
local.get $0
|
local.get $0
|
||||||
|
local.set $5
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.set $6
|
||||||
|
local.get $5
|
||||||
|
local.get $6
|
||||||
f64.max
|
f64.max
|
||||||
end
|
end
|
||||||
local.get $2
|
local.get $2
|
||||||
local.get $3
|
local.get $3
|
||||||
local.get $4
|
local.get $4
|
||||||
call $std/math/check<f64>
|
call $std/math/check<f64>
|
||||||
local.tee $5
|
local.tee $7
|
||||||
if (result i32)
|
if (result i32)
|
||||||
global.get $std/math/js
|
global.get $std/math/js
|
||||||
i32.eqz
|
i32.eqz
|
||||||
local.tee $5
|
local.tee $7
|
||||||
if (result i32)
|
if (result i32)
|
||||||
local.get $5
|
local.get $7
|
||||||
else
|
else
|
||||||
local.get $0
|
local.get $0
|
||||||
local.get $1
|
local.get $1
|
||||||
@ -6974,13 +7014,19 @@
|
|||||||
call $std/math/check<f64>
|
call $std/math/check<f64>
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
local.get $5
|
local.get $7
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
(func $std/math/test_maxf (; 117 ;) (type $ffffii) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32)
|
(func $std/math/test_maxf (; 117 ;) (type $ffffii) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32)
|
||||||
|
(local $5 f32)
|
||||||
|
(local $6 f32)
|
||||||
block $~lib/math/NativeMathf.max|inlined.0 (result f32)
|
block $~lib/math/NativeMathf.max|inlined.0 (result f32)
|
||||||
local.get $0
|
local.get $0
|
||||||
|
local.set $5
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.set $6
|
||||||
|
local.get $5
|
||||||
|
local.get $6
|
||||||
f32.max
|
f32.max
|
||||||
end
|
end
|
||||||
local.get $2
|
local.get $2
|
||||||
@ -6989,23 +7035,29 @@
|
|||||||
call $std/math/check<f32>
|
call $std/math/check<f32>
|
||||||
)
|
)
|
||||||
(func $std/math/test_min (; 118 ;) (type $FFFFii) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32)
|
(func $std/math/test_min (; 118 ;) (type $FFFFii) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32)
|
||||||
(local $5 i32)
|
(local $5 f64)
|
||||||
|
(local $6 f64)
|
||||||
|
(local $7 i32)
|
||||||
block $~lib/math/NativeMath.min|inlined.0 (result f64)
|
block $~lib/math/NativeMath.min|inlined.0 (result f64)
|
||||||
local.get $0
|
local.get $0
|
||||||
|
local.set $5
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.set $6
|
||||||
|
local.get $5
|
||||||
|
local.get $6
|
||||||
f64.min
|
f64.min
|
||||||
end
|
end
|
||||||
local.get $2
|
local.get $2
|
||||||
local.get $3
|
local.get $3
|
||||||
local.get $4
|
local.get $4
|
||||||
call $std/math/check<f64>
|
call $std/math/check<f64>
|
||||||
local.tee $5
|
local.tee $7
|
||||||
if (result i32)
|
if (result i32)
|
||||||
global.get $std/math/js
|
global.get $std/math/js
|
||||||
i32.eqz
|
i32.eqz
|
||||||
local.tee $5
|
local.tee $7
|
||||||
if (result i32)
|
if (result i32)
|
||||||
local.get $5
|
local.get $7
|
||||||
else
|
else
|
||||||
local.get $0
|
local.get $0
|
||||||
local.get $1
|
local.get $1
|
||||||
@ -7016,13 +7068,19 @@
|
|||||||
call $std/math/check<f64>
|
call $std/math/check<f64>
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
local.get $5
|
local.get $7
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
(func $std/math/test_minf (; 119 ;) (type $ffffii) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32)
|
(func $std/math/test_minf (; 119 ;) (type $ffffii) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32)
|
||||||
|
(local $5 f32)
|
||||||
|
(local $6 f32)
|
||||||
block $~lib/math/NativeMathf.min|inlined.0 (result f32)
|
block $~lib/math/NativeMathf.min|inlined.0 (result f32)
|
||||||
local.get $0
|
local.get $0
|
||||||
|
local.set $5
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.set $6
|
||||||
|
local.get $5
|
||||||
|
local.get $6
|
||||||
f32.min
|
f32.min
|
||||||
end
|
end
|
||||||
local.get $2
|
local.get $2
|
||||||
@ -7083,7 +7141,9 @@
|
|||||||
local.get $8
|
local.get $8
|
||||||
else
|
else
|
||||||
local.get $1
|
local.get $1
|
||||||
local.get $1
|
local.set $9
|
||||||
|
local.get $9
|
||||||
|
local.get $9
|
||||||
f64.ne
|
f64.ne
|
||||||
end
|
end
|
||||||
i32.const 0
|
i32.const 0
|
||||||
@ -7368,7 +7428,9 @@
|
|||||||
local.get $8
|
local.get $8
|
||||||
else
|
else
|
||||||
local.get $1
|
local.get $1
|
||||||
local.get $1
|
local.set $9
|
||||||
|
local.get $9
|
||||||
|
local.get $9
|
||||||
f32.ne
|
f32.ne
|
||||||
end
|
end
|
||||||
i32.const 0
|
i32.const 0
|
||||||
@ -9848,12 +9910,15 @@
|
|||||||
f32.sub
|
f32.sub
|
||||||
)
|
)
|
||||||
(func $std/math/test_round (; 133 ;) (type $FFFii) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32)
|
(func $std/math/test_round (; 133 ;) (type $FFFii) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32)
|
||||||
|
(local $4 f64)
|
||||||
block $~lib/math/NativeMath.round|inlined.0 (result f64)
|
block $~lib/math/NativeMath.round|inlined.0 (result f64)
|
||||||
local.get $0
|
local.get $0
|
||||||
|
local.set $4
|
||||||
|
local.get $4
|
||||||
f64.const 0.5
|
f64.const 0.5
|
||||||
f64.add
|
f64.add
|
||||||
f64.floor
|
f64.floor
|
||||||
local.get $0
|
local.get $4
|
||||||
f64.copysign
|
f64.copysign
|
||||||
end
|
end
|
||||||
local.get $1
|
local.get $1
|
||||||
@ -9862,12 +9927,15 @@
|
|||||||
call $std/math/check<f64>
|
call $std/math/check<f64>
|
||||||
)
|
)
|
||||||
(func $std/math/test_roundf (; 134 ;) (type $fffii) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32)
|
(func $std/math/test_roundf (; 134 ;) (type $fffii) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32)
|
||||||
|
(local $4 f32)
|
||||||
block $~lib/math/NativeMathf.round|inlined.0 (result f32)
|
block $~lib/math/NativeMathf.round|inlined.0 (result f32)
|
||||||
local.get $0
|
local.get $0
|
||||||
|
local.set $4
|
||||||
|
local.get $4
|
||||||
f32.const 0.5
|
f32.const 0.5
|
||||||
f32.add
|
f32.add
|
||||||
f32.floor
|
f32.floor
|
||||||
local.get $0
|
local.get $4
|
||||||
f32.copysign
|
f32.copysign
|
||||||
end
|
end
|
||||||
local.get $1
|
local.get $1
|
||||||
@ -9876,21 +9944,24 @@
|
|||||||
call $std/math/check<f32>
|
call $std/math/check<f32>
|
||||||
)
|
)
|
||||||
(func $std/math/test_sign (; 135 ;) (type $FFFii) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32)
|
(func $std/math/test_sign (; 135 ;) (type $FFFii) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32)
|
||||||
(local $4 i32)
|
(local $4 f64)
|
||||||
|
(local $5 i32)
|
||||||
block $~lib/math/NativeMath.sign|inlined.0 (result f64)
|
block $~lib/math/NativeMath.sign|inlined.0 (result f64)
|
||||||
local.get $0
|
local.get $0
|
||||||
|
local.set $4
|
||||||
|
local.get $4
|
||||||
f64.const 0
|
f64.const 0
|
||||||
f64.gt
|
f64.gt
|
||||||
if (result f64)
|
if (result f64)
|
||||||
f64.const 1
|
f64.const 1
|
||||||
else
|
else
|
||||||
local.get $0
|
local.get $4
|
||||||
f64.const 0
|
f64.const 0
|
||||||
f64.lt
|
f64.lt
|
||||||
if (result f64)
|
if (result f64)
|
||||||
f64.const -1
|
f64.const -1
|
||||||
else
|
else
|
||||||
local.get $0
|
local.get $4
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
br $~lib/math/NativeMath.sign|inlined.0
|
br $~lib/math/NativeMath.sign|inlined.0
|
||||||
@ -9899,13 +9970,13 @@
|
|||||||
local.get $2
|
local.get $2
|
||||||
local.get $3
|
local.get $3
|
||||||
call $std/math/check<f64>
|
call $std/math/check<f64>
|
||||||
local.tee $4
|
local.tee $5
|
||||||
if (result i32)
|
if (result i32)
|
||||||
global.get $std/math/js
|
global.get $std/math/js
|
||||||
i32.eqz
|
i32.eqz
|
||||||
local.tee $4
|
local.tee $5
|
||||||
if (result i32)
|
if (result i32)
|
||||||
local.get $4
|
local.get $5
|
||||||
else
|
else
|
||||||
local.get $0
|
local.get $0
|
||||||
call $~lib/bindings/Math/sign
|
call $~lib/bindings/Math/sign
|
||||||
@ -9915,24 +9986,27 @@
|
|||||||
call $std/math/check<f64>
|
call $std/math/check<f64>
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
local.get $4
|
local.get $5
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
(func $std/math/test_signf (; 136 ;) (type $fffii) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32)
|
(func $std/math/test_signf (; 136 ;) (type $fffii) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32)
|
||||||
|
(local $4 f32)
|
||||||
block $~lib/math/NativeMathf.sign|inlined.0 (result f32)
|
block $~lib/math/NativeMathf.sign|inlined.0 (result f32)
|
||||||
local.get $0
|
local.get $0
|
||||||
|
local.set $4
|
||||||
|
local.get $4
|
||||||
f32.const 0
|
f32.const 0
|
||||||
f32.gt
|
f32.gt
|
||||||
if (result f32)
|
if (result f32)
|
||||||
f32.const 1
|
f32.const 1
|
||||||
else
|
else
|
||||||
local.get $0
|
local.get $4
|
||||||
f32.const 0
|
f32.const 0
|
||||||
f32.lt
|
f32.lt
|
||||||
if (result f32)
|
if (result f32)
|
||||||
f32.const -1
|
f32.const -1
|
||||||
else
|
else
|
||||||
local.get $0
|
local.get $4
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
br $~lib/math/NativeMathf.sign|inlined.0
|
br $~lib/math/NativeMathf.sign|inlined.0
|
||||||
@ -10610,6 +10684,7 @@
|
|||||||
(local $4 f64)
|
(local $4 f64)
|
||||||
(local $5 f64)
|
(local $5 f64)
|
||||||
(local $6 f64)
|
(local $6 f64)
|
||||||
|
(local $7 f64)
|
||||||
local.get $0
|
local.get $0
|
||||||
i64.reinterpret_f64
|
i64.reinterpret_f64
|
||||||
i64.const 9223372036854775807
|
i64.const 9223372036854775807
|
||||||
@ -10679,6 +10754,8 @@
|
|||||||
local.get $5
|
local.get $5
|
||||||
f64.mul
|
f64.mul
|
||||||
block $~lib/math/expo2|inlined.1 (result f64)
|
block $~lib/math/expo2|inlined.1 (result f64)
|
||||||
|
local.get $2
|
||||||
|
local.set $6
|
||||||
i32.const 1023
|
i32.const 1023
|
||||||
i32.const 2043
|
i32.const 2043
|
||||||
i32.const 2
|
i32.const 2
|
||||||
@ -10690,14 +10767,14 @@
|
|||||||
i64.const 32
|
i64.const 32
|
||||||
i64.shl
|
i64.shl
|
||||||
f64.reinterpret_i64
|
f64.reinterpret_i64
|
||||||
local.set $6
|
local.set $7
|
||||||
local.get $2
|
local.get $6
|
||||||
f64.const 1416.0996898839683
|
f64.const 1416.0996898839683
|
||||||
f64.sub
|
f64.sub
|
||||||
call $~lib/math/NativeMath.exp
|
call $~lib/math/NativeMath.exp
|
||||||
local.get $6
|
local.get $7
|
||||||
f64.mul
|
f64.mul
|
||||||
local.get $6
|
local.get $7
|
||||||
f64.mul
|
f64.mul
|
||||||
end
|
end
|
||||||
f64.mul
|
f64.mul
|
||||||
@ -10737,6 +10814,7 @@
|
|||||||
(local $3 f32)
|
(local $3 f32)
|
||||||
(local $4 f32)
|
(local $4 f32)
|
||||||
(local $5 f32)
|
(local $5 f32)
|
||||||
|
(local $6 f32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.reinterpret_f32
|
i32.reinterpret_f32
|
||||||
i32.const 2147483647
|
i32.const 2147483647
|
||||||
@ -10801,6 +10879,8 @@
|
|||||||
local.get $4
|
local.get $4
|
||||||
f32.mul
|
f32.mul
|
||||||
block $~lib/math/expo2f|inlined.1 (result f32)
|
block $~lib/math/expo2f|inlined.1 (result f32)
|
||||||
|
local.get $2
|
||||||
|
local.set $5
|
||||||
i32.const 127
|
i32.const 127
|
||||||
i32.const 235
|
i32.const 235
|
||||||
i32.const 1
|
i32.const 1
|
||||||
@ -10809,14 +10889,14 @@
|
|||||||
i32.const 23
|
i32.const 23
|
||||||
i32.shl
|
i32.shl
|
||||||
f32.reinterpret_i32
|
f32.reinterpret_i32
|
||||||
local.set $5
|
local.set $6
|
||||||
local.get $2
|
local.get $5
|
||||||
f32.const 162.88958740234375
|
f32.const 162.88958740234375
|
||||||
f32.sub
|
f32.sub
|
||||||
call $~lib/math/NativeMathf.exp
|
call $~lib/math/NativeMathf.exp
|
||||||
local.get $5
|
local.get $6
|
||||||
f32.mul
|
f32.mul
|
||||||
local.get $5
|
local.get $6
|
||||||
f32.mul
|
f32.mul
|
||||||
end
|
end
|
||||||
f32.mul
|
f32.mul
|
||||||
@ -10832,22 +10912,25 @@
|
|||||||
call $std/math/check<f32>
|
call $std/math/check<f32>
|
||||||
)
|
)
|
||||||
(func $std/math/test_sqrt (; 145 ;) (type $FFFii) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32)
|
(func $std/math/test_sqrt (; 145 ;) (type $FFFii) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32)
|
||||||
(local $4 i32)
|
(local $4 f64)
|
||||||
|
(local $5 i32)
|
||||||
block $~lib/math/NativeMath.sqrt|inlined.0 (result f64)
|
block $~lib/math/NativeMath.sqrt|inlined.0 (result f64)
|
||||||
local.get $0
|
local.get $0
|
||||||
|
local.set $4
|
||||||
|
local.get $4
|
||||||
f64.sqrt
|
f64.sqrt
|
||||||
end
|
end
|
||||||
local.get $1
|
local.get $1
|
||||||
local.get $2
|
local.get $2
|
||||||
local.get $3
|
local.get $3
|
||||||
call $std/math/check<f64>
|
call $std/math/check<f64>
|
||||||
local.tee $4
|
local.tee $5
|
||||||
if (result i32)
|
if (result i32)
|
||||||
global.get $std/math/js
|
global.get $std/math/js
|
||||||
i32.eqz
|
i32.eqz
|
||||||
local.tee $4
|
local.tee $5
|
||||||
if (result i32)
|
if (result i32)
|
||||||
local.get $4
|
local.get $5
|
||||||
else
|
else
|
||||||
local.get $0
|
local.get $0
|
||||||
call $~lib/bindings/Math/sqrt
|
call $~lib/bindings/Math/sqrt
|
||||||
@ -10857,12 +10940,15 @@
|
|||||||
call $std/math/check<f64>
|
call $std/math/check<f64>
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
local.get $4
|
local.get $5
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
(func $std/math/test_sqrtf (; 146 ;) (type $fffii) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32)
|
(func $std/math/test_sqrtf (; 146 ;) (type $fffii) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32)
|
||||||
|
(local $4 f32)
|
||||||
block $~lib/math/NativeMathf.sqrt|inlined.0 (result f32)
|
block $~lib/math/NativeMathf.sqrt|inlined.0 (result f32)
|
||||||
local.get $0
|
local.get $0
|
||||||
|
local.set $4
|
||||||
|
local.get $4
|
||||||
f32.sqrt
|
f32.sqrt
|
||||||
end
|
end
|
||||||
local.get $1
|
local.get $1
|
||||||
@ -11084,22 +11170,25 @@
|
|||||||
call $std/math/check<f32>
|
call $std/math/check<f32>
|
||||||
)
|
)
|
||||||
(func $std/math/test_trunc (; 151 ;) (type $FFFii) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32)
|
(func $std/math/test_trunc (; 151 ;) (type $FFFii) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32)
|
||||||
(local $4 i32)
|
(local $4 f64)
|
||||||
|
(local $5 i32)
|
||||||
block $~lib/math/NativeMath.trunc|inlined.0 (result f64)
|
block $~lib/math/NativeMath.trunc|inlined.0 (result f64)
|
||||||
local.get $0
|
local.get $0
|
||||||
|
local.set $4
|
||||||
|
local.get $4
|
||||||
f64.trunc
|
f64.trunc
|
||||||
end
|
end
|
||||||
local.get $1
|
local.get $1
|
||||||
local.get $2
|
local.get $2
|
||||||
local.get $3
|
local.get $3
|
||||||
call $std/math/check<f64>
|
call $std/math/check<f64>
|
||||||
local.tee $4
|
local.tee $5
|
||||||
if (result i32)
|
if (result i32)
|
||||||
global.get $std/math/js
|
global.get $std/math/js
|
||||||
i32.eqz
|
i32.eqz
|
||||||
local.tee $4
|
local.tee $5
|
||||||
if (result i32)
|
if (result i32)
|
||||||
local.get $4
|
local.get $5
|
||||||
else
|
else
|
||||||
local.get $0
|
local.get $0
|
||||||
call $~lib/bindings/Math/trunc
|
call $~lib/bindings/Math/trunc
|
||||||
@ -11109,12 +11198,15 @@
|
|||||||
call $std/math/check<f64>
|
call $std/math/check<f64>
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
local.get $4
|
local.get $5
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
(func $std/math/test_truncf (; 152 ;) (type $fffii) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32)
|
(func $std/math/test_truncf (; 152 ;) (type $fffii) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32)
|
||||||
|
(local $4 f32)
|
||||||
block $~lib/math/NativeMathf.trunc|inlined.0 (result f32)
|
block $~lib/math/NativeMathf.trunc|inlined.0 (result f32)
|
||||||
local.get $0
|
local.get $0
|
||||||
|
local.set $4
|
||||||
|
local.get $4
|
||||||
f32.trunc
|
f32.trunc
|
||||||
end
|
end
|
||||||
local.get $1
|
local.get $1
|
||||||
@ -34868,7 +34960,7 @@
|
|||||||
end
|
end
|
||||||
unreachable
|
unreachable
|
||||||
end
|
end
|
||||||
block
|
block $~lib/math/NativeMathf.seedRandom|inlined.0
|
||||||
call $~lib/bindings/Math/random
|
call $~lib/bindings/Math/random
|
||||||
i64.reinterpret_f64
|
i64.reinterpret_f64
|
||||||
local.set $3
|
local.set $3
|
||||||
|
@ -73,8 +73,8 @@
|
|||||||
local.get $0
|
local.get $0
|
||||||
local.get $1
|
local.get $1
|
||||||
f64.mul
|
f64.mul
|
||||||
local.tee $0
|
local.tee $1
|
||||||
local.get $0
|
local.get $1
|
||||||
f64.div
|
f64.div
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@ -324,8 +324,8 @@
|
|||||||
local.get $0
|
local.get $0
|
||||||
local.get $1
|
local.get $1
|
||||||
f32.mul
|
f32.mul
|
||||||
local.tee $0
|
local.tee $1
|
||||||
local.get $0
|
local.get $1
|
||||||
f32.div
|
f32.div
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
@ -76,7 +76,9 @@
|
|||||||
local.get $8
|
local.get $8
|
||||||
else
|
else
|
||||||
local.get $1
|
local.get $1
|
||||||
local.get $1
|
local.set $9
|
||||||
|
local.get $9
|
||||||
|
local.get $9
|
||||||
f64.ne
|
f64.ne
|
||||||
end
|
end
|
||||||
i32.const 0
|
i32.const 0
|
||||||
@ -388,7 +390,9 @@
|
|||||||
local.get $8
|
local.get $8
|
||||||
else
|
else
|
||||||
local.get $1
|
local.get $1
|
||||||
local.get $1
|
local.set $9
|
||||||
|
local.get $9
|
||||||
|
local.get $9
|
||||||
f32.ne
|
f32.ne
|
||||||
end
|
end
|
||||||
i32.const 0
|
i32.const 0
|
||||||
|
@ -1477,14 +1477,12 @@
|
|||||||
unreachable
|
unreachable
|
||||||
end
|
end
|
||||||
global.get $std/pointer/buf
|
global.get $std/pointer/buf
|
||||||
local.tee $0
|
|
||||||
i32.const 8
|
i32.const 8
|
||||||
i32.add
|
i32.add
|
||||||
|
local.tee $0
|
||||||
f32.const 1.2999999523162842
|
f32.const 1.2999999523162842
|
||||||
f32.store
|
f32.store
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.const 8
|
|
||||||
i32.add
|
|
||||||
f32.load
|
f32.load
|
||||||
f32.const 1.2999999523162842
|
f32.const 1.2999999523162842
|
||||||
f32.ne
|
f32.ne
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
(module
|
(module
|
||||||
(type $iii (func (param i32 i32) (result i32)))
|
|
||||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||||
(type $iiv (func (param i32 i32)))
|
(type $iiv (func (param i32 i32)))
|
||||||
(type $iiiv (func (param i32 i32 i32)))
|
(type $iiiv (func (param i32 i32 i32)))
|
||||||
(type $iifv (func (param i32 i32 f32)))
|
(type $iifv (func (param i32 i32 f32)))
|
||||||
(type $iif (func (param i32 i32) (result f32)))
|
|
||||||
(type $ifv (func (param i32 f32)))
|
(type $ifv (func (param i32 f32)))
|
||||||
(type $v (func))
|
(type $v (func))
|
||||||
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
|
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
|
||||||
@ -22,10 +20,7 @@
|
|||||||
(export "memory" (memory $0))
|
(export "memory" (memory $0))
|
||||||
(export "table" (table $0))
|
(export "table" (table $0))
|
||||||
(start $start)
|
(start $start)
|
||||||
(func $std/pointer/Pointer<Entry>#constructor (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
(func $~lib/internal/memory/memset (; 1 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
|
||||||
local.get $1
|
|
||||||
)
|
|
||||||
(func $~lib/internal/memory/memset (; 2 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
|
|
||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
(local $4 i32)
|
(local $4 i32)
|
||||||
(local $5 i64)
|
(local $5 i64)
|
||||||
@ -279,7 +274,7 @@
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
(func $~lib/internal/memory/memcpy (; 3 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
|
(func $~lib/internal/memory/memcpy (; 2 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
|
||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
(local $4 i32)
|
(local $4 i32)
|
||||||
(local $5 i32)
|
(local $5 i32)
|
||||||
@ -1480,7 +1475,7 @@
|
|||||||
i32.store8
|
i32.store8
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
(func $~lib/internal/memory/memmove (; 4 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
|
(func $~lib/internal/memory/memmove (; 3 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
|
||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
local.get $1
|
local.get $1
|
||||||
@ -1707,34 +1702,38 @@
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
(func $std/pointer/Pointer<Entry>#set:value (; 5 ;) (type $iiv) (param $0 i32) (param $1 i32)
|
(func $std/pointer/Pointer<Entry>#set:value (; 4 ;) (type $iiv) (param $0 i32) (param $1 i32)
|
||||||
(local $2 i32)
|
(local $2 i32)
|
||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
|
(local $4 i32)
|
||||||
local.get $1
|
local.get $1
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.eq
|
i32.eq
|
||||||
if
|
if
|
||||||
i32.const 0
|
|
||||||
local.set $2
|
|
||||||
i32.const 8
|
|
||||||
local.set $3
|
|
||||||
local.get $0
|
local.get $0
|
||||||
|
local.set $2
|
||||||
|
i32.const 0
|
||||||
|
local.set $3
|
||||||
|
i32.const 8
|
||||||
|
local.set $4
|
||||||
local.get $2
|
local.get $2
|
||||||
local.get $3
|
local.get $3
|
||||||
|
local.get $4
|
||||||
call $~lib/internal/memory/memset
|
call $~lib/internal/memory/memset
|
||||||
else
|
else
|
||||||
i32.const 8
|
|
||||||
local.set $3
|
|
||||||
local.get $0
|
local.get $0
|
||||||
|
local.set $4
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.set $3
|
||||||
|
i32.const 8
|
||||||
|
local.set $2
|
||||||
|
local.get $4
|
||||||
local.get $3
|
local.get $3
|
||||||
|
local.get $2
|
||||||
call $~lib/internal/memory/memmove
|
call $~lib/internal/memory/memmove
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
(func $std/pointer/Pointer<f32>#constructor (; 6 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
(func $std/pointer/Pointer<f32>#set (; 5 ;) (type $iifv) (param $0 i32) (param $1 i32) (param $2 f32)
|
||||||
local.get $1
|
|
||||||
)
|
|
||||||
(func $std/pointer/Pointer<f32>#set (; 7 ;) (type $iifv) (param $0 i32) (param $1 i32) (param $2 f32)
|
|
||||||
local.get $0
|
local.get $0
|
||||||
local.get $1
|
local.get $1
|
||||||
i32.const 4
|
i32.const 4
|
||||||
@ -1743,20 +1742,12 @@
|
|||||||
local.get $2
|
local.get $2
|
||||||
f32.store
|
f32.store
|
||||||
)
|
)
|
||||||
(func $std/pointer/Pointer<f32>#get (; 8 ;) (type $iif) (param $0 i32) (param $1 i32) (result f32)
|
(func $std/pointer/Pointer<f32>#set:value (; 6 ;) (type $ifv) (param $0 i32) (param $1 f32)
|
||||||
local.get $0
|
|
||||||
local.get $1
|
|
||||||
i32.const 4
|
|
||||||
i32.mul
|
|
||||||
i32.add
|
|
||||||
f32.load
|
|
||||||
)
|
|
||||||
(func $std/pointer/Pointer<f32>#set:value (; 9 ;) (type $ifv) (param $0 i32) (param $1 f32)
|
|
||||||
local.get $0
|
local.get $0
|
||||||
local.get $1
|
local.get $1
|
||||||
f32.store
|
f32.store
|
||||||
)
|
)
|
||||||
(func $start (; 10 ;) (type $v)
|
(func $start (; 7 ;) (type $v)
|
||||||
(local $0 i32)
|
(local $0 i32)
|
||||||
(local $1 i32)
|
(local $1 i32)
|
||||||
(local $2 f32)
|
(local $2 f32)
|
||||||
@ -2132,9 +2123,18 @@
|
|||||||
i32.const 1
|
i32.const 1
|
||||||
f32.const 1.2000000476837158
|
f32.const 1.2000000476837158
|
||||||
call $std/pointer/Pointer<f32>#set
|
call $std/pointer/Pointer<f32>#set
|
||||||
global.get $std/pointer/buf
|
block $std/pointer/Pointer<f32>#get|inlined.0 (result f32)
|
||||||
i32.const 0
|
global.get $std/pointer/buf
|
||||||
call $std/pointer/Pointer<f32>#get
|
local.set $1
|
||||||
|
i32.const 0
|
||||||
|
local.set $0
|
||||||
|
local.get $1
|
||||||
|
local.get $0
|
||||||
|
i32.const 4
|
||||||
|
i32.mul
|
||||||
|
i32.add
|
||||||
|
f32.load
|
||||||
|
end
|
||||||
f32.const 1.100000023841858
|
f32.const 1.100000023841858
|
||||||
f32.eq
|
f32.eq
|
||||||
i32.eqz
|
i32.eqz
|
||||||
@ -2146,9 +2146,18 @@
|
|||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
end
|
end
|
||||||
global.get $std/pointer/buf
|
block $std/pointer/Pointer<f32>#get|inlined.1 (result f32)
|
||||||
i32.const 1
|
global.get $std/pointer/buf
|
||||||
call $std/pointer/Pointer<f32>#get
|
local.set $0
|
||||||
|
i32.const 1
|
||||||
|
local.set $1
|
||||||
|
local.get $0
|
||||||
|
local.get $1
|
||||||
|
i32.const 4
|
||||||
|
i32.mul
|
||||||
|
i32.add
|
||||||
|
f32.load
|
||||||
|
end
|
||||||
f32.const 1.2000000476837158
|
f32.const 1.2000000476837158
|
||||||
f32.eq
|
f32.eq
|
||||||
i32.eqz
|
i32.eqz
|
||||||
@ -2160,7 +2169,7 @@
|
|||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
end
|
end
|
||||||
block $std/pointer/Pointer<f32>#get|inlined.0 (result f32)
|
block $std/pointer/Pointer<f32>#get|inlined.2 (result f32)
|
||||||
global.get $std/pointer/buf
|
global.get $std/pointer/buf
|
||||||
local.set $1
|
local.set $1
|
||||||
i32.const 0
|
i32.const 0
|
||||||
@ -2183,7 +2192,7 @@
|
|||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
end
|
end
|
||||||
block $std/pointer/Pointer<f32>#get|inlined.1 (result f32)
|
block $std/pointer/Pointer<f32>#get|inlined.3 (result f32)
|
||||||
global.get $std/pointer/buf
|
global.get $std/pointer/buf
|
||||||
local.set $0
|
local.set $0
|
||||||
i32.const 1
|
i32.const 1
|
||||||
@ -2232,7 +2241,7 @@
|
|||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
end
|
end
|
||||||
block
|
block $std/pointer/Pointer<f32>#set|inlined.0
|
||||||
global.get $std/pointer/buf
|
global.get $std/pointer/buf
|
||||||
local.set $1
|
local.set $1
|
||||||
i32.const 2
|
i32.const 2
|
||||||
@ -2247,9 +2256,18 @@
|
|||||||
local.get $2
|
local.get $2
|
||||||
f32.store
|
f32.store
|
||||||
end
|
end
|
||||||
global.get $std/pointer/buf
|
block $std/pointer/Pointer<f32>#get|inlined.4 (result f32)
|
||||||
i32.const 2
|
global.get $std/pointer/buf
|
||||||
call $std/pointer/Pointer<f32>#get
|
local.set $0
|
||||||
|
i32.const 2
|
||||||
|
local.set $1
|
||||||
|
local.get $0
|
||||||
|
local.get $1
|
||||||
|
i32.const 4
|
||||||
|
i32.mul
|
||||||
|
i32.add
|
||||||
|
f32.load
|
||||||
|
end
|
||||||
f32.const 1.2999999523162842
|
f32.const 1.2999999523162842
|
||||||
f32.eq
|
f32.eq
|
||||||
i32.eqz
|
i32.eqz
|
||||||
@ -2261,13 +2279,13 @@
|
|||||||
call $~lib/env/abort
|
call $~lib/env/abort
|
||||||
unreachable
|
unreachable
|
||||||
end
|
end
|
||||||
block $std/pointer/Pointer<f32>#get|inlined.2 (result f32)
|
block $std/pointer/Pointer<f32>#get|inlined.5 (result f32)
|
||||||
global.get $std/pointer/buf
|
global.get $std/pointer/buf
|
||||||
local.set $0
|
|
||||||
i32.const 2
|
|
||||||
local.set $1
|
local.set $1
|
||||||
local.get $0
|
i32.const 2
|
||||||
|
local.set $0
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.get $0
|
||||||
i32.const 4
|
i32.const 4
|
||||||
i32.mul
|
i32.mul
|
||||||
i32.add
|
i32.add
|
||||||
@ -2302,8 +2320,8 @@
|
|||||||
call $std/pointer/Pointer<f32>#set:value
|
call $std/pointer/Pointer<f32>#set:value
|
||||||
block $std/pointer/Pointer<f32>#get:value|inlined.0 (result f32)
|
block $std/pointer/Pointer<f32>#get:value|inlined.0 (result f32)
|
||||||
global.get $std/pointer/buf
|
global.get $std/pointer/buf
|
||||||
local.set $1
|
local.set $0
|
||||||
local.get $1
|
local.get $0
|
||||||
f32.load
|
f32.load
|
||||||
br $std/pointer/Pointer<f32>#get:value|inlined.0
|
br $std/pointer/Pointer<f32>#get:value|inlined.0
|
||||||
end
|
end
|
||||||
@ -2332,6 +2350,6 @@
|
|||||||
unreachable
|
unreachable
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
(func $null (; 11 ;) (type $v)
|
(func $null (; 8 ;) (type $v)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -428,6 +428,7 @@
|
|||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
(local $4 i32)
|
(local $4 i32)
|
||||||
(local $5 i32)
|
(local $5 i32)
|
||||||
|
(local $6 i32)
|
||||||
local.get $1
|
local.get $1
|
||||||
global.get $~lib/internal/arraybuffer/MAX_BLENGTH
|
global.get $~lib/internal/arraybuffer/MAX_BLENGTH
|
||||||
i32.gt_u
|
i32.gt_u
|
||||||
@ -453,9 +454,11 @@
|
|||||||
local.set $4
|
local.set $4
|
||||||
i32.const 0
|
i32.const 0
|
||||||
local.set $5
|
local.set $5
|
||||||
|
local.get $1
|
||||||
|
local.set $6
|
||||||
local.get $4
|
local.get $4
|
||||||
local.get $5
|
local.get $5
|
||||||
local.get $1
|
local.get $6
|
||||||
call $~lib/internal/memory/memset
|
call $~lib/internal/memory/memset
|
||||||
end
|
end
|
||||||
local.get $3
|
local.get $3
|
||||||
@ -844,6 +847,8 @@
|
|||||||
local.get $1
|
local.get $1
|
||||||
block $~lib/internal/hash/HASH<i8>|inlined.1 (result i32)
|
block $~lib/internal/hash/HASH<i8>|inlined.1 (result i32)
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.set $2
|
||||||
|
local.get $2
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.shl
|
i32.shl
|
||||||
i32.const 24
|
i32.const 24
|
||||||
@ -852,15 +857,15 @@
|
|||||||
br $~lib/internal/hash/HASH<i8>|inlined.1
|
br $~lib/internal/hash/HASH<i8>|inlined.1
|
||||||
end
|
end
|
||||||
call $~lib/set/Set<i8>#find
|
call $~lib/set/Set<i8>#find
|
||||||
local.set $2
|
local.set $3
|
||||||
local.get $2
|
local.get $3
|
||||||
i32.eqz
|
i32.eqz
|
||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local.get $2
|
local.get $3
|
||||||
local.get $2
|
local.get $3
|
||||||
i32.load offset=4
|
i32.load offset=4
|
||||||
global.get $~lib/set/EMPTY
|
global.get $~lib/set/EMPTY
|
||||||
i32.or
|
i32.or
|
||||||
@ -875,21 +880,21 @@
|
|||||||
i32.load offset=4
|
i32.load offset=4
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.shr_u
|
i32.shr_u
|
||||||
local.set $3
|
local.set $4
|
||||||
local.get $3
|
local.get $4
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.add
|
i32.add
|
||||||
global.get $~lib/set/INITIAL_CAPACITY
|
global.get $~lib/set/INITIAL_CAPACITY
|
||||||
local.tee $4
|
local.tee $2
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load offset=20
|
i32.load offset=20
|
||||||
local.tee $5
|
local.tee $5
|
||||||
local.get $4
|
local.get $2
|
||||||
local.get $5
|
local.get $5
|
||||||
i32.gt_u
|
i32.gt_u
|
||||||
select
|
select
|
||||||
i32.ge_u
|
i32.ge_u
|
||||||
local.tee $4
|
local.tee $2
|
||||||
if (result i32)
|
if (result i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load offset=20
|
i32.load offset=20
|
||||||
@ -901,11 +906,11 @@
|
|||||||
i32.trunc_f64_s
|
i32.trunc_f64_s
|
||||||
i32.lt_s
|
i32.lt_s
|
||||||
else
|
else
|
||||||
local.get $4
|
local.get $2
|
||||||
end
|
end
|
||||||
if
|
if
|
||||||
local.get $0
|
local.get $0
|
||||||
local.get $3
|
local.get $4
|
||||||
call $~lib/set/Set<i8>#rehash
|
call $~lib/set/Set<i8>#rehash
|
||||||
end
|
end
|
||||||
i32.const 1
|
i32.const 1
|
||||||
@ -1566,21 +1571,23 @@
|
|||||||
local.get $1
|
local.get $1
|
||||||
block $~lib/internal/hash/HASH<u8>|inlined.1 (result i32)
|
block $~lib/internal/hash/HASH<u8>|inlined.1 (result i32)
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.set $2
|
||||||
|
local.get $2
|
||||||
i32.const 255
|
i32.const 255
|
||||||
i32.and
|
i32.and
|
||||||
call $~lib/internal/hash/hash8
|
call $~lib/internal/hash/hash8
|
||||||
br $~lib/internal/hash/HASH<u8>|inlined.1
|
br $~lib/internal/hash/HASH<u8>|inlined.1
|
||||||
end
|
end
|
||||||
call $~lib/set/Set<u8>#find
|
call $~lib/set/Set<u8>#find
|
||||||
local.set $2
|
local.set $3
|
||||||
local.get $2
|
local.get $3
|
||||||
i32.eqz
|
i32.eqz
|
||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local.get $2
|
local.get $3
|
||||||
local.get $2
|
local.get $3
|
||||||
i32.load offset=4
|
i32.load offset=4
|
||||||
global.get $~lib/set/EMPTY
|
global.get $~lib/set/EMPTY
|
||||||
i32.or
|
i32.or
|
||||||
@ -1595,21 +1602,21 @@
|
|||||||
i32.load offset=4
|
i32.load offset=4
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.shr_u
|
i32.shr_u
|
||||||
local.set $3
|
local.set $4
|
||||||
local.get $3
|
local.get $4
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.add
|
i32.add
|
||||||
global.get $~lib/set/INITIAL_CAPACITY
|
global.get $~lib/set/INITIAL_CAPACITY
|
||||||
local.tee $4
|
local.tee $2
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load offset=20
|
i32.load offset=20
|
||||||
local.tee $5
|
local.tee $5
|
||||||
local.get $4
|
local.get $2
|
||||||
local.get $5
|
local.get $5
|
||||||
i32.gt_u
|
i32.gt_u
|
||||||
select
|
select
|
||||||
i32.ge_u
|
i32.ge_u
|
||||||
local.tee $4
|
local.tee $2
|
||||||
if (result i32)
|
if (result i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load offset=20
|
i32.load offset=20
|
||||||
@ -1621,11 +1628,11 @@
|
|||||||
i32.trunc_f64_s
|
i32.trunc_f64_s
|
||||||
i32.lt_s
|
i32.lt_s
|
||||||
else
|
else
|
||||||
local.get $4
|
local.get $2
|
||||||
end
|
end
|
||||||
if
|
if
|
||||||
local.get $0
|
local.get $0
|
||||||
local.get $3
|
local.get $4
|
||||||
call $~lib/set/Set<u8>#rehash
|
call $~lib/set/Set<u8>#rehash
|
||||||
end
|
end
|
||||||
i32.const 1
|
i32.const 1
|
||||||
@ -2312,6 +2319,8 @@
|
|||||||
local.get $1
|
local.get $1
|
||||||
block $~lib/internal/hash/HASH<i16>|inlined.1 (result i32)
|
block $~lib/internal/hash/HASH<i16>|inlined.1 (result i32)
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.set $2
|
||||||
|
local.get $2
|
||||||
i32.const 16
|
i32.const 16
|
||||||
i32.shl
|
i32.shl
|
||||||
i32.const 16
|
i32.const 16
|
||||||
@ -2320,15 +2329,15 @@
|
|||||||
br $~lib/internal/hash/HASH<i16>|inlined.1
|
br $~lib/internal/hash/HASH<i16>|inlined.1
|
||||||
end
|
end
|
||||||
call $~lib/set/Set<i16>#find
|
call $~lib/set/Set<i16>#find
|
||||||
local.set $2
|
local.set $3
|
||||||
local.get $2
|
local.get $3
|
||||||
i32.eqz
|
i32.eqz
|
||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local.get $2
|
local.get $3
|
||||||
local.get $2
|
local.get $3
|
||||||
i32.load offset=4
|
i32.load offset=4
|
||||||
global.get $~lib/set/EMPTY
|
global.get $~lib/set/EMPTY
|
||||||
i32.or
|
i32.or
|
||||||
@ -2343,21 +2352,21 @@
|
|||||||
i32.load offset=4
|
i32.load offset=4
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.shr_u
|
i32.shr_u
|
||||||
local.set $3
|
local.set $4
|
||||||
local.get $3
|
local.get $4
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.add
|
i32.add
|
||||||
global.get $~lib/set/INITIAL_CAPACITY
|
global.get $~lib/set/INITIAL_CAPACITY
|
||||||
local.tee $4
|
local.tee $2
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load offset=20
|
i32.load offset=20
|
||||||
local.tee $5
|
local.tee $5
|
||||||
local.get $4
|
local.get $2
|
||||||
local.get $5
|
local.get $5
|
||||||
i32.gt_u
|
i32.gt_u
|
||||||
select
|
select
|
||||||
i32.ge_u
|
i32.ge_u
|
||||||
local.tee $4
|
local.tee $2
|
||||||
if (result i32)
|
if (result i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load offset=20
|
i32.load offset=20
|
||||||
@ -2369,11 +2378,11 @@
|
|||||||
i32.trunc_f64_s
|
i32.trunc_f64_s
|
||||||
i32.lt_s
|
i32.lt_s
|
||||||
else
|
else
|
||||||
local.get $4
|
local.get $2
|
||||||
end
|
end
|
||||||
if
|
if
|
||||||
local.get $0
|
local.get $0
|
||||||
local.get $3
|
local.get $4
|
||||||
call $~lib/set/Set<i16>#rehash
|
call $~lib/set/Set<i16>#rehash
|
||||||
end
|
end
|
||||||
i32.const 1
|
i32.const 1
|
||||||
@ -3034,21 +3043,23 @@
|
|||||||
local.get $1
|
local.get $1
|
||||||
block $~lib/internal/hash/HASH<u16>|inlined.1 (result i32)
|
block $~lib/internal/hash/HASH<u16>|inlined.1 (result i32)
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.set $2
|
||||||
|
local.get $2
|
||||||
i32.const 65535
|
i32.const 65535
|
||||||
i32.and
|
i32.and
|
||||||
call $~lib/internal/hash/hash16
|
call $~lib/internal/hash/hash16
|
||||||
br $~lib/internal/hash/HASH<u16>|inlined.1
|
br $~lib/internal/hash/HASH<u16>|inlined.1
|
||||||
end
|
end
|
||||||
call $~lib/set/Set<u16>#find
|
call $~lib/set/Set<u16>#find
|
||||||
local.set $2
|
local.set $3
|
||||||
local.get $2
|
local.get $3
|
||||||
i32.eqz
|
i32.eqz
|
||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local.get $2
|
local.get $3
|
||||||
local.get $2
|
local.get $3
|
||||||
i32.load offset=4
|
i32.load offset=4
|
||||||
global.get $~lib/set/EMPTY
|
global.get $~lib/set/EMPTY
|
||||||
i32.or
|
i32.or
|
||||||
@ -3063,21 +3074,21 @@
|
|||||||
i32.load offset=4
|
i32.load offset=4
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.shr_u
|
i32.shr_u
|
||||||
local.set $3
|
local.set $4
|
||||||
local.get $3
|
local.get $4
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.add
|
i32.add
|
||||||
global.get $~lib/set/INITIAL_CAPACITY
|
global.get $~lib/set/INITIAL_CAPACITY
|
||||||
local.tee $4
|
local.tee $2
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load offset=20
|
i32.load offset=20
|
||||||
local.tee $5
|
local.tee $5
|
||||||
local.get $4
|
local.get $2
|
||||||
local.get $5
|
local.get $5
|
||||||
i32.gt_u
|
i32.gt_u
|
||||||
select
|
select
|
||||||
i32.ge_u
|
i32.ge_u
|
||||||
local.tee $4
|
local.tee $2
|
||||||
if (result i32)
|
if (result i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load offset=20
|
i32.load offset=20
|
||||||
@ -3089,11 +3100,11 @@
|
|||||||
i32.trunc_f64_s
|
i32.trunc_f64_s
|
||||||
i32.lt_s
|
i32.lt_s
|
||||||
else
|
else
|
||||||
local.get $4
|
local.get $2
|
||||||
end
|
end
|
||||||
if
|
if
|
||||||
local.get $0
|
local.get $0
|
||||||
local.get $3
|
local.get $4
|
||||||
call $~lib/set/Set<u16>#rehash
|
call $~lib/set/Set<u16>#rehash
|
||||||
end
|
end
|
||||||
i32.const 1
|
i32.const 1
|
||||||
@ -3792,19 +3803,21 @@
|
|||||||
local.get $1
|
local.get $1
|
||||||
block $~lib/internal/hash/HASH<i32>|inlined.1 (result i32)
|
block $~lib/internal/hash/HASH<i32>|inlined.1 (result i32)
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.set $2
|
||||||
|
local.get $2
|
||||||
call $~lib/internal/hash/hash32
|
call $~lib/internal/hash/hash32
|
||||||
br $~lib/internal/hash/HASH<i32>|inlined.1
|
br $~lib/internal/hash/HASH<i32>|inlined.1
|
||||||
end
|
end
|
||||||
call $~lib/set/Set<i32>#find
|
call $~lib/set/Set<i32>#find
|
||||||
local.set $2
|
local.set $3
|
||||||
local.get $2
|
local.get $3
|
||||||
i32.eqz
|
i32.eqz
|
||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local.get $2
|
local.get $3
|
||||||
local.get $2
|
local.get $3
|
||||||
i32.load offset=4
|
i32.load offset=4
|
||||||
global.get $~lib/set/EMPTY
|
global.get $~lib/set/EMPTY
|
||||||
i32.or
|
i32.or
|
||||||
@ -3819,21 +3832,21 @@
|
|||||||
i32.load offset=4
|
i32.load offset=4
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.shr_u
|
i32.shr_u
|
||||||
local.set $3
|
local.set $4
|
||||||
local.get $3
|
local.get $4
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.add
|
i32.add
|
||||||
global.get $~lib/set/INITIAL_CAPACITY
|
global.get $~lib/set/INITIAL_CAPACITY
|
||||||
local.tee $4
|
local.tee $2
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load offset=20
|
i32.load offset=20
|
||||||
local.tee $5
|
local.tee $5
|
||||||
local.get $4
|
local.get $2
|
||||||
local.get $5
|
local.get $5
|
||||||
i32.gt_u
|
i32.gt_u
|
||||||
select
|
select
|
||||||
i32.ge_u
|
i32.ge_u
|
||||||
local.tee $4
|
local.tee $2
|
||||||
if (result i32)
|
if (result i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load offset=20
|
i32.load offset=20
|
||||||
@ -3845,11 +3858,11 @@
|
|||||||
i32.trunc_f64_s
|
i32.trunc_f64_s
|
||||||
i32.lt_s
|
i32.lt_s
|
||||||
else
|
else
|
||||||
local.get $4
|
local.get $2
|
||||||
end
|
end
|
||||||
if
|
if
|
||||||
local.get $0
|
local.get $0
|
||||||
local.get $3
|
local.get $4
|
||||||
call $~lib/set/Set<i32>#rehash
|
call $~lib/set/Set<i32>#rehash
|
||||||
end
|
end
|
||||||
i32.const 1
|
i32.const 1
|
||||||
@ -4506,19 +4519,21 @@
|
|||||||
local.get $1
|
local.get $1
|
||||||
block $~lib/internal/hash/HASH<u32>|inlined.1 (result i32)
|
block $~lib/internal/hash/HASH<u32>|inlined.1 (result i32)
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.set $2
|
||||||
|
local.get $2
|
||||||
call $~lib/internal/hash/hash32
|
call $~lib/internal/hash/hash32
|
||||||
br $~lib/internal/hash/HASH<u32>|inlined.1
|
br $~lib/internal/hash/HASH<u32>|inlined.1
|
||||||
end
|
end
|
||||||
call $~lib/set/Set<u32>#find
|
call $~lib/set/Set<u32>#find
|
||||||
local.set $2
|
local.set $3
|
||||||
local.get $2
|
local.get $3
|
||||||
i32.eqz
|
i32.eqz
|
||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local.get $2
|
local.get $3
|
||||||
local.get $2
|
local.get $3
|
||||||
i32.load offset=4
|
i32.load offset=4
|
||||||
global.get $~lib/set/EMPTY
|
global.get $~lib/set/EMPTY
|
||||||
i32.or
|
i32.or
|
||||||
@ -4533,21 +4548,21 @@
|
|||||||
i32.load offset=4
|
i32.load offset=4
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.shr_u
|
i32.shr_u
|
||||||
local.set $3
|
local.set $4
|
||||||
local.get $3
|
local.get $4
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.add
|
i32.add
|
||||||
global.get $~lib/set/INITIAL_CAPACITY
|
global.get $~lib/set/INITIAL_CAPACITY
|
||||||
local.tee $4
|
local.tee $2
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load offset=20
|
i32.load offset=20
|
||||||
local.tee $5
|
local.tee $5
|
||||||
local.get $4
|
local.get $2
|
||||||
local.get $5
|
local.get $5
|
||||||
i32.gt_u
|
i32.gt_u
|
||||||
select
|
select
|
||||||
i32.ge_u
|
i32.ge_u
|
||||||
local.tee $4
|
local.tee $2
|
||||||
if (result i32)
|
if (result i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load offset=20
|
i32.load offset=20
|
||||||
@ -4559,11 +4574,11 @@
|
|||||||
i32.trunc_f64_s
|
i32.trunc_f64_s
|
||||||
i32.lt_s
|
i32.lt_s
|
||||||
else
|
else
|
||||||
local.get $4
|
local.get $2
|
||||||
end
|
end
|
||||||
if
|
if
|
||||||
local.get $0
|
local.get $0
|
||||||
local.get $3
|
local.get $4
|
||||||
call $~lib/set/Set<u32>#rehash
|
call $~lib/set/Set<u32>#rehash
|
||||||
end
|
end
|
||||||
i32.const 1
|
i32.const 1
|
||||||
@ -5301,27 +5316,30 @@
|
|||||||
i32.load offset=20
|
i32.load offset=20
|
||||||
)
|
)
|
||||||
(func $~lib/set/Set<i64>#delete (; 79 ;) (type $iIi) (param $0 i32) (param $1 i64) (result i32)
|
(func $~lib/set/Set<i64>#delete (; 79 ;) (type $iIi) (param $0 i32) (param $1 i64) (result i32)
|
||||||
(local $2 i32)
|
(local $2 i64)
|
||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
(local $4 i32)
|
(local $4 i32)
|
||||||
(local $5 i32)
|
(local $5 i32)
|
||||||
|
(local $6 i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
local.get $1
|
local.get $1
|
||||||
block $~lib/internal/hash/HASH<i64>|inlined.1 (result i32)
|
block $~lib/internal/hash/HASH<i64>|inlined.1 (result i32)
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.set $2
|
||||||
|
local.get $2
|
||||||
call $~lib/internal/hash/hash64
|
call $~lib/internal/hash/hash64
|
||||||
br $~lib/internal/hash/HASH<i64>|inlined.1
|
br $~lib/internal/hash/HASH<i64>|inlined.1
|
||||||
end
|
end
|
||||||
call $~lib/set/Set<i64>#find
|
call $~lib/set/Set<i64>#find
|
||||||
local.set $2
|
local.set $3
|
||||||
local.get $2
|
local.get $3
|
||||||
i32.eqz
|
i32.eqz
|
||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local.get $2
|
local.get $3
|
||||||
local.get $2
|
local.get $3
|
||||||
i32.load offset=8
|
i32.load offset=8
|
||||||
global.get $~lib/set/EMPTY
|
global.get $~lib/set/EMPTY
|
||||||
i32.or
|
i32.or
|
||||||
@ -5336,21 +5354,21 @@
|
|||||||
i32.load offset=4
|
i32.load offset=4
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.shr_u
|
i32.shr_u
|
||||||
local.set $3
|
local.set $4
|
||||||
local.get $3
|
local.get $4
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.add
|
i32.add
|
||||||
global.get $~lib/set/INITIAL_CAPACITY
|
global.get $~lib/set/INITIAL_CAPACITY
|
||||||
local.tee $4
|
local.tee $5
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load offset=20
|
i32.load offset=20
|
||||||
local.tee $5
|
local.tee $6
|
||||||
local.get $4
|
|
||||||
local.get $5
|
local.get $5
|
||||||
|
local.get $6
|
||||||
i32.gt_u
|
i32.gt_u
|
||||||
select
|
select
|
||||||
i32.ge_u
|
i32.ge_u
|
||||||
local.tee $4
|
local.tee $5
|
||||||
if (result i32)
|
if (result i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load offset=20
|
i32.load offset=20
|
||||||
@ -5362,11 +5380,11 @@
|
|||||||
i32.trunc_f64_s
|
i32.trunc_f64_s
|
||||||
i32.lt_s
|
i32.lt_s
|
||||||
else
|
else
|
||||||
local.get $4
|
local.get $5
|
||||||
end
|
end
|
||||||
if
|
if
|
||||||
local.get $0
|
local.get $0
|
||||||
local.get $3
|
local.get $4
|
||||||
call $~lib/set/Set<i64>#rehash
|
call $~lib/set/Set<i64>#rehash
|
||||||
end
|
end
|
||||||
i32.const 1
|
i32.const 1
|
||||||
@ -6016,27 +6034,30 @@
|
|||||||
i32.load offset=20
|
i32.load offset=20
|
||||||
)
|
)
|
||||||
(func $~lib/set/Set<u64>#delete (; 89 ;) (type $iIi) (param $0 i32) (param $1 i64) (result i32)
|
(func $~lib/set/Set<u64>#delete (; 89 ;) (type $iIi) (param $0 i32) (param $1 i64) (result i32)
|
||||||
(local $2 i32)
|
(local $2 i64)
|
||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
(local $4 i32)
|
(local $4 i32)
|
||||||
(local $5 i32)
|
(local $5 i32)
|
||||||
|
(local $6 i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
local.get $1
|
local.get $1
|
||||||
block $~lib/internal/hash/HASH<u64>|inlined.1 (result i32)
|
block $~lib/internal/hash/HASH<u64>|inlined.1 (result i32)
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.set $2
|
||||||
|
local.get $2
|
||||||
call $~lib/internal/hash/hash64
|
call $~lib/internal/hash/hash64
|
||||||
br $~lib/internal/hash/HASH<u64>|inlined.1
|
br $~lib/internal/hash/HASH<u64>|inlined.1
|
||||||
end
|
end
|
||||||
call $~lib/set/Set<u64>#find
|
call $~lib/set/Set<u64>#find
|
||||||
local.set $2
|
local.set $3
|
||||||
local.get $2
|
local.get $3
|
||||||
i32.eqz
|
i32.eqz
|
||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local.get $2
|
local.get $3
|
||||||
local.get $2
|
local.get $3
|
||||||
i32.load offset=8
|
i32.load offset=8
|
||||||
global.get $~lib/set/EMPTY
|
global.get $~lib/set/EMPTY
|
||||||
i32.or
|
i32.or
|
||||||
@ -6051,21 +6072,21 @@
|
|||||||
i32.load offset=4
|
i32.load offset=4
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.shr_u
|
i32.shr_u
|
||||||
local.set $3
|
local.set $4
|
||||||
local.get $3
|
local.get $4
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.add
|
i32.add
|
||||||
global.get $~lib/set/INITIAL_CAPACITY
|
global.get $~lib/set/INITIAL_CAPACITY
|
||||||
local.tee $4
|
local.tee $5
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load offset=20
|
i32.load offset=20
|
||||||
local.tee $5
|
local.tee $6
|
||||||
local.get $4
|
|
||||||
local.get $5
|
local.get $5
|
||||||
|
local.get $6
|
||||||
i32.gt_u
|
i32.gt_u
|
||||||
select
|
select
|
||||||
i32.ge_u
|
i32.ge_u
|
||||||
local.tee $4
|
local.tee $5
|
||||||
if (result i32)
|
if (result i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load offset=20
|
i32.load offset=20
|
||||||
@ -6077,11 +6098,11 @@
|
|||||||
i32.trunc_f64_s
|
i32.trunc_f64_s
|
||||||
i32.lt_s
|
i32.lt_s
|
||||||
else
|
else
|
||||||
local.get $4
|
local.get $5
|
||||||
end
|
end
|
||||||
if
|
if
|
||||||
local.get $0
|
local.get $0
|
||||||
local.get $3
|
local.get $4
|
||||||
call $~lib/set/Set<u64>#rehash
|
call $~lib/set/Set<u64>#rehash
|
||||||
end
|
end
|
||||||
i32.const 1
|
i32.const 1
|
||||||
@ -6733,28 +6754,31 @@
|
|||||||
i32.load offset=20
|
i32.load offset=20
|
||||||
)
|
)
|
||||||
(func $~lib/set/Set<f32>#delete (; 99 ;) (type $ifi) (param $0 i32) (param $1 f32) (result i32)
|
(func $~lib/set/Set<f32>#delete (; 99 ;) (type $ifi) (param $0 i32) (param $1 f32) (result i32)
|
||||||
(local $2 i32)
|
(local $2 f32)
|
||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
(local $4 i32)
|
(local $4 i32)
|
||||||
(local $5 i32)
|
(local $5 i32)
|
||||||
|
(local $6 i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
local.get $1
|
local.get $1
|
||||||
block $~lib/internal/hash/HASH<f32>|inlined.1 (result i32)
|
block $~lib/internal/hash/HASH<f32>|inlined.1 (result i32)
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.set $2
|
||||||
|
local.get $2
|
||||||
i32.reinterpret_f32
|
i32.reinterpret_f32
|
||||||
call $~lib/internal/hash/hash32
|
call $~lib/internal/hash/hash32
|
||||||
br $~lib/internal/hash/HASH<f32>|inlined.1
|
br $~lib/internal/hash/HASH<f32>|inlined.1
|
||||||
end
|
end
|
||||||
call $~lib/set/Set<f32>#find
|
call $~lib/set/Set<f32>#find
|
||||||
local.set $2
|
local.set $3
|
||||||
local.get $2
|
local.get $3
|
||||||
i32.eqz
|
i32.eqz
|
||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local.get $2
|
local.get $3
|
||||||
local.get $2
|
local.get $3
|
||||||
i32.load offset=4
|
i32.load offset=4
|
||||||
global.get $~lib/set/EMPTY
|
global.get $~lib/set/EMPTY
|
||||||
i32.or
|
i32.or
|
||||||
@ -6769,21 +6793,21 @@
|
|||||||
i32.load offset=4
|
i32.load offset=4
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.shr_u
|
i32.shr_u
|
||||||
local.set $3
|
local.set $4
|
||||||
local.get $3
|
local.get $4
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.add
|
i32.add
|
||||||
global.get $~lib/set/INITIAL_CAPACITY
|
global.get $~lib/set/INITIAL_CAPACITY
|
||||||
local.tee $4
|
local.tee $5
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load offset=20
|
i32.load offset=20
|
||||||
local.tee $5
|
local.tee $6
|
||||||
local.get $4
|
|
||||||
local.get $5
|
local.get $5
|
||||||
|
local.get $6
|
||||||
i32.gt_u
|
i32.gt_u
|
||||||
select
|
select
|
||||||
i32.ge_u
|
i32.ge_u
|
||||||
local.tee $4
|
local.tee $5
|
||||||
if (result i32)
|
if (result i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load offset=20
|
i32.load offset=20
|
||||||
@ -6795,11 +6819,11 @@
|
|||||||
i32.trunc_f64_s
|
i32.trunc_f64_s
|
||||||
i32.lt_s
|
i32.lt_s
|
||||||
else
|
else
|
||||||
local.get $4
|
local.get $5
|
||||||
end
|
end
|
||||||
if
|
if
|
||||||
local.get $0
|
local.get $0
|
||||||
local.get $3
|
local.get $4
|
||||||
call $~lib/set/Set<f32>#rehash
|
call $~lib/set/Set<f32>#rehash
|
||||||
end
|
end
|
||||||
i32.const 1
|
i32.const 1
|
||||||
@ -7451,28 +7475,31 @@
|
|||||||
i32.load offset=20
|
i32.load offset=20
|
||||||
)
|
)
|
||||||
(func $~lib/set/Set<f64>#delete (; 109 ;) (type $iFi) (param $0 i32) (param $1 f64) (result i32)
|
(func $~lib/set/Set<f64>#delete (; 109 ;) (type $iFi) (param $0 i32) (param $1 f64) (result i32)
|
||||||
(local $2 i32)
|
(local $2 f64)
|
||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
(local $4 i32)
|
(local $4 i32)
|
||||||
(local $5 i32)
|
(local $5 i32)
|
||||||
|
(local $6 i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
local.get $1
|
local.get $1
|
||||||
block $~lib/internal/hash/HASH<f64>|inlined.1 (result i32)
|
block $~lib/internal/hash/HASH<f64>|inlined.1 (result i32)
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.set $2
|
||||||
|
local.get $2
|
||||||
i64.reinterpret_f64
|
i64.reinterpret_f64
|
||||||
call $~lib/internal/hash/hash64
|
call $~lib/internal/hash/hash64
|
||||||
br $~lib/internal/hash/HASH<f64>|inlined.1
|
br $~lib/internal/hash/HASH<f64>|inlined.1
|
||||||
end
|
end
|
||||||
call $~lib/set/Set<f64>#find
|
call $~lib/set/Set<f64>#find
|
||||||
local.set $2
|
local.set $3
|
||||||
local.get $2
|
local.get $3
|
||||||
i32.eqz
|
i32.eqz
|
||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local.get $2
|
local.get $3
|
||||||
local.get $2
|
local.get $3
|
||||||
i32.load offset=8
|
i32.load offset=8
|
||||||
global.get $~lib/set/EMPTY
|
global.get $~lib/set/EMPTY
|
||||||
i32.or
|
i32.or
|
||||||
@ -7487,21 +7514,21 @@
|
|||||||
i32.load offset=4
|
i32.load offset=4
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.shr_u
|
i32.shr_u
|
||||||
local.set $3
|
local.set $4
|
||||||
local.get $3
|
local.get $4
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.add
|
i32.add
|
||||||
global.get $~lib/set/INITIAL_CAPACITY
|
global.get $~lib/set/INITIAL_CAPACITY
|
||||||
local.tee $4
|
local.tee $5
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load offset=20
|
i32.load offset=20
|
||||||
local.tee $5
|
local.tee $6
|
||||||
local.get $4
|
|
||||||
local.get $5
|
local.get $5
|
||||||
|
local.get $6
|
||||||
i32.gt_u
|
i32.gt_u
|
||||||
select
|
select
|
||||||
i32.ge_u
|
i32.ge_u
|
||||||
local.tee $4
|
local.tee $5
|
||||||
if (result i32)
|
if (result i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load offset=20
|
i32.load offset=20
|
||||||
@ -7513,11 +7540,11 @@
|
|||||||
i32.trunc_f64_s
|
i32.trunc_f64_s
|
||||||
i32.lt_s
|
i32.lt_s
|
||||||
else
|
else
|
||||||
local.get $4
|
local.get $5
|
||||||
end
|
end
|
||||||
if
|
if
|
||||||
local.get $0
|
local.get $0
|
||||||
local.get $3
|
local.get $4
|
||||||
call $~lib/set/Set<f64>#rehash
|
call $~lib/set/Set<f64>#rehash
|
||||||
end
|
end
|
||||||
i32.const 1
|
i32.const 1
|
||||||
|
@ -45,6 +45,8 @@
|
|||||||
(func $~lib/array/Array<i32>#__get (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
(func $~lib/array/Array<i32>#__get (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||||
(local $2 i32)
|
(local $2 i32)
|
||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
|
(local $4 i32)
|
||||||
|
(local $5 i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load
|
i32.load
|
||||||
local.set $2
|
local.set $2
|
||||||
@ -55,14 +57,18 @@
|
|||||||
i32.shr_u
|
i32.shr_u
|
||||||
i32.lt_u
|
i32.lt_u
|
||||||
if (result i32)
|
if (result i32)
|
||||||
i32.const 0
|
|
||||||
local.set $3
|
|
||||||
local.get $2
|
local.get $2
|
||||||
|
local.set $3
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.set $4
|
||||||
|
i32.const 0
|
||||||
|
local.set $5
|
||||||
|
local.get $3
|
||||||
|
local.get $4
|
||||||
i32.const 2
|
i32.const 2
|
||||||
i32.shl
|
i32.shl
|
||||||
i32.add
|
i32.add
|
||||||
local.get $3
|
local.get $5
|
||||||
i32.add
|
i32.add
|
||||||
i32.load offset=8
|
i32.load offset=8
|
||||||
else
|
else
|
||||||
@ -1879,6 +1885,7 @@
|
|||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
(local $4 i32)
|
(local $4 i32)
|
||||||
(local $5 i32)
|
(local $5 i32)
|
||||||
|
(local $6 i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load
|
i32.load
|
||||||
local.set $2
|
local.set $2
|
||||||
@ -1912,46 +1919,50 @@
|
|||||||
local.get $1
|
local.get $1
|
||||||
call $~lib/internal/arraybuffer/allocateUnsafe
|
call $~lib/internal/arraybuffer/allocateUnsafe
|
||||||
local.set $3
|
local.set $3
|
||||||
local.get $3
|
block $~lib/memory/memory.copy|inlined.0
|
||||||
global.get $~lib/internal/arraybuffer/HEADER_SIZE
|
local.get $3
|
||||||
i32.add
|
global.get $~lib/internal/arraybuffer/HEADER_SIZE
|
||||||
local.set $4
|
i32.add
|
||||||
local.get $0
|
local.set $4
|
||||||
global.get $~lib/internal/arraybuffer/HEADER_SIZE
|
local.get $0
|
||||||
i32.add
|
global.get $~lib/internal/arraybuffer/HEADER_SIZE
|
||||||
local.set $5
|
i32.add
|
||||||
local.get $4
|
local.set $5
|
||||||
local.get $5
|
local.get $2
|
||||||
local.get $2
|
local.set $6
|
||||||
call $~lib/internal/memory/memmove
|
local.get $4
|
||||||
|
local.get $5
|
||||||
|
local.get $6
|
||||||
|
call $~lib/internal/memory/memmove
|
||||||
|
end
|
||||||
block $~lib/memory/memory.free|inlined.0
|
block $~lib/memory/memory.free|inlined.0
|
||||||
block
|
local.get $0
|
||||||
local.get $0
|
local.set $6
|
||||||
call $~lib/allocator/arena/__memory_free
|
local.get $6
|
||||||
br $~lib/memory/memory.free|inlined.0
|
call $~lib/allocator/arena/__memory_free
|
||||||
unreachable
|
br $~lib/memory/memory.free|inlined.0
|
||||||
end
|
|
||||||
unreachable
|
|
||||||
end
|
end
|
||||||
local.get $3
|
local.get $3
|
||||||
local.set $0
|
local.set $0
|
||||||
end
|
end
|
||||||
local.get $0
|
block $~lib/memory/memory.fill|inlined.0
|
||||||
global.get $~lib/internal/arraybuffer/HEADER_SIZE
|
local.get $0
|
||||||
i32.add
|
global.get $~lib/internal/arraybuffer/HEADER_SIZE
|
||||||
local.get $2
|
i32.add
|
||||||
i32.add
|
local.get $2
|
||||||
local.set $3
|
i32.add
|
||||||
i32.const 0
|
local.set $3
|
||||||
local.set $5
|
i32.const 0
|
||||||
local.get $1
|
local.set $6
|
||||||
local.get $2
|
local.get $1
|
||||||
i32.sub
|
local.get $2
|
||||||
local.set $4
|
i32.sub
|
||||||
local.get $3
|
local.set $5
|
||||||
local.get $5
|
local.get $3
|
||||||
local.get $4
|
local.get $6
|
||||||
call $~lib/internal/memory/memset
|
local.get $5
|
||||||
|
call $~lib/internal/memory/memset
|
||||||
|
end
|
||||||
else
|
else
|
||||||
local.get $1
|
local.get $1
|
||||||
local.get $2
|
local.get $2
|
||||||
@ -1980,6 +1991,9 @@
|
|||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
(local $4 i32)
|
(local $4 i32)
|
||||||
(local $5 i32)
|
(local $5 i32)
|
||||||
|
(local $6 i32)
|
||||||
|
(local $7 i32)
|
||||||
|
(local $8 i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load
|
i32.load
|
||||||
local.set $3
|
local.set $3
|
||||||
@ -2020,21 +2034,31 @@
|
|||||||
i32.add
|
i32.add
|
||||||
i32.store offset=4
|
i32.store offset=4
|
||||||
end
|
end
|
||||||
i32.const 0
|
block $~lib/internal/arraybuffer/STORE<i32,i32>|inlined.0
|
||||||
local.set $5
|
local.get $3
|
||||||
local.get $3
|
local.set $5
|
||||||
local.get $1
|
local.get $1
|
||||||
i32.const 2
|
local.set $6
|
||||||
i32.shl
|
local.get $2
|
||||||
i32.add
|
local.set $7
|
||||||
local.get $5
|
i32.const 0
|
||||||
i32.add
|
local.set $8
|
||||||
local.get $2
|
local.get $5
|
||||||
i32.store offset=8
|
local.get $6
|
||||||
|
i32.const 2
|
||||||
|
i32.shl
|
||||||
|
i32.add
|
||||||
|
local.get $8
|
||||||
|
i32.add
|
||||||
|
local.get $7
|
||||||
|
i32.store offset=8
|
||||||
|
end
|
||||||
)
|
)
|
||||||
(func $~lib/array/Array<i64>#__get (; 11 ;) (type $iiI) (param $0 i32) (param $1 i32) (result i64)
|
(func $~lib/array/Array<i64>#__get (; 11 ;) (type $iiI) (param $0 i32) (param $1 i32) (result i64)
|
||||||
(local $2 i32)
|
(local $2 i32)
|
||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
|
(local $4 i32)
|
||||||
|
(local $5 i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load
|
i32.load
|
||||||
local.set $2
|
local.set $2
|
||||||
@ -2045,14 +2069,18 @@
|
|||||||
i32.shr_u
|
i32.shr_u
|
||||||
i32.lt_u
|
i32.lt_u
|
||||||
if (result i64)
|
if (result i64)
|
||||||
i32.const 0
|
|
||||||
local.set $3
|
|
||||||
local.get $2
|
local.get $2
|
||||||
|
local.set $3
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.set $4
|
||||||
|
i32.const 0
|
||||||
|
local.set $5
|
||||||
|
local.get $3
|
||||||
|
local.get $4
|
||||||
i32.const 3
|
i32.const 3
|
||||||
i32.shl
|
i32.shl
|
||||||
i32.add
|
i32.add
|
||||||
local.get $3
|
local.get $5
|
||||||
i32.add
|
i32.add
|
||||||
i64.load offset=8
|
i64.load offset=8
|
||||||
else
|
else
|
||||||
@ -2063,6 +2091,9 @@
|
|||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
(local $4 i32)
|
(local $4 i32)
|
||||||
(local $5 i32)
|
(local $5 i32)
|
||||||
|
(local $6 i32)
|
||||||
|
(local $7 i64)
|
||||||
|
(local $8 i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load
|
i32.load
|
||||||
local.set $3
|
local.set $3
|
||||||
@ -2103,21 +2134,31 @@
|
|||||||
i32.add
|
i32.add
|
||||||
i32.store offset=4
|
i32.store offset=4
|
||||||
end
|
end
|
||||||
i32.const 0
|
block $~lib/internal/arraybuffer/STORE<i64,i64>|inlined.0
|
||||||
local.set $5
|
local.get $3
|
||||||
local.get $3
|
local.set $5
|
||||||
local.get $1
|
local.get $1
|
||||||
i32.const 3
|
local.set $6
|
||||||
i32.shl
|
local.get $2
|
||||||
i32.add
|
local.set $7
|
||||||
local.get $5
|
i32.const 0
|
||||||
i32.add
|
local.set $8
|
||||||
local.get $2
|
local.get $5
|
||||||
i64.store offset=8
|
local.get $6
|
||||||
|
i32.const 3
|
||||||
|
i32.shl
|
||||||
|
i32.add
|
||||||
|
local.get $8
|
||||||
|
i32.add
|
||||||
|
local.get $7
|
||||||
|
i64.store offset=8
|
||||||
|
end
|
||||||
)
|
)
|
||||||
(func $~lib/array/Array<f32>#__get (; 13 ;) (type $iif) (param $0 i32) (param $1 i32) (result f32)
|
(func $~lib/array/Array<f32>#__get (; 13 ;) (type $iif) (param $0 i32) (param $1 i32) (result f32)
|
||||||
(local $2 i32)
|
(local $2 i32)
|
||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
|
(local $4 i32)
|
||||||
|
(local $5 i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load
|
i32.load
|
||||||
local.set $2
|
local.set $2
|
||||||
@ -2128,14 +2169,18 @@
|
|||||||
i32.shr_u
|
i32.shr_u
|
||||||
i32.lt_u
|
i32.lt_u
|
||||||
if (result f32)
|
if (result f32)
|
||||||
i32.const 0
|
|
||||||
local.set $3
|
|
||||||
local.get $2
|
local.get $2
|
||||||
|
local.set $3
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.set $4
|
||||||
|
i32.const 0
|
||||||
|
local.set $5
|
||||||
|
local.get $3
|
||||||
|
local.get $4
|
||||||
i32.const 2
|
i32.const 2
|
||||||
i32.shl
|
i32.shl
|
||||||
i32.add
|
i32.add
|
||||||
local.get $3
|
local.get $5
|
||||||
i32.add
|
i32.add
|
||||||
f32.load offset=8
|
f32.load offset=8
|
||||||
else
|
else
|
||||||
@ -2146,6 +2191,9 @@
|
|||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
(local $4 i32)
|
(local $4 i32)
|
||||||
(local $5 i32)
|
(local $5 i32)
|
||||||
|
(local $6 i32)
|
||||||
|
(local $7 f32)
|
||||||
|
(local $8 i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load
|
i32.load
|
||||||
local.set $3
|
local.set $3
|
||||||
@ -2186,21 +2234,31 @@
|
|||||||
i32.add
|
i32.add
|
||||||
i32.store offset=4
|
i32.store offset=4
|
||||||
end
|
end
|
||||||
i32.const 0
|
block $~lib/internal/arraybuffer/STORE<f32,f32>|inlined.0
|
||||||
local.set $5
|
local.get $3
|
||||||
local.get $3
|
local.set $5
|
||||||
local.get $1
|
local.get $1
|
||||||
i32.const 2
|
local.set $6
|
||||||
i32.shl
|
local.get $2
|
||||||
i32.add
|
local.set $7
|
||||||
local.get $5
|
i32.const 0
|
||||||
i32.add
|
local.set $8
|
||||||
local.get $2
|
local.get $5
|
||||||
f32.store offset=8
|
local.get $6
|
||||||
|
i32.const 2
|
||||||
|
i32.shl
|
||||||
|
i32.add
|
||||||
|
local.get $8
|
||||||
|
i32.add
|
||||||
|
local.get $7
|
||||||
|
f32.store offset=8
|
||||||
|
end
|
||||||
)
|
)
|
||||||
(func $~lib/array/Array<f64>#__get (; 15 ;) (type $iiF) (param $0 i32) (param $1 i32) (result f64)
|
(func $~lib/array/Array<f64>#__get (; 15 ;) (type $iiF) (param $0 i32) (param $1 i32) (result f64)
|
||||||
(local $2 i32)
|
(local $2 i32)
|
||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
|
(local $4 i32)
|
||||||
|
(local $5 i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load
|
i32.load
|
||||||
local.set $2
|
local.set $2
|
||||||
@ -2211,14 +2269,18 @@
|
|||||||
i32.shr_u
|
i32.shr_u
|
||||||
i32.lt_u
|
i32.lt_u
|
||||||
if (result f64)
|
if (result f64)
|
||||||
i32.const 0
|
|
||||||
local.set $3
|
|
||||||
local.get $2
|
local.get $2
|
||||||
|
local.set $3
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.set $4
|
||||||
|
i32.const 0
|
||||||
|
local.set $5
|
||||||
|
local.get $3
|
||||||
|
local.get $4
|
||||||
i32.const 3
|
i32.const 3
|
||||||
i32.shl
|
i32.shl
|
||||||
i32.add
|
i32.add
|
||||||
local.get $3
|
local.get $5
|
||||||
i32.add
|
i32.add
|
||||||
f64.load offset=8
|
f64.load offset=8
|
||||||
else
|
else
|
||||||
@ -2229,6 +2291,9 @@
|
|||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
(local $4 i32)
|
(local $4 i32)
|
||||||
(local $5 i32)
|
(local $5 i32)
|
||||||
|
(local $6 i32)
|
||||||
|
(local $7 f64)
|
||||||
|
(local $8 i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load
|
i32.load
|
||||||
local.set $3
|
local.set $3
|
||||||
@ -2269,17 +2334,25 @@
|
|||||||
i32.add
|
i32.add
|
||||||
i32.store offset=4
|
i32.store offset=4
|
||||||
end
|
end
|
||||||
i32.const 0
|
block $~lib/internal/arraybuffer/STORE<f64,f64>|inlined.0
|
||||||
local.set $5
|
local.get $3
|
||||||
local.get $3
|
local.set $5
|
||||||
local.get $1
|
local.get $1
|
||||||
i32.const 3
|
local.set $6
|
||||||
i32.shl
|
local.get $2
|
||||||
i32.add
|
local.set $7
|
||||||
local.get $5
|
i32.const 0
|
||||||
i32.add
|
local.set $8
|
||||||
local.get $2
|
local.get $5
|
||||||
f64.store offset=8
|
local.get $6
|
||||||
|
i32.const 3
|
||||||
|
i32.shl
|
||||||
|
i32.add
|
||||||
|
local.get $8
|
||||||
|
i32.add
|
||||||
|
local.get $7
|
||||||
|
f64.store offset=8
|
||||||
|
end
|
||||||
)
|
)
|
||||||
(func $start (; 17 ;) (type $v)
|
(func $start (; 17 ;) (type $v)
|
||||||
(local $0 i32)
|
(local $0 i32)
|
||||||
|
@ -1926,6 +1926,7 @@
|
|||||||
(local $5 i32)
|
(local $5 i32)
|
||||||
(local $6 i32)
|
(local $6 i32)
|
||||||
(local $7 i32)
|
(local $7 i32)
|
||||||
|
(local $8 i32)
|
||||||
local.get $1
|
local.get $1
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.lt_u
|
i32.lt_u
|
||||||
@ -2223,22 +2224,26 @@
|
|||||||
i32.shr_u
|
i32.shr_u
|
||||||
call $~lib/internal/string/allocateUnsafe
|
call $~lib/internal/string/allocateUnsafe
|
||||||
local.set $7
|
local.set $7
|
||||||
local.get $7
|
block $~lib/memory/memory.copy|inlined.0
|
||||||
global.get $~lib/internal/string/HEADER_SIZE
|
local.get $7
|
||||||
i32.add
|
global.get $~lib/internal/string/HEADER_SIZE
|
||||||
local.set $3
|
i32.add
|
||||||
local.get $3
|
local.set $3
|
||||||
local.get $4
|
local.get $4
|
||||||
local.get $5
|
local.set $6
|
||||||
call $~lib/internal/memory/memmove
|
local.get $5
|
||||||
|
local.set $8
|
||||||
|
local.get $3
|
||||||
|
local.get $6
|
||||||
|
local.get $8
|
||||||
|
call $~lib/internal/memory/memmove
|
||||||
|
end
|
||||||
block $~lib/memory/memory.free|inlined.0
|
block $~lib/memory/memory.free|inlined.0
|
||||||
block
|
local.get $4
|
||||||
local.get $4
|
local.set $8
|
||||||
call $~lib/allocator/arena/__memory_free
|
local.get $8
|
||||||
br $~lib/memory/memory.free|inlined.0
|
call $~lib/allocator/arena/__memory_free
|
||||||
unreachable
|
br $~lib/memory/memory.free|inlined.0
|
||||||
end
|
|
||||||
unreachable
|
|
||||||
end
|
end
|
||||||
local.get $7
|
local.get $7
|
||||||
)
|
)
|
||||||
@ -2607,13 +2612,9 @@
|
|||||||
block $~lib/memory/memory.free|inlined.1
|
block $~lib/memory/memory.free|inlined.1
|
||||||
global.get $std/string-utf8/ptr
|
global.get $std/string-utf8/ptr
|
||||||
local.set $0
|
local.set $0
|
||||||
block
|
local.get $0
|
||||||
local.get $0
|
call $~lib/allocator/arena/__memory_free
|
||||||
call $~lib/allocator/arena/__memory_free
|
br $~lib/memory/memory.free|inlined.1
|
||||||
br $~lib/memory/memory.free|inlined.1
|
|
||||||
unreachable
|
|
||||||
end
|
|
||||||
unreachable
|
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
(func $null (; 12 ;) (type $v)
|
(func $null (; 12 ;) (type $v)
|
||||||
|
@ -4251,32 +4251,32 @@
|
|||||||
(local $7 i32)
|
(local $7 i32)
|
||||||
(local $8 i64)
|
(local $8 i64)
|
||||||
(local $9 i32)
|
(local $9 i32)
|
||||||
(local $10 i64)
|
(local $10 i32)
|
||||||
(local $11 i32)
|
(local $11 i32)
|
||||||
(local $12 i32)
|
(local $12 i64)
|
||||||
(local $13 i64)
|
(local $13 i64)
|
||||||
(local $14 i64)
|
(local $14 i64)
|
||||||
local.get $3
|
local.get $3
|
||||||
local.get $1
|
local.get $1
|
||||||
i64.sub
|
i64.sub
|
||||||
local.set $8
|
local.set $12
|
||||||
i64.const 1
|
i64.const 1
|
||||||
i32.const 0
|
i32.const 0
|
||||||
local.get $4
|
local.get $4
|
||||||
i32.sub
|
i32.sub
|
||||||
local.tee $11
|
local.tee $11
|
||||||
i64.extend_i32_s
|
i64.extend_i32_s
|
||||||
local.tee $13
|
local.tee $1
|
||||||
i64.shl
|
i64.shl
|
||||||
local.tee $10
|
local.tee $13
|
||||||
i64.const 1
|
i64.const 1
|
||||||
i64.sub
|
i64.sub
|
||||||
local.tee $14
|
local.tee $14
|
||||||
local.get $3
|
local.get $3
|
||||||
i64.and
|
i64.and
|
||||||
local.set $1
|
local.set $8
|
||||||
local.get $3
|
local.get $3
|
||||||
local.get $13
|
local.get $1
|
||||||
i64.shr_u
|
i64.shr_u
|
||||||
i32.wrap_i64
|
i32.wrap_i64
|
||||||
local.tee $7
|
local.tee $7
|
||||||
@ -4284,7 +4284,7 @@
|
|||||||
local.set $9
|
local.set $9
|
||||||
i32.const 4624
|
i32.const 4624
|
||||||
i32.load
|
i32.load
|
||||||
local.set $12
|
local.set $10
|
||||||
loop $continue|0
|
loop $continue|0
|
||||||
local.get $9
|
local.get $9
|
||||||
i32.const 0
|
i32.const 0
|
||||||
@ -4440,9 +4440,9 @@
|
|||||||
local.get $11
|
local.get $11
|
||||||
i64.extend_i32_s
|
i64.extend_i32_s
|
||||||
i64.shl
|
i64.shl
|
||||||
local.get $1
|
local.get $8
|
||||||
i64.add
|
i64.add
|
||||||
local.tee $3
|
local.tee $1
|
||||||
local.get $5
|
local.get $5
|
||||||
i64.le_u
|
i64.le_u
|
||||||
if
|
if
|
||||||
@ -4450,7 +4450,9 @@
|
|||||||
local.get $9
|
local.get $9
|
||||||
i32.add
|
i32.add
|
||||||
global.set $~lib/internal/number/_K
|
global.set $~lib/internal/number/_K
|
||||||
local.get $12
|
local.get $5
|
||||||
|
local.set $3
|
||||||
|
local.get $10
|
||||||
local.get $9
|
local.get $9
|
||||||
i32.const 2
|
i32.const 2
|
||||||
i32.shl
|
i32.shl
|
||||||
@ -4459,7 +4461,9 @@
|
|||||||
local.get $11
|
local.get $11
|
||||||
i64.extend_i32_s
|
i64.extend_i32_s
|
||||||
i64.shl
|
i64.shl
|
||||||
local.set $1
|
local.set $8
|
||||||
|
local.get $12
|
||||||
|
local.set $5
|
||||||
local.get $6
|
local.get $6
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.sub
|
i32.sub
|
||||||
@ -4469,37 +4473,37 @@
|
|||||||
i32.add
|
i32.add
|
||||||
local.tee $2
|
local.tee $2
|
||||||
i32.load16_u offset=4
|
i32.load16_u offset=4
|
||||||
local.set $7
|
local.set $10
|
||||||
loop $continue|2
|
loop $continue|2
|
||||||
local.get $3
|
local.get $1
|
||||||
local.get $8
|
local.get $5
|
||||||
i64.lt_u
|
i64.lt_u
|
||||||
local.tee $0
|
local.tee $0
|
||||||
if
|
if
|
||||||
local.get $5
|
|
||||||
local.get $3
|
local.get $3
|
||||||
i64.sub
|
|
||||||
local.get $1
|
local.get $1
|
||||||
|
i64.sub
|
||||||
|
local.get $8
|
||||||
i64.ge_u
|
i64.ge_u
|
||||||
local.set $0
|
local.set $0
|
||||||
end
|
end
|
||||||
local.get $0
|
local.get $0
|
||||||
if
|
if
|
||||||
local.get $1
|
local.get $1
|
||||||
local.get $3
|
|
||||||
i64.add
|
|
||||||
local.get $8
|
local.get $8
|
||||||
|
i64.add
|
||||||
|
local.get $5
|
||||||
i64.lt_u
|
i64.lt_u
|
||||||
local.tee $0
|
local.tee $0
|
||||||
i32.eqz
|
i32.eqz
|
||||||
if
|
if
|
||||||
local.get $8
|
local.get $5
|
||||||
local.get $3
|
local.get $1
|
||||||
i64.sub
|
i64.sub
|
||||||
local.get $1
|
local.get $1
|
||||||
local.get $3
|
|
||||||
i64.add
|
|
||||||
local.get $8
|
local.get $8
|
||||||
|
i64.add
|
||||||
|
local.get $5
|
||||||
i64.sub
|
i64.sub
|
||||||
i64.gt_u
|
i64.gt_u
|
||||||
local.set $0
|
local.set $0
|
||||||
@ -4507,19 +4511,19 @@
|
|||||||
end
|
end
|
||||||
local.get $0
|
local.get $0
|
||||||
if
|
if
|
||||||
local.get $7
|
local.get $10
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.sub
|
i32.sub
|
||||||
local.set $7
|
local.set $10
|
||||||
local.get $1
|
local.get $1
|
||||||
local.get $3
|
local.get $8
|
||||||
i64.add
|
i64.add
|
||||||
local.set $3
|
local.set $1
|
||||||
br $continue|2
|
br $continue|2
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local.get $2
|
local.get $2
|
||||||
local.get $7
|
local.get $10
|
||||||
i32.store16 offset=4
|
i32.store16 offset=4
|
||||||
local.get $6
|
local.get $6
|
||||||
return
|
return
|
||||||
@ -4532,14 +4536,14 @@
|
|||||||
i64.const 10
|
i64.const 10
|
||||||
i64.mul
|
i64.mul
|
||||||
local.set $5
|
local.set $5
|
||||||
local.get $1
|
local.get $8
|
||||||
i64.const 10
|
i64.const 10
|
||||||
i64.mul
|
i64.mul
|
||||||
local.tee $1
|
local.tee $8
|
||||||
local.get $11
|
local.get $11
|
||||||
i64.extend_i32_s
|
i64.extend_i32_s
|
||||||
i64.shr_u
|
i64.shr_u
|
||||||
local.tee $3
|
local.tee $1
|
||||||
local.get $6
|
local.get $6
|
||||||
i64.extend_i32_s
|
i64.extend_i32_s
|
||||||
i64.or
|
i64.or
|
||||||
@ -4556,7 +4560,7 @@
|
|||||||
i32.shl
|
i32.shl
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.add
|
i32.add
|
||||||
local.get $3
|
local.get $1
|
||||||
i32.wrap_i64
|
i32.wrap_i64
|
||||||
i32.const 65535
|
i32.const 65535
|
||||||
i32.and
|
i32.and
|
||||||
@ -4568,10 +4572,10 @@
|
|||||||
i32.const 1
|
i32.const 1
|
||||||
i32.sub
|
i32.sub
|
||||||
local.set $9
|
local.set $9
|
||||||
local.get $1
|
local.get $8
|
||||||
local.get $14
|
local.get $14
|
||||||
i64.and
|
i64.and
|
||||||
local.tee $1
|
local.tee $8
|
||||||
local.get $5
|
local.get $5
|
||||||
i64.ge_u
|
i64.ge_u
|
||||||
br_if $continue|3
|
br_if $continue|3
|
||||||
@ -4579,7 +4583,9 @@
|
|||||||
local.get $9
|
local.get $9
|
||||||
i32.add
|
i32.add
|
||||||
global.set $~lib/internal/number/_K
|
global.set $~lib/internal/number/_K
|
||||||
local.get $12
|
local.get $13
|
||||||
|
local.set $1
|
||||||
|
local.get $10
|
||||||
i32.const 0
|
i32.const 0
|
||||||
local.get $9
|
local.get $9
|
||||||
i32.sub
|
i32.sub
|
||||||
@ -4587,49 +4593,50 @@
|
|||||||
i32.shl
|
i32.shl
|
||||||
i32.add
|
i32.add
|
||||||
i64.load32_u offset=8
|
i64.load32_u offset=8
|
||||||
local.get $8
|
local.get $12
|
||||||
i64.mul
|
i64.mul
|
||||||
local.set $8
|
local.set $3
|
||||||
local.get $6
|
local.get $6
|
||||||
|
local.tee $10
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.sub
|
i32.sub
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.shl
|
i32.shl
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.add
|
i32.add
|
||||||
local.tee $7
|
local.tee $4
|
||||||
i32.load16_u offset=4
|
i32.load16_u offset=4
|
||||||
local.set $4
|
local.set $6
|
||||||
loop $continue|4
|
loop $continue|4
|
||||||
local.get $1
|
|
||||||
local.get $8
|
local.get $8
|
||||||
|
local.get $3
|
||||||
i64.lt_u
|
i64.lt_u
|
||||||
local.tee $2
|
local.tee $2
|
||||||
if
|
if
|
||||||
local.get $5
|
local.get $5
|
||||||
local.get $1
|
local.get $8
|
||||||
i64.sub
|
i64.sub
|
||||||
local.get $10
|
local.get $1
|
||||||
i64.ge_u
|
i64.ge_u
|
||||||
local.set $2
|
local.set $2
|
||||||
end
|
end
|
||||||
local.get $2
|
local.get $2
|
||||||
if
|
if
|
||||||
local.get $1
|
local.get $1
|
||||||
local.get $10
|
|
||||||
i64.add
|
|
||||||
local.get $8
|
local.get $8
|
||||||
|
i64.add
|
||||||
|
local.get $3
|
||||||
i64.lt_u
|
i64.lt_u
|
||||||
local.tee $2
|
local.tee $2
|
||||||
i32.eqz
|
i32.eqz
|
||||||
if
|
if
|
||||||
|
local.get $3
|
||||||
local.get $8
|
local.get $8
|
||||||
local.get $1
|
|
||||||
i64.sub
|
i64.sub
|
||||||
local.get $1
|
local.get $1
|
||||||
local.get $10
|
|
||||||
i64.add
|
|
||||||
local.get $8
|
local.get $8
|
||||||
|
i64.add
|
||||||
|
local.get $3
|
||||||
i64.sub
|
i64.sub
|
||||||
i64.gt_u
|
i64.gt_u
|
||||||
local.set $2
|
local.set $2
|
||||||
@ -4637,21 +4644,21 @@
|
|||||||
end
|
end
|
||||||
local.get $2
|
local.get $2
|
||||||
if
|
if
|
||||||
local.get $4
|
local.get $6
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.sub
|
i32.sub
|
||||||
local.set $4
|
local.set $6
|
||||||
local.get $1
|
local.get $1
|
||||||
local.get $10
|
local.get $8
|
||||||
i64.add
|
i64.add
|
||||||
local.set $1
|
local.set $8
|
||||||
br $continue|4
|
br $continue|4
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local.get $7
|
|
||||||
local.get $4
|
local.get $4
|
||||||
i32.store16 offset=4
|
|
||||||
local.get $6
|
local.get $6
|
||||||
|
i32.store16 offset=4
|
||||||
|
local.get $10
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
(func $~lib/internal/number/prettify (; 51 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
(func $~lib/internal/number/prettify (; 51 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||||
@ -4677,74 +4684,73 @@
|
|||||||
local.get $1
|
local.get $1
|
||||||
local.get $2
|
local.get $2
|
||||||
i32.add
|
i32.add
|
||||||
local.tee $5
|
|
||||||
i32.le_s
|
|
||||||
local.tee $3
|
local.tee $3
|
||||||
|
i32.le_s
|
||||||
|
local.tee $4
|
||||||
if
|
if
|
||||||
local.get $5
|
local.get $3
|
||||||
i32.const 21
|
i32.const 21
|
||||||
i32.le_s
|
i32.le_s
|
||||||
local.set $3
|
local.set $4
|
||||||
end
|
end
|
||||||
local.get $3
|
local.get $4
|
||||||
if (result i32)
|
if (result i32)
|
||||||
local.get $1
|
local.get $1
|
||||||
local.set $3
|
local.set $4
|
||||||
loop $repeat|0
|
loop $repeat|0
|
||||||
block $break|0
|
block $break|0
|
||||||
|
local.get $4
|
||||||
local.get $3
|
local.get $3
|
||||||
local.get $5
|
|
||||||
i32.ge_s
|
i32.ge_s
|
||||||
br_if $break|0
|
br_if $break|0
|
||||||
local.get $3
|
local.get $4
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.shl
|
i32.shl
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.add
|
i32.add
|
||||||
i32.const 48
|
i32.const 48
|
||||||
i32.store16 offset=4
|
i32.store16 offset=4
|
||||||
local.get $3
|
local.get $4
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.add
|
i32.add
|
||||||
local.set $3
|
local.set $4
|
||||||
br $repeat|0
|
br $repeat|0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local.get $5
|
local.get $3
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.shl
|
i32.shl
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.add
|
i32.add
|
||||||
i32.const 3145774
|
i32.const 3145774
|
||||||
i32.store offset=4
|
i32.store offset=4
|
||||||
local.get $5
|
local.get $3
|
||||||
i32.const 2
|
i32.const 2
|
||||||
i32.add
|
i32.add
|
||||||
else
|
else
|
||||||
local.get $5
|
local.get $3
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.gt_s
|
i32.gt_s
|
||||||
local.tee $3
|
local.tee $4
|
||||||
if
|
if
|
||||||
local.get $5
|
local.get $3
|
||||||
i32.const 21
|
i32.const 21
|
||||||
i32.le_s
|
i32.le_s
|
||||||
local.set $3
|
local.set $4
|
||||||
end
|
end
|
||||||
local.get $3
|
local.get $4
|
||||||
if (result i32)
|
if (result i32)
|
||||||
local.get $5
|
local.get $3
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.shl
|
i32.shl
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.add
|
i32.add
|
||||||
local.tee $3
|
|
||||||
i32.const 4
|
i32.const 4
|
||||||
i32.add
|
i32.add
|
||||||
local.tee $0
|
local.tee $4
|
||||||
i32.const 2
|
i32.const 2
|
||||||
i32.add
|
i32.add
|
||||||
local.get $0
|
local.get $4
|
||||||
i32.const 0
|
i32.const 0
|
||||||
local.get $2
|
local.get $2
|
||||||
i32.sub
|
i32.sub
|
||||||
@ -4752,6 +4758,10 @@
|
|||||||
i32.shl
|
i32.shl
|
||||||
call $~lib/internal/memory/memmove
|
call $~lib/internal/memory/memmove
|
||||||
local.get $3
|
local.get $3
|
||||||
|
i32.const 1
|
||||||
|
i32.shl
|
||||||
|
local.get $0
|
||||||
|
i32.add
|
||||||
i32.const 46
|
i32.const 46
|
||||||
i32.store16 offset=4
|
i32.store16 offset=4
|
||||||
local.get $1
|
local.get $1
|
||||||
@ -4759,25 +4769,25 @@
|
|||||||
i32.add
|
i32.add
|
||||||
else
|
else
|
||||||
i32.const -6
|
i32.const -6
|
||||||
local.get $5
|
local.get $3
|
||||||
i32.lt_s
|
i32.lt_s
|
||||||
local.tee $3
|
local.tee $4
|
||||||
if
|
if
|
||||||
local.get $5
|
local.get $3
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.le_s
|
i32.le_s
|
||||||
local.set $3
|
local.set $4
|
||||||
end
|
end
|
||||||
local.get $3
|
local.get $4
|
||||||
if (result i32)
|
if (result i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.const 4
|
i32.const 4
|
||||||
i32.add
|
i32.add
|
||||||
local.tee $2
|
local.tee $2
|
||||||
i32.const 2
|
i32.const 2
|
||||||
local.get $5
|
local.get $3
|
||||||
i32.sub
|
i32.sub
|
||||||
local.tee $3
|
local.tee $4
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.shl
|
i32.shl
|
||||||
i32.add
|
i32.add
|
||||||
@ -4790,29 +4800,29 @@
|
|||||||
i32.const 3014704
|
i32.const 3014704
|
||||||
i32.store offset=4
|
i32.store offset=4
|
||||||
i32.const 2
|
i32.const 2
|
||||||
local.set $4
|
local.set $3
|
||||||
loop $repeat|1
|
loop $repeat|1
|
||||||
block $break|1
|
block $break|1
|
||||||
local.get $4
|
|
||||||
local.get $3
|
local.get $3
|
||||||
|
local.get $4
|
||||||
i32.ge_s
|
i32.ge_s
|
||||||
br_if $break|1
|
br_if $break|1
|
||||||
local.get $4
|
local.get $3
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.shl
|
i32.shl
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.add
|
i32.add
|
||||||
i32.const 48
|
i32.const 48
|
||||||
i32.store16 offset=4
|
i32.store16 offset=4
|
||||||
local.get $4
|
local.get $3
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.add
|
i32.add
|
||||||
local.set $4
|
local.set $3
|
||||||
br $repeat|1
|
br $repeat|1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local.get $1
|
local.get $1
|
||||||
local.get $3
|
local.get $4
|
||||||
i32.add
|
i32.add
|
||||||
else
|
else
|
||||||
local.get $1
|
local.get $1
|
||||||
@ -4825,52 +4835,52 @@
|
|||||||
local.get $0
|
local.get $0
|
||||||
i32.const 4
|
i32.const 4
|
||||||
i32.add
|
i32.add
|
||||||
local.tee $3
|
local.tee $4
|
||||||
block (result i32)
|
block (result i32)
|
||||||
local.get $5
|
local.get $3
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.sub
|
i32.sub
|
||||||
local.tee $4
|
local.tee $3
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.lt_s
|
i32.lt_s
|
||||||
local.tee $2
|
local.tee $2
|
||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
local.get $4
|
local.get $3
|
||||||
i32.sub
|
i32.sub
|
||||||
local.set $4
|
local.set $3
|
||||||
end
|
end
|
||||||
local.get $4
|
local.get $3
|
||||||
end
|
end
|
||||||
local.get $4
|
local.get $3
|
||||||
call $~lib/internal/number/decimalCount32
|
call $~lib/internal/number/decimalCount32
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.add
|
i32.add
|
||||||
local.tee $4
|
local.tee $5
|
||||||
call $~lib/internal/number/utoa32_lut
|
call $~lib/internal/number/utoa32_lut
|
||||||
local.get $3
|
local.get $4
|
||||||
i32.const 45
|
i32.const 45
|
||||||
i32.const 43
|
i32.const 43
|
||||||
local.get $2
|
local.get $2
|
||||||
select
|
select
|
||||||
i32.store16 offset=4
|
i32.store16 offset=4
|
||||||
local.get $4
|
local.get $5
|
||||||
i32.const 2
|
i32.const 2
|
||||||
i32.add
|
i32.add
|
||||||
else
|
else
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.const 4
|
i32.const 4
|
||||||
i32.add
|
i32.add
|
||||||
local.tee $3
|
local.tee $4
|
||||||
i32.const 4
|
i32.const 4
|
||||||
i32.add
|
i32.add
|
||||||
local.get $3
|
local.get $4
|
||||||
i32.const 2
|
i32.const 2
|
||||||
i32.add
|
i32.add
|
||||||
local.get $1
|
local.get $1
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.shl
|
i32.shl
|
||||||
local.tee $4
|
local.tee $5
|
||||||
i32.const 2
|
i32.const 2
|
||||||
i32.sub
|
i32.sub
|
||||||
call $~lib/internal/memory/memmove
|
call $~lib/internal/memory/memmove
|
||||||
@ -4878,7 +4888,7 @@
|
|||||||
i32.const 46
|
i32.const 46
|
||||||
i32.store16 offset=6
|
i32.store16 offset=6
|
||||||
local.get $0
|
local.get $0
|
||||||
local.get $4
|
local.get $5
|
||||||
i32.add
|
i32.add
|
||||||
local.tee $0
|
local.tee $0
|
||||||
i32.const 101
|
i32.const 101
|
||||||
@ -4886,30 +4896,30 @@
|
|||||||
local.get $0
|
local.get $0
|
||||||
i32.const 4
|
i32.const 4
|
||||||
i32.add
|
i32.add
|
||||||
local.tee $3
|
local.tee $4
|
||||||
block (result i32)
|
block (result i32)
|
||||||
local.get $5
|
local.get $3
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.sub
|
i32.sub
|
||||||
local.tee $4
|
local.tee $3
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.lt_s
|
i32.lt_s
|
||||||
local.tee $2
|
local.tee $2
|
||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
local.get $4
|
local.get $3
|
||||||
i32.sub
|
i32.sub
|
||||||
local.set $4
|
local.set $3
|
||||||
end
|
end
|
||||||
local.get $4
|
local.get $3
|
||||||
end
|
end
|
||||||
local.get $4
|
local.get $3
|
||||||
call $~lib/internal/number/decimalCount32
|
call $~lib/internal/number/decimalCount32
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.add
|
i32.add
|
||||||
local.tee $0
|
local.tee $0
|
||||||
call $~lib/internal/number/utoa32_lut
|
call $~lib/internal/number/utoa32_lut
|
||||||
local.get $3
|
local.get $4
|
||||||
i32.const 45
|
i32.const 45
|
||||||
i32.const 43
|
i32.const 43
|
||||||
local.get $2
|
local.get $2
|
||||||
@ -4931,19 +4941,18 @@
|
|||||||
(local $4 i32)
|
(local $4 i32)
|
||||||
(local $5 i64)
|
(local $5 i64)
|
||||||
(local $6 i32)
|
(local $6 i32)
|
||||||
(local $7 i64)
|
(local $7 i32)
|
||||||
(local $8 i32)
|
(local $8 i64)
|
||||||
(local $9 i64)
|
(local $9 i64)
|
||||||
(local $10 i64)
|
(local $10 i64)
|
||||||
(local $11 i64)
|
(local $11 i64)
|
||||||
(local $12 i64)
|
(local $12 i32)
|
||||||
(local $13 i32)
|
(local $13 i64)
|
||||||
(local $14 i32)
|
(local $14 i32)
|
||||||
(local $15 i64)
|
|
||||||
local.get $1
|
local.get $1
|
||||||
f64.const 0
|
f64.const 0
|
||||||
f64.lt
|
f64.lt
|
||||||
local.tee $13
|
local.tee $12
|
||||||
if (result f64)
|
if (result f64)
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.const 45
|
i32.const 45
|
||||||
@ -4954,32 +4963,32 @@
|
|||||||
local.get $1
|
local.get $1
|
||||||
end
|
end
|
||||||
i64.reinterpret_f64
|
i64.reinterpret_f64
|
||||||
local.tee $2
|
local.tee $13
|
||||||
i64.const 9218868437227405312
|
i64.const 9218868437227405312
|
||||||
i64.and
|
i64.and
|
||||||
i64.const 52
|
i64.const 52
|
||||||
i64.shr_u
|
i64.shr_u
|
||||||
i32.wrap_i64
|
i32.wrap_i64
|
||||||
local.set $8
|
local.set $7
|
||||||
local.get $2
|
local.get $13
|
||||||
i64.const 4503599627370495
|
i64.const 4503599627370495
|
||||||
i64.and
|
i64.and
|
||||||
local.get $8
|
local.get $7
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.ne
|
i32.ne
|
||||||
local.tee $6
|
local.tee $4
|
||||||
i64.extend_i32_u
|
i64.extend_i32_u
|
||||||
i64.const 52
|
i64.const 52
|
||||||
i64.shl
|
i64.shl
|
||||||
i64.add
|
i64.add
|
||||||
local.set $2
|
local.set $2
|
||||||
local.get $8
|
local.get $7
|
||||||
i32.const 1
|
i32.const 1
|
||||||
local.get $6
|
local.get $4
|
||||||
select
|
select
|
||||||
i32.const 1075
|
i32.const 1075
|
||||||
i32.sub
|
i32.sub
|
||||||
local.tee $8
|
local.tee $7
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.sub
|
i32.sub
|
||||||
local.set $6
|
local.set $6
|
||||||
@ -5008,7 +5017,7 @@
|
|||||||
i64.shl
|
i64.shl
|
||||||
i64.const 1
|
i64.const 1
|
||||||
i64.sub
|
i64.sub
|
||||||
local.get $8
|
local.get $7
|
||||||
local.get $14
|
local.get $14
|
||||||
i32.sub
|
i32.sub
|
||||||
local.get $6
|
local.get $6
|
||||||
@ -5075,27 +5084,27 @@
|
|||||||
local.tee $2
|
local.tee $2
|
||||||
i64.const 4294967295
|
i64.const 4294967295
|
||||||
i64.and
|
i64.and
|
||||||
local.tee $7
|
local.tee $8
|
||||||
global.get $~lib/internal/number/_frc_pow
|
global.get $~lib/internal/number/_frc_pow
|
||||||
local.tee $5
|
local.tee $5
|
||||||
i64.const 4294967295
|
i64.const 4294967295
|
||||||
i64.and
|
i64.and
|
||||||
local.tee $9
|
local.tee $9
|
||||||
i64.mul
|
i64.mul
|
||||||
local.set $10
|
local.set $3
|
||||||
local.get $5
|
local.get $5
|
||||||
i64.const 32
|
i64.const 32
|
||||||
i64.shr_u
|
i64.shr_u
|
||||||
local.tee $11
|
local.tee $10
|
||||||
local.get $7
|
local.get $8
|
||||||
i64.mul
|
i64.mul
|
||||||
local.get $2
|
local.get $2
|
||||||
i64.const 32
|
i64.const 32
|
||||||
i64.shr_u
|
i64.shr_u
|
||||||
local.tee $12
|
local.tee $2
|
||||||
local.get $9
|
local.get $9
|
||||||
i64.mul
|
i64.mul
|
||||||
local.get $10
|
local.get $3
|
||||||
i64.const 32
|
i64.const 32
|
||||||
i64.shr_u
|
i64.shr_u
|
||||||
i64.add
|
i64.add
|
||||||
@ -5107,43 +5116,43 @@
|
|||||||
i64.add
|
i64.add
|
||||||
i64.const 32
|
i64.const 32
|
||||||
i64.shr_u
|
i64.shr_u
|
||||||
local.get $11
|
local.get $2
|
||||||
local.get $12
|
local.get $10
|
||||||
i64.mul
|
i64.mul
|
||||||
local.get $3
|
local.get $3
|
||||||
i64.const 32
|
i64.const 32
|
||||||
i64.shr_u
|
i64.shr_u
|
||||||
i64.add
|
i64.add
|
||||||
i64.add
|
i64.add
|
||||||
local.set $2
|
local.set $13
|
||||||
local.get $5
|
local.get $5
|
||||||
i64.const 4294967295
|
i64.const 4294967295
|
||||||
i64.and
|
i64.and
|
||||||
local.tee $11
|
local.tee $2
|
||||||
global.get $~lib/internal/number/_frc_plus
|
global.get $~lib/internal/number/_frc_plus
|
||||||
local.tee $3
|
local.tee $3
|
||||||
i64.const 4294967295
|
i64.const 4294967295
|
||||||
i64.and
|
i64.and
|
||||||
local.tee $10
|
local.tee $10
|
||||||
i64.mul
|
i64.mul
|
||||||
local.set $7
|
local.set $11
|
||||||
local.get $10
|
local.get $10
|
||||||
local.get $5
|
local.get $5
|
||||||
i64.const 32
|
i64.const 32
|
||||||
i64.shr_u
|
i64.shr_u
|
||||||
|
local.tee $8
|
||||||
|
i64.mul
|
||||||
|
local.get $2
|
||||||
|
local.get $3
|
||||||
|
i64.const 32
|
||||||
|
i64.shr_u
|
||||||
local.tee $9
|
local.tee $9
|
||||||
i64.mul
|
i64.mul
|
||||||
local.get $11
|
local.get $11
|
||||||
local.get $3
|
|
||||||
i64.const 32
|
|
||||||
i64.shr_u
|
|
||||||
local.tee $12
|
|
||||||
i64.mul
|
|
||||||
local.get $7
|
|
||||||
i64.const 32
|
i64.const 32
|
||||||
i64.shr_u
|
i64.shr_u
|
||||||
i64.add
|
i64.add
|
||||||
local.tee $3
|
local.tee $2
|
||||||
i64.const 4294967295
|
i64.const 4294967295
|
||||||
i64.and
|
i64.and
|
||||||
i64.add
|
i64.add
|
||||||
@ -5151,97 +5160,95 @@
|
|||||||
i64.add
|
i64.add
|
||||||
i64.const 32
|
i64.const 32
|
||||||
i64.shr_u
|
i64.shr_u
|
||||||
|
local.get $8
|
||||||
local.get $9
|
local.get $9
|
||||||
local.get $12
|
|
||||||
i64.mul
|
i64.mul
|
||||||
local.get $3
|
local.get $2
|
||||||
i64.const 32
|
i64.const 32
|
||||||
i64.shr_u
|
i64.shr_u
|
||||||
i64.add
|
i64.add
|
||||||
i64.add
|
i64.add
|
||||||
local.set $15
|
local.set $11
|
||||||
global.get $~lib/internal/number/_frc_minus
|
global.get $~lib/internal/number/_frc_minus
|
||||||
local.tee $3
|
local.tee $2
|
||||||
i64.const 4294967295
|
i64.const 4294967295
|
||||||
i64.and
|
i64.and
|
||||||
local.tee $7
|
local.tee $8
|
||||||
local.get $5
|
local.get $5
|
||||||
i64.const 4294967295
|
i64.const 4294967295
|
||||||
i64.and
|
i64.and
|
||||||
local.tee $9
|
local.tee $9
|
||||||
i64.mul
|
i64.mul
|
||||||
local.set $10
|
local.set $3
|
||||||
local.get $5
|
local.get $11
|
||||||
i64.const 32
|
|
||||||
i64.shr_u
|
|
||||||
local.tee $11
|
|
||||||
local.get $7
|
|
||||||
i64.mul
|
|
||||||
local.get $3
|
|
||||||
i64.const 32
|
|
||||||
i64.shr_u
|
|
||||||
local.tee $12
|
|
||||||
local.get $9
|
|
||||||
i64.mul
|
|
||||||
local.get $10
|
|
||||||
i64.const 32
|
|
||||||
i64.shr_u
|
|
||||||
i64.add
|
|
||||||
local.tee $3
|
|
||||||
i64.const 4294967295
|
|
||||||
i64.and
|
|
||||||
i64.add
|
|
||||||
local.set $5
|
|
||||||
local.get $15
|
|
||||||
i64.const 1
|
i64.const 1
|
||||||
i64.sub
|
i64.sub
|
||||||
local.tee $7
|
local.tee $11
|
||||||
local.get $11
|
local.get $5
|
||||||
local.get $12
|
i64.const 32
|
||||||
|
i64.shr_u
|
||||||
|
local.tee $10
|
||||||
|
local.get $8
|
||||||
|
i64.mul
|
||||||
|
local.get $2
|
||||||
|
i64.const 32
|
||||||
|
i64.shr_u
|
||||||
|
local.tee $2
|
||||||
|
local.get $9
|
||||||
i64.mul
|
i64.mul
|
||||||
local.get $3
|
local.get $3
|
||||||
i64.const 32
|
i64.const 32
|
||||||
i64.shr_u
|
i64.shr_u
|
||||||
i64.add
|
i64.add
|
||||||
local.get $5
|
local.tee $3
|
||||||
|
i64.const 4294967295
|
||||||
|
i64.and
|
||||||
|
i64.add
|
||||||
i64.const 2147483647
|
i64.const 2147483647
|
||||||
i64.add
|
i64.add
|
||||||
i64.const 32
|
i64.const 32
|
||||||
i64.shr_u
|
i64.shr_u
|
||||||
|
local.get $2
|
||||||
|
local.get $10
|
||||||
|
i64.mul
|
||||||
|
local.get $3
|
||||||
|
i64.const 32
|
||||||
|
i64.shr_u
|
||||||
|
i64.add
|
||||||
i64.add
|
i64.add
|
||||||
i64.const 1
|
i64.const 1
|
||||||
i64.add
|
i64.add
|
||||||
i64.sub
|
i64.sub
|
||||||
local.set $3
|
local.set $3
|
||||||
local.get $13
|
local.get $12
|
||||||
i32.const 1
|
i32.const 1
|
||||||
i32.shl
|
i32.shl
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.add
|
i32.add
|
||||||
local.get $0
|
local.get $0
|
||||||
local.get $2
|
local.get $13
|
||||||
local.get $8
|
global.get $~lib/internal/number/_exp_pow
|
||||||
|
local.tee $14
|
||||||
|
local.get $7
|
||||||
local.get $4
|
local.get $4
|
||||||
i32.sub
|
i32.sub
|
||||||
global.get $~lib/internal/number/_exp_pow
|
|
||||||
local.tee $4
|
|
||||||
i32.add
|
i32.add
|
||||||
i32.const -64
|
i32.const -64
|
||||||
i32.sub
|
i32.sub
|
||||||
local.get $7
|
local.get $11
|
||||||
local.get $4
|
|
||||||
global.get $~lib/internal/number/_exp
|
global.get $~lib/internal/number/_exp
|
||||||
|
local.get $14
|
||||||
i32.add
|
i32.add
|
||||||
i32.const -64
|
i32.const -64
|
||||||
i32.sub
|
i32.sub
|
||||||
local.get $3
|
local.get $3
|
||||||
local.get $13
|
local.get $12
|
||||||
call $~lib/internal/number/genDigits
|
call $~lib/internal/number/genDigits
|
||||||
local.get $13
|
local.get $12
|
||||||
i32.sub
|
i32.sub
|
||||||
global.get $~lib/internal/number/_K
|
global.get $~lib/internal/number/_K
|
||||||
call $~lib/internal/number/prettify
|
call $~lib/internal/number/prettify
|
||||||
local.get $13
|
local.get $12
|
||||||
i32.add
|
i32.add
|
||||||
)
|
)
|
||||||
(func $~lib/string/String#substring (; 53 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
(func $~lib/string/String#substring (; 53 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -476,6 +476,7 @@
|
|||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
(local $4 i32)
|
(local $4 i32)
|
||||||
(local $5 i32)
|
(local $5 i32)
|
||||||
|
(local $6 i32)
|
||||||
local.get $1
|
local.get $1
|
||||||
global.get $~lib/internal/arraybuffer/MAX_BLENGTH
|
global.get $~lib/internal/arraybuffer/MAX_BLENGTH
|
||||||
i32.gt_u
|
i32.gt_u
|
||||||
@ -501,9 +502,11 @@
|
|||||||
local.set $4
|
local.set $4
|
||||||
i32.const 0
|
i32.const 0
|
||||||
local.set $5
|
local.set $5
|
||||||
|
local.get $1
|
||||||
|
local.set $6
|
||||||
local.get $4
|
local.get $4
|
||||||
local.get $5
|
local.get $5
|
||||||
local.get $1
|
local.get $6
|
||||||
call $~lib/internal/memory/memset
|
call $~lib/internal/memory/memset
|
||||||
end
|
end
|
||||||
local.get $3
|
local.get $3
|
||||||
@ -819,10 +822,13 @@
|
|||||||
i32.const 0
|
i32.const 0
|
||||||
)
|
)
|
||||||
(func $~lib/map/Map<String,usize>#has (; 16 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
(func $~lib/map/Map<String,usize>#has (; 16 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||||
|
(local $2 i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
local.get $1
|
local.get $1
|
||||||
block $~lib/internal/hash/HASH<String>|inlined.0 (result i32)
|
block $~lib/internal/hash/HASH<String>|inlined.0 (result i32)
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.set $2
|
||||||
|
local.get $2
|
||||||
call $~lib/internal/hash/hashStr
|
call $~lib/internal/hash/hashStr
|
||||||
br $~lib/internal/hash/HASH<String>|inlined.0
|
br $~lib/internal/hash/HASH<String>|inlined.0
|
||||||
end
|
end
|
||||||
@ -832,18 +838,21 @@
|
|||||||
)
|
)
|
||||||
(func $~lib/map/Map<String,usize>#get (; 17 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
(func $~lib/map/Map<String,usize>#get (; 17 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||||
(local $2 i32)
|
(local $2 i32)
|
||||||
|
(local $3 i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
local.get $1
|
local.get $1
|
||||||
block $~lib/internal/hash/HASH<String>|inlined.1 (result i32)
|
block $~lib/internal/hash/HASH<String>|inlined.1 (result i32)
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.set $2
|
||||||
|
local.get $2
|
||||||
call $~lib/internal/hash/hashStr
|
call $~lib/internal/hash/hashStr
|
||||||
br $~lib/internal/hash/HASH<String>|inlined.1
|
br $~lib/internal/hash/HASH<String>|inlined.1
|
||||||
end
|
end
|
||||||
call $~lib/map/Map<String,usize>#find
|
call $~lib/map/Map<String,usize>#find
|
||||||
local.set $2
|
local.set $3
|
||||||
local.get $2
|
local.get $3
|
||||||
if (result i32)
|
if (result i32)
|
||||||
local.get $2
|
local.get $3
|
||||||
i32.load offset=4
|
i32.load offset=4
|
||||||
else
|
else
|
||||||
unreachable
|
unreachable
|
||||||
@ -996,18 +1005,20 @@
|
|||||||
(local $6 i32)
|
(local $6 i32)
|
||||||
block $~lib/internal/hash/HASH<String>|inlined.2 (result i32)
|
block $~lib/internal/hash/HASH<String>|inlined.2 (result i32)
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.set $3
|
||||||
|
local.get $3
|
||||||
call $~lib/internal/hash/hashStr
|
call $~lib/internal/hash/hashStr
|
||||||
br $~lib/internal/hash/HASH<String>|inlined.2
|
br $~lib/internal/hash/HASH<String>|inlined.2
|
||||||
end
|
end
|
||||||
local.set $3
|
local.set $4
|
||||||
local.get $0
|
local.get $0
|
||||||
local.get $1
|
local.get $1
|
||||||
local.get $3
|
|
||||||
call $~lib/map/Map<String,usize>#find
|
|
||||||
local.set $4
|
|
||||||
local.get $4
|
local.get $4
|
||||||
|
call $~lib/map/Map<String,usize>#find
|
||||||
|
local.set $5
|
||||||
|
local.get $5
|
||||||
if
|
if
|
||||||
local.get $4
|
local.get $5
|
||||||
local.get $2
|
local.get $2
|
||||||
i32.store offset=4
|
i32.store offset=4
|
||||||
else
|
else
|
||||||
@ -1042,8 +1053,8 @@
|
|||||||
end
|
end
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load offset=8
|
i32.load offset=8
|
||||||
local.set $5
|
local.set $3
|
||||||
local.get $5
|
local.get $3
|
||||||
global.get $~lib/internal/arraybuffer/HEADER_SIZE
|
global.get $~lib/internal/arraybuffer/HEADER_SIZE
|
||||||
i32.add
|
i32.add
|
||||||
block (result i32)
|
block (result i32)
|
||||||
@ -1061,11 +1072,11 @@
|
|||||||
end
|
end
|
||||||
i32.mul
|
i32.mul
|
||||||
i32.add
|
i32.add
|
||||||
local.set $4
|
local.set $5
|
||||||
local.get $4
|
local.get $5
|
||||||
local.get $1
|
local.get $1
|
||||||
i32.store
|
i32.store
|
||||||
local.get $4
|
local.get $5
|
||||||
local.get $2
|
local.get $2
|
||||||
i32.store offset=4
|
i32.store offset=4
|
||||||
local.get $0
|
local.get $0
|
||||||
@ -1076,7 +1087,7 @@
|
|||||||
i32.store offset=20
|
i32.store offset=20
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load
|
i32.load
|
||||||
local.get $3
|
local.get $4
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load offset=4
|
i32.load offset=4
|
||||||
i32.and
|
i32.and
|
||||||
@ -1084,12 +1095,12 @@
|
|||||||
i32.mul
|
i32.mul
|
||||||
i32.add
|
i32.add
|
||||||
local.set $6
|
local.set $6
|
||||||
local.get $4
|
local.get $5
|
||||||
local.get $6
|
local.get $6
|
||||||
i32.load offset=8
|
i32.load offset=8
|
||||||
i32.store offset=8
|
i32.store offset=8
|
||||||
local.get $6
|
local.get $6
|
||||||
local.get $4
|
local.get $5
|
||||||
i32.store offset=8
|
i32.store offset=8
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
@ -1333,18 +1344,20 @@
|
|||||||
(local $6 i32)
|
(local $6 i32)
|
||||||
block $~lib/internal/hash/HASH<usize>|inlined.0 (result i32)
|
block $~lib/internal/hash/HASH<usize>|inlined.0 (result i32)
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.set $3
|
||||||
|
local.get $3
|
||||||
call $~lib/internal/hash/hash32
|
call $~lib/internal/hash/hash32
|
||||||
br $~lib/internal/hash/HASH<usize>|inlined.0
|
br $~lib/internal/hash/HASH<usize>|inlined.0
|
||||||
end
|
end
|
||||||
local.set $3
|
local.set $4
|
||||||
local.get $0
|
local.get $0
|
||||||
local.get $1
|
local.get $1
|
||||||
local.get $3
|
|
||||||
call $~lib/map/Map<usize,String>#find
|
|
||||||
local.set $4
|
|
||||||
local.get $4
|
local.get $4
|
||||||
|
call $~lib/map/Map<usize,String>#find
|
||||||
|
local.set $5
|
||||||
|
local.get $5
|
||||||
if
|
if
|
||||||
local.get $4
|
local.get $5
|
||||||
local.get $2
|
local.get $2
|
||||||
i32.store offset=4
|
i32.store offset=4
|
||||||
else
|
else
|
||||||
@ -1379,8 +1392,8 @@
|
|||||||
end
|
end
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load offset=8
|
i32.load offset=8
|
||||||
local.set $5
|
local.set $3
|
||||||
local.get $5
|
local.get $3
|
||||||
global.get $~lib/internal/arraybuffer/HEADER_SIZE
|
global.get $~lib/internal/arraybuffer/HEADER_SIZE
|
||||||
i32.add
|
i32.add
|
||||||
block (result i32)
|
block (result i32)
|
||||||
@ -1398,11 +1411,11 @@
|
|||||||
end
|
end
|
||||||
i32.mul
|
i32.mul
|
||||||
i32.add
|
i32.add
|
||||||
local.set $4
|
local.set $5
|
||||||
local.get $4
|
local.get $5
|
||||||
local.get $1
|
local.get $1
|
||||||
i32.store
|
i32.store
|
||||||
local.get $4
|
local.get $5
|
||||||
local.get $2
|
local.get $2
|
||||||
i32.store offset=4
|
i32.store offset=4
|
||||||
local.get $0
|
local.get $0
|
||||||
@ -1413,7 +1426,7 @@
|
|||||||
i32.store offset=20
|
i32.store offset=20
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load
|
i32.load
|
||||||
local.get $3
|
local.get $4
|
||||||
local.get $0
|
local.get $0
|
||||||
i32.load offset=4
|
i32.load offset=4
|
||||||
i32.and
|
i32.and
|
||||||
@ -1421,12 +1434,12 @@
|
|||||||
i32.mul
|
i32.mul
|
||||||
i32.add
|
i32.add
|
||||||
local.set $6
|
local.set $6
|
||||||
local.get $4
|
local.get $5
|
||||||
local.get $6
|
local.get $6
|
||||||
i32.load offset=8
|
i32.load offset=8
|
||||||
i32.store offset=8
|
i32.store offset=8
|
||||||
local.get $6
|
local.get $6
|
||||||
local.get $4
|
local.get $5
|
||||||
i32.store offset=8
|
i32.store offset=8
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
@ -1478,10 +1491,13 @@
|
|||||||
local.get $2
|
local.get $2
|
||||||
)
|
)
|
||||||
(func $~lib/map/Map<usize,String>#has (; 25 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
(func $~lib/map/Map<usize,String>#has (; 25 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||||
|
(local $2 i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
local.get $1
|
local.get $1
|
||||||
block $~lib/internal/hash/HASH<usize>|inlined.2 (result i32)
|
block $~lib/internal/hash/HASH<usize>|inlined.2 (result i32)
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.set $2
|
||||||
|
local.get $2
|
||||||
call $~lib/internal/hash/hash32
|
call $~lib/internal/hash/hash32
|
||||||
br $~lib/internal/hash/HASH<usize>|inlined.2
|
br $~lib/internal/hash/HASH<usize>|inlined.2
|
||||||
end
|
end
|
||||||
@ -1491,18 +1507,21 @@
|
|||||||
)
|
)
|
||||||
(func $~lib/map/Map<usize,String>#get (; 26 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
(func $~lib/map/Map<usize,String>#get (; 26 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||||
(local $2 i32)
|
(local $2 i32)
|
||||||
|
(local $3 i32)
|
||||||
local.get $0
|
local.get $0
|
||||||
local.get $1
|
local.get $1
|
||||||
block $~lib/internal/hash/HASH<usize>|inlined.3 (result i32)
|
block $~lib/internal/hash/HASH<usize>|inlined.3 (result i32)
|
||||||
local.get $1
|
local.get $1
|
||||||
|
local.set $2
|
||||||
|
local.get $2
|
||||||
call $~lib/internal/hash/hash32
|
call $~lib/internal/hash/hash32
|
||||||
br $~lib/internal/hash/HASH<usize>|inlined.3
|
br $~lib/internal/hash/HASH<usize>|inlined.3
|
||||||
end
|
end
|
||||||
call $~lib/map/Map<usize,String>#find
|
call $~lib/map/Map<usize,String>#find
|
||||||
local.set $2
|
local.set $3
|
||||||
local.get $2
|
local.get $3
|
||||||
if (result i32)
|
if (result i32)
|
||||||
local.get $2
|
local.get $3
|
||||||
i32.load offset=4
|
i32.load offset=4
|
||||||
else
|
else
|
||||||
unreachable
|
unreachable
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user