mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-04-25 07:02:13 +00:00
Suppress some unnecessary blocks and nops; Fix compilation of always 'break'ing 'do's
This commit is contained in:
parent
2f8f477ab0
commit
25a1f6230a
2
dist/asc.js
vendored
2
dist/asc.js
vendored
File diff suppressed because one or more lines are too long
2
dist/asc.js.map
vendored
2
dist/asc.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/assemblyscript.js
vendored
2
dist/assemblyscript.js
vendored
File diff suppressed because one or more lines are too long
2
dist/assemblyscript.js.map
vendored
2
dist/assemblyscript.js.map
vendored
File diff suppressed because one or more lines are too long
206
src/compiler.ts
206
src/compiler.ts
@ -373,14 +373,13 @@ export class Compiler extends DiagnosticEmitter {
|
||||
/** Compiles a source by looking it up by path first. */
|
||||
compileSourceByPath(normalizedPathWithoutExtension: string, reportNode: Node): void {
|
||||
var source = this.program.lookupSourceByPath(normalizedPathWithoutExtension);
|
||||
if (!source) {
|
||||
if (source) this.compileSource(source);
|
||||
else {
|
||||
this.error(
|
||||
DiagnosticCode.File_0_not_found,
|
||||
reportNode.range, normalizedPathWithoutExtension
|
||||
);
|
||||
return;
|
||||
}
|
||||
this.compileSource(source);
|
||||
}
|
||||
|
||||
/** Compiles a source. */
|
||||
@ -1359,67 +1358,67 @@ export class Compiler extends DiagnosticEmitter {
|
||||
|
||||
compileStatement(statement: Statement): ExpressionRef {
|
||||
var module = this.module;
|
||||
var expr: ExpressionRef;
|
||||
var stmt: ExpressionRef;
|
||||
switch (statement.kind) {
|
||||
case NodeKind.BLOCK: {
|
||||
expr = this.compileBlockStatement(<BlockStatement>statement);
|
||||
stmt = this.compileBlockStatement(<BlockStatement>statement);
|
||||
break;
|
||||
}
|
||||
case NodeKind.BREAK: {
|
||||
expr = this.compileBreakStatement(<BreakStatement>statement);
|
||||
stmt = this.compileBreakStatement(<BreakStatement>statement);
|
||||
break;
|
||||
}
|
||||
case NodeKind.CONTINUE: {
|
||||
expr = this.compileContinueStatement(<ContinueStatement>statement);
|
||||
stmt = this.compileContinueStatement(<ContinueStatement>statement);
|
||||
break;
|
||||
}
|
||||
case NodeKind.DO: {
|
||||
expr = this.compileDoStatement(<DoStatement>statement);
|
||||
stmt = this.compileDoStatement(<DoStatement>statement);
|
||||
break;
|
||||
}
|
||||
case NodeKind.EMPTY: {
|
||||
expr = this.compileEmptyStatement(<EmptyStatement>statement);
|
||||
stmt = this.compileEmptyStatement(<EmptyStatement>statement);
|
||||
break;
|
||||
}
|
||||
case NodeKind.EXPRESSION: {
|
||||
expr = this.compileExpressionStatement(<ExpressionStatement>statement);
|
||||
stmt = this.compileExpressionStatement(<ExpressionStatement>statement);
|
||||
break;
|
||||
}
|
||||
case NodeKind.FOR: {
|
||||
expr = this.compileForStatement(<ForStatement>statement);
|
||||
stmt = this.compileForStatement(<ForStatement>statement);
|
||||
break;
|
||||
}
|
||||
case NodeKind.IF: {
|
||||
expr = this.compileIfStatement(<IfStatement>statement);
|
||||
stmt = this.compileIfStatement(<IfStatement>statement);
|
||||
break;
|
||||
}
|
||||
case NodeKind.RETURN: {
|
||||
expr = this.compileReturnStatement(<ReturnStatement>statement);
|
||||
stmt = this.compileReturnStatement(<ReturnStatement>statement);
|
||||
break;
|
||||
}
|
||||
case NodeKind.SWITCH: {
|
||||
expr = this.compileSwitchStatement(<SwitchStatement>statement);
|
||||
stmt = this.compileSwitchStatement(<SwitchStatement>statement);
|
||||
break;
|
||||
}
|
||||
case NodeKind.THROW: {
|
||||
expr = this.compileThrowStatement(<ThrowStatement>statement);
|
||||
stmt = this.compileThrowStatement(<ThrowStatement>statement);
|
||||
break;
|
||||
}
|
||||
case NodeKind.TRY: {
|
||||
expr = this.compileTryStatement(<TryStatement>statement);
|
||||
stmt = this.compileTryStatement(<TryStatement>statement);
|
||||
break;
|
||||
}
|
||||
case NodeKind.VARIABLE: {
|
||||
expr = this.compileVariableStatement(<VariableStatement>statement);
|
||||
if (!expr) expr = module.createNop();
|
||||
stmt = this.compileVariableStatement(<VariableStatement>statement);
|
||||
if (!stmt) stmt = module.createNop();
|
||||
break;
|
||||
}
|
||||
case NodeKind.VOID: {
|
||||
expr = this.compileVoidStatement(<VoidStatement>statement);
|
||||
stmt = this.compileVoidStatement(<VoidStatement>statement);
|
||||
break;
|
||||
}
|
||||
case NodeKind.WHILE: {
|
||||
expr = this.compileWhileStatement(<WhileStatement>statement);
|
||||
stmt = this.compileWhileStatement(<WhileStatement>statement);
|
||||
break;
|
||||
}
|
||||
case NodeKind.TYPEDECLARATION: {
|
||||
@ -1432,34 +1431,42 @@ export class Compiler extends DiagnosticEmitter {
|
||||
}
|
||||
default: {
|
||||
assert(false);
|
||||
expr = module.createUnreachable();
|
||||
stmt = module.createUnreachable();
|
||||
}
|
||||
}
|
||||
if (this.options.sourceMap) this.addDebugLocation(expr, statement.range);
|
||||
return expr;
|
||||
if (this.options.sourceMap) this.addDebugLocation(stmt, statement.range);
|
||||
return stmt;
|
||||
}
|
||||
|
||||
compileStatements(statements: Statement[]): ExpressionRef[] {
|
||||
var numStatements = statements.length;
|
||||
var stmts = new Array<ExpressionRef>(numStatements);
|
||||
var count = 0;
|
||||
var flow = this.currentFunction.flow;
|
||||
for (let i = 0; i < numStatements; ++i) {
|
||||
stmts[i] = this.compileStatement(statements[i]);
|
||||
let stmt = this.compileStatement(statements[i]);
|
||||
if (getExpressionId(stmt) != ExpressionId.Nop) {
|
||||
stmts[count++] = stmt;
|
||||
if (flow.isAny(FlowFlags.BREAKS | FlowFlags.CONTINUES | FlowFlags.RETURNS)) break;
|
||||
}
|
||||
}
|
||||
return stmts; // array of 0-es in noEmit-mode
|
||||
stmts.length = count;
|
||||
return stmts;
|
||||
}
|
||||
|
||||
compileBlockStatement(statement: BlockStatement): ExpressionRef {
|
||||
var statements = statement.statements;
|
||||
|
||||
// NOTE that we could optimize this to a NOP if empty or unwrap a single
|
||||
// statement, but that's not what the source told us to do and left to the
|
||||
// optimizer.
|
||||
|
||||
// Not actually a branch, but can contain its own scoped variables.
|
||||
var blockFlow = this.currentFunction.flow.enterBranchOrScope();
|
||||
this.currentFunction.flow = blockFlow;
|
||||
|
||||
var stmt = this.module.createBlock(null, this.compileStatements(statements), NativeType.None);
|
||||
var stmts = this.compileStatements(statements);
|
||||
var stmt = stmts.length == 0
|
||||
? this.module.createNop()
|
||||
: stmts.length == 1
|
||||
? stmts[0]
|
||||
: this.module.createBlock(null, stmts, NativeType.None);
|
||||
|
||||
// Switch back to the parent flow
|
||||
var parentFlow = blockFlow.leaveBranchOrScope();
|
||||
@ -1515,42 +1522,37 @@ export class Compiler extends DiagnosticEmitter {
|
||||
}
|
||||
|
||||
compileDoStatement(statement: DoStatement): ExpressionRef {
|
||||
|
||||
// A do statement does not initiate a new branch because it is executed at
|
||||
// least once, but has its own break and continue labels.
|
||||
var currentFunction = this.currentFunction;
|
||||
var label = currentFunction.enterBreakContext();
|
||||
var flow = currentFunction.flow;
|
||||
var previousBreakLabel = flow.breakLabel;
|
||||
var previousContinueLabel = flow.continueLabel;
|
||||
var module = this.module;
|
||||
|
||||
var label = currentFunction.enterBreakContext();
|
||||
var flow = currentFunction.flow.enterBranchOrScope();
|
||||
currentFunction.flow = flow;
|
||||
var breakLabel = "break|" + label;
|
||||
flow.breakLabel = breakLabel;
|
||||
var continueLabel = "continue|" + label;
|
||||
flow.continueLabel = continueLabel;
|
||||
|
||||
var body = this.compileStatement(statement.statement);
|
||||
|
||||
// Reset to the previous break and continue labels, if any.
|
||||
flow.breakLabel = previousBreakLabel;
|
||||
flow.continueLabel = previousContinueLabel;
|
||||
|
||||
var module = this.module;
|
||||
var condExpr = this.makeIsTrueish(
|
||||
this.compileExpression(statement.condition, Type.i32, ConversionKind.NONE, WrapMode.NONE),
|
||||
this.currentType
|
||||
);
|
||||
// TODO: check if condition is always false and if so, omit it?
|
||||
|
||||
// No need to eliminate the condition in generic contexts as the statement is executed anyway.
|
||||
|
||||
this.currentFunction.leaveBreakContext();
|
||||
// Switch back to the parent flow
|
||||
currentFunction.flow = flow.leaveBranchOrScope();
|
||||
currentFunction.leaveBreakContext();
|
||||
|
||||
return module.createBlock(breakLabel, [
|
||||
module.createLoop(continueLabel,
|
||||
module.createBlock(null, [
|
||||
body,
|
||||
module.createBreak(continueLabel, condExpr)
|
||||
], NativeType.None))
|
||||
flow.isAny(FlowFlags.BREAKS | FlowFlags.CONTINUES | FlowFlags.RETURNS)
|
||||
? body // skip trailing continue if unnecessary
|
||||
: module.createBlock(null, [
|
||||
body,
|
||||
module.createBreak(continueLabel, condExpr)
|
||||
], NativeType.None)
|
||||
)
|
||||
], NativeType.None);
|
||||
}
|
||||
|
||||
@ -1568,62 +1570,71 @@ export class Compiler extends DiagnosticEmitter {
|
||||
}
|
||||
|
||||
compileForStatement(statement: ForStatement): ExpressionRef {
|
||||
|
||||
// A for statement initiates a new branch with its own scoped variables
|
||||
// possibly declared in its initializer, and break context.
|
||||
var currentFunction = this.currentFunction;
|
||||
var context = currentFunction.enterBreakContext();
|
||||
var label = currentFunction.enterBreakContext();
|
||||
var flow = currentFunction.flow.enterBranchOrScope();
|
||||
currentFunction.flow = flow;
|
||||
var breakLabel = flow.breakLabel = "break|" + context;
|
||||
var breakLabel = flow.breakLabel = "break|" + label;
|
||||
flow.breakLabel = breakLabel;
|
||||
var continueLabel = "continue|" + context;
|
||||
var continueLabel = "continue|" + label;
|
||||
flow.continueLabel = continueLabel;
|
||||
|
||||
// Compile in correct order
|
||||
var module = this.module;
|
||||
var initializer = statement.initializer
|
||||
var initExpr = statement.initializer
|
||||
? this.compileStatement(<Statement>statement.initializer)
|
||||
: module.createNop();
|
||||
var condition = statement.condition
|
||||
? this.makeIsTrueish(
|
||||
this.compileExpressionRetainType(<Expression>statement.condition, Type.bool, WrapMode.NONE),
|
||||
this.currentType
|
||||
)
|
||||
: module.createI32(1);
|
||||
var incrementor = statement.incrementor
|
||||
var condExpr: ExpressionRef = 0;
|
||||
var alwaysTrue = true;
|
||||
if (statement.condition) {
|
||||
condExpr = this.makeIsTrueish(
|
||||
this.compileExpressionRetainType(<Expression>statement.condition, Type.bool, WrapMode.NONE),
|
||||
this.currentType
|
||||
);
|
||||
// check if the condition is always true
|
||||
let condPre = this.precomputeExpressionRef(condExpr);
|
||||
if (getExpressionId(condPre) == ExpressionId.Const) {
|
||||
assert(getExpressionType(condPre) == NativeType.I32);
|
||||
if (getConstValueI32(condPre) != 0) alwaysTrue = true;
|
||||
// TODO: could skip compilation if the condition is always false here, but beware that the
|
||||
// initializer could still declare new 'var's that are used later on.
|
||||
}
|
||||
// recompile to original
|
||||
condExpr = this.makeIsTrueish(
|
||||
this.compileExpressionRetainType(<Expression>statement.condition, Type.bool, WrapMode.NONE),
|
||||
this.currentType
|
||||
);
|
||||
} else {
|
||||
// omitted condition is always true
|
||||
condExpr = module.createI32(1);
|
||||
alwaysTrue = true;
|
||||
}
|
||||
var incrExpr = statement.incrementor
|
||||
? this.compileExpression(<Expression>statement.incrementor, Type.void, ConversionKind.IMPLICIT, WrapMode.NONE)
|
||||
: module.createNop();
|
||||
var body = this.compileStatement(statement.statement);
|
||||
|
||||
var alwaysReturns = !statement.condition && flow.is(FlowFlags.RETURNS);
|
||||
var alwaysReturnsWrapped = !statement.condition && flow.is(FlowFlags.RETURNS_WRAPPED);
|
||||
var alwaysThrows = !statement.condition && flow.is(FlowFlags.THROWS);
|
||||
var alwaysAllocates = !statement.condition && flow.is(FlowFlags.ALLOCATES);
|
||||
// TODO: check other always-true conditions as well, not just omitted
|
||||
|
||||
if (alwaysReturns) flow.set(FlowFlags.RETURNS);
|
||||
if (alwaysReturnsWrapped) flow.set(FlowFlags.RETURNS_WRAPPED);
|
||||
if (alwaysThrows) flow.set(FlowFlags.THROWS);
|
||||
if (alwaysAllocates) flow.set(FlowFlags.ALLOCATES);
|
||||
var bodyExpr = this.compileStatement(statement.statement);
|
||||
|
||||
// Switch back to the parent flow
|
||||
currentFunction.flow = flow.leaveBranchOrScope();
|
||||
var parentFlow = flow.leaveBranchOrScope();
|
||||
if (alwaysTrue) parentFlow.inherit(flow);
|
||||
currentFunction.flow = parentFlow;
|
||||
currentFunction.leaveBreakContext();
|
||||
|
||||
var expr = module.createBlock(breakLabel, [
|
||||
initializer,
|
||||
initExpr,
|
||||
module.createLoop(continueLabel, module.createBlock(null, [
|
||||
module.createIf(condition, module.createBlock(null, [
|
||||
body,
|
||||
incrementor,
|
||||
module.createIf(condExpr, module.createBlock(null, [
|
||||
bodyExpr,
|
||||
incrExpr,
|
||||
module.createBreak(continueLabel)
|
||||
], NativeType.None))
|
||||
], NativeType.None))
|
||||
], NativeType.None);
|
||||
|
||||
// If the loop is guaranteed to run and return, append a hint
|
||||
if (alwaysReturns || alwaysThrows) {
|
||||
// If the loop is guaranteed to run and return, append a hint for Binaryen
|
||||
if (flow.isAny(FlowFlags.RETURNS | FlowFlags.THROWS)) {
|
||||
expr = module.createBlock(null, [
|
||||
expr,
|
||||
module.createUnreachable()
|
||||
@ -1774,8 +1785,6 @@ export class Compiler extends DiagnosticEmitter {
|
||||
let case_ = cases[i];
|
||||
let statements = case_.statements;
|
||||
let numStatements = statements.length;
|
||||
let body = new Array<ExpressionRef>(1 + numStatements);
|
||||
body[0] = currentBlock;
|
||||
|
||||
// Each switch case initiates a new branch
|
||||
let flow = currentFunction.flow.enterBranchOrScope();
|
||||
@ -1785,9 +1794,17 @@ export class Compiler extends DiagnosticEmitter {
|
||||
|
||||
let fallsThrough = i != numCases - 1;
|
||||
let nextLabel = !fallsThrough ? breakLabel : "case" + (i + 1).toString(10) + "|" + context;
|
||||
let stmts = new Array<ExpressionRef>(1 + numStatements);
|
||||
stmts[0] = currentBlock;
|
||||
let count = 1;
|
||||
for (let j = 0; j < numStatements; ++j) {
|
||||
body[j + 1] = this.compileStatement(statements[j]);
|
||||
let stmt = this.compileStatement(statements[j]);
|
||||
if (getExpressionId(stmt) != ExpressionId.Nop) {
|
||||
stmts[count++] = stmt;
|
||||
if (flow.is(FlowFlags.BREAKS | FlowFlags.CONTINUES | FlowFlags.RETURNS)) break;
|
||||
}
|
||||
}
|
||||
stmts.length = count;
|
||||
if (!(fallsThrough || flow.is(FlowFlags.RETURNS))) alwaysReturns = false; // ignore fall-throughs
|
||||
if (!(fallsThrough || flow.is(FlowFlags.RETURNS_WRAPPED))) alwaysReturnsWrapped = false; // ignore fall-throughs
|
||||
if (!(fallsThrough || flow.is(FlowFlags.THROWS))) alwaysThrows = false;
|
||||
@ -1795,8 +1812,7 @@ export class Compiler extends DiagnosticEmitter {
|
||||
|
||||
// Switch back to the parent flow
|
||||
currentFunction.flow = flow.leaveBranchOrScope();
|
||||
|
||||
currentBlock = module.createBlock(nextLabel, body, NativeType.None);
|
||||
currentBlock = module.createBlock(nextLabel, stmts, NativeType.None); // must be a labeled block
|
||||
}
|
||||
currentFunction.leaveBreakContext();
|
||||
|
||||
@ -2040,10 +2056,14 @@ export class Compiler extends DiagnosticEmitter {
|
||||
|
||||
var expr = module.createBlock(breakLabel, [
|
||||
module.createLoop(continueLabel,
|
||||
module.createIf(condExpr, module.createBlock(null, [
|
||||
body,
|
||||
module.createBreak(continueLabel)
|
||||
], NativeType.None))
|
||||
module.createIf(condExpr,
|
||||
flow.isAny(FlowFlags.CONTINUES | FlowFlags.BREAKS | FlowFlags.RETURNS)
|
||||
? body // skip trailing continue if unnecessary
|
||||
: module.createBlock(null, [
|
||||
body,
|
||||
module.createBreak(continueLabel)
|
||||
], NativeType.None)
|
||||
)
|
||||
)
|
||||
], NativeType.None);
|
||||
|
||||
@ -6992,17 +7012,13 @@ export class Compiler extends DiagnosticEmitter {
|
||||
var source = range.source;
|
||||
if (source.debugInfoIndex < 0) source.debugInfoIndex = this.module.addDebugInfoFile(source.normalizedPath);
|
||||
range.debugInfoRef = expr;
|
||||
if (!currentFunction.debugLocations) currentFunction.debugLocations = [];
|
||||
currentFunction.debugLocations.push(range);
|
||||
}
|
||||
}
|
||||
|
||||
// helpers
|
||||
|
||||
function mangleExportName(element: Element, explicitSimpleName: string | null = null): string {
|
||||
var simpleName = explicitSimpleName != null
|
||||
? explicitSimpleName
|
||||
: element.simpleName;
|
||||
function mangleExportName(element: Element, simpleName: string = element.simpleName): string {
|
||||
switch (element.kind) {
|
||||
case ElementKind.FUNCTION: {
|
||||
let parent = (<Function>element).parent || (<Function>element).prototype.parent;
|
||||
|
@ -2798,7 +2798,7 @@ export class Function extends Element {
|
||||
/** Current control flow. */
|
||||
flow: Flow;
|
||||
/** Remembered debug locations. */
|
||||
debugLocations: Range[] | null = null;
|
||||
debugLocations: Range[] = [];
|
||||
/** Function reference, if compiled. */
|
||||
ref: FunctionRef = 0;
|
||||
/** Function table index, if any. */
|
||||
@ -2996,11 +2996,8 @@ export class Function extends Element {
|
||||
/** Enters a(nother) break context. */
|
||||
enterBreakContext(): string {
|
||||
var id = this.nextBreakId++;
|
||||
if (!this.breakStack) {
|
||||
this.breakStack = [ id ];
|
||||
} else {
|
||||
this.breakStack.push(id);
|
||||
}
|
||||
if (!this.breakStack) this.breakStack = [ id ];
|
||||
else this.breakStack.push(id);
|
||||
return this.breakContext = id.toString(10);
|
||||
}
|
||||
|
||||
@ -3027,20 +3024,17 @@ export class Function extends Element {
|
||||
this.tempI32s = this.tempI64s = this.tempF32s = this.tempF64s = null;
|
||||
if (this.program.options.sourceMap) {
|
||||
let debugLocations = this.debugLocations;
|
||||
if (debugLocations) {
|
||||
for (let i = 0, k = debugLocations.length; i < k; ++i) {
|
||||
let debugLocation = debugLocations[i];
|
||||
module.setDebugLocation(
|
||||
ref,
|
||||
debugLocation.debugInfoRef,
|
||||
debugLocation.source.debugInfoIndex,
|
||||
debugLocation.line,
|
||||
debugLocation.column
|
||||
);
|
||||
}
|
||||
for (let i = 0, k = debugLocations.length; i < k; ++i) {
|
||||
let debugLocation = debugLocations[i];
|
||||
module.setDebugLocation(
|
||||
ref,
|
||||
debugLocation.debugInfoRef,
|
||||
debugLocation.source.debugInfoIndex,
|
||||
debugLocation.line,
|
||||
debugLocation.column
|
||||
);
|
||||
}
|
||||
}
|
||||
this.debugLocations = null;
|
||||
}
|
||||
|
||||
/** Returns the TypeScript representation of this function. */
|
||||
@ -3633,6 +3627,8 @@ export class Flow {
|
||||
|
||||
/** Tests if this flow has the specified flag or flags. */
|
||||
is(flag: FlowFlags): bool { return (this.flags & flag) == flag; }
|
||||
/** Tests if this flow has one of the specified flags. */
|
||||
isAny(flag: CommonFlags): bool { return (this.flags & flag) != 0; }
|
||||
/** Sets the specified flag or flags. */
|
||||
set(flag: FlowFlags): void { this.flags |= flag; }
|
||||
/** Unsets the specified flag or flags. */
|
||||
|
@ -3,12 +3,14 @@ export function bswap<T>(value: T): T {
|
||||
|
||||
if (sizeof<T>() == 2) {
|
||||
return bswap16<T>(value);
|
||||
} else if (sizeof<T>() == 4) {
|
||||
}
|
||||
if (sizeof<T>() == 4) {
|
||||
return <T>(
|
||||
rotl<u32>(<u32>value & 0xFF00FF00, 8) |
|
||||
rotr<u32>(<u32>value & 0x00FF00FF, 8)
|
||||
);
|
||||
} else if (sizeof<T>() == 8) {
|
||||
}
|
||||
if (sizeof<T>() == 8) {
|
||||
let a: u64 = (<u64>value >> 8) & 0x00FF00FF00FF00FF;
|
||||
let b: u64 = (<u64>value & 0x00FF00FF00FF00FF) << 8;
|
||||
let v: u64 = a | b;
|
||||
|
@ -60,7 +60,6 @@
|
||||
)
|
||||
)
|
||||
(block
|
||||
(nop)
|
||||
(set_local $0
|
||||
(i32.const 256)
|
||||
)
|
||||
@ -88,7 +87,6 @@
|
||||
)
|
||||
)
|
||||
(block
|
||||
(nop)
|
||||
(set_local $1
|
||||
(i32.const 256)
|
||||
)
|
||||
@ -143,7 +141,6 @@
|
||||
)
|
||||
)
|
||||
(block
|
||||
(nop)
|
||||
(set_local $2
|
||||
(i32.const 256)
|
||||
)
|
||||
@ -213,7 +210,6 @@
|
||||
)
|
||||
)
|
||||
(block
|
||||
(nop)
|
||||
(set_local $3
|
||||
(i32.ctz
|
||||
(i32.const 2)
|
||||
@ -258,7 +254,6 @@
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(nop)
|
||||
(set_local $4
|
||||
(i32.ctz
|
||||
(i32.const 2)
|
||||
|
@ -21,7 +21,6 @@
|
||||
(start $start)
|
||||
(func $~lib/math/NativeMath.scalbn (; 0 ;) (type $FiF) (param $0 f64) (param $1 i32) (result f64)
|
||||
(local $2 f64)
|
||||
(nop)
|
||||
(set_local $2
|
||||
(get_local $0)
|
||||
)
|
||||
@ -180,7 +179,6 @@
|
||||
(local $38 f64)
|
||||
(local $39 f64)
|
||||
(local $40 i32)
|
||||
(nop)
|
||||
(set_local $2
|
||||
(i64.reinterpret/f64
|
||||
(get_local $0)
|
||||
@ -652,8 +650,6 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(nop)
|
||||
(nop)
|
||||
(if
|
||||
(i32.gt_s
|
||||
(get_local $8)
|
||||
@ -840,7 +836,6 @@
|
||||
)
|
||||
)
|
||||
(block
|
||||
(nop)
|
||||
(set_local $27
|
||||
(i32.const 0)
|
||||
)
|
||||
@ -1829,7 +1824,6 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(nop)
|
||||
(if
|
||||
(i32.eqz
|
||||
(get_local $4)
|
||||
@ -2142,7 +2136,6 @@
|
||||
)
|
||||
(func $~lib/math/NativeMathf.scalbn (; 4 ;) (type $fif) (param $0 f32) (param $1 i32) (result f32)
|
||||
(local $2 f32)
|
||||
(nop)
|
||||
(set_local $2
|
||||
(get_local $0)
|
||||
)
|
||||
@ -2295,7 +2288,6 @@
|
||||
(local $34 f32)
|
||||
(local $35 f32)
|
||||
(local $36 i32)
|
||||
(nop)
|
||||
(set_local $2
|
||||
(i32.reinterpret/f32
|
||||
(get_local $0)
|
||||
@ -2509,7 +2501,6 @@
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(nop)
|
||||
(if
|
||||
(if (result i32)
|
||||
(tee_local $6
|
||||
@ -2633,8 +2624,6 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(nop)
|
||||
(nop)
|
||||
(if
|
||||
(i32.gt_s
|
||||
(get_local $5)
|
||||
@ -2772,7 +2761,6 @@
|
||||
)
|
||||
)
|
||||
(block
|
||||
(nop)
|
||||
(set_local $23
|
||||
(i32.const 0)
|
||||
)
|
||||
@ -3710,7 +3698,6 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(nop)
|
||||
(if
|
||||
(i32.eqz
|
||||
(get_local $4)
|
||||
|
@ -64,6 +64,7 @@
|
||||
)
|
||||
)
|
||||
(func $builtins/test (; 5 ;) (type $v)
|
||||
(nop)
|
||||
)
|
||||
(func $start (; 6 ;) (type $v)
|
||||
(local $0 i32)
|
||||
|
@ -6,7 +6,6 @@
|
||||
(export "memory" (memory $0))
|
||||
(func $class-with-boolean-field/test (; 0 ;) (type $i) (result i32)
|
||||
(local $0 i32)
|
||||
(nop)
|
||||
(i32.store8
|
||||
(get_local $0)
|
||||
(i32.const 1)
|
||||
|
@ -1,5 +1,6 @@
|
||||
(module
|
||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(type $i (func (result i32)))
|
||||
(type $v (func))
|
||||
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
|
||||
(global $comma/a (mut i32) (i32.const 0))
|
||||
|
@ -39,5 +39,6 @@
|
||||
)
|
||||
)
|
||||
(func $export/ns.two (; 3 ;) (type $v)
|
||||
(nop)
|
||||
)
|
||||
)
|
||||
|
@ -216,30 +216,28 @@
|
||||
)
|
||||
(func $exports/Car#constructor (; 7 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
(block
|
||||
(i32.store
|
||||
(tee_local $0
|
||||
(if (result i32)
|
||||
(get_local $0)
|
||||
(get_local $0)
|
||||
(tee_local $0
|
||||
(block (result i32)
|
||||
(set_local $2
|
||||
(call $~lib/allocator/arena/allocate_memory
|
||||
(i32.const 4)
|
||||
)
|
||||
(i32.store
|
||||
(tee_local $0
|
||||
(if (result i32)
|
||||
(get_local $0)
|
||||
(get_local $0)
|
||||
(tee_local $0
|
||||
(block (result i32)
|
||||
(set_local $2
|
||||
(call $~lib/allocator/arena/allocate_memory
|
||||
(i32.const 4)
|
||||
)
|
||||
(i32.store
|
||||
(get_local $2)
|
||||
(get_local $1)
|
||||
)
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.store
|
||||
(get_local $2)
|
||||
(get_local $1)
|
||||
)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
@ -287,6 +285,7 @@
|
||||
)
|
||||
)
|
||||
(func $exports/Car#openDoors (; 13 ;) (type $iv) (param $0 i32)
|
||||
(nop)
|
||||
)
|
||||
(func $exports/vehicles.Car.getNumTires (; 14 ;) (type $i) (result i32)
|
||||
(return
|
||||
@ -295,30 +294,28 @@
|
||||
)
|
||||
(func $exports/vehicles.Car#constructor (; 15 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
(block
|
||||
(i32.store
|
||||
(tee_local $0
|
||||
(if (result i32)
|
||||
(get_local $0)
|
||||
(get_local $0)
|
||||
(tee_local $0
|
||||
(block (result i32)
|
||||
(set_local $2
|
||||
(call $~lib/allocator/arena/allocate_memory
|
||||
(i32.const 4)
|
||||
)
|
||||
(i32.store
|
||||
(tee_local $0
|
||||
(if (result i32)
|
||||
(get_local $0)
|
||||
(get_local $0)
|
||||
(tee_local $0
|
||||
(block (result i32)
|
||||
(set_local $2
|
||||
(call $~lib/allocator/arena/allocate_memory
|
||||
(i32.const 4)
|
||||
)
|
||||
(i32.store
|
||||
(get_local $2)
|
||||
(get_local $1)
|
||||
)
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.store
|
||||
(get_local $2)
|
||||
(get_local $1)
|
||||
)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
@ -366,6 +363,7 @@
|
||||
)
|
||||
)
|
||||
(func $exports/vehicles.Car#openDoors (; 21 ;) (type $iv) (param $0 i32)
|
||||
(nop)
|
||||
)
|
||||
(func $start (; 22 ;) (type $v)
|
||||
(set_global $~lib/allocator/arena/startOffset
|
||||
|
@ -1,6 +1,6 @@
|
||||
(module
|
||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(type $i (func (result i32)))
|
||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(type $v (func))
|
||||
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
|
||||
(global $for/i (mut i32) (i32.const 0))
|
||||
@ -22,9 +22,7 @@
|
||||
(i32.const 10)
|
||||
)
|
||||
(block
|
||||
(block
|
||||
(nop)
|
||||
)
|
||||
(nop)
|
||||
(set_global $for/i
|
||||
(i32.add
|
||||
(get_global $for/i)
|
||||
@ -64,9 +62,7 @@
|
||||
(i32.const 10)
|
||||
)
|
||||
(block
|
||||
(block
|
||||
(nop)
|
||||
)
|
||||
(nop)
|
||||
(set_local $0
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
|
@ -28,6 +28,7 @@
|
||||
)
|
||||
)
|
||||
(func $start~someName|2 (; 3 ;) (type $v)
|
||||
(nop)
|
||||
)
|
||||
(func $start~anonymous|3 (; 4 ;) (type $i) (result i32)
|
||||
(i32.const 1)
|
||||
|
@ -19,6 +19,7 @@
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $function/v (; 0 ;) (type $v)
|
||||
(nop)
|
||||
)
|
||||
(func $function/i (; 1 ;) (type $i) (result i32)
|
||||
(return
|
||||
@ -41,6 +42,7 @@
|
||||
)
|
||||
)
|
||||
(func $function/iv (; 5 ;) (type $iv) (param $0 i32)
|
||||
(nop)
|
||||
)
|
||||
(func $function/ii (; 6 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(return
|
||||
@ -63,6 +65,7 @@
|
||||
)
|
||||
)
|
||||
(func $function/iiv (; 10 ;) (type $iiv) (param $0 i32) (param $1 i32)
|
||||
(nop)
|
||||
)
|
||||
(func $function/iii (; 11 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(return
|
||||
|
@ -38,17 +38,11 @@
|
||||
(func $if/ifThenElseBlock (; 3 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(if
|
||||
(get_local $0)
|
||||
(block
|
||||
(nop)
|
||||
(return
|
||||
(i32.const 1)
|
||||
)
|
||||
(return
|
||||
(i32.const 1)
|
||||
)
|
||||
(block
|
||||
(nop)
|
||||
(return
|
||||
(i32.const 0)
|
||||
)
|
||||
(return
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -33,6 +33,7 @@
|
||||
)
|
||||
)
|
||||
(func $export/ns.two (; 3 ;) (type $v)
|
||||
(nop)
|
||||
)
|
||||
(func $start (; 4 ;) (type $v)
|
||||
(drop
|
||||
|
@ -114,9 +114,7 @@
|
||||
(get_local $1)
|
||||
)
|
||||
(block
|
||||
(block
|
||||
(nop)
|
||||
)
|
||||
(nop)
|
||||
(set_local $0
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
|
@ -16,7 +16,6 @@
|
||||
(export "table" (table $0))
|
||||
(start $start)
|
||||
(func $inlining/test (; 1 ;) (type $i) (result i32)
|
||||
(nop)
|
||||
(return
|
||||
(i32.add
|
||||
(i32.const 1)
|
||||
|
@ -24,7 +24,6 @@
|
||||
(local $11 f64)
|
||||
(local $12 f64)
|
||||
(local $13 i32)
|
||||
(nop)
|
||||
(set_local $1
|
||||
(i64.reinterpret/f64
|
||||
(get_local $0)
|
||||
|
@ -20,7 +20,6 @@
|
||||
(set_local $3
|
||||
(get_local $0)
|
||||
)
|
||||
(nop)
|
||||
(block $break|0
|
||||
(loop $continue|0
|
||||
(if
|
||||
|
@ -285,22 +285,20 @@
|
||||
(if
|
||||
(get_local $2)
|
||||
(block
|
||||
(block
|
||||
(i32.store8
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(tee_local $2
|
||||
(i32.sub
|
||||
(get_local $2)
|
||||
(i32.const 1)
|
||||
)
|
||||
(i32.store8
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(tee_local $2
|
||||
(i32.sub
|
||||
(get_local $2)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(i32.load8_u
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(i32.load8_u
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -21,7 +21,6 @@
|
||||
(set_local $0
|
||||
(i32.const 127)
|
||||
)
|
||||
(nop)
|
||||
(set_local $0
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
@ -305,7 +304,6 @@
|
||||
(set_local $2
|
||||
(i32.const 32767)
|
||||
)
|
||||
(nop)
|
||||
(set_local $2
|
||||
(i32.add
|
||||
(get_local $2)
|
||||
@ -589,7 +587,6 @@
|
||||
(set_local $4
|
||||
(i32.const 0)
|
||||
)
|
||||
(nop)
|
||||
(set_local $4
|
||||
(i32.sub
|
||||
(get_local $4)
|
||||
@ -846,7 +843,6 @@
|
||||
(set_local $6
|
||||
(i32.const 0)
|
||||
)
|
||||
(nop)
|
||||
(set_local $6
|
||||
(i32.sub
|
||||
(get_local $6)
|
||||
|
@ -43,6 +43,7 @@
|
||||
)
|
||||
)
|
||||
(func $export/ns.two (; 3 ;) (type $v)
|
||||
(nop)
|
||||
)
|
||||
(func $start (; 4 ;) (type $v)
|
||||
(drop
|
||||
|
@ -1,6 +1,7 @@
|
||||
(module
|
||||
(type $iiv (func (param i32 i32)))
|
||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(type $i (func (result i32)))
|
||||
(type $v (func))
|
||||
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
|
||||
(global $retain-i32/si (mut i32) (i32.const 0))
|
||||
|
@ -1,4 +1,5 @@
|
||||
(module
|
||||
(type $i (func (result i32)))
|
||||
(type $iv (func (param i32)))
|
||||
(type $v (func))
|
||||
(global $scoped/aGlobal (mut i32) (i32.const 1))
|
||||
@ -11,16 +12,11 @@
|
||||
(func $scoped/fn (; 0 ;) (type $iv) (param $0 i32)
|
||||
(local $1 i32)
|
||||
(local $2 i32)
|
||||
(block
|
||||
(set_local $1
|
||||
(i32.const 0)
|
||||
)
|
||||
(set_local $1
|
||||
(i32.const 0)
|
||||
)
|
||||
(block
|
||||
(nop)
|
||||
(set_local $2
|
||||
(get_local $0)
|
||||
)
|
||||
(set_local $2
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $start (; 1 ;) (type $v)
|
||||
@ -80,10 +76,8 @@
|
||||
(set_local $2
|
||||
(i64.const 5)
|
||||
)
|
||||
(block
|
||||
(set_local $3
|
||||
(f32.const 10)
|
||||
)
|
||||
(set_local $3
|
||||
(f32.const 10)
|
||||
)
|
||||
)
|
||||
(call $scoped/fn
|
||||
|
@ -77,7 +77,6 @@
|
||||
(start $start)
|
||||
(func $~lib/math/NativeMath.scalbn (; 1 ;) (type $FiF) (param $0 f64) (param $1 i32) (result f64)
|
||||
(local $2 f64)
|
||||
(nop)
|
||||
(set_local $2
|
||||
(get_local $0)
|
||||
)
|
||||
@ -236,7 +235,6 @@
|
||||
(local $38 f64)
|
||||
(local $39 f64)
|
||||
(local $40 i32)
|
||||
(nop)
|
||||
(set_local $2
|
||||
(i64.reinterpret/f64
|
||||
(get_local $0)
|
||||
@ -708,8 +706,6 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(nop)
|
||||
(nop)
|
||||
(if
|
||||
(i32.gt_s
|
||||
(get_local $8)
|
||||
@ -896,7 +892,6 @@
|
||||
)
|
||||
)
|
||||
(block
|
||||
(nop)
|
||||
(set_local $27
|
||||
(i32.const 0)
|
||||
)
|
||||
@ -1885,7 +1880,6 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(nop)
|
||||
(if
|
||||
(i32.eqz
|
||||
(get_local $4)
|
||||
@ -2198,7 +2192,6 @@
|
||||
)
|
||||
(func $~lib/math/NativeMathf.scalbn (; 5 ;) (type $fif) (param $0 f32) (param $1 i32) (result f32)
|
||||
(local $2 f32)
|
||||
(nop)
|
||||
(set_local $2
|
||||
(get_local $0)
|
||||
)
|
||||
@ -2351,7 +2344,6 @@
|
||||
(local $34 f32)
|
||||
(local $35 f32)
|
||||
(local $36 i32)
|
||||
(nop)
|
||||
(set_local $2
|
||||
(i32.reinterpret/f32
|
||||
(get_local $0)
|
||||
@ -2565,7 +2557,6 @@
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(nop)
|
||||
(if
|
||||
(if (result i32)
|
||||
(tee_local $6
|
||||
@ -2689,8 +2680,6 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(nop)
|
||||
(nop)
|
||||
(if
|
||||
(i32.gt_s
|
||||
(get_local $5)
|
||||
@ -2828,7 +2817,6 @@
|
||||
)
|
||||
)
|
||||
(block
|
||||
(nop)
|
||||
(set_local $23
|
||||
(i32.const 0)
|
||||
)
|
||||
@ -3766,7 +3754,6 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(nop)
|
||||
(if
|
||||
(i32.eqz
|
||||
(get_local $4)
|
||||
@ -4142,6 +4129,7 @@
|
||||
)
|
||||
)
|
||||
(func $showcase/anExportedFunction (; 15 ;) (type $v)
|
||||
(nop)
|
||||
)
|
||||
(func $memcpy/memcpy (; 16 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(local $3 i32)
|
||||
@ -4151,7 +4139,6 @@
|
||||
(set_local $3
|
||||
(get_local $0)
|
||||
)
|
||||
(nop)
|
||||
(block $break|0
|
||||
(loop $continue|0
|
||||
(if
|
||||
|
@ -488,7 +488,6 @@
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
(local $5 i32)
|
||||
(nop)
|
||||
(block $break|0
|
||||
(loop $continue|0
|
||||
(if
|
||||
@ -2580,22 +2579,20 @@
|
||||
(if
|
||||
(get_local $2)
|
||||
(block
|
||||
(block
|
||||
(i32.store8
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(tee_local $2
|
||||
(i32.sub
|
||||
(get_local $2)
|
||||
(i32.const 1)
|
||||
)
|
||||
(i32.store8
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(tee_local $2
|
||||
(i32.sub
|
||||
(get_local $2)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(i32.load8_u
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(i32.load8_u
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -2674,6 +2671,7 @@
|
||||
)
|
||||
)
|
||||
(func $~lib/allocator/arena/free_memory (; 6 ;) (type $iv) (param $0 i32)
|
||||
(nop)
|
||||
)
|
||||
(func $~lib/allocator/arena/reset_memory (; 7 ;) (type $v)
|
||||
(set_global $~lib/allocator/arena/offset
|
||||
|
@ -588,7 +588,6 @@
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
(block
|
||||
(nop)
|
||||
(if
|
||||
(i32.gt_u
|
||||
(get_local $1)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -578,7 +578,6 @@
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
(local $5 i32)
|
||||
(nop)
|
||||
(block $break|0
|
||||
(loop $continue|0
|
||||
(if
|
||||
@ -2670,22 +2669,20 @@
|
||||
(if
|
||||
(get_local $2)
|
||||
(block
|
||||
(block
|
||||
(i32.store8
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(tee_local $2
|
||||
(i32.sub
|
||||
(get_local $2)
|
||||
(i32.const 1)
|
||||
)
|
||||
(i32.store8
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(tee_local $2
|
||||
(i32.sub
|
||||
(get_local $2)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(i32.load8_u
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(i32.load8_u
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -135,8 +135,7 @@
|
||||
)
|
||||
(func $std/constructor/EmptyCtor#constructor (; 1 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
(block
|
||||
)
|
||||
(nop)
|
||||
(tee_local $0
|
||||
(if (result i32)
|
||||
(get_local $0)
|
||||
@ -156,8 +155,7 @@
|
||||
)
|
||||
(func $std/constructor/EmptyCtorWithFieldInit#constructor (; 2 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
(block
|
||||
)
|
||||
(nop)
|
||||
(tee_local $0
|
||||
(if (result i32)
|
||||
(get_local $0)
|
||||
@ -181,8 +179,7 @@
|
||||
)
|
||||
(func $std/constructor/EmptyCtorWithFieldNoInit#constructor (; 3 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
(block
|
||||
)
|
||||
(nop)
|
||||
(tee_local $0
|
||||
(if (result i32)
|
||||
(get_local $0)
|
||||
@ -213,13 +210,11 @@
|
||||
)
|
||||
(func $std/constructor/CtorConditionallyReturns#constructor (; 5 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
(block
|
||||
(if
|
||||
(get_global $std/constructor/b)
|
||||
(return
|
||||
(call $~lib/allocator/arena/allocate_memory
|
||||
(i32.const 0)
|
||||
)
|
||||
(if
|
||||
(get_global $std/constructor/b)
|
||||
(return
|
||||
(call $~lib/allocator/arena/allocate_memory
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -242,7 +237,30 @@
|
||||
)
|
||||
(func $std/constructor/CtorAllocates#constructor (; 6 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
(block
|
||||
(drop
|
||||
(tee_local $0
|
||||
(if (result i32)
|
||||
(get_local $0)
|
||||
(get_local $0)
|
||||
(tee_local $0
|
||||
(block (result i32)
|
||||
(set_local $1
|
||||
(call $~lib/allocator/arena/allocate_memory
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
(func $std/constructor/CtorConditionallyAllocates#constructor (; 7 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
(if
|
||||
(get_global $std/constructor/b)
|
||||
(drop
|
||||
(tee_local $0
|
||||
(if (result i32)
|
||||
@ -262,33 +280,6 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
(func $std/constructor/CtorConditionallyAllocates#constructor (; 7 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
(block
|
||||
(if
|
||||
(get_global $std/constructor/b)
|
||||
(drop
|
||||
(tee_local $0
|
||||
(if (result i32)
|
||||
(get_local $0)
|
||||
(get_local $0)
|
||||
(tee_local $0
|
||||
(block (result i32)
|
||||
(set_local $1
|
||||
(call $~lib/allocator/arena/allocate_memory
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(tee_local $0
|
||||
(if (result i32)
|
||||
(get_local $0)
|
||||
|
@ -76,7 +76,6 @@
|
||||
(func $~lib/math/R (; 1 ;) (type $FF) (param $0 f64) (result f64)
|
||||
(local $1 f64)
|
||||
(local $2 f64)
|
||||
(nop)
|
||||
(set_local $1
|
||||
(f64.mul
|
||||
(get_local $0)
|
||||
@ -156,7 +155,6 @@
|
||||
(local $6 f64)
|
||||
(local $7 f64)
|
||||
(local $8 f64)
|
||||
(nop)
|
||||
(set_local $1
|
||||
(i32.wrap/i64
|
||||
(i64.shr_u
|
||||
@ -273,7 +271,6 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(nop)
|
||||
(if
|
||||
(i32.shr_u
|
||||
(get_local $1)
|
||||
@ -402,7 +399,6 @@
|
||||
(local $13 f64)
|
||||
(local $14 f64)
|
||||
(local $15 f64)
|
||||
(nop)
|
||||
(set_local $1
|
||||
(i64.reinterpret/f64
|
||||
(get_local $0)
|
||||
@ -756,7 +752,6 @@
|
||||
(local $11 f64)
|
||||
(local $12 f64)
|
||||
(local $13 i32)
|
||||
(nop)
|
||||
(set_local $1
|
||||
(i64.reinterpret/f64
|
||||
(get_local $0)
|
||||
@ -1048,7 +1043,6 @@
|
||||
)
|
||||
(func $~lib/math/NativeMath.acosh (; 6 ;) (type $FF) (param $0 f64) (result f64)
|
||||
(local $1 i64)
|
||||
(nop)
|
||||
(set_local $1
|
||||
(i64.and
|
||||
(i64.shr_u
|
||||
@ -1160,7 +1154,6 @@
|
||||
(local $7 f64)
|
||||
(local $8 f64)
|
||||
(local $9 f64)
|
||||
(nop)
|
||||
(set_local $1
|
||||
(i32.wrap/i64
|
||||
(i64.shr_u
|
||||
@ -1398,7 +1391,6 @@
|
||||
(local $1 i64)
|
||||
(local $2 i64)
|
||||
(local $3 i64)
|
||||
(nop)
|
||||
(set_local $1
|
||||
(i64.reinterpret/f64
|
||||
(get_local $0)
|
||||
@ -1552,7 +1544,6 @@
|
||||
(local $6 f64)
|
||||
(local $7 f64)
|
||||
(local $8 i32)
|
||||
(nop)
|
||||
(set_local $1
|
||||
(i32.wrap/i64
|
||||
(i64.shr_u
|
||||
@ -1575,7 +1566,6 @@
|
||||
(i32.const 2147483647)
|
||||
)
|
||||
)
|
||||
(nop)
|
||||
(if
|
||||
(i32.ge_u
|
||||
(get_local $1)
|
||||
@ -1609,7 +1599,6 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(nop)
|
||||
(if
|
||||
(i32.lt_u
|
||||
(get_local $1)
|
||||
@ -2087,7 +2076,6 @@
|
||||
(local $7 i32)
|
||||
(local $8 i32)
|
||||
(local $9 f64)
|
||||
(nop)
|
||||
(if
|
||||
(if (result i32)
|
||||
(tee_local $2
|
||||
@ -2409,7 +2397,6 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(nop)
|
||||
(if
|
||||
(if (result i32)
|
||||
(tee_local $2
|
||||
@ -2567,7 +2554,6 @@
|
||||
(local $4 f64)
|
||||
(local $5 f64)
|
||||
(local $6 f64)
|
||||
(nop)
|
||||
(set_local $1
|
||||
(i64.reinterpret/f64
|
||||
(get_local $0)
|
||||
@ -2841,7 +2827,6 @@
|
||||
(local $13 f64)
|
||||
(local $14 f64)
|
||||
(local $15 i32)
|
||||
(nop)
|
||||
(set_local $1
|
||||
(i64.reinterpret/f64
|
||||
(get_local $0)
|
||||
@ -2919,7 +2904,6 @@
|
||||
(i32.const 1071001154)
|
||||
)
|
||||
(block
|
||||
(nop)
|
||||
(if
|
||||
(i32.lt_u
|
||||
(get_local $2)
|
||||
@ -3204,7 +3188,6 @@
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(nop)
|
||||
(if
|
||||
(if (result i32)
|
||||
(tee_local $15
|
||||
@ -3315,7 +3298,6 @@
|
||||
)
|
||||
(func $~lib/math/NativeMath.scalbn (; 26 ;) (type $FiF) (param $0 f64) (param $1 i32) (result f64)
|
||||
(local $2 f64)
|
||||
(nop)
|
||||
(set_local $2
|
||||
(get_local $0)
|
||||
)
|
||||
@ -3443,7 +3425,6 @@
|
||||
(local $6 f64)
|
||||
(local $7 f64)
|
||||
(local $8 f64)
|
||||
(nop)
|
||||
(set_local $1
|
||||
(i32.wrap/i64
|
||||
(i64.shr_u
|
||||
@ -3669,7 +3650,6 @@
|
||||
)
|
||||
(func $~lib/math/expo2 (; 28 ;) (type $FF) (param $0 f64) (result f64)
|
||||
(local $1 f64)
|
||||
(nop)
|
||||
(set_local $1
|
||||
(f64.reinterpret/i64
|
||||
(i64.shl
|
||||
@ -3732,7 +3712,6 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(nop)
|
||||
(if
|
||||
(i32.lt_u
|
||||
(get_local $2)
|
||||
@ -3871,7 +3850,6 @@
|
||||
(local $13 f64)
|
||||
(local $14 f64)
|
||||
(local $15 f64)
|
||||
(nop)
|
||||
(set_local $2
|
||||
(i64.reinterpret/f64
|
||||
(get_local $0)
|
||||
@ -4210,7 +4188,6 @@
|
||||
(local $16 f64)
|
||||
(local $17 f64)
|
||||
(local $18 f64)
|
||||
(nop)
|
||||
(set_local $1
|
||||
(i64.reinterpret/f64
|
||||
(get_local $0)
|
||||
@ -4603,7 +4580,6 @@
|
||||
(local $15 f64)
|
||||
(local $16 f64)
|
||||
(local $17 f64)
|
||||
(nop)
|
||||
(set_local $1
|
||||
(i64.reinterpret/f64
|
||||
(get_local $0)
|
||||
@ -5023,7 +4999,6 @@
|
||||
(local $38 f64)
|
||||
(local $39 f64)
|
||||
(local $40 i32)
|
||||
(nop)
|
||||
(set_local $2
|
||||
(i64.reinterpret/f64
|
||||
(get_local $0)
|
||||
@ -5495,8 +5470,6 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(nop)
|
||||
(nop)
|
||||
(if
|
||||
(i32.gt_s
|
||||
(get_local $8)
|
||||
@ -5683,7 +5656,6 @@
|
||||
)
|
||||
)
|
||||
(block
|
||||
(nop)
|
||||
(set_local $27
|
||||
(i32.const 0)
|
||||
)
|
||||
@ -6561,7 +6533,6 @@
|
||||
(local $1 i64)
|
||||
(local $2 i32)
|
||||
(local $3 f64)
|
||||
(nop)
|
||||
(set_local $1
|
||||
(i64.reinterpret/f64
|
||||
(get_local $0)
|
||||
@ -6605,7 +6576,6 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(nop)
|
||||
(if
|
||||
(i64.ne
|
||||
(i64.shr_u
|
||||
@ -6807,7 +6777,6 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(nop)
|
||||
(if
|
||||
(i32.lt_u
|
||||
(get_local $4)
|
||||
@ -6963,7 +6932,6 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(nop)
|
||||
(if
|
||||
(i32.gt_u
|
||||
(get_local $3)
|
||||
|
@ -12510,138 +12510,136 @@
|
||||
)
|
||||
)
|
||||
(block $break|2
|
||||
(loop $continue|2
|
||||
(if
|
||||
(i32.lt_s
|
||||
(get_local $2)
|
||||
(get_local $6)
|
||||
)
|
||||
(block
|
||||
(br_if $break|2
|
||||
(i32.eq
|
||||
(i32.add
|
||||
(get_local $2)
|
||||
(i32.const 1)
|
||||
)
|
||||
(get_local $6)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(loop $continue|3
|
||||
(if
|
||||
(i32.lt_s
|
||||
(i32.gt_s
|
||||
(get_local $2)
|
||||
(get_local $6)
|
||||
)
|
||||
(block
|
||||
(br_if $break|2
|
||||
(i32.eq
|
||||
(i32.add
|
||||
(get_local $2)
|
||||
(i32.const 1)
|
||||
(if
|
||||
(i64.eq
|
||||
(i64.shr_u
|
||||
(tee_local $5
|
||||
(i64.sub
|
||||
(get_local $3)
|
||||
(get_local $7)
|
||||
)
|
||||
)
|
||||
(i64.const 63)
|
||||
)
|
||||
(i64.const 0)
|
||||
)
|
||||
(block
|
||||
(set_local $3
|
||||
(get_local $5)
|
||||
)
|
||||
(set_local $8
|
||||
(i32.add
|
||||
(get_local $8)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(get_local $6)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(get_local $0)
|
||||
(set_local $3
|
||||
(i64.shl
|
||||
(get_local $3)
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
(set_local $8
|
||||
(i32.shl
|
||||
(get_local $8)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(set_local $2
|
||||
(i32.sub
|
||||
(get_local $2)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(br $continue|3)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i64.eq
|
||||
(i64.shr_u
|
||||
(tee_local $5
|
||||
(i64.sub
|
||||
(get_local $3)
|
||||
(get_local $7)
|
||||
)
|
||||
)
|
||||
(i64.const 63)
|
||||
)
|
||||
(i64.const 0)
|
||||
)
|
||||
(block
|
||||
(set_local $3
|
||||
(get_local $5)
|
||||
)
|
||||
(set_local $8
|
||||
(i32.add
|
||||
(get_local $8)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(loop $continue|3
|
||||
)
|
||||
(if
|
||||
(i64.eq
|
||||
(get_local $3)
|
||||
(i64.const 0)
|
||||
)
|
||||
(set_local $2
|
||||
(i32.const -60)
|
||||
)
|
||||
(loop $continue|4
|
||||
(if
|
||||
(i32.gt_s
|
||||
(get_local $2)
|
||||
(get_local $6)
|
||||
(i64.eq
|
||||
(i64.shr_u
|
||||
(get_local $3)
|
||||
(i64.const 52)
|
||||
)
|
||||
(i64.const 0)
|
||||
)
|
||||
(block
|
||||
(if
|
||||
(i64.eq
|
||||
(i64.shr_u
|
||||
(tee_local $5
|
||||
(i64.sub
|
||||
(get_local $3)
|
||||
(get_local $7)
|
||||
)
|
||||
)
|
||||
(i64.const 63)
|
||||
)
|
||||
(i64.const 0)
|
||||
)
|
||||
(block
|
||||
(set_local $3
|
||||
(get_local $5)
|
||||
)
|
||||
(set_local $8
|
||||
(i32.add
|
||||
(get_local $8)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set_local $3
|
||||
(i64.shl
|
||||
(get_local $3)
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
(set_local $8
|
||||
(i32.shl
|
||||
(get_local $8)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(set_local $2
|
||||
(i32.sub
|
||||
(get_local $2)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(br $continue|3)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i64.eq
|
||||
(i64.shr_u
|
||||
(tee_local $5
|
||||
(i64.sub
|
||||
(get_local $3)
|
||||
(get_local $7)
|
||||
)
|
||||
)
|
||||
(i64.const 63)
|
||||
)
|
||||
(i64.const 0)
|
||||
)
|
||||
(block
|
||||
(set_local $3
|
||||
(get_local $5)
|
||||
)
|
||||
(set_local $8
|
||||
(i32.add
|
||||
(get_local $8)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i64.eq
|
||||
(get_local $3)
|
||||
(i64.const 0)
|
||||
)
|
||||
(set_local $2
|
||||
(i32.const -60)
|
||||
)
|
||||
(loop $continue|4
|
||||
(if
|
||||
(i64.eq
|
||||
(i64.shr_u
|
||||
(get_local $3)
|
||||
(i64.const 52)
|
||||
)
|
||||
(i64.const 0)
|
||||
)
|
||||
(block
|
||||
(set_local $3
|
||||
(i64.shl
|
||||
(get_local $3)
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
(set_local $2
|
||||
(i32.sub
|
||||
(get_local $2)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(br $continue|4)
|
||||
)
|
||||
(br $continue|4)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -12970,134 +12968,132 @@
|
||||
(i32.const 0)
|
||||
)
|
||||
(block $break|2
|
||||
(loop $continue|2
|
||||
(if
|
||||
(i32.lt_s
|
||||
(get_local $3)
|
||||
(get_local $6)
|
||||
)
|
||||
(block
|
||||
(br_if $break|2
|
||||
(i32.eq
|
||||
(i32.add
|
||||
(get_local $3)
|
||||
(i32.const 1)
|
||||
)
|
||||
(get_local $6)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(loop $continue|3
|
||||
(if
|
||||
(i32.lt_s
|
||||
(i32.gt_s
|
||||
(get_local $3)
|
||||
(get_local $6)
|
||||
)
|
||||
(block
|
||||
(br_if $break|2
|
||||
(i32.eq
|
||||
(i32.add
|
||||
(get_local $3)
|
||||
(i32.const 1)
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.shr_u
|
||||
(tee_local $2
|
||||
(i32.sub
|
||||
(get_local $4)
|
||||
(get_local $7)
|
||||
)
|
||||
)
|
||||
(i32.const 31)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(set_local $4
|
||||
(get_local $2)
|
||||
)
|
||||
(set_local $5
|
||||
(i32.add
|
||||
(get_local $5)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(get_local $6)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(get_local $0)
|
||||
(set_local $4
|
||||
(i32.shl
|
||||
(get_local $4)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(set_local $5
|
||||
(i32.shl
|
||||
(get_local $5)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(set_local $3
|
||||
(i32.sub
|
||||
(get_local $3)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(br $continue|3)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.shr_u
|
||||
(tee_local $2
|
||||
(i32.sub
|
||||
(get_local $4)
|
||||
(get_local $7)
|
||||
)
|
||||
)
|
||||
(i32.const 31)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(set_local $4
|
||||
(get_local $2)
|
||||
)
|
||||
(set_local $5
|
||||
(i32.add
|
||||
(get_local $5)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(loop $continue|3
|
||||
)
|
||||
(if
|
||||
(get_local $4)
|
||||
(loop $continue|4
|
||||
(if
|
||||
(i32.gt_s
|
||||
(get_local $3)
|
||||
(get_local $6)
|
||||
(i32.eqz
|
||||
(i32.shr_u
|
||||
(get_local $4)
|
||||
(i32.const 23)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.shr_u
|
||||
(tee_local $2
|
||||
(i32.sub
|
||||
(get_local $4)
|
||||
(get_local $7)
|
||||
)
|
||||
)
|
||||
(i32.const 31)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(set_local $4
|
||||
(get_local $2)
|
||||
)
|
||||
(set_local $5
|
||||
(i32.add
|
||||
(get_local $5)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set_local $4
|
||||
(i32.shl
|
||||
(get_local $4)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(set_local $5
|
||||
(i32.shl
|
||||
(get_local $5)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(set_local $3
|
||||
(i32.sub
|
||||
(get_local $3)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(br $continue|3)
|
||||
(br $continue|4)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.shr_u
|
||||
(tee_local $2
|
||||
(i32.sub
|
||||
(get_local $4)
|
||||
(get_local $7)
|
||||
)
|
||||
)
|
||||
(i32.const 31)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(set_local $4
|
||||
(get_local $2)
|
||||
)
|
||||
(set_local $5
|
||||
(i32.add
|
||||
(get_local $5)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(get_local $4)
|
||||
(loop $continue|4
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.shr_u
|
||||
(get_local $4)
|
||||
(i32.const 23)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(set_local $4
|
||||
(i32.shl
|
||||
(get_local $4)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(set_local $3
|
||||
(i32.sub
|
||||
(get_local $3)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(br $continue|4)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set_local $3
|
||||
(i32.const -30)
|
||||
)
|
||||
(set_local $3
|
||||
(i32.const -30)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -150,7 +150,6 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(nop)
|
||||
(if
|
||||
(i32.eqz
|
||||
(get_local $4)
|
||||
@ -667,7 +666,6 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(nop)
|
||||
(if
|
||||
(i32.eqz
|
||||
(get_local $4)
|
||||
|
@ -184,8 +184,7 @@
|
||||
)
|
||||
(func $std/operator-overloading/Tester#constructor (; 2 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(local $3 i32)
|
||||
(block
|
||||
)
|
||||
(nop)
|
||||
(tee_local $0
|
||||
(if (result i32)
|
||||
(get_local $0)
|
||||
@ -328,7 +327,6 @@
|
||||
)
|
||||
(func $~lib/math/NativeMath.scalbn (; 8 ;) (type $FiF) (param $0 f64) (param $1 i32) (result f64)
|
||||
(local $2 f64)
|
||||
(nop)
|
||||
(set_local $2
|
||||
(get_local $0)
|
||||
)
|
||||
@ -487,7 +485,6 @@
|
||||
(local $38 f64)
|
||||
(local $39 f64)
|
||||
(local $40 i32)
|
||||
(nop)
|
||||
(set_local $2
|
||||
(i64.reinterpret/f64
|
||||
(get_local $0)
|
||||
@ -959,8 +956,6 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(nop)
|
||||
(nop)
|
||||
(if
|
||||
(i32.gt_s
|
||||
(get_local $8)
|
||||
@ -1147,7 +1142,6 @@
|
||||
)
|
||||
)
|
||||
(block
|
||||
(nop)
|
||||
(set_local $27
|
||||
(i32.const 0)
|
||||
)
|
||||
@ -2275,8 +2269,7 @@
|
||||
)
|
||||
(func $std/operator-overloading/TesterInlineStatic#constructor (; 20 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(local $3 i32)
|
||||
(block
|
||||
)
|
||||
(nop)
|
||||
(tee_local $0
|
||||
(if (result i32)
|
||||
(get_local $0)
|
||||
@ -2304,8 +2297,7 @@
|
||||
)
|
||||
(func $std/operator-overloading/TesterInlineInstance#constructor (; 21 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(local $3 i32)
|
||||
(block
|
||||
)
|
||||
(nop)
|
||||
(tee_local $0
|
||||
(if (result i32)
|
||||
(get_local $0)
|
||||
|
@ -25,7 +25,7 @@
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 4)
|
||||
(i32.const 25)
|
||||
(i32.const 27)
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
@ -114,7 +114,7 @@
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 4)
|
||||
(i32.const 25)
|
||||
(i32.const 27)
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
@ -292,7 +292,7 @@
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 4)
|
||||
(i32.const 25)
|
||||
(i32.const 27)
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
@ -333,7 +333,7 @@
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 4)
|
||||
(i32.const 25)
|
||||
(i32.const 27)
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
|
@ -42,7 +42,7 @@
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 4)
|
||||
(i32.const 25)
|
||||
(i32.const 27)
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
@ -142,15 +142,10 @@
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(return
|
||||
(call $~lib/polyfills/bswap16<u16>
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(get_local $0)
|
||||
(call $~lib/polyfills/bswap16<u16>
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $~lib/polyfills/bswap16<i16> (; 3 ;) (type $ii) (param $0 i32) (result i32)
|
||||
@ -184,7 +179,7 @@
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 4)
|
||||
(i32.const 25)
|
||||
(i32.const 27)
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
@ -287,15 +282,10 @@
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(return
|
||||
(call $~lib/polyfills/bswap16<i16>
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(get_local $0)
|
||||
(call $~lib/polyfills/bswap16<i16>
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $~lib/polyfills/bswap<u32> (; 5 ;) (type $ii) (param $0 i32) (result i32)
|
||||
@ -344,29 +334,24 @@
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(return
|
||||
(i32.or
|
||||
(i32.rotl
|
||||
(i32.and
|
||||
(get_local $0)
|
||||
(i32.const -16711936)
|
||||
)
|
||||
(i32.const 8)
|
||||
(return
|
||||
(i32.or
|
||||
(i32.rotl
|
||||
(i32.and
|
||||
(get_local $0)
|
||||
(i32.const -16711936)
|
||||
)
|
||||
(i32.rotr
|
||||
(i32.and
|
||||
(get_local $0)
|
||||
(i32.const 16711935)
|
||||
)
|
||||
(i32.const 8)
|
||||
(i32.const 8)
|
||||
)
|
||||
(i32.rotr
|
||||
(i32.and
|
||||
(get_local $0)
|
||||
(i32.const 16711935)
|
||||
)
|
||||
(i32.const 8)
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $~lib/polyfills/bswap<i32> (; 6 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
@ -414,29 +399,24 @@
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(return
|
||||
(i32.or
|
||||
(i32.rotl
|
||||
(i32.and
|
||||
(get_local $0)
|
||||
(i32.const -16711936)
|
||||
)
|
||||
(i32.const 8)
|
||||
(return
|
||||
(i32.or
|
||||
(i32.rotl
|
||||
(i32.and
|
||||
(get_local $0)
|
||||
(i32.const -16711936)
|
||||
)
|
||||
(i32.rotr
|
||||
(i32.and
|
||||
(get_local $0)
|
||||
(i32.const 16711935)
|
||||
)
|
||||
(i32.const 8)
|
||||
(i32.const 8)
|
||||
)
|
||||
(i32.rotr
|
||||
(i32.and
|
||||
(get_local $0)
|
||||
(i32.const 16711935)
|
||||
)
|
||||
(i32.const 8)
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $~lib/polyfills/bswap<u64> (; 7 ;) (type $II) (param $0 i64) (result i64)
|
||||
(local $1 i32)
|
||||
@ -540,9 +520,6 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $~lib/polyfills/bswap<i64> (; 8 ;) (type $II) (param $0 i64) (result i64)
|
||||
(local $1 i32)
|
||||
@ -646,9 +623,6 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $~lib/polyfills/bswap<usize> (; 9 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
@ -696,29 +670,24 @@
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(return
|
||||
(i32.or
|
||||
(i32.rotl
|
||||
(i32.and
|
||||
(get_local $0)
|
||||
(i32.const -16711936)
|
||||
)
|
||||
(i32.const 8)
|
||||
(return
|
||||
(i32.or
|
||||
(i32.rotl
|
||||
(i32.and
|
||||
(get_local $0)
|
||||
(i32.const -16711936)
|
||||
)
|
||||
(i32.rotr
|
||||
(i32.and
|
||||
(get_local $0)
|
||||
(i32.const 16711935)
|
||||
)
|
||||
(i32.const 8)
|
||||
(i32.const 8)
|
||||
)
|
||||
(i32.rotr
|
||||
(i32.and
|
||||
(get_local $0)
|
||||
(i32.const 16711935)
|
||||
)
|
||||
(i32.const 8)
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $~lib/polyfills/bswap<isize> (; 10 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
@ -766,29 +735,24 @@
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(return
|
||||
(i32.or
|
||||
(i32.rotl
|
||||
(i32.and
|
||||
(get_local $0)
|
||||
(i32.const -16711936)
|
||||
)
|
||||
(i32.const 8)
|
||||
(return
|
||||
(i32.or
|
||||
(i32.rotl
|
||||
(i32.and
|
||||
(get_local $0)
|
||||
(i32.const -16711936)
|
||||
)
|
||||
(i32.rotr
|
||||
(i32.and
|
||||
(get_local $0)
|
||||
(i32.const 16711935)
|
||||
)
|
||||
(i32.const 8)
|
||||
(i32.const 8)
|
||||
)
|
||||
(i32.rotr
|
||||
(i32.and
|
||||
(get_local $0)
|
||||
(i32.const 16711935)
|
||||
)
|
||||
(i32.const 8)
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $~lib/polyfills/bswap16<u32> (; 11 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
@ -821,7 +785,7 @@
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 4)
|
||||
(i32.const 25)
|
||||
(i32.const 27)
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
@ -901,7 +865,7 @@
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 4)
|
||||
(i32.const 25)
|
||||
(i32.const 27)
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
|
@ -141,7 +141,6 @@
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
(local $5 i32)
|
||||
(nop)
|
||||
(block $break|0
|
||||
(loop $continue|0
|
||||
(if
|
||||
@ -2233,22 +2232,20 @@
|
||||
(if
|
||||
(get_local $2)
|
||||
(block
|
||||
(block
|
||||
(i32.store8
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(tee_local $2
|
||||
(i32.sub
|
||||
(get_local $2)
|
||||
(i32.const 1)
|
||||
)
|
||||
(i32.store8
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(tee_local $2
|
||||
(i32.sub
|
||||
(get_local $2)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(i32.load8_u
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(i32.load8_u
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -2261,6 +2258,7 @@
|
||||
)
|
||||
)
|
||||
(func $~lib/allocator/arena/free_memory (; 5 ;) (type $iv) (param $0 i32)
|
||||
(nop)
|
||||
)
|
||||
(func $~lib/set/Set<i32>#add (; 6 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
@ -2418,25 +2416,23 @@
|
||||
(get_local $3)
|
||||
)
|
||||
(block
|
||||
(block
|
||||
(if
|
||||
(i32.eq
|
||||
(i32.load
|
||||
(i32.add
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.mul
|
||||
(get_local $2)
|
||||
(i32.const 4)
|
||||
)
|
||||
(if
|
||||
(i32.eq
|
||||
(i32.load
|
||||
(i32.add
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.mul
|
||||
(get_local $2)
|
||||
(i32.const 4)
|
||||
)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
(return
|
||||
(i32.const 1)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
(return
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(set_local $2
|
||||
@ -2492,10 +2488,31 @@
|
||||
(get_local $3)
|
||||
)
|
||||
(block
|
||||
(block
|
||||
(if
|
||||
(i32.eq
|
||||
(i32.load
|
||||
(if
|
||||
(i32.eq
|
||||
(i32.load
|
||||
(i32.add
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.mul
|
||||
(get_local $2)
|
||||
(i32.const 4)
|
||||
)
|
||||
)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
(block
|
||||
(if
|
||||
(i32.lt_u
|
||||
(i32.add
|
||||
(get_local $2)
|
||||
(i32.const 1)
|
||||
)
|
||||
(get_local $3)
|
||||
)
|
||||
(call $~lib/memory/move_memory
|
||||
(i32.add
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
@ -2505,62 +2522,39 @@
|
||||
(i32.const 4)
|
||||
)
|
||||
)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
(block
|
||||
(if
|
||||
(i32.lt_u
|
||||
(i32.add
|
||||
(get_local $2)
|
||||
(i32.const 1)
|
||||
)
|
||||
(get_local $3)
|
||||
)
|
||||
(call $~lib/memory/move_memory
|
||||
(i32.add
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.mul
|
||||
(get_local $2)
|
||||
(i32.const 4)
|
||||
)
|
||||
)
|
||||
(i32.add
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.mul
|
||||
(i32.add
|
||||
(get_local $2)
|
||||
(i32.const 1)
|
||||
)
|
||||
(i32.const 4)
|
||||
)
|
||||
)
|
||||
(i32.sub
|
||||
(i32.sub
|
||||
(get_local $3)
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(i32.store offset=8
|
||||
(get_local $0)
|
||||
(i32.sub
|
||||
(i32.load offset=8
|
||||
(i32.add
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.mul
|
||||
(i32.add
|
||||
(get_local $2)
|
||||
(i32.const 1)
|
||||
)
|
||||
(i32.const 4)
|
||||
)
|
||||
)
|
||||
(i32.sub
|
||||
(i32.sub
|
||||
(get_local $3)
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(return
|
||||
)
|
||||
(i32.store offset=8
|
||||
(get_local $0)
|
||||
(i32.sub
|
||||
(i32.load offset=8
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set_local $2
|
||||
|
@ -599,7 +599,6 @@
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
(local $5 i32)
|
||||
(nop)
|
||||
(block $break|0
|
||||
(loop $continue|0
|
||||
(if
|
||||
@ -2691,22 +2690,20 @@
|
||||
(if
|
||||
(get_local $2)
|
||||
(block
|
||||
(block
|
||||
(i32.store8
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(tee_local $2
|
||||
(i32.sub
|
||||
(get_local $2)
|
||||
(i32.const 1)
|
||||
)
|
||||
(i32.store8
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(tee_local $2
|
||||
(i32.sub
|
||||
(get_local $2)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(i32.load8_u
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(i32.load8_u
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -2872,7 +2869,6 @@
|
||||
(get_local $4)
|
||||
)
|
||||
(block
|
||||
(nop)
|
||||
(if
|
||||
(i32.ge_u
|
||||
(get_local $1)
|
||||
@ -2990,7 +2986,6 @@
|
||||
(get_local $4)
|
||||
)
|
||||
(block
|
||||
(nop)
|
||||
(if
|
||||
(i32.ge_u
|
||||
(get_local $1)
|
||||
@ -3108,7 +3103,6 @@
|
||||
(get_local $4)
|
||||
)
|
||||
(block
|
||||
(nop)
|
||||
(if
|
||||
(i32.ge_u
|
||||
(get_local $1)
|
||||
@ -3226,7 +3220,6 @@
|
||||
(get_local $4)
|
||||
)
|
||||
(block
|
||||
(nop)
|
||||
(if
|
||||
(i32.ge_u
|
||||
(get_local $1)
|
||||
|
@ -538,33 +538,31 @@
|
||||
(get_local $4)
|
||||
)
|
||||
(block
|
||||
(block
|
||||
(if
|
||||
(i32.eqz
|
||||
(call $~lib/memory/compare_memory
|
||||
(if
|
||||
(i32.eqz
|
||||
(call $~lib/memory/compare_memory
|
||||
(i32.add
|
||||
(i32.add
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.const 4)
|
||||
)
|
||||
(i32.shl
|
||||
(get_local $5)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
(get_local $0)
|
||||
(i32.const 4)
|
||||
)
|
||||
(i32.shl
|
||||
(get_local $8)
|
||||
(get_local $5)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
(i32.const 4)
|
||||
)
|
||||
(i32.shl
|
||||
(get_local $8)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(get_local $5)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(get_local $5)
|
||||
)
|
||||
)
|
||||
(set_local $5
|
||||
@ -673,7 +671,6 @@
|
||||
(get_local $3)
|
||||
)
|
||||
)
|
||||
(nop)
|
||||
(if
|
||||
(i32.eq
|
||||
(get_local $4)
|
||||
@ -877,10 +874,8 @@
|
||||
(br $break|0)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(set_local $1
|
||||
(i32.const 10)
|
||||
)
|
||||
(set_local $1
|
||||
(i32.const 10)
|
||||
)
|
||||
)
|
||||
(set_local $1
|
||||
@ -1099,7 +1094,6 @@
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(nop)
|
||||
(if
|
||||
(i32.eq
|
||||
(get_local $3)
|
||||
@ -1512,7 +1506,6 @@
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
(local $5 i32)
|
||||
(nop)
|
||||
(block $break|0
|
||||
(loop $continue|0
|
||||
(if
|
||||
@ -3604,22 +3597,20 @@
|
||||
(if
|
||||
(get_local $2)
|
||||
(block
|
||||
(block
|
||||
(i32.store8
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(tee_local $2
|
||||
(i32.sub
|
||||
(get_local $2)
|
||||
(i32.const 1)
|
||||
)
|
||||
(i32.store8
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(tee_local $2
|
||||
(i32.sub
|
||||
(get_local $2)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(i32.load8_u
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(i32.load8_u
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -4314,21 +4305,19 @@
|
||||
(get_local $6)
|
||||
)
|
||||
(block
|
||||
(block
|
||||
(call $~lib/memory/move_memory
|
||||
(call $~lib/memory/move_memory
|
||||
(i32.add
|
||||
(i32.add
|
||||
(i32.add
|
||||
(get_local $4)
|
||||
(i32.const 4)
|
||||
)
|
||||
(get_local $3)
|
||||
)
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $4)
|
||||
(i32.const 4)
|
||||
)
|
||||
(get_local $5)
|
||||
(get_local $3)
|
||||
)
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.const 4)
|
||||
)
|
||||
(get_local $5)
|
||||
)
|
||||
(set_local $3
|
||||
(i32.add
|
||||
|
@ -546,7 +546,6 @@
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
(block
|
||||
(nop)
|
||||
(if
|
||||
(i32.gt_u
|
||||
(get_local $1)
|
||||
@ -643,7 +642,6 @@
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
(block
|
||||
(nop)
|
||||
(if
|
||||
(i32.gt_u
|
||||
(get_local $1)
|
||||
@ -740,7 +738,6 @@
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
(block
|
||||
(nop)
|
||||
(if
|
||||
(i32.gt_u
|
||||
(get_local $1)
|
||||
@ -837,7 +834,6 @@
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
(block
|
||||
(nop)
|
||||
(if
|
||||
(i32.gt_u
|
||||
(get_local $1)
|
||||
@ -934,7 +930,6 @@
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
(block
|
||||
(nop)
|
||||
(if
|
||||
(i32.gt_u
|
||||
(get_local $1)
|
||||
@ -1031,7 +1026,6 @@
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
(block
|
||||
(nop)
|
||||
(if
|
||||
(i32.gt_u
|
||||
(get_local $1)
|
||||
@ -1128,7 +1122,6 @@
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
(block
|
||||
(nop)
|
||||
(if
|
||||
(i32.gt_u
|
||||
(get_local $1)
|
||||
@ -1225,7 +1218,6 @@
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
(block
|
||||
(nop)
|
||||
(if
|
||||
(i32.gt_u
|
||||
(get_local $1)
|
||||
@ -1322,7 +1314,6 @@
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
(block
|
||||
(nop)
|
||||
(if
|
||||
(i32.gt_u
|
||||
(get_local $1)
|
||||
@ -1419,7 +1410,6 @@
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
(block
|
||||
(nop)
|
||||
(if
|
||||
(i32.gt_u
|
||||
(get_local $1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user