1
0
mirror of https://github.com/fluencelabs/assemblyscript synced 2025-05-13 15:51:28 +00:00

Properly inline getters; Simplify blocks when last statement returns

This commit is contained in:
dcodeIO 2018-06-22 15:26:59 +02:00
parent 525795b354
commit 7a8995b18b
75 changed files with 5090 additions and 6836 deletions
dist
src
std
tests/compiler

2
dist/asc.js vendored

File diff suppressed because one or more lines are too long

2
dist/asc.js.map vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1413,6 +1413,20 @@ export class UnaryPrefixExpression extends UnaryExpression {
// statements // statements
export function isLastStatement(statement: Statement): bool {
var parent = assert(statement.parent);
if (parent.kind == NodeKind.BLOCK) {
let statements = (<BlockStatement>parent).statements;
if (statements[statements.length - 1] === statement) {
switch (assert(parent.parent).kind) {
case NodeKind.FUNCTIONDECLARATION:
case NodeKind.METHODDECLARATION: return true;
}
}
}
return false;
}
/** Base class of all statement nodes. */ /** Base class of all statement nodes. */
export abstract class Statement extends Node { } export abstract class Statement extends Node { }

@ -128,7 +128,8 @@ import {
UnaryPrefixExpression, UnaryPrefixExpression,
FieldDeclaration, FieldDeclaration,
nodeIsConstantValue nodeIsConstantValue,
isLastStatement
} from "./ast"; } from "./ast";
import { import {
@ -1486,11 +1487,17 @@ export class Compiler extends DiagnosticEmitter {
this.currentFunction.flow = blockFlow; this.currentFunction.flow = blockFlow;
var stmts = this.compileStatements(statements); var stmts = this.compileStatements(statements);
var lastType: NativeType;
var stmt = stmts.length == 0 var stmt = stmts.length == 0
? this.module.createNop() ? this.module.createNop()
: stmts.length == 1 : stmts.length == 1
? stmts[0] ? stmts[0]
: this.module.createBlock(null, stmts, NativeType.None); : this.module.createBlock(null, stmts,
// if the last expression is a value, annotate the block's return value
(lastType = getExpressionType(stmts[stmts.length - 1])) == NativeType.None
? NativeType.None
: lastType
);
// Switch back to the parent flow // Switch back to the parent flow
var parentFlow = blockFlow.leaveBranchOrScope(); var parentFlow = blockFlow.leaveBranchOrScope();
@ -1776,6 +1783,9 @@ export class Compiler extends DiagnosticEmitter {
if (!flow.canOverflow(expr, returnType)) flow.set(FlowFlags.RETURNS_WRAPPED); if (!flow.canOverflow(expr, returnType)) flow.set(FlowFlags.RETURNS_WRAPPED);
} }
// If the last statement anyway, make it the block's return value
if (isLastStatement(statement)) return expr ? expr : module.createNop();
// When inlining, break to the end of the inlined function's block (no need to wrap) // When inlining, break to the end of the inlined function's block (no need to wrap)
return flow.is(FlowFlags.INLINE_CONTEXT) return flow.is(FlowFlags.INLINE_CONTEXT)
? module.createBreak(assert(flow.returnLabel), 0, expr) ? module.createBreak(assert(flow.returnLabel), 0, expr)
@ -6440,6 +6450,7 @@ export class Compiler extends DiagnosticEmitter {
)) { )) {
return module.createUnreachable(); return module.createUnreachable();
} }
let inline = (instance.decoratorFlags & DecoratorFlags.INLINE) != 0;
if (instance.is(CommonFlags.INSTANCE)) { if (instance.is(CommonFlags.INSTANCE)) {
let parent = assert(instance.parent); let parent = assert(instance.parent);
assert(parent.kind == ElementKind.CLASS); assert(parent.kind == ElementKind.CLASS);
@ -6450,10 +6461,10 @@ export class Compiler extends DiagnosticEmitter {
WrapMode.NONE WrapMode.NONE
); );
this.currentType = signature.returnType; this.currentType = signature.returnType;
return this.compileCallDirect(instance, [], propertyAccess, thisExpr); return this.compileCallDirect(instance, [], propertyAccess, thisExpr, inline);
} else { } else {
this.currentType = signature.returnType; this.currentType = signature.returnType;
return this.compileCallDirect(instance, [], propertyAccess); return this.compileCallDirect(instance, [], propertyAccess, 0, inline);
} }
} else { } else {
this.error( this.error(

11
std/assembly.d.ts vendored

@ -3,6 +3,8 @@
* @module std/assembly * @module std/assembly
*//***/ *//***/
/// <reference no-default-lib="true"/>
// Types // Types
/** An 8-bit signed integer. */ /** An 8-bit signed integer. */
@ -467,11 +469,12 @@ declare class Set<T> {
clear(): void; clear(): void;
} }
declare class Symbol { interface SymbolConstructor {
constructor(description?: string | null); (description?: string | null): symbol;
static for(key: string): Symbol; for(key: string): symbol;
static keyFor(sym: Symbol): string | null; keyFor(sym: symbol): string | null;
} }
declare const Symbol: SymbolConstructor;
interface IMath<T> { interface IMath<T> {
/** The base of natural logarithms, e, approximately 2.718. */ /** The base of natural logarithms, e, approximately 2.718. */

@ -1,30 +1,50 @@
import { Map } from "./map"; import { Map } from "./map";
var nextId: usize = 1;
var stringToId: Map<string, usize>; var stringToId: Map<string, usize>;
var idToString: Map<usize, string>; var idToString: Map<usize, string>;
var nextId: usize = 12; // Symbol.unscopables + 1
export class Symbol { @unmanaged export class symbol {}
static for(key: string): Symbol { type Symbol = symbol;
export function Symbol(description: string | null = null): symbol {
var id = nextId++;
if (!id) unreachable(); // out of ids
return changetype<symbol>(id);
}
export namespace Symbol {
// well-known symbols
export const hasInstance = changetype<symbol>(1);
export const concatSpreadable = changetype<symbol>(2);
export const isRegExp = changetype<symbol>(3);
export const iterator = changetype<symbol>(3);
export const match = changetype<symbol>(4);
export const replace = changetype<symbol>(5);
export const search = changetype<symbol>(6);
export const species = changetype<symbol>(7);
export const split = changetype<symbol>(8);
export const toPrimitive = changetype<symbol>(9);
export const toStringTag = changetype<symbol>(10);
export const unscopables = changetype<symbol>(11);
/* tslint:disable */// not valid TS
export function for(key: string): symbol {
if (!stringToId) { stringToId = new Map(); idToString = new Map(); } if (!stringToId) { stringToId = new Map(); idToString = new Map(); }
else if (stringToId.has(key)) return changetype<Symbol>(stringToId.get(key)); else if (stringToId.has(key)) return changetype<symbol>(stringToId.get(key));
var id = nextId++; var id = nextId++;
if (!id) unreachable(); // out of ids if (!id) unreachable(); // out of ids
stringToId.set(key, id); stringToId.set(key, id);
idToString.set(id, key); idToString.set(id, key);
return changetype<Symbol>(id); return changetype<symbol>(id);
} }
/* tslint:enable */
static keyFor(sym: Symbol): string | null { export function keyFor(sym: symbol): string | null {
return idToString !== null && idToString.has(changetype<usize>(sym)) return idToString !== null && idToString.has(changetype<usize>(sym))
? idToString.get(changetype<usize>(sym)) ? idToString.get(changetype<usize>(sym))
: null; : null;
} }
constructor(description: string | null = null) {
var id = nextId++;
if (!id) unreachable(); // out of ids
return changetype<Symbol>(id);
}
} }

15
std/portable.d.ts vendored

@ -12,6 +12,8 @@
* @module std/portable * @module std/portable
*//***/ *//***/
/// <reference no-default-lib="true"/>
// Portable types // Portable types
declare type i8 = number; declare type i8 = number;
@ -309,11 +311,6 @@ declare class Error {
stack: string | null; stack: string | null;
} }
declare class Symbol {
private constructor();
static readonly iterator: symbol;
}
declare class Set<T> { declare class Set<T> {
constructor(entries?: T[]); constructor(entries?: T[]);
readonly size: i32; readonly size: i32;
@ -337,6 +334,14 @@ declare class Map<K,V> {
[Symbol.iterator](): Iterator<[K,V]>; [Symbol.iterator](): Iterator<[K,V]>;
} }
interface SymbolConstructor {
(description?: string | null): symbol;
for(key: string): symbol;
keyFor(sym: symbol): string | null;
readonly iterator: symbol;
}
declare const Symbol: SymbolConstructor;
interface Iterable<T> { interface Iterable<T> {
[Symbol.iterator](): Iterator<T>; [Symbol.iterator](): Iterator<T>;
} }

@ -14,7 +14,6 @@
(export "memory" (memory $0)) (export "memory" (memory $0))
(start $start) (start $start)
(func $abi/exported (; 1 ;) (type $i) (result i32) (func $abi/exported (; 1 ;) (type $i) (result i32)
(return
(i32.shr_s (i32.shr_s
(i32.shl (i32.shl
(i32.const 128) (i32.const 128)
@ -23,19 +22,13 @@
(i32.const 24) (i32.const 24)
) )
) )
)
(func $abi/exportedExported (; 2 ;) (type $i) (result i32) (func $abi/exportedExported (; 2 ;) (type $i) (result i32)
(return
(call $abi/exported) (call $abi/exported)
) )
)
(func $abi/internal (; 3 ;) (type $i) (result i32) (func $abi/internal (; 3 ;) (type $i) (result i32)
(return
(i32.const 128) (i32.const 128)
) )
)
(func $abi/exportedInternal (; 4 ;) (type $i) (result i32) (func $abi/exportedInternal (; 4 ;) (type $i) (result i32)
(return
(i32.shr_s (i32.shr_s
(i32.shl (i32.shl
(call $abi/internal) (call $abi/internal)
@ -44,7 +37,6 @@
(i32.const 24) (i32.const 24)
) )
) )
)
(func $start (; 5 ;) (type $v) (func $start (; 5 ;) (type $v)
(local $0 i32) (local $0 i32)
(local $1 i32) (local $1 i32)

@ -119,7 +119,6 @@
) )
) )
) )
(return
(f64.mul (f64.mul
(get_local $2) (get_local $2)
(f64.reinterpret/i64 (f64.reinterpret/i64
@ -135,7 +134,6 @@
) )
) )
) )
)
(func $~lib/math/NativeMath.pow (; 1 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64) (func $~lib/math/NativeMath.pow (; 1 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
(local $2 i64) (local $2 i64)
(local $3 i32) (local $3 i32)
@ -1689,21 +1687,17 @@
) )
) )
) )
(return
(f64.mul (f64.mul
(get_local $14) (get_local $14)
(get_local $13) (get_local $13)
) )
) )
)
(func $isNaN<f32> (; 2 ;) (type $fi) (param $0 f32) (result i32) (func $isNaN<f32> (; 2 ;) (type $fi) (param $0 f32) (result i32)
(return
(f32.ne (f32.ne
(get_local $0) (get_local $0)
(get_local $0) (get_local $0)
) )
) )
)
(func $~lib/math/NativeMathf.mod (; 3 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32) (func $~lib/math/NativeMathf.mod (; 3 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
@ -2121,12 +2115,10 @@
(get_local $6) (get_local $6)
) )
) )
(return
(f32.reinterpret/i32 (f32.reinterpret/i32
(get_local $2) (get_local $2)
) )
) )
)
(func $~lib/math/NativeMathf.scalbn (; 4 ;) (type $fif) (param $0 f32) (param $1 i32) (result f32) (func $~lib/math/NativeMathf.scalbn (; 4 ;) (type $fif) (param $0 f32) (param $1 i32) (result f32)
(local $2 f32) (local $2 f32)
(set_local $2 (set_local $2
@ -2230,7 +2222,6 @@
) )
) )
) )
(return
(f32.mul (f32.mul
(get_local $2) (get_local $2)
(f32.reinterpret/i32 (f32.reinterpret/i32
@ -2244,7 +2235,6 @@
) )
) )
) )
)
(func $~lib/math/NativeMathf.pow (; 5 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32) (func $~lib/math/NativeMathf.pow (; 5 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
@ -3555,21 +3545,17 @@
) )
) )
) )
(return
(f32.mul (f32.mul
(get_local $12) (get_local $12)
(get_local $11) (get_local $11)
) )
) )
)
(func $isNaN<f64> (; 6 ;) (type $Fi) (param $0 f64) (result i32) (func $isNaN<f64> (; 6 ;) (type $Fi) (param $0 f64) (result i32)
(return
(f64.ne (f64.ne
(get_local $0) (get_local $0)
(get_local $0) (get_local $0)
) )
) )
)
(func $~lib/math/NativeMath.mod (; 7 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64) (func $~lib/math/NativeMath.mod (; 7 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
(local $2 i64) (local $2 i64)
(local $3 i64) (local $3 i64)
@ -4006,12 +3992,10 @@
) )
) )
) )
(return
(f64.reinterpret/i64 (f64.reinterpret/i64
(get_local $2) (get_local $2)
) )
) )
)
(func $start (; 8 ;) (type $v) (func $start (; 8 ;) (type $v)
(drop (drop
(i32.lt_s (i32.lt_s

@ -28,15 +28,12 @@
(export "table" (table $0)) (export "table" (table $0))
(start $start) (start $start)
(func $isNaN<f32> (; 1 ;) (type $fi) (param $0 f32) (result i32) (func $isNaN<f32> (; 1 ;) (type $fi) (param $0 f32) (result i32)
(return
(f32.ne (f32.ne
(get_local $0) (get_local $0)
(get_local $0) (get_local $0)
) )
) )
)
(func $isFinite<f32> (; 2 ;) (type $fi) (param $0 f32) (result i32) (func $isFinite<f32> (; 2 ;) (type $fi) (param $0 f32) (result i32)
(return
(f32.eq (f32.eq
(f32.sub (f32.sub
(get_local $0) (get_local $0)
@ -45,17 +42,13 @@
(f32.const 0) (f32.const 0)
) )
) )
)
(func $isNaN<f64> (; 3 ;) (type $Fi) (param $0 f64) (result i32) (func $isNaN<f64> (; 3 ;) (type $Fi) (param $0 f64) (result i32)
(return
(f64.ne (f64.ne
(get_local $0) (get_local $0)
(get_local $0) (get_local $0)
) )
) )
)
(func $isFinite<f64> (; 4 ;) (type $Fi) (param $0 f64) (result i32) (func $isFinite<f64> (; 4 ;) (type $Fi) (param $0 f64) (result i32)
(return
(f64.eq (f64.eq
(f64.sub (f64.sub
(get_local $0) (get_local $0)
@ -64,7 +57,6 @@
(f64.const 0) (f64.const 0)
) )
) )
)
(func $start~anonymous|0 (; 5 ;) (type $iiv) (param $0 i32) (param $1 i32) (func $start~anonymous|0 (; 5 ;) (type $iiv) (param $0 i32) (param $1 i32)
(nop) (nop)
) )

@ -11,25 +11,17 @@
(export "memory" (memory $0)) (export "memory" (memory $0))
(start $start) (start $start)
(func $call-inferred/foo<i32> (; 1 ;) (type $ii) (param $0 i32) (result i32) (func $call-inferred/foo<i32> (; 1 ;) (type $ii) (param $0 i32) (result i32)
(return
(get_local $0) (get_local $0)
) )
)
(func $call-inferred/foo<f64> (; 2 ;) (type $FF) (param $0 f64) (result f64) (func $call-inferred/foo<f64> (; 2 ;) (type $FF) (param $0 f64) (result f64)
(return
(get_local $0) (get_local $0)
) )
)
(func $call-inferred/foo<f32> (; 3 ;) (type $ff) (param $0 f32) (result f32) (func $call-inferred/foo<f32> (; 3 ;) (type $ff) (param $0 f32) (result f32)
(return
(get_local $0) (get_local $0)
) )
)
(func $call-inferred/bar<f32> (; 4 ;) (type $ff) (param $0 f32) (result f32) (func $call-inferred/bar<f32> (; 4 ;) (type $ff) (param $0 f32) (result f32)
(return
(get_local $0) (get_local $0)
) )
)
(func $start (; 5 ;) (type $v) (func $start (; 5 ;) (type $v)
(if (if
(i32.eqz (i32.eqz

@ -14,7 +14,6 @@
(export "table" (table $0)) (export "table" (table $0))
(start $start) (start $start)
(func $call-optional/opt (; 1 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (func $call-optional/opt (; 1 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(return
(i32.add (i32.add
(i32.add (i32.add
(get_local $0) (get_local $0)
@ -23,7 +22,6 @@
(get_local $2) (get_local $2)
) )
) )
)
(func $call-optional/opt|trampoline (; 2 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (func $call-optional/opt|trampoline (; 2 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(block $2of2 (block $2of2
(block $1of2 (block $1of2

@ -10,10 +10,8 @@
(get_local $0) (get_local $0)
(i32.const 1) (i32.const 1)
) )
(return
(i32.load8_u (i32.load8_u
(get_local $0) (get_local $0)
) )
) )
) )
)

@ -15,7 +15,6 @@
(export "memory" (memory $0)) (export "memory" (memory $0))
(start $start) (start $start)
(func $class/Animal.add (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $class/Animal.add (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(return
(i32.add (i32.add
(i32.add (i32.add
(get_local $0) (get_local $0)
@ -24,9 +23,7 @@
(get_global $class/Animal.ONE) (get_global $class/Animal.ONE)
) )
) )
)
(func $class/Animal.sub<f32> (; 2 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32) (func $class/Animal.sub<f32> (; 2 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32)
(return
(f32.add (f32.add
(f32.sub (f32.sub
(get_local $0) (get_local $0)
@ -37,9 +34,7 @@
) )
) )
) )
)
(func $class/Animal<f64>#instanceAdd (; 3 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (func $class/Animal<f64>#instanceAdd (; 3 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(return
(i32.add (i32.add
(i32.add (i32.add
(get_local $1) (get_local $1)
@ -48,9 +43,7 @@
(get_global $class/Animal.ONE) (get_global $class/Animal.ONE)
) )
) )
)
(func $class/Animal<f64>#instanceSub<f32> (; 4 ;) (type $ifff) (param $0 i32) (param $1 f32) (param $2 f32) (result f32) (func $class/Animal<f64>#instanceSub<f32> (; 4 ;) (type $ifff) (param $0 i32) (param $1 f32) (param $2 f32) (result f32)
(return
(f32.add (f32.add
(f32.sub (f32.sub
(get_local $1) (get_local $1)
@ -61,7 +54,6 @@
) )
) )
) )
)
(func $class/test (; 5 ;) (type $ii) (param $0 i32) (result i32) (func $class/test (; 5 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(local $2 i32) (local $2 i32)
@ -124,10 +116,8 @@
(set_local $2 (set_local $2
(get_local $1) (get_local $1)
) )
(return
(get_local $2) (get_local $2)
) )
)
(func $start (; 6 ;) (type $v) (func $start (; 6 ;) (type $v)
(if (if
(i32.eqz (i32.eqz

@ -37,10 +37,8 @@
(export "memory" (memory $0)) (export "memory" (memory $0))
(start $start) (start $start)
(func $enum/getZero (; 0 ;) (type $i) (result i32) (func $enum/getZero (; 0 ;) (type $i) (result i32)
(return
(i32.const 0) (i32.const 0)
) )
)
(func $start (; 1 ;) (type $v) (func $start (; 1 ;) (type $v)
(set_global $enum/NonConstant.ZERO (set_global $enum/NonConstant.ZERO
(call $enum/getZero) (call $enum/getZero)

@ -15,29 +15,23 @@
(export "ns.two" (func $export/ns.two)) (export "ns.two" (func $export/ns.two))
(export "memory" (memory $0)) (export "memory" (memory $0))
(func $export/add (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $export/add (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(return
(i32.add (i32.add
(get_local $0) (get_local $0)
(get_local $1) (get_local $1)
) )
) )
)
(func $export/sub (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $export/sub (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(return
(i32.sub (i32.sub
(get_local $0) (get_local $0)
(get_local $1) (get_local $1)
) )
) )
)
(func $export/mul (; 2 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $export/mul (; 2 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(return
(i32.mul (i32.mul
(get_local $0) (get_local $0)
(get_local $1) (get_local $1)
) )
) )
)
(func $export/ns.two (; 3 ;) (type $v) (func $export/ns.two (; 3 ;) (type $v)
(nop) (nop)
) )

@ -49,21 +49,17 @@
(export "memory" (memory $0)) (export "memory" (memory $0))
(start $start) (start $start)
(func $exports/add (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $exports/add (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(return
(i32.add (i32.add
(get_local $0) (get_local $0)
(get_local $1) (get_local $1)
) )
) )
)
(func $exports/subOpt (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $exports/subOpt (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(return
(i32.sub (i32.sub
(get_local $0) (get_local $0)
(get_local $1) (get_local $1)
) )
) )
)
(func $exports/subOpt|trampoline (; 2 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $exports/subOpt|trampoline (; 2 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(block $1of1 (block $1of1
(block $0of1 (block $0of1
@ -92,18 +88,14 @@
) )
) )
(func $exports/math.sub (; 4 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $exports/math.sub (; 4 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(return
(i32.sub (i32.sub
(get_local $0) (get_local $0)
(get_local $1) (get_local $1)
) )
) )
)
(func $exports/Car.getNumTires (; 5 ;) (type $i) (result i32) (func $exports/Car.getNumTires (; 5 ;) (type $i) (result i32)
(return
(i32.const 4) (i32.const 4)
) )
)
(func $~lib/allocator/arena/allocate_memory (; 6 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/allocator/arena/allocate_memory (; 6 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(local $2 i32) (local $2 i32)
@ -210,10 +202,8 @@
) )
) )
) )
(return
(i32.const 0) (i32.const 0)
) )
)
(func $exports/Car#constructor (; 7 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $exports/Car#constructor (; 7 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
(i32.store (i32.store
@ -272,12 +262,10 @@
) )
) )
(func $exports/Car#get:numDoors (; 11 ;) (type $ii) (param $0 i32) (result i32) (func $exports/Car#get:numDoors (; 11 ;) (type $ii) (param $0 i32) (result i32)
(return
(i32.load (i32.load
(get_local $0) (get_local $0)
) )
) )
)
(func $exports/Car#set:numDoors (; 12 ;) (type $iiv) (param $0 i32) (param $1 i32) (func $exports/Car#set:numDoors (; 12 ;) (type $iiv) (param $0 i32) (param $1 i32)
(i32.store (i32.store
(get_local $0) (get_local $0)
@ -288,10 +276,8 @@
(nop) (nop)
) )
(func $exports/vehicles.Car.getNumTires (; 14 ;) (type $i) (result i32) (func $exports/vehicles.Car.getNumTires (; 14 ;) (type $i) (result i32)
(return
(i32.const 4) (i32.const 4)
) )
)
(func $exports/vehicles.Car#constructor (; 15 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $exports/vehicles.Car#constructor (; 15 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
(i32.store (i32.store
@ -350,12 +336,10 @@
) )
) )
(func $exports/vehicles.Car#get:numDoors (; 19 ;) (type $ii) (param $0 i32) (result i32) (func $exports/vehicles.Car#get:numDoors (; 19 ;) (type $ii) (param $0 i32) (result i32)
(return
(i32.load (i32.load
(get_local $0) (get_local $0)
) )
) )
)
(func $exports/vehicles.Car#set:numDoors (; 20 ;) (type $iiv) (param $0 i32) (param $1 i32) (func $exports/vehicles.Car#set:numDoors (; 20 ;) (type $iiv) (param $0 i32) (param $1 i32)
(i32.store (i32.store
(get_local $0) (get_local $0)

@ -18,15 +18,11 @@
(export "table" (table $0)) (export "table" (table $0))
(start $start) (start $start)
(func $start~anonymous|0 (; 1 ;) (type $ii) (param $0 i32) (result i32) (func $start~anonymous|0 (; 1 ;) (type $ii) (param $0 i32) (result i32)
(return
(get_local $0) (get_local $0)
) )
)
(func $start~anonymous|1 (; 2 ;) (type $ii) (param $0 i32) (result i32) (func $start~anonymous|1 (; 2 ;) (type $ii) (param $0 i32) (result i32)
(return
(get_local $0) (get_local $0)
) )
)
(func $start~someName|2 (; 3 ;) (type $v) (func $start~someName|2 (; 3 ;) (type $v)
(nop) (nop)
) )

@ -19,47 +19,33 @@
(export "table" (table $0)) (export "table" (table $0))
(start $start) (start $start)
(func $function-types/makeAdder<i32>~anonymous|0 (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $function-types/makeAdder<i32>~anonymous|0 (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(return
(i32.add (i32.add
(get_local $0) (get_local $0)
(get_local $1) (get_local $1)
) )
) )
)
(func $function-types/makeAdder<i32> (; 2 ;) (type $i) (result i32) (func $function-types/makeAdder<i32> (; 2 ;) (type $i) (result i32)
(return
(i32.const 0) (i32.const 0)
) )
)
(func $function-types/makeAdder<i64>~anonymous|1 (; 3 ;) (type $III) (param $0 i64) (param $1 i64) (result i64) (func $function-types/makeAdder<i64>~anonymous|1 (; 3 ;) (type $III) (param $0 i64) (param $1 i64) (result i64)
(return
(i64.add (i64.add
(get_local $0) (get_local $0)
(get_local $1) (get_local $1)
) )
) )
)
(func $function-types/makeAdder<i64> (; 4 ;) (type $i) (result i32) (func $function-types/makeAdder<i64> (; 4 ;) (type $i) (result i32)
(return
(i32.const 1) (i32.const 1)
) )
)
(func $function-types/makeAdder<f64>~anonymous|2 (; 5 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64) (func $function-types/makeAdder<f64>~anonymous|2 (; 5 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
(return
(f64.add (f64.add
(get_local $0) (get_local $0)
(get_local $1) (get_local $1)
) )
) )
)
(func $function-types/makeAdder<f64> (; 6 ;) (type $i) (result i32) (func $function-types/makeAdder<f64> (; 6 ;) (type $i) (result i32)
(return
(i32.const 2) (i32.const 2)
) )
)
(func $function-types/doAddWithFn<i32> (; 7 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (func $function-types/doAddWithFn<i32> (; 7 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(return
(block (result i32)
(set_global $~argc (set_global $~argc
(i32.const 2) (i32.const 2)
) )
@ -69,11 +55,7 @@
(get_local $2) (get_local $2)
) )
) )
)
)
(func $function-types/doAdd<i32> (; 8 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $function-types/doAdd<i32> (; 8 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(return
(block (result i32)
(set_global $~argc (set_global $~argc
(i32.const 2) (i32.const 2)
) )
@ -83,19 +65,13 @@
(call $function-types/makeAdder<i32>) (call $function-types/makeAdder<i32>)
) )
) )
)
)
(func $function-types/addI32 (; 9 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $function-types/addI32 (; 9 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(return
(i32.add (i32.add
(get_local $0) (get_local $0)
(get_local $1) (get_local $1)
) )
) )
)
(func $function-types/makeAndAdd<i32> (; 10 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (func $function-types/makeAndAdd<i32> (; 10 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(return
(block (result i32)
(set_global $~argc (set_global $~argc
(i32.const 2) (i32.const 2)
) )
@ -105,8 +81,6 @@
(get_local $2) (get_local $2)
) )
) )
)
)
(func $function-types/makeAndAdd<i32>|trampoline (; 11 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (func $function-types/makeAndAdd<i32>|trampoline (; 11 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(block $1of1 (block $1of1
(block $0of1 (block $0of1

@ -22,61 +22,42 @@
(nop) (nop)
) )
(func $function/i (; 1 ;) (type $i) (result i32) (func $function/i (; 1 ;) (type $i) (result i32)
(return
(i32.const 0) (i32.const 0)
) )
)
(func $function/I (; 2 ;) (type $I) (result i64) (func $function/I (; 2 ;) (type $I) (result i64)
(return
(i64.const 0) (i64.const 0)
) )
)
(func $function/f (; 3 ;) (type $f) (result f32) (func $function/f (; 3 ;) (type $f) (result f32)
(return
(f32.const 0) (f32.const 0)
) )
)
(func $function/F (; 4 ;) (type $F) (result f64) (func $function/F (; 4 ;) (type $F) (result f64)
(return
(f64.const 0) (f64.const 0)
) )
)
(func $function/iv (; 5 ;) (type $iv) (param $0 i32) (func $function/iv (; 5 ;) (type $iv) (param $0 i32)
(nop) (nop)
) )
(func $function/ii (; 6 ;) (type $ii) (param $0 i32) (result i32) (func $function/ii (; 6 ;) (type $ii) (param $0 i32) (result i32)
(return
(get_local $0) (get_local $0)
) )
)
(func $function/II (; 7 ;) (type $II) (param $0 i64) (result i64) (func $function/II (; 7 ;) (type $II) (param $0 i64) (result i64)
(return
(get_local $0) (get_local $0)
) )
)
(func $function/ff (; 8 ;) (type $ff) (param $0 f32) (result f32) (func $function/ff (; 8 ;) (type $ff) (param $0 f32) (result f32)
(return
(get_local $0) (get_local $0)
) )
)
(func $function/FF (; 9 ;) (type $FF) (param $0 f64) (result f64) (func $function/FF (; 9 ;) (type $FF) (param $0 f64) (result f64)
(return
(get_local $0) (get_local $0)
) )
)
(func $function/iiv (; 10 ;) (type $iiv) (param $0 i32) (param $1 i32) (func $function/iiv (; 10 ;) (type $iiv) (param $0 i32) (param $1 i32)
(nop) (nop)
) )
(func $function/iii (; 11 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $function/iii (; 11 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(return
(i32.add (i32.add
(get_local $0) (get_local $0)
(get_local $1) (get_local $1)
) )
) )
)
(func $function/III (; 12 ;) (type $IiI) (param $0 i64) (param $1 i32) (result i64) (func $function/III (; 12 ;) (type $IiI) (param $0 i64) (param $1 i32) (result i64)
(return
(i64.add (i64.add
(get_local $0) (get_local $0)
(i64.extend_s/i32 (i64.extend_s/i32
@ -84,23 +65,18 @@
) )
) )
) )
)
(func $function/fff (; 13 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32) (func $function/fff (; 13 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32)
(return
(f32.add (f32.add
(get_local $0) (get_local $0)
(get_local $1) (get_local $1)
) )
) )
)
(func $function/FFF (; 14 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64) (func $function/FFF (; 14 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
(return
(f64.add (f64.add
(get_local $0) (get_local $0)
(get_local $1) (get_local $1)
) )
) )
)
(func $start (; 15 ;) (type $v) (func $start (; 15 ;) (type $v)
(call $function/v) (call $function/v)
(drop (drop

@ -11,10 +11,8 @@
(export "memory" (memory $0)) (export "memory" (memory $0))
(start $start) (start $start)
(func $getter-setter/Foo.get:bar (; 1 ;) (type $i) (result i32) (func $getter-setter/Foo.get:bar (; 1 ;) (type $i) (result i32)
(return
(get_global $getter-setter/Foo._bar) (get_global $getter-setter/Foo._bar)
) )
)
(func $getter-setter/Foo.set:bar (; 2 ;) (type $iv) (param $0 i32) (func $getter-setter/Foo.set:bar (; 2 ;) (type $iv) (param $0 i32)
(set_global $getter-setter/Foo._bar (set_global $getter-setter/Foo._bar
(get_local $0) (get_local $0)

@ -41,15 +41,11 @@
(export "ge_u" (func $../../examples/i64-polyfill/assembly/i64/ge_u)) (export "ge_u" (func $../../examples/i64-polyfill/assembly/i64/ge_u))
(export "memory" (memory $0)) (export "memory" (memory $0))
(func $../../examples/i64-polyfill/assembly/i64/getHi (; 0 ;) (type $i) (result i32) (func $../../examples/i64-polyfill/assembly/i64/getHi (; 0 ;) (type $i) (result i32)
(return
(get_global $../../examples/i64-polyfill/assembly/i64/hi) (get_global $../../examples/i64-polyfill/assembly/i64/hi)
) )
)
(func $../../examples/i64-polyfill/assembly/i64/getLo (; 1 ;) (type $i) (result i32) (func $../../examples/i64-polyfill/assembly/i64/getLo (; 1 ;) (type $i) (result i32)
(return
(get_global $../../examples/i64-polyfill/assembly/i64/lo) (get_global $../../examples/i64-polyfill/assembly/i64/lo)
) )
)
(func $../../examples/i64-polyfill/assembly/i64/clz (; 2 ;) (type $iiv) (param $0 i32) (param $1 i32) (func $../../examples/i64-polyfill/assembly/i64/clz (; 2 ;) (type $iiv) (param $0 i32) (param $1 i32)
(local $2 i64) (local $2 i64)
(set_local $2 (set_local $2

@ -30,10 +30,8 @@
(i32.const 1) (i32.const 1)
) )
) )
(return
(i32.const 0) (i32.const 0)
) )
)
(func $if/ifThenElseBlock (; 3 ;) (type $ii) (param $0 i32) (result i32) (func $if/ifThenElseBlock (; 3 ;) (type $ii) (param $0 i32) (result i32)
(if (if
(get_local $0) (get_local $0)

@ -9,29 +9,23 @@
(export "memory" (memory $0)) (export "memory" (memory $0))
(start $start) (start $start)
(func $export/add (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $export/add (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(return
(i32.add (i32.add
(get_local $0) (get_local $0)
(get_local $1) (get_local $1)
) )
) )
)
(func $export/sub (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $export/sub (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(return
(i32.sub (i32.sub
(get_local $0) (get_local $0)
(get_local $1) (get_local $1)
) )
) )
)
(func $export/mul (; 2 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $export/mul (; 2 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(return
(i32.mul (i32.mul
(get_local $0) (get_local $0)
(get_local $1) (get_local $1)
) )
) )
)
(func $export/ns.two (; 3 ;) (type $v) (func $export/ns.two (; 3 ;) (type $v)
(nop) (nop)
) )

@ -47,25 +47,17 @@
) )
) )
(func $infer-type/reti (; 2 ;) (type $i) (result i32) (func $infer-type/reti (; 2 ;) (type $i) (result i32)
(return
(i32.const 0) (i32.const 0)
) )
)
(func $infer-type/retI (; 3 ;) (type $I) (result i64) (func $infer-type/retI (; 3 ;) (type $I) (result i64)
(return
(i64.const 0) (i64.const 0)
) )
)
(func $infer-type/retf (; 4 ;) (type $f) (result f32) (func $infer-type/retf (; 4 ;) (type $f) (result f32)
(return
(f32.const 0) (f32.const 0)
) )
)
(func $infer-type/refF (; 5 ;) (type $F) (result f64) (func $infer-type/refF (; 5 ;) (type $F) (result f64)
(return
(f64.const 0) (f64.const 0)
) )
)
(func $start (; 6 ;) (type $v) (func $start (; 6 ;) (type $v)
(local $0 i32) (local $0 i32)
(local $1 i32) (local $1 i32)

@ -16,13 +16,11 @@
(export "table" (table $0)) (export "table" (table $0))
(start $start) (start $start)
(func $inlining/test (; 1 ;) (type $i) (result i32) (func $inlining/test (; 1 ;) (type $i) (result i32)
(return
(i32.add (i32.add
(i32.const 1) (i32.const 1)
(i32.const 2) (i32.const 2)
) )
) )
)
(func $inlining/test_funcs~anonymous|0 (; 2 ;) (type $ii) (param $0 i32) (result i32) (func $inlining/test_funcs~anonymous|0 (; 2 ;) (type $ii) (param $0 i32) (result i32)
(get_local $0) (get_local $0)
) )
@ -59,7 +57,6 @@
(i32.const 1) (i32.const 1)
) )
) )
(br $inlining/func_ii|inlined.0
(if (result i32) (if (result i32)
(i32.lt_s (i32.lt_s
(get_local $2) (get_local $2)
@ -69,7 +66,6 @@
(i32.const 3) (i32.const 3)
) )
) )
)
(i32.const 1) (i32.const 1)
) )
) )
@ -99,7 +95,6 @@
(i32.const 1) (i32.const 1)
) )
) )
(br $inlining/func_ii|inlined.1
(if (result i32) (if (result i32)
(i32.lt_s (i32.lt_s
(get_local $2) (get_local $2)
@ -109,7 +104,6 @@
(i32.const 3) (i32.const 3)
) )
) )
)
(i32.const 2) (i32.const 2)
) )
) )
@ -139,7 +133,6 @@
(i32.const 1) (i32.const 1)
) )
) )
(br $inlining/func_ii|inlined.2
(if (result i32) (if (result i32)
(i32.lt_s (i32.lt_s
(get_local $2) (get_local $2)
@ -149,7 +142,6 @@
(i32.const 3) (i32.const 3)
) )
) )
)
(i32.const 3) (i32.const 3)
) )
) )
@ -170,10 +162,8 @@
(set_local $2 (set_local $2
(i32.const 0) (i32.const 0)
) )
(br $inlining/func_ii_opt|inlined.0
(get_local $2) (get_local $2)
) )
)
(i32.const 0) (i32.const 0)
) )
) )
@ -194,10 +184,8 @@
(set_local $2 (set_local $2
(i32.const 1) (i32.const 1)
) )
(br $inlining/func_ii_opt|inlined.1
(get_local $2) (get_local $2)
) )
)
(i32.const 1) (i32.const 1)
) )
) )
@ -235,10 +223,8 @@
) )
) )
) )
(br $inlining/func_ii_loc|inlined.0
(get_local $4) (get_local $4)
) )
)
(i32.const 3) (i32.const 3)
) )
) )
@ -276,10 +262,8 @@
) )
) )
) )
(br $inlining/func_ii_loc|inlined.1
(get_local $2) (get_local $2)
) )
)
(i32.const 4) (i32.const 4)
) )
) )
@ -308,12 +292,10 @@
(call_indirect (type $ii) (call_indirect (type $ii)
(i32.const 2) (i32.const 2)
(block $inlining/func_fe|inlined.0 (result i32) (block $inlining/func_fe|inlined.0 (result i32)
(br $inlining/func_fe|inlined.0
(i32.const 0) (i32.const 0)
) )
) )
) )
)
(i32.const 2) (i32.const 2)
) )
) )
@ -337,13 +319,11 @@
(set_local $3 (set_local $3
(i32.const 2) (i32.const 2)
) )
(br $inlining/Foo.method_static|inlined.0
(i32.add (i32.add
(get_local $2) (get_local $2)
(get_local $3) (get_local $3)
) )
) )
)
(i32.const 44) (i32.const 44)
) )
) )
@ -370,10 +350,8 @@
(set_local $2 (set_local $2
(i32.const 3) (i32.const 3)
) )
(br $inlining/Foo#method_this|inlined.0
(get_local $7) (get_local $7)
) )
)
(i32.const 123) (i32.const 123)
) )
) )

@ -290,8 +290,8 @@
(local $4 f64) (local $4 f64)
(local $5 f64) (local $5 f64)
(local $6 f64) (local $6 f64)
(local $7 f64) (local $7 i32)
(local $8 i32) (local $8 f64)
(local $9 f64) (local $9 f64)
(local $10 f64) (local $10 f64)
(local $11 f64) (local $11 f64)
@ -312,7 +312,7 @@
(f64.convert_u/i32 (f64.convert_u/i32
(get_local $0) (get_local $0)
) )
(tee_local $7 (tee_local $8
(f64.div (f64.div
(tee_local $4 (tee_local $4
(f64.convert_u/i32 (f64.convert_u/i32
@ -344,7 +344,7 @@
(loop $repeat|0 (loop $repeat|0
(br_if $break|0 (br_if $break|0
(i32.ge_u (i32.ge_u
(get_local $8) (get_local $7)
(get_local $1) (get_local $1)
) )
) )
@ -352,7 +352,7 @@
(f64.mul (f64.mul
(f64.sub (f64.sub
(f64.convert_u/i32 (f64.convert_u/i32
(get_local $8) (get_local $7)
) )
(get_local $11) (get_local $11)
) )
@ -379,7 +379,7 @@
(get_local $4) (get_local $4)
) )
) )
(tee_local $7 (tee_local $8
(f64.mul (f64.mul
(get_local $5) (get_local $5)
(get_local $5) (get_local $5)
@ -405,7 +405,7 @@
(f64.add (f64.add
(f64.sub (f64.sub
(get_local $6) (get_local $6)
(get_local $7) (get_local $8)
) )
(get_local $10) (get_local $10)
) )
@ -447,7 +447,7 @@
) )
) )
) )
(set_local $7 (set_local $8
(f64.add (f64.add
(f64.sub (f64.sub
(f64.mul (f64.mul
@ -475,7 +475,7 @@
) )
) )
(set_local $4 (set_local $4
(get_local $7) (get_local $8)
) )
(set_local $2 (set_local $2
(i32.add (i32.add
@ -493,7 +493,7 @@
(get_local $0) (get_local $0)
(get_local $1) (get_local $1)
) )
(get_local $8) (get_local $7)
) )
(i32.const 1) (i32.const 1)
) )
@ -504,7 +504,6 @@
(f64.div (f64.div
(call $~lib/math/NativeMath.log (call $~lib/math/NativeMath.log
(call $~lib/math/NativeMath.log (call $~lib/math/NativeMath.log
(tee_local $7
(f64.sqrt (f64.sqrt
(f64.add (f64.add
(f64.mul (f64.mul
@ -519,7 +518,6 @@
) )
) )
) )
)
(f64.const 0.6931471805599453) (f64.const 0.6931471805599453)
) )
) )
@ -551,9 +549,9 @@
) )
) )
) )
(set_local $8 (set_local $7
(i32.add (i32.add
(get_local $8) (get_local $7)
(i32.const 1) (i32.const 1)
) )
) )

@ -279,7 +279,6 @@
(set_local $13 (set_local $13
(get_local $3) (get_local $3)
) )
(return
(f64.add (f64.add
(f64.add (f64.add
(f64.sub (f64.sub
@ -310,9 +309,7 @@
) )
) )
) )
)
(func $isFinite<f64> (; 1 ;) (type $Fi) (param $0 f64) (result i32) (func $isFinite<f64> (; 1 ;) (type $Fi) (param $0 f64) (result i32)
(return
(f64.eq (f64.eq
(f64.sub (f64.sub
(get_local $0) (get_local $0)
@ -321,9 +318,7 @@
(f64.const 0) (f64.const 0)
) )
) )
)
(func $../../examples/mandelbrot/assembly/index/clamp<f64> (; 2 ;) (type $FFFF) (param $0 f64) (param $1 f64) (param $2 f64) (result f64) (func $../../examples/mandelbrot/assembly/index/clamp<f64> (; 2 ;) (type $FFFF) (param $0 f64) (param $1 f64) (param $2 f64) (result f64)
(return
(f64.min (f64.min
(f64.max (f64.max
(get_local $0) (get_local $0)
@ -332,7 +327,6 @@
(get_local $2) (get_local $2)
) )
) )
)
(func $../../examples/mandelbrot/assembly/index/computeLine (; 3 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (func $../../examples/mandelbrot/assembly/index/computeLine (; 3 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32)
(local $4 f64) (local $4 f64)
(local $5 f64) (local $5 f64)
@ -573,14 +567,12 @@
) )
) )
) )
(br $~lib/math/NativeMath.sqrt|inlined.0
(f64.sqrt (f64.sqrt
(get_local $15) (get_local $15)
) )
) )
) )
) )
)
(f64.const 0.6931471805599453) (f64.const 0.6931471805599453)
) )
) )

@ -523,10 +523,8 @@
(set_local $128 (set_local $128
(get_local $127) (get_local $127)
) )
(return
(get_local $128) (get_local $128)
) )
)
(func $many-locals/testI8 (; 2 ;) (type $ii) (param $0 i32) (result i32) (func $many-locals/testI8 (; 2 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(local $2 i32) (local $2 i32)
@ -1040,7 +1038,6 @@
(set_local $128 (set_local $128
(get_local $127) (get_local $127)
) )
(return
(i32.shr_s (i32.shr_s
(i32.shl (i32.shl
(get_local $128) (get_local $128)
@ -1049,7 +1046,6 @@
(i32.const 24) (i32.const 24)
) )
) )
)
(func $start (; 3 ;) (type $v) (func $start (; 3 ;) (type $v)
(if (if
(i32.eqz (i32.eqz

@ -1812,10 +1812,8 @@
) )
) )
) )
(return
(get_local $3) (get_local $3)
) )
)
(func $start (; 2 ;) (type $v) (func $start (; 2 ;) (type $v)
(i64.store (i64.store
(i32.const 8) (i32.const 8)

@ -308,10 +308,8 @@
) )
) )
) )
(return
(get_local $3) (get_local $3)
) )
)
(func $start (; 2 ;) (type $v) (func $start (; 2 ;) (type $v)
(i64.store (i64.store
(i32.const 8) (i32.const 8)

@ -376,10 +376,8 @@
) )
) )
) )
(return
(get_local $3) (get_local $3)
) )
)
(func $start (; 2 ;) (type $v) (func $start (; 2 ;) (type $v)
(set_global $memset/dest (set_global $memset/dest
(get_global $HEAP_BASE) (get_global $HEAP_BASE)

@ -5,8 +5,6 @@
(export "default" (func $named-export-default/get3)) (export "default" (func $named-export-default/get3))
(export "memory" (memory $0)) (export "memory" (memory $0))
(func $named-export-default/get3 (; 0 ;) (type $i) (result i32) (func $named-export-default/get3 (; 0 ;) (type $i) (result i32)
(return
(i32.const 3) (i32.const 3)
) )
) )
)

@ -5,13 +5,9 @@
(export "getValue" (func $named-import-default/getValue)) (export "getValue" (func $named-import-default/getValue))
(export "memory" (memory $0)) (export "memory" (memory $0))
(func $named-export-default/get3 (; 0 ;) (type $i) (result i32) (func $named-export-default/get3 (; 0 ;) (type $i) (result i32)
(return
(i32.const 3) (i32.const 3)
) )
)
(func $named-import-default/getValue (; 1 ;) (type $i) (result i32) (func $named-import-default/getValue (; 1 ;) (type $i) (result i32)
(return
(call $named-export-default/get3) (call $named-export-default/get3)
) )
) )
)

@ -10,15 +10,11 @@
(export "memory" (memory $0)) (export "memory" (memory $0))
(start $start) (start $start)
(func $namespace/Outer.Inner.aFunc (; 0 ;) (type $i) (result i32) (func $namespace/Outer.Inner.aFunc (; 0 ;) (type $i) (result i32)
(return
(get_global $namespace/Outer.Inner.aVar) (get_global $namespace/Outer.Inner.aVar)
) )
)
(func $namespace/Joined.anotherFunc (; 1 ;) (type $i) (result i32) (func $namespace/Joined.anotherFunc (; 1 ;) (type $i) (result i32)
(return
(i32.const 3) (i32.const 3)
) )
)
(func $start (; 2 ;) (type $v) (func $start (; 2 ;) (type $v)
(drop (drop
(get_global $namespace/Outer.Inner.aVar) (get_global $namespace/Outer.Inner.aVar)

@ -14,7 +14,6 @@
(i32.const 1) (i32.const 1)
) )
) )
(return
(i32.add (i32.add
(call $recursive/fib (call $recursive/fib
(i32.sub (i32.sub
@ -31,4 +30,3 @@
) )
) )
) )
)

@ -19,29 +19,23 @@
(export "memory" (memory $0)) (export "memory" (memory $0))
(start $start) (start $start)
(func $export/add (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $export/add (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(return
(i32.add (i32.add
(get_local $0) (get_local $0)
(get_local $1) (get_local $1)
) )
) )
)
(func $export/sub (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $export/sub (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(return
(i32.sub (i32.sub
(get_local $0) (get_local $0)
(get_local $1) (get_local $1)
) )
) )
)
(func $export/mul (; 2 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $export/mul (; 2 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(return
(i32.mul (i32.mul
(get_local $0) (get_local $0)
(get_local $1) (get_local $1)
) )
) )
)
(func $export/ns.two (; 3 ;) (type $v) (func $export/ns.two (; 3 ;) (type $v)
(nop) (nop)
) )

@ -10,10 +10,8 @@
(export "memory" (memory $0)) (export "memory" (memory $0))
(start $start) (start $start)
(func $static-this/Foo.getBar (; 1 ;) (type $i) (result i32) (func $static-this/Foo.getBar (; 1 ;) (type $i) (result i32)
(return
(get_global $static-this/Foo.bar) (get_global $static-this/Foo.bar)
) )
)
(func $start (; 2 ;) (type $v) (func $start (; 2 ;) (type $v)
(if (if
(i32.eqz (i32.eqz

@ -127,10 +127,8 @@
) )
) )
) )
(return
(i32.const 0) (i32.const 0)
) )
)
(func $~lib/memory/set_memory (; 2 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (func $~lib/memory/set_memory (; 2 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
@ -2654,7 +2652,6 @@
) )
) )
) )
(return
(if (result i32) (if (result i32)
(get_local $2) (get_local $2)
(i32.sub (i32.sub
@ -2668,7 +2665,6 @@
(i32.const 0) (i32.const 0)
) )
) )
)
(func $~lib/allocator/arena/free_memory (; 6 ;) (type $iv) (param $0 i32) (func $~lib/allocator/arena/free_memory (; 6 ;) (type $iv) (param $0 i32)
(nop) (nop)
) )

@ -27,7 +27,6 @@
(get_local $0) (get_local $0)
) )
) )
(return
(if (result i32) (if (result i32)
(i32.lt_u (i32.lt_u
(get_local $1) (get_local $1)
@ -39,7 +38,6 @@
) )
) )
(block $~lib/internal/arraybuffer/loadUnsafe<Array<i32>,Array<i32>>|inlined.0 (result i32) (block $~lib/internal/arraybuffer/loadUnsafe<Array<i32>,Array<i32>>|inlined.0 (result i32)
(br $~lib/internal/arraybuffer/loadUnsafe<Array<i32>,Array<i32>>|inlined.0
(i32.load offset=8 (i32.load offset=8
(i32.add (i32.add
(get_local $2) (get_local $2)
@ -50,11 +48,9 @@
) )
) )
) )
)
(unreachable) (unreachable)
) )
) )
)
(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)
(set_local $2 (set_local $2
@ -62,7 +58,6 @@
(get_local $0) (get_local $0)
) )
) )
(return
(if (result i32) (if (result i32)
(i32.lt_u (i32.lt_u
(get_local $1) (get_local $1)
@ -74,7 +69,6 @@
) )
) )
(block $~lib/internal/arraybuffer/loadUnsafe<i32,i32>|inlined.0 (result i32) (block $~lib/internal/arraybuffer/loadUnsafe<i32,i32>|inlined.0 (result i32)
(br $~lib/internal/arraybuffer/loadUnsafe<i32,i32>|inlined.0
(i32.load offset=8 (i32.load offset=8
(i32.add (i32.add
(get_local $2) (get_local $2)
@ -85,13 +79,10 @@
) )
) )
) )
)
(unreachable) (unreachable)
) )
) )
)
(func $std/array-access/i32ArrayArrayElementAccess (; 3 ;) (type $ii) (param $0 i32) (result i32) (func $std/array-access/i32ArrayArrayElementAccess (; 3 ;) (type $ii) (param $0 i32) (result i32)
(return
(call $~lib/array/Array<i32>#__get (call $~lib/array/Array<i32>#__get
(call $~lib/array/Array<Array<i32>>#__get (call $~lib/array/Array<Array<i32>>#__get
(get_local $0) (get_local $0)
@ -100,7 +91,6 @@
(i32.const 1) (i32.const 1)
) )
) )
)
(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)
(set_local $2 (set_local $2
@ -108,7 +98,6 @@
(get_local $0) (get_local $0)
) )
) )
(return
(if (result i32) (if (result i32)
(i32.lt_u (i32.lt_u
(get_local $1) (get_local $1)
@ -120,7 +109,6 @@
) )
) )
(block $~lib/internal/arraybuffer/loadUnsafe<String,String>|inlined.0 (result i32) (block $~lib/internal/arraybuffer/loadUnsafe<String,String>|inlined.0 (result i32)
(br $~lib/internal/arraybuffer/loadUnsafe<String,String>|inlined.0
(i32.load offset=8 (i32.load offset=8
(i32.add (i32.add
(get_local $2) (get_local $2)
@ -131,13 +119,10 @@
) )
) )
) )
)
(unreachable) (unreachable)
) )
) )
)
(func $std/array-access/stringArrayPropertyAccess (; 5 ;) (type $ii) (param $0 i32) (result i32) (func $std/array-access/stringArrayPropertyAccess (; 5 ;) (type $ii) (param $0 i32) (result i32)
(return
(i32.load (i32.load
(call $~lib/array/Array<String>#__get (call $~lib/array/Array<String>#__get
(get_local $0) (get_local $0)
@ -145,7 +130,6 @@
) )
) )
) )
)
(func $~lib/memory/compare_memory (; 6 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (func $~lib/memory/compare_memory (; 6 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(if (if
(i32.eq (i32.eq
@ -197,7 +181,6 @@
) )
) )
) )
(return
(if (result i32) (if (result i32)
(get_local $2) (get_local $2)
(i32.sub (i32.sub
@ -211,7 +194,6 @@
(i32.const 0) (i32.const 0)
) )
) )
)
(func $~lib/string/String#startsWith (; 7 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (func $~lib/string/String#startsWith (; 7 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
@ -295,7 +277,6 @@
(i32.const 0) (i32.const 0)
) )
) )
(return
(i32.eqz (i32.eqz
(call $~lib/memory/compare_memory (call $~lib/memory/compare_memory
(i32.add (i32.add
@ -319,9 +300,7 @@
) )
) )
) )
)
(func $std/array-access/stringArrayMethodCall (; 8 ;) (type $ii) (param $0 i32) (result i32) (func $std/array-access/stringArrayMethodCall (; 8 ;) (type $ii) (param $0 i32) (result i32)
(return
(call $~lib/string/String#startsWith (call $~lib/string/String#startsWith
(call $~lib/array/Array<String>#__get (call $~lib/array/Array<String>#__get
(get_local $0) (get_local $0)
@ -331,7 +310,6 @@
(i32.const 0) (i32.const 0)
) )
) )
)
(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)
(set_local $2 (set_local $2
@ -339,7 +317,6 @@
(get_local $0) (get_local $0)
) )
) )
(return
(if (result i32) (if (result i32)
(i32.lt_u (i32.lt_u
(get_local $1) (get_local $1)
@ -351,7 +328,6 @@
) )
) )
(block $~lib/internal/arraybuffer/loadUnsafe<Array<String>,Array<String>>|inlined.0 (result i32) (block $~lib/internal/arraybuffer/loadUnsafe<Array<String>,Array<String>>|inlined.0 (result i32)
(br $~lib/internal/arraybuffer/loadUnsafe<Array<String>,Array<String>>|inlined.0
(i32.load offset=8 (i32.load offset=8
(i32.add (i32.add
(get_local $2) (get_local $2)
@ -362,13 +338,10 @@
) )
) )
) )
)
(unreachable) (unreachable)
) )
) )
)
(func $std/array-access/stringArrayArrayPropertyAccess (; 10 ;) (type $ii) (param $0 i32) (result i32) (func $std/array-access/stringArrayArrayPropertyAccess (; 10 ;) (type $ii) (param $0 i32) (result i32)
(return
(i32.load (i32.load
(call $~lib/array/Array<String>#__get (call $~lib/array/Array<String>#__get
(call $~lib/array/Array<Array<String>>#__get (call $~lib/array/Array<Array<String>>#__get
@ -379,9 +352,7 @@
) )
) )
) )
)
(func $std/array-access/stringArrayArrayMethodCall (; 11 ;) (type $ii) (param $0 i32) (result i32) (func $std/array-access/stringArrayArrayMethodCall (; 11 ;) (type $ii) (param $0 i32) (result i32)
(return
(call $~lib/string/String#startsWith (call $~lib/string/String#startsWith
(call $~lib/array/Array<String>#__get (call $~lib/array/Array<String>#__get
(call $~lib/array/Array<Array<String>>#__get (call $~lib/array/Array<Array<String>>#__get
@ -395,4 +366,3 @@
) )
) )
) )
)

@ -26,12 +26,10 @@
(export "memory" (memory $0)) (export "memory" (memory $0))
(start $start) (start $start)
(func $~lib/array/Array<i32>#get:length (; 1 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/array/Array<i32>#get:length (; 1 ;) (type $ii) (param $0 i32) (result i32)
(return
(i32.load offset=4 (i32.load offset=4
(get_local $0) (get_local $0)
) )
) )
)
(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)
(set_local $2 (set_local $2
@ -39,7 +37,6 @@
(get_local $0) (get_local $0)
) )
) )
(return
(if (result i32) (if (result i32)
(i32.lt_u (i32.lt_u
(get_local $1) (get_local $1)
@ -51,7 +48,6 @@
) )
) )
(block $~lib/internal/arraybuffer/loadUnsafe<i32,i32>|inlined.0 (result i32) (block $~lib/internal/arraybuffer/loadUnsafe<i32,i32>|inlined.0 (result i32)
(br $~lib/internal/arraybuffer/loadUnsafe<i32,i32>|inlined.0
(i32.load offset=8 (i32.load offset=8
(i32.add (i32.add
(get_local $2) (get_local $2)
@ -62,13 +58,10 @@
) )
) )
) )
)
(unreachable) (unreachable)
) )
) )
)
(func $~lib/internal/arraybuffer/computeSize (; 3 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/internal/arraybuffer/computeSize (; 3 ;) (type $ii) (param $0 i32) (result i32)
(return
(i32.shl (i32.shl
(i32.const 1) (i32.const 1)
(i32.sub (i32.sub
@ -85,7 +78,6 @@
) )
) )
) )
)
(func $~lib/allocator/arena/allocate_memory (; 4 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/allocator/arena/allocate_memory (; 4 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(local $2 i32) (local $2 i32)
@ -192,10 +184,8 @@
) )
) )
) )
(return
(i32.const 0) (i32.const 0)
) )
)
(func $~lib/internal/arraybuffer/allocUnsafe (; 5 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/internal/arraybuffer/allocUnsafe (; 5 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(if (if
@ -226,10 +216,8 @@
(get_local $1) (get_local $1)
(get_local $0) (get_local $0)
) )
(return
(get_local $1) (get_local $1)
) )
)
(func $~lib/memory/set_memory (; 6 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (func $~lib/memory/set_memory (; 6 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)

@ -2877,7 +2877,6 @@
(block (block
(if (if
(i32.eq (i32.eq
(tee_local $3
(i32.load offset=8 (i32.load offset=8
(i32.add (i32.add
(get_local $0) (get_local $0)
@ -2887,7 +2886,6 @@
) )
) )
) )
)
(get_local $1) (get_local $1)
) )
(return (return
@ -2969,7 +2967,6 @@
(block (block
(if (if
(i32.eq (i32.eq
(tee_local $3
(i32.load offset=8 (i32.load offset=8
(i32.add (i32.add
(get_local $0) (get_local $0)
@ -2979,7 +2976,6 @@
) )
) )
) )
)
(get_local $1) (get_local $1)
) )
(return (return
@ -3212,7 +3208,6 @@
(if (if
(i32.and (i32.and
(call_indirect (type $iiii) (call_indirect (type $iiii)
(tee_local $3
(i32.load offset=8 (i32.load offset=8
(i32.add (i32.add
(get_local $4) (get_local $4)
@ -3222,7 +3217,6 @@
) )
) )
) )
)
(get_local $2) (get_local $2)
(get_local $0) (get_local $0)
(get_local $1) (get_local $1)
@ -3331,7 +3325,6 @@
(if (if
(i32.and (i32.and
(call_indirect (type $iiii) (call_indirect (type $iiii)
(tee_local $3
(i32.load offset=8 (i32.load offset=8
(i32.add (i32.add
(get_local $4) (get_local $4)
@ -3341,7 +3334,6 @@
) )
) )
) )
)
(get_local $2) (get_local $2)
(get_local $0) (get_local $0)
(get_local $1) (get_local $1)
@ -3450,7 +3442,6 @@
(if (if
(i32.and (i32.and
(call_indirect (type $iiii) (call_indirect (type $iiii)
(tee_local $3
(i32.load offset=8 (i32.load offset=8
(i32.add (i32.add
(get_local $4) (get_local $4)
@ -3460,7 +3451,6 @@
) )
) )
) )
)
(get_local $2) (get_local $2)
(get_local $0) (get_local $0)
(get_local $1) (get_local $1)
@ -3569,7 +3559,6 @@
(i32.const 3) (i32.const 3)
) )
(call_indirect (type $iiiv) (call_indirect (type $iiiv)
(tee_local $3
(i32.load offset=8 (i32.load offset=8
(i32.add (i32.add
(get_local $4) (get_local $4)
@ -3579,7 +3568,6 @@
) )
) )
) )
)
(get_local $2) (get_local $2)
(get_local $0) (get_local $0)
(get_local $1) (get_local $1)
@ -3687,7 +3675,6 @@
) )
) )
(call_indirect (type $iiif) (call_indirect (type $iiif)
(tee_local $3
(i32.load offset=8 (i32.load offset=8
(i32.add (i32.add
(get_local $4) (get_local $4)
@ -3697,7 +3684,6 @@
) )
) )
) )
)
(get_local $2) (get_local $2)
(get_local $0) (get_local $0)
(get_local $1) (get_local $1)
@ -3817,7 +3803,6 @@
) )
) )
(call_indirect (type $iiii) (call_indirect (type $iiii)
(tee_local $3
(i32.load offset=8 (i32.load offset=8
(i32.add (i32.add
(get_local $4) (get_local $4)
@ -3827,7 +3812,6 @@
) )
) )
) )
)
(get_local $2) (get_local $2)
(get_local $0) (get_local $0)
(get_local $1) (get_local $1)
@ -4057,7 +4041,6 @@
(set_local $2 (set_local $2
(call_indirect (type $iiiii) (call_indirect (type $iiiii)
(get_local $2) (get_local $2)
(tee_local $4
(i32.load offset=8 (i32.load offset=8
(i32.add (i32.add
(get_local $5) (get_local $5)
@ -4067,7 +4050,6 @@
) )
) )
) )
)
(get_local $3) (get_local $3)
(get_local $0) (get_local $0)
(get_local $1) (get_local $1)
@ -4443,7 +4425,7 @@
(get_local $7) (get_local $7)
) )
) )
(set_local $5 (set_local $6
(i32.load offset=8 (i32.load offset=8
(i32.add (i32.add
(get_local $4) (get_local $4)
@ -4468,7 +4450,7 @@
(i32.const 0) (i32.const 0)
) )
(block (block
(set_local $6 (set_local $5
(i32.load offset=8 (i32.load offset=8
(i32.add (i32.add
(get_local $4) (get_local $4)
@ -4485,8 +4467,10 @@
(br_if $break|1 (br_if $break|1
(i32.ge_s (i32.ge_s
(call_indirect (type $iii) (call_indirect (type $iii)
(get_local $5)
(get_local $6) (get_local $6)
(tee_local $8
(get_local $5)
)
(get_local $1) (get_local $1)
) )
(i32.const 0) (i32.const 0)
@ -4494,7 +4478,7 @@
) )
(set_local $3 (set_local $3
(i32.sub (i32.sub
(tee_local $8 (tee_local $5
(get_local $3) (get_local $3)
) )
(i32.const 1) (i32.const 1)
@ -4505,13 +4489,13 @@
(get_local $4) (get_local $4)
(i32.shl (i32.shl
(i32.add (i32.add
(get_local $8) (get_local $5)
(i32.const 1) (i32.const 1)
) )
(i32.const 2) (i32.const 2)
) )
) )
(get_local $6) (get_local $8)
) )
(br $continue|1) (br $continue|1)
) )
@ -4529,7 +4513,7 @@
(i32.const 2) (i32.const 2)
) )
) )
(get_local $5) (get_local $6)
) )
(set_local $2 (set_local $2
(i32.add (i32.add
@ -4557,7 +4541,7 @@
(call $~lib/memory/set_memory (call $~lib/memory/set_memory
(tee_local $7 (tee_local $7
(call $~lib/allocator/arena/allocate_memory (call $~lib/allocator/arena/allocate_memory
(tee_local $2 (tee_local $6
(i32.shl (i32.shl
(i32.shr_s (i32.shr_s
(i32.add (i32.add
@ -4576,15 +4560,15 @@
) )
) )
(i32.const 0) (i32.const 0)
(get_local $2) (get_local $6)
) )
(set_local $3 (set_local $2
(i32.load (i32.load
(get_local $0) (get_local $0)
) )
) )
(block $break|0 (block $break|0
(set_local $4 (set_local $3
(i32.sub (i32.sub
(get_local $8) (get_local $8)
(i32.const 1) (i32.const 1)
@ -4593,18 +4577,18 @@
(loop $repeat|0 (loop $repeat|0
(br_if $break|0 (br_if $break|0
(i32.le_s (i32.le_s
(get_local $4) (get_local $3)
(i32.const 0) (i32.const 0)
) )
) )
(set_local $2 (set_local $4
(get_local $4) (get_local $3)
) )
(loop $continue|1 (loop $continue|1
(if (if
(i32.eq (i32.eq
(i32.and (i32.and
(get_local $2) (get_local $4)
(i32.const 1) (i32.const 1)
) )
(i32.and (i32.and
@ -4614,7 +4598,7 @@
(get_local $7) (get_local $7)
(i32.shl (i32.shl
(i32.shr_s (i32.shr_s
(get_local $2) (get_local $4)
(i32.const 6) (i32.const 6)
) )
(i32.const 2) (i32.const 2)
@ -4623,7 +4607,7 @@
) )
(i32.and (i32.and
(i32.shr_s (i32.shr_s
(get_local $2) (get_local $4)
(i32.const 1) (i32.const 1)
) )
(i32.const 31) (i32.const 31)
@ -4633,9 +4617,9 @@
) )
) )
(block (block
(set_local $2 (set_local $4
(i32.shr_s (i32.shr_s
(get_local $2) (get_local $4)
(i32.const 1) (i32.const 1)
) )
) )
@ -4643,14 +4627,14 @@
) )
) )
) )
(set_local $2 (set_local $4
(i32.load offset=8 (i32.load offset=8
(i32.add (i32.add
(get_local $3) (get_local $2)
(i32.shl (i32.shl
(tee_local $5 (tee_local $5
(i32.shr_s (i32.shr_s
(get_local $2) (get_local $4)
(i32.const 1) (i32.const 1)
) )
) )
@ -4662,9 +4646,9 @@
(set_local $6 (set_local $6
(i32.load offset=8 (i32.load offset=8
(i32.add (i32.add
(get_local $3) (get_local $2)
(i32.shl (i32.shl
(get_local $4) (get_local $3)
(i32.const 2) (i32.const 2)
) )
) )
@ -4676,7 +4660,7 @@
(if (if
(i32.lt_s (i32.lt_s
(call_indirect (type $iii) (call_indirect (type $iii)
(get_local $2) (get_local $4)
(get_local $6) (get_local $6)
(get_local $1) (get_local $1)
) )
@ -4689,7 +4673,7 @@
(get_local $7) (get_local $7)
(i32.shl (i32.shl
(i32.shr_s (i32.shr_s
(get_local $4) (get_local $3)
(i32.const 5) (i32.const 5)
) )
(i32.const 2) (i32.const 2)
@ -4703,7 +4687,7 @@
(i32.shl (i32.shl
(i32.const 1) (i32.const 1)
(i32.and (i32.and
(get_local $4) (get_local $3)
(i32.const 31) (i32.const 31)
) )
) )
@ -4711,17 +4695,17 @@
) )
(i32.store offset=8 (i32.store offset=8
(i32.add (i32.add
(get_local $3) (get_local $2)
(i32.shl (i32.shl
(get_local $4) (get_local $3)
(i32.const 2) (i32.const 2)
) )
) )
(get_local $2) (get_local $4)
) )
(i32.store offset=8 (i32.store offset=8
(i32.add (i32.add
(get_local $3) (get_local $2)
(i32.shl (i32.shl
(get_local $5) (get_local $5)
(i32.const 2) (i32.const 2)
@ -4731,9 +4715,9 @@
) )
) )
) )
(set_local $4 (set_local $3
(i32.sub (i32.sub
(get_local $4) (get_local $3)
(i32.const 1) (i32.const 1)
) )
) )
@ -4741,7 +4725,7 @@
) )
) )
(block $break|2 (block $break|2
(set_local $4 (set_local $3
(i32.sub (i32.sub
(get_local $8) (get_local $8)
(i32.const 1) (i32.const 1)
@ -4750,34 +4734,32 @@
(loop $repeat|2 (loop $repeat|2
(br_if $break|2 (br_if $break|2
(i32.lt_s (i32.lt_s
(get_local $4) (get_local $3)
(i32.const 2) (i32.const 2)
) )
) )
(set_local $6 (set_local $6
(i32.load offset=8 (i32.load offset=8
(get_local $3) (get_local $2)
) )
) )
(i32.store offset=8 (i32.store offset=8
(get_local $3) (get_local $2)
(tee_local $5
(i32.load offset=8 (i32.load offset=8
(i32.add (i32.add
(get_local $3) (get_local $2)
(i32.shl (i32.shl
(get_local $4) (get_local $3)
(i32.const 2) (i32.const 2)
) )
) )
) )
) )
)
(i32.store offset=8 (i32.store offset=8
(i32.add (i32.add
(get_local $3) (get_local $2)
(i32.shl (i32.shl
(get_local $4) (get_local $3)
(i32.const 2) (i32.const 2)
) )
) )
@ -4789,7 +4771,7 @@
(loop $continue|3 (loop $continue|3
(if (if
(i32.lt_s (i32.lt_s
(tee_local $2 (tee_local $4
(i32.add (i32.add
(i32.shl (i32.shl
(get_local $5) (get_local $5)
@ -4818,11 +4800,11 @@
) )
) )
) )
(get_local $4) (get_local $3)
) )
(block (block
(set_local $5 (set_local $5
(get_local $2) (get_local $4)
) )
(br $continue|3) (br $continue|3)
) )
@ -4837,13 +4819,13 @@
(block (block
(set_local $6 (set_local $6
(i32.load offset=8 (i32.load offset=8
(get_local $3) (get_local $2)
) )
) )
(set_local $2 (set_local $4
(i32.load offset=8 (i32.load offset=8
(i32.add (i32.add
(get_local $3) (get_local $2)
(i32.shl (i32.shl
(get_local $5) (get_local $5)
(i32.const 2) (i32.const 2)
@ -4858,7 +4840,7 @@
(i32.lt_s (i32.lt_s
(call_indirect (type $iii) (call_indirect (type $iii)
(get_local $6) (get_local $6)
(get_local $2) (get_local $4)
(get_local $1) (get_local $1)
) )
(i32.const 0) (i32.const 0)
@ -4892,7 +4874,7 @@
) )
(i32.store offset=8 (i32.store offset=8
(i32.add (i32.add
(get_local $3) (get_local $2)
(i32.shl (i32.shl
(get_local $5) (get_local $5)
(i32.const 2) (i32.const 2)
@ -4901,8 +4883,8 @@
(get_local $6) (get_local $6)
) )
(i32.store offset=8 (i32.store offset=8
(get_local $3)
(get_local $2) (get_local $2)
(get_local $4)
) )
) )
) )
@ -4916,9 +4898,9 @@
) )
) )
) )
(set_local $4 (set_local $3
(i32.sub (i32.sub
(get_local $4) (get_local $3)
(i32.const 1) (i32.const 1)
) )
) )
@ -4931,24 +4913,22 @@
(set_local $1 (set_local $1
(i32.load offset=8 (i32.load offset=8
(i32.add (i32.add
(get_local $3) (get_local $2)
(i32.const 4) (i32.const 4)
) )
) )
) )
(i32.store offset=8 (i32.store offset=8
(i32.add (i32.add
(get_local $3) (get_local $2)
(i32.const 4) (i32.const 4)
) )
(tee_local $2
(i32.load offset=8 (i32.load offset=8
(get_local $3) (get_local $2)
)
) )
) )
(i32.store offset=8 (i32.store offset=8
(get_local $3) (get_local $2)
(get_local $1) (get_local $1)
) )
(get_local $0) (get_local $0)

File diff suppressed because it is too large Load Diff

@ -24,7 +24,6 @@
(export "memory" (memory $0)) (export "memory" (memory $0))
(start $start) (start $start)
(func $~lib/internal/arraybuffer/computeSize (; 1 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/internal/arraybuffer/computeSize (; 1 ;) (type $ii) (param $0 i32) (result i32)
(return
(i32.shl (i32.shl
(i32.const 1) (i32.const 1)
(i32.sub (i32.sub
@ -41,7 +40,6 @@
) )
) )
) )
)
(func $~lib/allocator/arena/allocate_memory (; 2 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/allocator/arena/allocate_memory (; 2 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(local $2 i32) (local $2 i32)
@ -148,10 +146,8 @@
) )
) )
) )
(return
(i32.const 0) (i32.const 0)
) )
)
(func $~lib/internal/arraybuffer/allocUnsafe (; 3 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/internal/arraybuffer/allocUnsafe (; 3 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(if (if
@ -182,10 +178,8 @@
(get_local $1) (get_local $1)
(get_local $0) (get_local $0)
) )
(return
(get_local $1) (get_local $1)
) )
)
(func $~lib/memory/set_memory (; 4 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (func $~lib/memory/set_memory (; 4 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
@ -576,10 +570,8 @@
(get_local $1) (get_local $1)
) )
) )
(return
(get_local $3) (get_local $3)
) )
)
(func $~lib/memory/copy_memory (; 6 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (func $~lib/memory/copy_memory (; 6 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
@ -2821,10 +2813,8 @@
) )
(get_local $6) (get_local $6)
) )
(return
(get_local $7) (get_local $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)
(block $2of2 (block $2of2
(block $1of2 (block $1of2

@ -128,10 +128,8 @@
) )
) )
) )
(return
(i32.const 0) (i32.const 0)
) )
)
(func $std/constructor/EmptyCtor#constructor (; 1 ;) (type $ii) (param $0 i32) (result i32) (func $std/constructor/EmptyCtor#constructor (; 1 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(nop) (nop)
@ -201,12 +199,10 @@
) )
) )
(func $std/constructor/CtorReturns#constructor (; 4 ;) (type $ii) (param $0 i32) (result i32) (func $std/constructor/CtorReturns#constructor (; 4 ;) (type $ii) (param $0 i32) (result i32)
(return
(call $~lib/allocator/arena/allocate_memory (call $~lib/allocator/arena/allocate_memory
(i32.const 0) (i32.const 0)
) )
) )
)
(func $std/constructor/CtorConditionallyReturns#constructor (; 5 ;) (type $ii) (param $0 i32) (result i32) (func $std/constructor/CtorConditionallyReturns#constructor (; 5 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(if (if

@ -76,10 +76,8 @@
(br $repeat|0) (br $repeat|0)
) )
) )
(return
(get_local $1) (get_local $1)
) )
)
(func $~lib/internal/hash/hash32 (; 2 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/internal/hash/hash32 (; 2 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(set_local $1 (set_local $1
@ -139,10 +137,8 @@
(i32.const 16777619) (i32.const 16777619)
) )
) )
(return
(get_local $1) (get_local $1)
) )
)
(func $~lib/internal/hash/hash64 (; 3 ;) (type $Ii) (param $0 i64) (result i32) (func $~lib/internal/hash/hash64 (; 3 ;) (type $Ii) (param $0 i64) (result i32)
(local $1 i32) (local $1 i32)
(local $2 i32) (local $2 i32)
@ -271,10 +267,8 @@
(i32.const 16777619) (i32.const 16777619)
) )
) )
(return
(get_local $3) (get_local $3)
) )
)
(func $start (; 4 ;) (type $v) (func $start (; 4 ;) (type $v)
(local $0 i32) (local $0 i32)
(local $1 f32) (local $1 f32)

@ -5775,22 +5775,20 @@
) )
) )
(func $std/libm/sign (; 51 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/sign (; 51 ;) (type $FF) (param $0 f64) (result f64)
(if (if (result f64)
(f64.gt (f64.gt
(f64.abs (f64.abs
(get_local $0) (get_local $0)
) )
(f64.const 0) (f64.const 0)
) )
(set_local $0
(f64.copysign (f64.copysign
(f64.const 1) (f64.const 1)
(get_local $0) (get_local $0)
) )
)
)
(get_local $0) (get_local $0)
) )
)
(func $~lib/math/NativeMath.sinh (; 52 ;) (type $FF) (param $0 f64) (result f64) (func $~lib/math/NativeMath.sinh (; 52 ;) (type $FF) (param $0 f64) (result f64)
(local $1 f64) (local $1 f64)
(local $2 f64) (local $2 f64)

@ -59,16 +59,12 @@
(export "trunc" (func $std/libm/trunc)) (export "trunc" (func $std/libm/trunc))
(export "memory" (memory $0)) (export "memory" (memory $0))
(func $std/libm/abs (; 0 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/abs (; 0 ;) (type $FF) (param $0 f64) (result f64)
(return
(block $~lib/math/NativeMath.abs|inlined.0 (result f64) (block $~lib/math/NativeMath.abs|inlined.0 (result f64)
(br $~lib/math/NativeMath.abs|inlined.0
(f64.abs (f64.abs
(get_local $0) (get_local $0)
) )
) )
) )
)
)
(func $~lib/math/R (; 1 ;) (type $FF) (param $0 f64) (result f64) (func $~lib/math/R (; 1 ;) (type $FF) (param $0 f64) (result f64)
(local $1 f64) (local $1 f64)
(local $2 f64) (local $2 f64)
@ -135,13 +131,11 @@
) )
) )
) )
(return
(f64.div (f64.div
(get_local $1) (get_local $1)
(get_local $2) (get_local $2)
) )
) )
)
(func $~lib/math/NativeMath.acos (; 2 ;) (type $FF) (param $0 f64) (result f64) (func $~lib/math/NativeMath.acos (; 2 ;) (type $FF) (param $0 f64) (result f64)
(local $1 i32) (local $1 i32)
(local $2 i32) (local $2 i32)
@ -362,7 +356,6 @@
(get_local $8) (get_local $8)
) )
) )
(return
(f64.mul (f64.mul
(f64.const 2) (f64.const 2)
(f64.add (f64.add
@ -371,14 +364,11 @@
) )
) )
) )
)
(func $std/libm/acos (; 3 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/acos (; 3 ;) (type $FF) (param $0 f64) (result f64)
(return
(call $~lib/math/NativeMath.acos (call $~lib/math/NativeMath.acos
(get_local $0) (get_local $0)
) )
) )
)
(func $~lib/math/NativeMath.log1p (; 4 ;) (type $FF) (param $0 f64) (result f64) (func $~lib/math/NativeMath.log1p (; 4 ;) (type $FF) (param $0 f64) (result f64)
(local $1 i64) (local $1 i64)
(local $2 i32) (local $2 i32)
@ -703,7 +693,6 @@
(get_local $3) (get_local $3)
) )
) )
(return
(f64.add (f64.add
(f64.add (f64.add
(f64.sub (f64.sub
@ -733,7 +722,6 @@
) )
) )
) )
)
(func $~lib/math/NativeMath.log (; 5 ;) (type $FF) (param $0 f64) (result f64) (func $~lib/math/NativeMath.log (; 5 ;) (type $FF) (param $0 f64) (result f64)
(local $1 i64) (local $1 i64)
(local $2 i32) (local $2 i32)
@ -1005,7 +993,6 @@
(set_local $13 (set_local $13
(get_local $3) (get_local $3)
) )
(return
(f64.add (f64.add
(f64.add (f64.add
(f64.sub (f64.sub
@ -1036,7 +1023,6 @@
) )
) )
) )
)
(func $~lib/math/NativeMath.acosh (; 6 ;) (type $FF) (param $0 f64) (result f64) (func $~lib/math/NativeMath.acosh (; 6 ;) (type $FF) (param $0 f64) (result f64)
(local $1 i64) (local $1 i64)
(set_local $1 (set_local $1
@ -1124,7 +1110,6 @@
) )
) )
) )
(return
(f64.add (f64.add
(call $~lib/math/NativeMath.log (call $~lib/math/NativeMath.log
(get_local $0) (get_local $0)
@ -1132,14 +1117,11 @@
(f64.const 0.6931471805599453) (f64.const 0.6931471805599453)
) )
) )
)
(func $std/libm/acosh (; 7 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/acosh (; 7 ;) (type $FF) (param $0 f64) (result f64)
(return
(call $~lib/math/NativeMath.acosh (call $~lib/math/NativeMath.acosh
(get_local $0) (get_local $0)
) )
) )
)
(func $~lib/math/NativeMath.asin (; 8 ;) (type $FF) (param $0 f64) (result f64) (func $~lib/math/NativeMath.asin (; 8 ;) (type $FF) (param $0 f64) (result f64)
(local $1 i32) (local $1 i32)
(local $2 i32) (local $2 i32)
@ -1371,17 +1353,13 @@
) )
) )
) )
(return
(get_local $0) (get_local $0)
) )
)
(func $std/libm/asin (; 9 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/asin (; 9 ;) (type $FF) (param $0 f64) (result f64)
(return
(call $~lib/math/NativeMath.asin (call $~lib/math/NativeMath.asin
(get_local $0) (get_local $0)
) )
) )
)
(func $~lib/math/NativeMath.asinh (; 10 ;) (type $FF) (param $0 f64) (result f64) (func $~lib/math/NativeMath.asinh (; 10 ;) (type $FF) (param $0 f64) (result f64)
(local $1 i64) (local $1 i64)
(local $2 i64) (local $2 i64)
@ -1502,7 +1480,6 @@
) )
) )
) )
(return
(if (result f64) (if (result f64)
(i64.ne (i64.ne
(get_local $3) (get_local $3)
@ -1514,22 +1491,17 @@
(get_local $0) (get_local $0)
) )
) )
)
(func $std/libm/asinh (; 11 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/asinh (; 11 ;) (type $FF) (param $0 f64) (result f64)
(return
(call $~lib/math/NativeMath.asinh (call $~lib/math/NativeMath.asinh
(get_local $0) (get_local $0)
) )
) )
)
(func $isNaN<f64> (; 12 ;) (type $Fi) (param $0 f64) (result i32) (func $isNaN<f64> (; 12 ;) (type $Fi) (param $0 f64) (result i32)
(return
(f64.ne (f64.ne
(get_local $0) (get_local $0)
(get_local $0) (get_local $0)
) )
) )
)
(func $~lib/math/NativeMath.atan (; 13 ;) (type $FF) (param $0 f64) (result f64) (func $~lib/math/NativeMath.atan (; 13 ;) (type $FF) (param $0 f64) (result f64)
(local $1 i32) (local $1 i32)
(local $2 i32) (local $2 i32)
@ -1928,7 +1900,6 @@
) )
(unreachable) (unreachable)
) )
(return
(if (result f64) (if (result f64)
(get_local $2) (get_local $2)
(f64.neg (f64.neg
@ -1937,14 +1908,11 @@
(get_local $3) (get_local $3)
) )
) )
)
(func $std/libm/atan (; 14 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/atan (; 14 ;) (type $FF) (param $0 f64) (result f64)
(return
(call $~lib/math/NativeMath.atan (call $~lib/math/NativeMath.atan
(get_local $0) (get_local $0)
) )
) )
)
(func $~lib/math/NativeMath.atanh (; 15 ;) (type $FF) (param $0 f64) (result f64) (func $~lib/math/NativeMath.atanh (; 15 ;) (type $FF) (param $0 f64) (result f64)
(local $1 i64) (local $1 i64)
(local $2 i64) (local $2 i64)
@ -2042,7 +2010,6 @@
) )
) )
) )
(return
(if (result f64) (if (result f64)
(i64.ne (i64.ne
(get_local $3) (get_local $3)
@ -2054,14 +2021,11 @@
(get_local $4) (get_local $4)
) )
) )
)
(func $std/libm/atanh (; 16 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/atanh (; 16 ;) (type $FF) (param $0 f64) (result f64)
(return
(call $~lib/math/NativeMath.atanh (call $~lib/math/NativeMath.atanh
(get_local $0) (get_local $0)
) )
) )
)
(func $~lib/math/NativeMath.atan2 (; 17 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64) (func $~lib/math/NativeMath.atan2 (; 17 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
(local $2 i32) (local $2 i32)
(local $3 i64) (local $3 i64)
@ -2530,18 +2494,14 @@
) )
) )
(unreachable) (unreachable)
(return
(f64.const 0) (f64.const 0)
) )
)
(func $std/libm/atan2 (; 18 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64) (func $std/libm/atan2 (; 18 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
(return
(call $~lib/math/NativeMath.atan2 (call $~lib/math/NativeMath.atan2
(get_local $0) (get_local $0)
(get_local $1) (get_local $1)
) )
) )
)
(func $~lib/math/NativeMath.cbrt (; 19 ;) (type $FF) (param $0 f64) (result f64) (func $~lib/math/NativeMath.cbrt (; 19 ;) (type $FF) (param $0 f64) (result f64)
(local $1 i64) (local $1 i64)
(local $2 i32) (local $2 i32)
@ -2756,32 +2716,22 @@
) )
) )
) )
(return
(get_local $3) (get_local $3)
) )
)
(func $std/libm/cbrt (; 20 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/cbrt (; 20 ;) (type $FF) (param $0 f64) (result f64)
(return
(call $~lib/math/NativeMath.cbrt (call $~lib/math/NativeMath.cbrt
(get_local $0) (get_local $0)
) )
) )
)
(func $std/libm/ceil (; 21 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/ceil (; 21 ;) (type $FF) (param $0 f64) (result f64)
(return
(block $~lib/math/NativeMath.ceil|inlined.0 (result f64) (block $~lib/math/NativeMath.ceil|inlined.0 (result f64)
(br $~lib/math/NativeMath.ceil|inlined.0
(f64.ceil (f64.ceil
(get_local $0) (get_local $0)
) )
) )
) )
)
)
(func $std/libm/clz32 (; 22 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/clz32 (; 22 ;) (type $FF) (param $0 f64) (result f64)
(return
(block $~lib/math/NativeMath.clz32|inlined.0 (result f64) (block $~lib/math/NativeMath.clz32|inlined.0 (result f64)
(br $~lib/math/NativeMath.clz32|inlined.0
(f64.convert_s/i32 (f64.convert_s/i32
(i32.clz (i32.clz
(i32.trunc_s/f64 (i32.trunc_s/f64
@ -2791,21 +2741,15 @@
) )
) )
) )
)
)
(func $~lib/math/NativeMath.cos (; 23 ;) (type $FF) (param $0 f64) (result f64) (func $~lib/math/NativeMath.cos (; 23 ;) (type $FF) (param $0 f64) (result f64)
(unreachable) (unreachable)
(return
(f64.const 0) (f64.const 0)
) )
)
(func $std/libm/cos (; 24 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/cos (; 24 ;) (type $FF) (param $0 f64) (result f64)
(return
(call $~lib/math/NativeMath.cos (call $~lib/math/NativeMath.cos
(get_local $0) (get_local $0)
) )
) )
)
(func $~lib/math/NativeMath.expm1 (; 25 ;) (type $FF) (param $0 f64) (result f64) (func $~lib/math/NativeMath.expm1 (; 25 ;) (type $FF) (param $0 f64) (result f64)
(local $1 i64) (local $1 i64)
(local $2 i32) (local $2 i32)
@ -3287,10 +3231,8 @@
) )
) )
) )
(return
(get_local $14) (get_local $14)
) )
)
(func $~lib/math/NativeMath.scalbn (; 26 ;) (type $FiF) (param $0 f64) (param $1 i32) (result f64) (func $~lib/math/NativeMath.scalbn (; 26 ;) (type $FiF) (param $0 f64) (param $1 i32) (result f64)
(local $2 f64) (local $2 f64)
(set_local $2 (set_local $2
@ -3394,7 +3336,6 @@
) )
) )
) )
(return
(f64.mul (f64.mul
(get_local $2) (get_local $2)
(f64.reinterpret/i64 (f64.reinterpret/i64
@ -3410,7 +3351,6 @@
) )
) )
) )
)
(func $~lib/math/NativeMath.exp (; 27 ;) (type $FF) (param $0 f64) (result f64) (func $~lib/math/NativeMath.exp (; 27 ;) (type $FF) (param $0 f64) (result f64)
(local $1 i32) (local $1 i32)
(local $2 i32) (local $2 i32)
@ -3636,13 +3576,11 @@
(get_local $8) (get_local $8)
) )
) )
(return
(call $~lib/math/NativeMath.scalbn (call $~lib/math/NativeMath.scalbn
(get_local $8) (get_local $8)
(get_local $5) (get_local $5)
) )
) )
)
(func $~lib/math/expo2 (; 28 ;) (type $FF) (param $0 f64) (result f64) (func $~lib/math/expo2 (; 28 ;) (type $FF) (param $0 f64) (result f64)
(local $1 f64) (local $1 f64)
(set_local $1 (set_local $1
@ -3664,7 +3602,6 @@
) )
) )
) )
(return
(f64.mul (f64.mul
(f64.mul (f64.mul
(call $~lib/math/NativeMath.exp (call $~lib/math/NativeMath.exp
@ -3678,7 +3615,6 @@
(get_local $1) (get_local $1)
) )
) )
)
(func $~lib/math/NativeMath.cosh (; 29 ;) (type $FF) (param $0 f64) (result f64) (func $~lib/math/NativeMath.cosh (; 29 ;) (type $FF) (param $0 f64) (result f64)
(local $1 i64) (local $1 i64)
(local $2 i32) (local $2 i32)
@ -3783,53 +3719,37 @@
(get_local $0) (get_local $0)
) )
) )
(return
(get_local $3) (get_local $3)
) )
)
(func $std/libm/cosh (; 30 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/cosh (; 30 ;) (type $FF) (param $0 f64) (result f64)
(return
(call $~lib/math/NativeMath.cosh (call $~lib/math/NativeMath.cosh
(get_local $0) (get_local $0)
) )
) )
)
(func $std/libm/exp (; 31 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/exp (; 31 ;) (type $FF) (param $0 f64) (result f64)
(return
(call $~lib/math/NativeMath.exp (call $~lib/math/NativeMath.exp
(get_local $0) (get_local $0)
) )
) )
)
(func $std/libm/expm1 (; 32 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/expm1 (; 32 ;) (type $FF) (param $0 f64) (result f64)
(return
(call $~lib/math/NativeMath.expm1 (call $~lib/math/NativeMath.expm1
(get_local $0) (get_local $0)
) )
) )
)
(func $std/libm/floor (; 33 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/floor (; 33 ;) (type $FF) (param $0 f64) (result f64)
(return
(block $~lib/math/NativeMath.floor|inlined.0 (result f64) (block $~lib/math/NativeMath.floor|inlined.0 (result f64)
(br $~lib/math/NativeMath.floor|inlined.0
(f64.floor (f64.floor
(get_local $0) (get_local $0)
) )
) )
) )
)
)
(func $std/libm/fround (; 34 ;) (type $Ff) (param $0 f64) (result f32) (func $std/libm/fround (; 34 ;) (type $Ff) (param $0 f64) (result f32)
(return
(block $~lib/math/NativeMath.fround|inlined.0 (result f32) (block $~lib/math/NativeMath.fround|inlined.0 (result f32)
(br $~lib/math/NativeMath.fround|inlined.0
(f32.demote/f64 (f32.demote/f64
(get_local $0) (get_local $0)
) )
) )
) )
)
)
(func $~lib/math/NativeMath.hypot (; 35 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64) (func $~lib/math/NativeMath.hypot (; 35 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
(local $2 i64) (local $2 i64)
(local $3 i64) (local $3 i64)
@ -4109,7 +4029,6 @@
) )
) )
) )
(return
(f64.mul (f64.mul
(get_local $8) (get_local $8)
(f64.sqrt (f64.sqrt
@ -4126,17 +4045,13 @@
) )
) )
) )
)
(func $std/libm/hypot (; 36 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64) (func $std/libm/hypot (; 36 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
(return
(call $~lib/math/NativeMath.hypot (call $~lib/math/NativeMath.hypot
(get_local $0) (get_local $0)
(get_local $1) (get_local $1)
) )
) )
)
(func $~lib/math/NativeMath.imul (; 37 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64) (func $~lib/math/NativeMath.imul (; 37 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
(return
(f64.convert_s/i32 (f64.convert_s/i32
(i32.mul (i32.mul
(i32.trunc_s/f64 (i32.trunc_s/f64
@ -4148,22 +4063,17 @@
) )
) )
) )
)
(func $std/libm/imul (; 38 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64) (func $std/libm/imul (; 38 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
(return
(call $~lib/math/NativeMath.imul (call $~lib/math/NativeMath.imul
(get_local $0) (get_local $0)
(get_local $1) (get_local $1)
) )
) )
)
(func $std/libm/log (; 39 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/log (; 39 ;) (type $FF) (param $0 f64) (result f64)
(return
(call $~lib/math/NativeMath.log (call $~lib/math/NativeMath.log
(get_local $0) (get_local $0)
) )
) )
)
(func $~lib/math/NativeMath.log10 (; 40 ;) (type $FF) (param $0 f64) (result f64) (func $~lib/math/NativeMath.log10 (; 40 ;) (type $FF) (param $0 f64) (result f64)
(local $1 i64) (local $1 i64)
(local $2 i32) (local $2 i32)
@ -4536,27 +4446,21 @@
(set_local $15 (set_local $15
(get_local $9) (get_local $9)
) )
(return
(f64.add (f64.add
(get_local $18) (get_local $18)
(get_local $15) (get_local $15)
) )
) )
)
(func $std/libm/log10 (; 41 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/log10 (; 41 ;) (type $FF) (param $0 f64) (result f64)
(return
(call $~lib/math/NativeMath.log10 (call $~lib/math/NativeMath.log10
(get_local $0) (get_local $0)
) )
) )
)
(func $std/libm/log1p (; 42 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/log1p (; 42 ;) (type $FF) (param $0 f64) (result f64)
(return
(call $~lib/math/NativeMath.log1p (call $~lib/math/NativeMath.log1p
(get_local $0) (get_local $0)
) )
) )
)
(func $~lib/math/NativeMath.log2 (; 43 ;) (type $FF) (param $0 f64) (result f64) (func $~lib/math/NativeMath.log2 (; 43 ;) (type $FF) (param $0 f64) (result f64)
(local $1 i64) (local $1 i64)
(local $2 i32) (local $2 i32)
@ -4916,44 +4820,32 @@
(set_local $15 (set_local $15
(get_local $9) (get_local $9)
) )
(return
(f64.add (f64.add
(get_local $16) (get_local $16)
(get_local $15) (get_local $15)
) )
) )
)
(func $std/libm/log2 (; 44 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/log2 (; 44 ;) (type $FF) (param $0 f64) (result f64)
(return
(call $~lib/math/NativeMath.log2 (call $~lib/math/NativeMath.log2
(get_local $0) (get_local $0)
) )
) )
)
(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)
(return
(block $~lib/math/NativeMath.max|inlined.0 (result f64) (block $~lib/math/NativeMath.max|inlined.0 (result f64)
(br $~lib/math/NativeMath.max|inlined.0
(f64.max (f64.max
(get_local $0) (get_local $0)
(get_local $1) (get_local $1)
) )
) )
) )
)
)
(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)
(return
(block $~lib/math/NativeMath.min|inlined.0 (result f64) (block $~lib/math/NativeMath.min|inlined.0 (result f64)
(br $~lib/math/NativeMath.min|inlined.0
(f64.min (f64.min
(get_local $0) (get_local $0)
(get_local $1) (get_local $1)
) )
) )
) )
)
)
(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)
(local $2 i64) (local $2 i64)
(local $3 i32) (local $3 i32)
@ -6507,21 +6399,17 @@
) )
) )
) )
(return
(f64.mul (f64.mul
(get_local $14) (get_local $14)
(get_local $13) (get_local $13)
) )
) )
)
(func $std/libm/pow (; 48 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64) (func $std/libm/pow (; 48 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
(return
(call $~lib/math/NativeMath.pow (call $~lib/math/NativeMath.pow
(get_local $0) (get_local $0)
(get_local $1) (get_local $1)
) )
) )
)
(func $~lib/math/NativeMath.round (; 49 ;) (type $FF) (param $0 f64) (result f64) (func $~lib/math/NativeMath.round (; 49 ;) (type $FF) (param $0 f64) (result f64)
(local $1 i64) (local $1 i64)
(local $2 i32) (local $2 i32)
@ -6678,21 +6566,15 @@
) )
) )
) )
(return
(get_local $3) (get_local $3)
) )
)
(func $std/libm/round (; 50 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/round (; 50 ;) (type $FF) (param $0 f64) (result f64)
(return
(call $~lib/math/NativeMath.round (call $~lib/math/NativeMath.round
(get_local $0) (get_local $0)
) )
) )
)
(func $std/libm/sign (; 51 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/sign (; 51 ;) (type $FF) (param $0 f64) (result f64)
(return
(block $~lib/math/NativeMath.sign|inlined.0 (result f64) (block $~lib/math/NativeMath.sign|inlined.0 (result f64)
(br $~lib/math/NativeMath.sign|inlined.0
(if (result f64) (if (result f64)
(f64.gt (f64.gt
(f64.abs (f64.abs
@ -6708,21 +6590,15 @@
) )
) )
) )
)
)
(func $~lib/math/NativeMath.sin (; 52 ;) (type $FF) (param $0 f64) (result f64) (func $~lib/math/NativeMath.sin (; 52 ;) (type $FF) (param $0 f64) (result f64)
(unreachable) (unreachable)
(return
(f64.const 0) (f64.const 0)
) )
)
(func $std/libm/sin (; 53 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/sin (; 53 ;) (type $FF) (param $0 f64) (result f64)
(return
(call $~lib/math/NativeMath.sin (call $~lib/math/NativeMath.sin
(get_local $0) (get_local $0)
) )
) )
)
(func $~lib/math/NativeMath.sinh (; 54 ;) (type $FF) (param $0 f64) (result f64) (func $~lib/math/NativeMath.sinh (; 54 ;) (type $FF) (param $0 f64) (result f64)
(local $1 i64) (local $1 i64)
(local $2 f64) (local $2 f64)
@ -6853,41 +6729,29 @@
) )
) )
) )
(return
(get_local $5) (get_local $5)
) )
)
(func $std/libm/sinh (; 55 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/sinh (; 55 ;) (type $FF) (param $0 f64) (result f64)
(return
(call $~lib/math/NativeMath.sinh (call $~lib/math/NativeMath.sinh
(get_local $0) (get_local $0)
) )
) )
)
(func $std/libm/sqrt (; 56 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/sqrt (; 56 ;) (type $FF) (param $0 f64) (result f64)
(return
(block $~lib/math/NativeMath.sqrt|inlined.0 (result f64) (block $~lib/math/NativeMath.sqrt|inlined.0 (result f64)
(br $~lib/math/NativeMath.sqrt|inlined.0
(f64.sqrt (f64.sqrt
(get_local $0) (get_local $0)
) )
) )
) )
)
)
(func $~lib/math/NativeMath.tan (; 57 ;) (type $FF) (param $0 f64) (result f64) (func $~lib/math/NativeMath.tan (; 57 ;) (type $FF) (param $0 f64) (result f64)
(unreachable) (unreachable)
(return
(f64.const 0) (f64.const 0)
) )
)
(func $std/libm/tan (; 58 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/tan (; 58 ;) (type $FF) (param $0 f64) (result f64)
(return
(call $~lib/math/NativeMath.tan (call $~lib/math/NativeMath.tan
(get_local $0) (get_local $0)
) )
) )
)
(func $~lib/math/NativeMath.tanh (; 59 ;) (type $FF) (param $0 f64) (result f64) (func $~lib/math/NativeMath.tanh (; 59 ;) (type $FF) (param $0 f64) (result f64)
(local $1 i64) (local $1 i64)
(local $2 i32) (local $2 i32)
@ -7023,7 +6887,6 @@
) )
) )
) )
(return
(if (result f64) (if (result f64)
(get_local $2) (get_local $2)
(f64.neg (f64.neg
@ -7032,23 +6895,16 @@
(get_local $4) (get_local $4)
) )
) )
)
(func $std/libm/tanh (; 60 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/tanh (; 60 ;) (type $FF) (param $0 f64) (result f64)
(return
(call $~lib/math/NativeMath.tanh (call $~lib/math/NativeMath.tanh
(get_local $0) (get_local $0)
) )
) )
)
(func $std/libm/trunc (; 61 ;) (type $FF) (param $0 f64) (result f64) (func $std/libm/trunc (; 61 ;) (type $FF) (param $0 f64) (result f64)
(return
(block $~lib/math/NativeMath.trunc|inlined.0 (result f64) (block $~lib/math/NativeMath.trunc|inlined.0 (result f64)
(br $~lib/math/NativeMath.trunc|inlined.0
(f64.trunc (f64.trunc
(get_local $0) (get_local $0)
) )
) )
) )
) )
)
)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -12438,22 +12438,20 @@
) )
) )
(func $std/math/test_signf (; 142 ;) (type $fffii) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) (func $std/math/test_signf (; 142 ;) (type $fffii) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32)
(if (call $std/math/check<f32>
(if (result f32)
(f32.gt (f32.gt
(f32.abs (f32.abs
(get_local $0) (get_local $0)
) )
(f32.const 0) (f32.const 0)
) )
(set_local $0
(f32.copysign (f32.copysign
(f32.const 1) (f32.const 1)
(get_local $0) (get_local $0)
) )
)
)
(call $std/math/check<f32>
(get_local $0) (get_local $0)
)
(get_local $1) (get_local $1)
(get_local $2) (get_local $2)
(get_local $3) (get_local $3)

File diff suppressed because it is too large Load Diff

@ -20,13 +20,11 @@
(export "memory" (memory $0)) (export "memory" (memory $0))
(start $start) (start $start)
(func $isNaN<f64> (; 2 ;) (type $Fi) (param $0 f64) (result i32) (func $isNaN<f64> (; 2 ;) (type $Fi) (param $0 f64) (result i32)
(return
(f64.ne (f64.ne
(get_local $0) (get_local $0)
(get_local $0) (get_local $0)
) )
) )
)
(func $~lib/math/NativeMath.mod (; 3 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64) (func $~lib/math/NativeMath.mod (; 3 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
(local $2 i64) (local $2 i64)
(local $3 i64) (local $3 i64)
@ -463,12 +461,10 @@
) )
) )
) )
(return
(f64.reinterpret/i64 (f64.reinterpret/i64
(get_local $2) (get_local $2)
) )
) )
)
(func $std/mod/check<f64> (; 4 ;) (type $FFi) (param $0 f64) (param $1 f64) (result i32) (func $std/mod/check<f64> (; 4 ;) (type $FFi) (param $0 f64) (param $1 f64) (result i32)
(if (if
(call $isNaN<f64> (call $isNaN<f64>
@ -500,16 +496,13 @@
) )
) )
) )
(return
(f64.eq (f64.eq
(get_local $0) (get_local $0)
(get_local $1) (get_local $1)
) )
) )
)
(func $std/mod/test_fmod (; 5 ;) (type $FFFi) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) (func $std/mod/test_fmod (; 5 ;) (type $FFFi) (param $0 f64) (param $1 f64) (param $2 f64) (result i32)
(local $3 i32) (local $3 i32)
(return
(if (result i32) (if (result i32)
(tee_local $3 (tee_local $3
(call $std/mod/check<f64> (call $std/mod/check<f64>
@ -538,15 +531,12 @@
(get_local $3) (get_local $3)
) )
) )
)
(func $isNaN<f32> (; 6 ;) (type $fi) (param $0 f32) (result i32) (func $isNaN<f32> (; 6 ;) (type $fi) (param $0 f32) (result i32)
(return
(f32.ne (f32.ne
(get_local $0) (get_local $0)
(get_local $0) (get_local $0)
) )
) )
)
(func $~lib/math/NativeMathf.mod (; 7 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32) (func $~lib/math/NativeMathf.mod (; 7 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
@ -964,12 +954,10 @@
(get_local $6) (get_local $6)
) )
) )
(return
(f32.reinterpret/i32 (f32.reinterpret/i32
(get_local $2) (get_local $2)
) )
) )
)
(func $std/mod/check<f32> (; 8 ;) (type $ffi) (param $0 f32) (param $1 f32) (result i32) (func $std/mod/check<f32> (; 8 ;) (type $ffi) (param $0 f32) (param $1 f32) (result i32)
(if (if
(call $isNaN<f32> (call $isNaN<f32>
@ -1001,15 +989,12 @@
) )
) )
) )
(return
(f32.eq (f32.eq
(get_local $0) (get_local $0)
(get_local $1) (get_local $1)
) )
) )
)
(func $std/mod/test_fmodf (; 9 ;) (type $fffi) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) (func $std/mod/test_fmodf (; 9 ;) (type $fffi) (param $0 f32) (param $1 f32) (param $2 f32) (result i32)
(return
(call $std/mod/check<f32> (call $std/mod/check<f32>
(call $~lib/math/NativeMathf.mod (call $~lib/math/NativeMathf.mod
(get_local $0) (get_local $0)
@ -1018,7 +1003,6 @@
(get_local $2) (get_local $2)
) )
) )
)
(func $start (; 10 ;) (type $v) (func $start (; 10 ;) (type $v)
(if (if
(i32.eqz (i32.eqz

@ -119,10 +119,8 @@
) )
) )
) )
(return
(i32.const 0) (i32.const 0)
) )
)
(func $std/new/AClass#constructor (; 1 ;) (type $ifi) (param $0 i32) (param $1 f32) (result i32) (func $std/new/AClass#constructor (; 1 ;) (type $ifi) (param $0 i32) (param $1 f32) (result i32)
(local $2 i32) (local $2 i32)
(block (block

@ -3417,7 +3417,6 @@
) )
) )
(set_global $std/operator-overloading/ais (set_global $std/operator-overloading/ais
(tee_local $0
(call $std/operator-overloading/Tester#constructor (call $std/operator-overloading/Tester#constructor
(i32.const 0) (i32.const 0)
(i32.add (i32.add
@ -3442,7 +3441,6 @@
) )
) )
) )
)
(if (if
(tee_local $1 (tee_local $1
(i32.eq (i32.eq
@ -3490,7 +3488,6 @@
) )
) )
(set_global $std/operator-overloading/aii (set_global $std/operator-overloading/aii
(tee_local $0
(call $std/operator-overloading/Tester#constructor (call $std/operator-overloading/Tester#constructor
(i32.const 0) (i32.const 0)
(i32.add (i32.add
@ -3515,7 +3512,6 @@
) )
) )
) )
)
(if (if
(tee_local $0 (tee_local $0
(i32.eq (i32.eq

@ -190,10 +190,8 @@
) )
) )
) )
(return
(i32.const 0) (i32.const 0)
) )
)
(func $std/operator-overloading/Tester#constructor (; 2 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (func $std/operator-overloading/Tester#constructor (; 2 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32) (local $3 i32)
(nop) (nop)
@ -223,7 +221,6 @@
) )
) )
(func $std/operator-overloading/Tester.add (; 3 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $std/operator-overloading/Tester.add (; 3 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(return
(call $std/operator-overloading/Tester#constructor (call $std/operator-overloading/Tester#constructor
(i32.const 0) (i32.const 0)
(i32.add (i32.add
@ -244,9 +241,7 @@
) )
) )
) )
)
(func $std/operator-overloading/Tester.sub (; 4 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $std/operator-overloading/Tester.sub (; 4 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(return
(call $std/operator-overloading/Tester#constructor (call $std/operator-overloading/Tester#constructor
(i32.const 0) (i32.const 0)
(i32.sub (i32.sub
@ -267,9 +262,7 @@
) )
) )
) )
)
(func $std/operator-overloading/Tester.mul (; 5 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $std/operator-overloading/Tester.mul (; 5 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(return
(call $std/operator-overloading/Tester#constructor (call $std/operator-overloading/Tester#constructor
(i32.const 0) (i32.const 0)
(i32.mul (i32.mul
@ -290,9 +283,7 @@
) )
) )
) )
)
(func $std/operator-overloading/Tester.div (; 6 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $std/operator-overloading/Tester.div (; 6 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(return
(call $std/operator-overloading/Tester#constructor (call $std/operator-overloading/Tester#constructor
(i32.const 0) (i32.const 0)
(i32.div_s (i32.div_s
@ -313,9 +304,7 @@
) )
) )
) )
)
(func $std/operator-overloading/Tester.mod (; 7 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $std/operator-overloading/Tester.mod (; 7 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(return
(call $std/operator-overloading/Tester#constructor (call $std/operator-overloading/Tester#constructor
(i32.const 0) (i32.const 0)
(i32.rem_s (i32.rem_s
@ -336,7 +325,6 @@
) )
) )
) )
)
(func $~lib/math/NativeMath.scalbn (; 8 ;) (type $FiF) (param $0 f64) (param $1 i32) (result f64) (func $~lib/math/NativeMath.scalbn (; 8 ;) (type $FiF) (param $0 f64) (param $1 i32) (result f64)
(local $2 f64) (local $2 f64)
(set_local $2 (set_local $2
@ -440,7 +428,6 @@
) )
) )
) )
(return
(f64.mul (f64.mul
(get_local $2) (get_local $2)
(f64.reinterpret/i64 (f64.reinterpret/i64
@ -456,7 +443,6 @@
) )
) )
) )
)
(func $~lib/math/NativeMath.pow (; 9 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64) (func $~lib/math/NativeMath.pow (; 9 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
(local $2 i64) (local $2 i64)
(local $3 i32) (local $3 i32)
@ -2010,15 +1996,12 @@
) )
) )
) )
(return
(f64.mul (f64.mul
(get_local $14) (get_local $14)
(get_local $13) (get_local $13)
) )
) )
)
(func $std/operator-overloading/Tester.pow (; 10 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $std/operator-overloading/Tester.pow (; 10 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(return
(call $std/operator-overloading/Tester#constructor (call $std/operator-overloading/Tester#constructor
(i32.const 0) (i32.const 0)
(i32.trunc_s/f64 (i32.trunc_s/f64
@ -2051,9 +2034,7 @@
) )
) )
) )
)
(func $std/operator-overloading/Tester.and (; 11 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $std/operator-overloading/Tester.and (; 11 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(return
(call $std/operator-overloading/Tester#constructor (call $std/operator-overloading/Tester#constructor
(i32.const 0) (i32.const 0)
(i32.and (i32.and
@ -2074,9 +2055,7 @@
) )
) )
) )
)
(func $std/operator-overloading/Tester.or (; 12 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $std/operator-overloading/Tester.or (; 12 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(return
(call $std/operator-overloading/Tester#constructor (call $std/operator-overloading/Tester#constructor
(i32.const 0) (i32.const 0)
(i32.or (i32.or
@ -2097,9 +2076,7 @@
) )
) )
) )
)
(func $std/operator-overloading/Tester.xor (; 13 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $std/operator-overloading/Tester.xor (; 13 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(return
(call $std/operator-overloading/Tester#constructor (call $std/operator-overloading/Tester#constructor
(i32.const 0) (i32.const 0)
(i32.xor (i32.xor
@ -2120,10 +2097,8 @@
) )
) )
) )
)
(func $std/operator-overloading/Tester.equals (; 14 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $std/operator-overloading/Tester.equals (; 14 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
(return
(if (result i32) (if (result i32)
(tee_local $2 (tee_local $2
(i32.eq (i32.eq
@ -2146,10 +2121,8 @@
(get_local $2) (get_local $2)
) )
) )
)
(func $std/operator-overloading/Tester.notEquals (; 15 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $std/operator-overloading/Tester.notEquals (; 15 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
(return
(if (result i32) (if (result i32)
(tee_local $2 (tee_local $2
(i32.ne (i32.ne
@ -2172,10 +2145,8 @@
(get_local $2) (get_local $2)
) )
) )
)
(func $std/operator-overloading/Tester.greater (; 16 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $std/operator-overloading/Tester.greater (; 16 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
(return
(if (result i32) (if (result i32)
(tee_local $2 (tee_local $2
(i32.gt_s (i32.gt_s
@ -2198,10 +2169,8 @@
(get_local $2) (get_local $2)
) )
) )
)
(func $std/operator-overloading/Tester.greaterEquals (; 17 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $std/operator-overloading/Tester.greaterEquals (; 17 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
(return
(if (result i32) (if (result i32)
(tee_local $2 (tee_local $2
(i32.ge_s (i32.ge_s
@ -2224,10 +2193,8 @@
(get_local $2) (get_local $2)
) )
) )
)
(func $std/operator-overloading/Tester.less (; 18 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $std/operator-overloading/Tester.less (; 18 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
(return
(if (result i32) (if (result i32)
(tee_local $2 (tee_local $2
(i32.lt_s (i32.lt_s
@ -2250,10 +2217,8 @@
(get_local $2) (get_local $2)
) )
) )
)
(func $std/operator-overloading/Tester.lessEquals (; 19 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $std/operator-overloading/Tester.lessEquals (; 19 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
(return
(if (result i32) (if (result i32)
(tee_local $2 (tee_local $2
(i32.le_s (i32.le_s
@ -2276,9 +2241,7 @@
(get_local $2) (get_local $2)
) )
) )
)
(func $std/operator-overloading/Tester.shr (; 20 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $std/operator-overloading/Tester.shr (; 20 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(return
(call $std/operator-overloading/Tester#constructor (call $std/operator-overloading/Tester#constructor
(i32.const 0) (i32.const 0)
(i32.shr_s (i32.shr_s
@ -2295,9 +2258,7 @@
) )
) )
) )
)
(func $std/operator-overloading/Tester.shu (; 21 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $std/operator-overloading/Tester.shu (; 21 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(return
(call $std/operator-overloading/Tester#constructor (call $std/operator-overloading/Tester#constructor
(i32.const 0) (i32.const 0)
(i32.shr_u (i32.shr_u
@ -2314,9 +2275,7 @@
) )
) )
) )
)
(func $std/operator-overloading/Tester.shl (; 22 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $std/operator-overloading/Tester.shl (; 22 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(return
(call $std/operator-overloading/Tester#constructor (call $std/operator-overloading/Tester#constructor
(i32.const 0) (i32.const 0)
(i32.shl (i32.shl
@ -2333,9 +2292,7 @@
) )
) )
) )
)
(func $std/operator-overloading/Tester.pos (; 23 ;) (type $ii) (param $0 i32) (result i32) (func $std/operator-overloading/Tester.pos (; 23 ;) (type $ii) (param $0 i32) (result i32)
(return
(call $std/operator-overloading/Tester#constructor (call $std/operator-overloading/Tester#constructor
(i32.const 0) (i32.const 0)
(i32.load (i32.load
@ -2346,9 +2303,7 @@
) )
) )
) )
)
(func $std/operator-overloading/Tester.neg (; 24 ;) (type $ii) (param $0 i32) (result i32) (func $std/operator-overloading/Tester.neg (; 24 ;) (type $ii) (param $0 i32) (result i32)
(return
(call $std/operator-overloading/Tester#constructor (call $std/operator-overloading/Tester#constructor
(i32.const 0) (i32.const 0)
(i32.sub (i32.sub
@ -2365,9 +2320,7 @@
) )
) )
) )
)
(func $std/operator-overloading/Tester.not (; 25 ;) (type $ii) (param $0 i32) (result i32) (func $std/operator-overloading/Tester.not (; 25 ;) (type $ii) (param $0 i32) (result i32)
(return
(call $std/operator-overloading/Tester#constructor (call $std/operator-overloading/Tester#constructor
(i32.const 0) (i32.const 0)
(i32.xor (i32.xor
@ -2384,10 +2337,8 @@
) )
) )
) )
)
(func $std/operator-overloading/Tester.excl (; 26 ;) (type $ii) (param $0 i32) (result i32) (func $std/operator-overloading/Tester.excl (; 26 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(return
(if (result i32) (if (result i32)
(tee_local $1 (tee_local $1
(i32.eqz (i32.eqz
@ -2404,7 +2355,6 @@
(get_local $1) (get_local $1)
) )
) )
)
(func $std/operator-overloading/Tester#inc (; 27 ;) (type $ii) (param $0 i32) (result i32) (func $std/operator-overloading/Tester#inc (; 27 ;) (type $ii) (param $0 i32) (result i32)
(i32.store (i32.store
(get_local $0) (get_local $0)
@ -2424,10 +2374,8 @@
(i32.const 1) (i32.const 1)
) )
) )
(return
(get_local $0) (get_local $0)
) )
)
(func $std/operator-overloading/Tester#dec (; 28 ;) (type $ii) (param $0 i32) (result i32) (func $std/operator-overloading/Tester#dec (; 28 ;) (type $ii) (param $0 i32) (result i32)
(i32.store (i32.store
(get_local $0) (get_local $0)
@ -2447,10 +2395,8 @@
(i32.const 1) (i32.const 1)
) )
) )
(return
(get_local $0) (get_local $0)
) )
)
(func $std/operator-overloading/TesterInlineStatic#constructor (; 29 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (func $std/operator-overloading/TesterInlineStatic#constructor (; 29 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32) (local $3 i32)
(nop) (nop)
@ -3681,7 +3627,6 @@
(set_local $1 (set_local $1
(get_global $std/operator-overloading/ais2) (get_global $std/operator-overloading/ais2)
) )
(br $std/operator-overloading/TesterInlineStatic.add|inlined.0
(call $std/operator-overloading/TesterInlineStatic#constructor (call $std/operator-overloading/TesterInlineStatic#constructor
(i32.const 0) (i32.const 0)
(i32.add (i32.add
@ -3703,7 +3648,6 @@
) )
) )
) )
)
(if (if
(i32.eqz (i32.eqz
(if (result i32) (if (result i32)
@ -3756,7 +3700,6 @@
(set_local $0 (set_local $0
(get_global $std/operator-overloading/aii2) (get_global $std/operator-overloading/aii2)
) )
(br $std/operator-overloading/TesterInlineInstance#add|inlined.0
(call $std/operator-overloading/TesterInlineInstance#constructor (call $std/operator-overloading/TesterInlineInstance#constructor
(i32.const 0) (i32.const 0)
(i32.add (i32.add
@ -3778,7 +3721,6 @@
) )
) )
) )
)
(if (if
(i32.eqz (i32.eqz
(if (result i32) (if (result i32)

@ -1,7 +1,6 @@
(module (module
(type $iii (func (param i32 i32) (result i32))) (type $iii (func (param i32 i32) (result i32)))
(type $iv (func (param i32))) (type $iv (func (param i32)))
(type $ii (func (param i32) (result i32)))
(type $iiiiv (func (param i32 i32 i32 i32))) (type $iiiiv (func (param i32 i32 i32 i32)))
(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)))
@ -15,8 +14,6 @@
(data (i32.const 8) "\0e\00\00\00s\00t\00d\00/\00p\00o\00i\00n\00t\00e\00r\00.\00t\00s") (data (i32.const 8) "\0e\00\00\00s\00t\00d\00/\00p\00o\00i\00n\00t\00e\00r\00.\00t\00s")
(export "_setargc" (func $~setargc)) (export "_setargc" (func $~setargc))
(export "Pointer<Entry>#constructor" (func $std/pointer/Pointer<Entry>#constructor|trampoline)) (export "Pointer<Entry>#constructor" (func $std/pointer/Pointer<Entry>#constructor|trampoline))
(export "Pointer<Entry>#get:offset" (func $std/pointer/Pointer<Entry>#get:offset))
(export "Pointer<Entry>#get:value" (func $std/pointer/Pointer<Entry>#get:offset))
(export "memory" (memory $0)) (export "memory" (memory $0))
(start $start) (start $start)
(func $std/pointer/Pointer<Entry>#constructor (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $std/pointer/Pointer<Entry>#constructor (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
@ -46,10 +43,7 @@
(get_local $0) (get_local $0)
) )
) )
(func $std/pointer/Pointer<Entry>#get:offset (; 4 ;) (type $ii) (param $0 i32) (result i32) (func $start (; 4 ;) (type $v)
(get_local $0)
)
(func $start (; 5 ;) (type $v)
(set_global $std/pointer/one (set_global $std/pointer/one
(call $std/pointer/Pointer<Entry>#constructor (call $std/pointer/Pointer<Entry>#constructor
(i32.const 0) (i32.const 0)
@ -64,16 +58,14 @@
) )
(if (if
(i32.ne (i32.ne
(call $std/pointer/Pointer<Entry>#get:offset
(get_global $std/pointer/one) (get_global $std/pointer/one)
)
(i32.const 8) (i32.const 8)
) )
(block (block
(call $~lib/env/abort (call $~lib/env/abort
(i32.const 0) (i32.const 0)
(i32.const 8) (i32.const 8)
(i32.const 54) (i32.const 52)
(i32.const 0) (i32.const 0)
) )
(unreachable) (unreachable)
@ -81,47 +73,39 @@
) )
(if (if
(i32.ne (i32.ne
(call $std/pointer/Pointer<Entry>#get:offset
(get_global $std/pointer/two) (get_global $std/pointer/two)
)
(i32.const 24) (i32.const 24)
) )
(block (block
(call $~lib/env/abort (call $~lib/env/abort
(i32.const 0) (i32.const 0)
(i32.const 8) (i32.const 8)
(i32.const 55) (i32.const 53)
(i32.const 0) (i32.const 0)
) )
(unreachable) (unreachable)
) )
) )
(i32.store (i32.store
(call $std/pointer/Pointer<Entry>#get:offset
(get_global $std/pointer/one) (get_global $std/pointer/one)
)
(i32.const 1) (i32.const 1)
) )
(i32.store offset=4 (i32.store offset=4
(call $std/pointer/Pointer<Entry>#get:offset
(get_global $std/pointer/one) (get_global $std/pointer/one)
)
(i32.const 2) (i32.const 2)
) )
(if (if
(i32.ne (i32.ne
(i32.load (i32.load
(call $std/pointer/Pointer<Entry>#get:offset
(get_global $std/pointer/one) (get_global $std/pointer/one)
) )
)
(i32.const 1) (i32.const 1)
) )
(block (block
(call $~lib/env/abort (call $~lib/env/abort
(i32.const 0) (i32.const 0)
(i32.const 8) (i32.const 8)
(i32.const 59) (i32.const 57)
(i32.const 0) (i32.const 0)
) )
(unreachable) (unreachable)
@ -130,17 +114,15 @@
(if (if
(i32.ne (i32.ne
(i32.load offset=4 (i32.load offset=4
(call $std/pointer/Pointer<Entry>#get:offset
(get_global $std/pointer/one) (get_global $std/pointer/one)
) )
)
(i32.const 2) (i32.const 2)
) )
(block (block
(call $~lib/env/abort (call $~lib/env/abort
(i32.const 0) (i32.const 0)
(i32.const 8) (i32.const 8)
(i32.const 60) (i32.const 58)
(i32.const 0) (i32.const 0)
) )
(unreachable) (unreachable)
@ -154,16 +136,14 @@
) )
(if (if
(i32.ne (i32.ne
(call $std/pointer/Pointer<Entry>#get:offset
(get_global $std/pointer/add) (get_global $std/pointer/add)
)
(i32.const 32) (i32.const 32)
) )
(block (block
(call $~lib/env/abort (call $~lib/env/abort
(i32.const 0) (i32.const 0)
(i32.const 8) (i32.const 8)
(i32.const 63) (i32.const 61)
(i32.const 0) (i32.const 0)
) )
(unreachable) (unreachable)
@ -177,16 +157,14 @@
) )
(if (if
(i32.ne (i32.ne
(call $std/pointer/Pointer<Entry>#get:offset
(get_global $std/pointer/sub) (get_global $std/pointer/sub)
)
(i32.const 16) (i32.const 16)
) )
(block (block
(call $~lib/env/abort (call $~lib/env/abort
(i32.const 0) (i32.const 0)
(i32.const 8) (i32.const 8)
(i32.const 66) (i32.const 64)
(i32.const 0) (i32.const 0)
) )
(unreachable) (unreachable)
@ -194,16 +172,14 @@
) )
(if (if
(i32.ne (i32.ne
(call $std/pointer/Pointer<Entry>#get:offset
(get_global $std/pointer/one) (get_global $std/pointer/one)
)
(i32.const 8) (i32.const 8)
) )
(block (block
(call $~lib/env/abort (call $~lib/env/abort
(i32.const 0) (i32.const 0)
(i32.const 8) (i32.const 8)
(i32.const 68) (i32.const 66)
(i32.const 0) (i32.const 0)
) )
(unreachable) (unreachable)
@ -227,7 +203,7 @@
(call $~lib/env/abort (call $~lib/env/abort
(i32.const 0) (i32.const 0)
(i32.const 8) (i32.const 8)
(i32.const 70) (i32.const 68)
(i32.const 0) (i32.const 0)
) )
(unreachable) (unreachable)
@ -235,11 +211,24 @@
) )
(if (if
(i32.ne (i32.ne
(call $std/pointer/Pointer<Entry>#get:offset
(get_global $std/pointer/one) (get_global $std/pointer/one)
)
(i32.const 16) (i32.const 16)
) )
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 69)
(i32.const 0)
)
(unreachable)
)
)
(if
(i32.ne
(get_global $std/pointer/two)
(i32.const 24)
)
(block (block
(call $~lib/env/abort (call $~lib/env/abort
(i32.const 0) (i32.const 0)
@ -250,41 +239,56 @@
(unreachable) (unreachable)
) )
) )
(set_global $std/pointer/two
(i32.sub
(get_global $std/pointer/two)
(i32.const 8)
)
)
(set_global $std/pointer/two
(i32.sub
(get_global $std/pointer/two)
(i32.const 8)
)
)
(if (if
(i32.ne (i32.ne
(call $std/pointer/Pointer<Entry>#get:offset
(get_global $std/pointer/two) (get_global $std/pointer/two)
) (i32.const 8)
(i32.const 24)
) )
(block (block
(call $~lib/env/abort (call $~lib/env/abort
(i32.const 0) (i32.const 0)
(i32.const 8) (i32.const 8)
(i32.const 73) (i32.const 74)
(i32.const 0) (i32.const 0)
) )
(unreachable) (unreachable)
) )
) )
(set_global $std/pointer/two (if
(i32.sub (i32.ne
(i32.load
(get_global $std/pointer/two) (get_global $std/pointer/two)
(i32.const 8)
) )
(i32.const 1)
) )
(set_global $std/pointer/two (block
(i32.sub (call $~lib/env/abort
(get_global $std/pointer/two) (i32.const 0)
(i32.const 8) (i32.const 8)
(i32.const 75)
(i32.const 0)
)
(unreachable)
) )
) )
(if (if
(i32.ne (i32.ne
(call $std/pointer/Pointer<Entry>#get:offset (i32.load offset=4
(get_global $std/pointer/two) (get_global $std/pointer/two)
) )
(i32.const 8) (i32.const 2)
) )
(block (block
(call $~lib/env/abort (call $~lib/env/abort
@ -296,43 +300,5 @@
(unreachable) (unreachable)
) )
) )
(if
(i32.ne
(i32.load
(call $std/pointer/Pointer<Entry>#get:offset
(get_global $std/pointer/two)
)
)
(i32.const 1)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 77)
(i32.const 0)
)
(unreachable)
)
)
(if
(i32.ne
(i32.load offset=4
(call $std/pointer/Pointer<Entry>#get:offset
(get_global $std/pointer/two)
)
)
(i32.const 2)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 78)
(i32.const 0)
)
(unreachable)
)
)
) )
) )

@ -7,12 +7,10 @@ export class Pointer<T> {
return changetype<Pointer<T>>(offset); return changetype<Pointer<T>>(offset);
} }
// FIXME: does not inline
@inline get offset(): usize { @inline get offset(): usize {
return changetype<usize>(this); return changetype<usize>(this);
} }
// FIXME: does not inline
@inline get value(): T { @inline get value(): T {
return changetype<T>(changetype<usize>(this)); return changetype<T>(changetype<usize>(this));
} }

@ -1,7 +1,6 @@
(module (module
(type $iii (func (param i32 i32) (result i32))) (type $iii (func (param i32 i32) (result i32)))
(type $iv (func (param i32))) (type $iv (func (param i32)))
(type $ii (func (param i32) (result i32)))
(type $iiiiv (func (param i32 i32 i32 i32))) (type $iiiiv (func (param i32 i32 i32 i32)))
(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)))
@ -16,15 +15,11 @@
(data (i32.const 8) "\0e\00\00\00s\00t\00d\00/\00p\00o\00i\00n\00t\00e\00r\00.\00t\00s\00") (data (i32.const 8) "\0e\00\00\00s\00t\00d\00/\00p\00o\00i\00n\00t\00e\00r\00.\00t\00s\00")
(export "_setargc" (func $~setargc)) (export "_setargc" (func $~setargc))
(export "Pointer<Entry>#constructor" (func $std/pointer/Pointer<Entry>#constructor|trampoline)) (export "Pointer<Entry>#constructor" (func $std/pointer/Pointer<Entry>#constructor|trampoline))
(export "Pointer<Entry>#get:offset" (func $std/pointer/Pointer<Entry>#get:offset))
(export "Pointer<Entry>#get:value" (func $std/pointer/Pointer<Entry>#get:value))
(export "memory" (memory $0)) (export "memory" (memory $0))
(start $start) (start $start)
(func $std/pointer/Pointer<Entry>#constructor (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $std/pointer/Pointer<Entry>#constructor (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(return
(get_local $1) (get_local $1)
) )
)
(func $std/pointer/Pointer<Entry>#constructor|trampoline (; 2 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $std/pointer/Pointer<Entry>#constructor|trampoline (; 2 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(block $1of1 (block $1of1
(block $0of1 (block $0of1
@ -49,17 +44,7 @@
(get_local $0) (get_local $0)
) )
) )
(func $std/pointer/Pointer<Entry>#get:offset (; 4 ;) (type $ii) (param $0 i32) (result i32) (func $start (; 4 ;) (type $v)
(return
(get_local $0)
)
)
(func $std/pointer/Pointer<Entry>#get:value (; 5 ;) (type $ii) (param $0 i32) (result i32)
(return
(get_local $0)
)
)
(func $start (; 6 ;) (type $v)
(local $0 i32) (local $0 i32)
(local $1 i32) (local $1 i32)
(set_global $std/pointer/one (set_global $std/pointer/one
@ -77,9 +62,12 @@
(if (if
(i32.eqz (i32.eqz
(i32.eq (i32.eq
(call $std/pointer/Pointer<Entry>#get:offset (block $std/pointer/Pointer<Entry>#get:offset|inlined.0 (result i32)
(set_local $0
(get_global $std/pointer/one) (get_global $std/pointer/one)
) )
(get_local $0)
)
(i32.const 8) (i32.const 8)
) )
) )
@ -87,7 +75,7 @@
(call $~lib/env/abort (call $~lib/env/abort
(i32.const 0) (i32.const 0)
(i32.const 8) (i32.const 8)
(i32.const 54) (i32.const 52)
(i32.const 0) (i32.const 0)
) )
(unreachable) (unreachable)
@ -96,9 +84,12 @@
(if (if
(i32.eqz (i32.eqz
(i32.eq (i32.eq
(call $std/pointer/Pointer<Entry>#get:offset (block $std/pointer/Pointer<Entry>#get:offset|inlined.1 (result i32)
(set_local $0
(get_global $std/pointer/two) (get_global $std/pointer/two)
) )
(get_local $0)
)
(i32.const 24) (i32.const 24)
) )
) )
@ -106,31 +97,40 @@
(call $~lib/env/abort (call $~lib/env/abort
(i32.const 0) (i32.const 0)
(i32.const 8) (i32.const 8)
(i32.const 55) (i32.const 53)
(i32.const 0) (i32.const 0)
) )
(unreachable) (unreachable)
) )
) )
(i32.store (i32.store
(call $std/pointer/Pointer<Entry>#get:value (block $std/pointer/Pointer<Entry>#get:value|inlined.0 (result i32)
(set_local $0
(get_global $std/pointer/one) (get_global $std/pointer/one)
) )
(get_local $0)
)
(i32.const 1) (i32.const 1)
) )
(i32.store offset=4 (i32.store offset=4
(call $std/pointer/Pointer<Entry>#get:value (block $std/pointer/Pointer<Entry>#get:value|inlined.1 (result i32)
(set_local $0
(get_global $std/pointer/one) (get_global $std/pointer/one)
) )
(get_local $0)
)
(i32.const 2) (i32.const 2)
) )
(if (if
(i32.eqz (i32.eqz
(i32.eq (i32.eq
(i32.load (i32.load
(call $std/pointer/Pointer<Entry>#get:value (block $std/pointer/Pointer<Entry>#get:value|inlined.2 (result i32)
(set_local $0
(get_global $std/pointer/one) (get_global $std/pointer/one)
) )
(get_local $0)
)
) )
(i32.const 1) (i32.const 1)
) )
@ -139,7 +139,7 @@
(call $~lib/env/abort (call $~lib/env/abort
(i32.const 0) (i32.const 0)
(i32.const 8) (i32.const 8)
(i32.const 59) (i32.const 57)
(i32.const 0) (i32.const 0)
) )
(unreachable) (unreachable)
@ -149,9 +149,12 @@
(i32.eqz (i32.eqz
(i32.eq (i32.eq
(i32.load offset=4 (i32.load offset=4
(call $std/pointer/Pointer<Entry>#get:value (block $std/pointer/Pointer<Entry>#get:value|inlined.3 (result i32)
(set_local $0
(get_global $std/pointer/one) (get_global $std/pointer/one)
) )
(get_local $0)
)
) )
(i32.const 2) (i32.const 2)
) )
@ -160,7 +163,7 @@
(call $~lib/env/abort (call $~lib/env/abort
(i32.const 0) (i32.const 0)
(i32.const 8) (i32.const 8)
(i32.const 60) (i32.const 58)
(i32.const 0) (i32.const 0)
) )
(unreachable) (unreachable)
@ -174,20 +177,21 @@
(set_local $1 (set_local $1
(get_global $std/pointer/two) (get_global $std/pointer/two)
) )
(br $std/pointer/Pointer<Entry>#add|inlined.0
(i32.add (i32.add
(get_local $0) (get_local $0)
(get_local $1) (get_local $1)
) )
) )
) )
)
(if (if
(i32.eqz (i32.eqz
(i32.eq (i32.eq
(call $std/pointer/Pointer<Entry>#get:offset (block $std/pointer/Pointer<Entry>#get:offset|inlined.2 (result i32)
(set_local $1
(get_global $std/pointer/add) (get_global $std/pointer/add)
) )
(get_local $1)
)
(i32.const 32) (i32.const 32)
) )
) )
@ -195,7 +199,7 @@
(call $~lib/env/abort (call $~lib/env/abort
(i32.const 0) (i32.const 0)
(i32.const 8) (i32.const 8)
(i32.const 63) (i32.const 61)
(i32.const 0) (i32.const 0)
) )
(unreachable) (unreachable)
@ -209,21 +213,44 @@
(set_local $0 (set_local $0
(get_global $std/pointer/one) (get_global $std/pointer/one)
) )
(br $std/pointer/Pointer<Entry>#sub|inlined.0
(i32.sub (i32.sub
(get_local $1) (get_local $1)
(get_local $0) (get_local $0)
) )
) )
) )
(if
(i32.eqz
(i32.eq
(block $std/pointer/Pointer<Entry>#get:offset|inlined.3 (result i32)
(set_local $0
(get_global $std/pointer/sub)
)
(get_local $0)
)
(i32.const 16)
)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 64)
(i32.const 0)
)
(unreachable)
)
) )
(if (if
(i32.eqz (i32.eqz
(i32.eq (i32.eq
(call $std/pointer/Pointer<Entry>#get:offset (block $std/pointer/Pointer<Entry>#get:offset|inlined.4 (result i32)
(get_global $std/pointer/sub) (set_local $0
(get_global $std/pointer/one)
) )
(i32.const 16) (get_local $0)
)
(i32.const 8)
) )
) )
(block (block
@ -236,25 +263,6 @@
(unreachable) (unreachable)
) )
) )
(if
(i32.eqz
(i32.eq
(call $std/pointer/Pointer<Entry>#get:offset
(get_global $std/pointer/one)
)
(i32.const 8)
)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 68)
(i32.const 0)
)
(unreachable)
)
)
(set_global $std/pointer/nextOne (set_global $std/pointer/nextOne
(block (result i32) (block (result i32)
(set_global $std/pointer/one (set_global $std/pointer/one
@ -262,14 +270,12 @@
(set_local $0 (set_local $0
(get_global $std/pointer/one) (get_global $std/pointer/one)
) )
(br $std/pointer/Pointer<Entry>#inc|inlined.0
(i32.add (i32.add
(get_local $0) (get_local $0)
(i32.const 8) (i32.const 8)
) )
) )
) )
)
(get_global $std/pointer/one) (get_global $std/pointer/one)
) )
) )
@ -284,7 +290,7 @@
(call $~lib/env/abort (call $~lib/env/abort
(i32.const 0) (i32.const 0)
(i32.const 8) (i32.const 8)
(i32.const 70) (i32.const 68)
(i32.const 0) (i32.const 0)
) )
(unreachable) (unreachable)
@ -293,12 +299,37 @@
(if (if
(i32.eqz (i32.eqz
(i32.eq (i32.eq
(call $std/pointer/Pointer<Entry>#get:offset (block $std/pointer/Pointer<Entry>#get:offset|inlined.5 (result i32)
(set_local $0
(get_global $std/pointer/one) (get_global $std/pointer/one)
) )
(get_local $0)
)
(i32.const 16) (i32.const 16)
) )
) )
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 69)
(i32.const 0)
)
(unreachable)
)
)
(if
(i32.eqz
(i32.eq
(block $std/pointer/Pointer<Entry>#get:offset|inlined.6 (result i32)
(set_local $0
(get_global $std/pointer/two)
)
(get_local $0)
)
(i32.const 24)
)
)
(block (block
(call $~lib/env/abort (call $~lib/env/abort
(i32.const 0) (i32.const 0)
@ -309,58 +340,86 @@
(unreachable) (unreachable)
) )
) )
(if
(i32.eqz
(i32.eq
(call $std/pointer/Pointer<Entry>#get:offset
(get_global $std/pointer/two)
)
(i32.const 24)
)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 73)
(i32.const 0)
)
(unreachable)
)
)
(set_global $std/pointer/two (set_global $std/pointer/two
(block $std/pointer/Pointer<Entry>#dec|inlined.0 (result i32) (block $std/pointer/Pointer<Entry>#dec|inlined.0 (result i32)
(set_local $0 (set_local $0
(get_global $std/pointer/two) (get_global $std/pointer/two)
) )
(br $std/pointer/Pointer<Entry>#dec|inlined.0
(i32.sub (i32.sub
(get_local $0) (get_local $0)
(i32.const 8) (i32.const 8)
) )
) )
) )
)
(set_global $std/pointer/two (set_global $std/pointer/two
(block $std/pointer/Pointer<Entry>#dec|inlined.1 (result i32) (block $std/pointer/Pointer<Entry>#dec|inlined.1 (result i32)
(set_local $0 (set_local $0
(get_global $std/pointer/two) (get_global $std/pointer/two)
) )
(br $std/pointer/Pointer<Entry>#dec|inlined.1
(i32.sub (i32.sub
(get_local $0) (get_local $0)
(i32.const 8) (i32.const 8)
) )
) )
) )
(if
(i32.eqz
(i32.eq
(block $std/pointer/Pointer<Entry>#get:offset|inlined.7 (result i32)
(set_local $0
(get_global $std/pointer/two)
)
(get_local $0)
)
(i32.const 8)
)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 74)
(i32.const 0)
)
(unreachable)
)
) )
(if (if
(i32.eqz (i32.eqz
(i32.eq (i32.eq
(call $std/pointer/Pointer<Entry>#get:offset (i32.load
(block $std/pointer/Pointer<Entry>#get:value|inlined.4 (result i32)
(set_local $0
(get_global $std/pointer/two) (get_global $std/pointer/two)
) )
(get_local $0)
)
)
(i32.const 1)
)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8) (i32.const 8)
(i32.const 75)
(i32.const 0)
)
(unreachable)
)
)
(if
(i32.eqz
(i32.eq
(i32.load offset=4
(block $std/pointer/Pointer<Entry>#get:value|inlined.5 (result i32)
(set_local $0
(get_global $std/pointer/two)
)
(get_local $0)
)
)
(i32.const 2)
) )
) )
(block (block
@ -373,47 +432,5 @@
(unreachable) (unreachable)
) )
) )
(if
(i32.eqz
(i32.eq
(i32.load
(call $std/pointer/Pointer<Entry>#get:value
(get_global $std/pointer/two)
)
)
(i32.const 1)
)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 77)
(i32.const 0)
)
(unreachable)
)
)
(if
(i32.eqz
(i32.eq
(i32.load offset=4
(call $std/pointer/Pointer<Entry>#get:value
(get_global $std/pointer/two)
)
)
(i32.const 2)
)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 78)
(i32.const 0)
)
(unreachable)
)
)
) )
) )

@ -89,10 +89,8 @@
) )
) )
) )
(return
(get_local $0) (get_local $0)
) )
)
(func $~lib/polyfills/bswap<u16> (; 2 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/polyfills/bswap<u16> (; 2 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(if (if
@ -227,10 +225,8 @@
) )
) )
) )
(return
(get_local $0) (get_local $0)
) )
)
(func $~lib/polyfills/bswap<i16> (; 4 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/polyfills/bswap<i16> (; 4 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(if (if
@ -825,10 +821,8 @@
) )
) )
) )
(return
(get_local $0) (get_local $0)
) )
)
(func $~lib/polyfills/bswap16<i32> (; 12 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/polyfills/bswap16<i32> (; 12 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(if (if
@ -905,10 +899,8 @@
) )
) )
) )
(return
(get_local $0) (get_local $0)
) )
)
(func $start (; 13 ;) (type $v) (func $start (; 13 ;) (type $v)
(if (if
(i32.eqz (i32.eqz

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -35,12 +35,10 @@
(export "memory" (memory $0)) (export "memory" (memory $0))
(start $start) (start $start)
(func $~lib/array/Array<i32>#get:length (; 1 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/array/Array<i32>#get:length (; 1 ;) (type $ii) (param $0 i32) (result i32)
(return
(i32.load offset=4 (i32.load offset=4
(get_local $0) (get_local $0)
) )
) )
)
(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)
(set_local $2 (set_local $2
@ -48,7 +46,6 @@
(get_local $0) (get_local $0)
) )
) )
(return
(if (result i32) (if (result i32)
(i32.lt_u (i32.lt_u
(get_local $1) (get_local $1)
@ -60,7 +57,6 @@
) )
) )
(block $~lib/internal/arraybuffer/loadUnsafe<i32,i32>|inlined.0 (result i32) (block $~lib/internal/arraybuffer/loadUnsafe<i32,i32>|inlined.0 (result i32)
(br $~lib/internal/arraybuffer/loadUnsafe<i32,i32>|inlined.0
(i32.load offset=8 (i32.load offset=8
(i32.add (i32.add
(get_local $2) (get_local $2)
@ -71,13 +67,10 @@
) )
) )
) )
)
(unreachable) (unreachable)
) )
) )
)
(func $~lib/internal/arraybuffer/computeSize (; 3 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/internal/arraybuffer/computeSize (; 3 ;) (type $ii) (param $0 i32) (result i32)
(return
(i32.shl (i32.shl
(i32.const 1) (i32.const 1)
(i32.sub (i32.sub
@ -94,7 +87,6 @@
) )
) )
) )
)
(func $~lib/memory/set_memory (; 4 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (func $~lib/memory/set_memory (; 4 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
@ -553,10 +545,8 @@
) )
) )
) )
(return
(i32.const 0) (i32.const 0)
) )
)
(func $~lib/internal/arraybuffer/allocUnsafe (; 6 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/internal/arraybuffer/allocUnsafe (; 6 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(if (if
@ -587,10 +577,8 @@
(get_local $1) (get_local $1)
(get_local $0) (get_local $0)
) )
(return
(get_local $1) (get_local $1)
) )
)
(func $~lib/memory/copy_memory (; 7 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (func $~lib/memory/copy_memory (; 7 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
@ -2839,10 +2827,8 @@
) )
) )
) )
(return
(get_local $0) (get_local $0)
) )
)
(func $~lib/array/Array<i32>#__set (; 10 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (func $~lib/array/Array<i32>#__set (; 10 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
@ -2919,12 +2905,10 @@
) )
) )
(func $~lib/array/Array<i64>#get:length (; 11 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/array/Array<i64>#get:length (; 11 ;) (type $ii) (param $0 i32) (result i32)
(return
(i32.load offset=4 (i32.load offset=4
(get_local $0) (get_local $0)
) )
) )
)
(func $~lib/array/Array<i64>#__get (; 12 ;) (type $iiI) (param $0 i32) (param $1 i32) (result i64) (func $~lib/array/Array<i64>#__get (; 12 ;) (type $iiI) (param $0 i32) (param $1 i32) (result i64)
(local $2 i32) (local $2 i32)
(set_local $2 (set_local $2
@ -2932,7 +2916,6 @@
(get_local $0) (get_local $0)
) )
) )
(return
(if (result i64) (if (result i64)
(i32.lt_u (i32.lt_u
(get_local $1) (get_local $1)
@ -2944,7 +2927,6 @@
) )
) )
(block $~lib/internal/arraybuffer/loadUnsafe<i64,i64>|inlined.0 (result i64) (block $~lib/internal/arraybuffer/loadUnsafe<i64,i64>|inlined.0 (result i64)
(br $~lib/internal/arraybuffer/loadUnsafe<i64,i64>|inlined.0
(i64.load offset=8 (i64.load offset=8
(i32.add (i32.add
(get_local $2) (get_local $2)
@ -2955,11 +2937,9 @@
) )
) )
) )
)
(unreachable) (unreachable)
) )
) )
)
(func $~lib/array/Array<i64>#__set (; 13 ;) (type $iiIv) (param $0 i32) (param $1 i32) (param $2 i64) (func $~lib/array/Array<i64>#__set (; 13 ;) (type $iiIv) (param $0 i32) (param $1 i32) (param $2 i64)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
@ -3036,12 +3016,10 @@
) )
) )
(func $~lib/array/Array<f32>#get:length (; 14 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/array/Array<f32>#get:length (; 14 ;) (type $ii) (param $0 i32) (result i32)
(return
(i32.load offset=4 (i32.load offset=4
(get_local $0) (get_local $0)
) )
) )
)
(func $~lib/array/Array<f32>#__get (; 15 ;) (type $iif) (param $0 i32) (param $1 i32) (result f32) (func $~lib/array/Array<f32>#__get (; 15 ;) (type $iif) (param $0 i32) (param $1 i32) (result f32)
(local $2 i32) (local $2 i32)
(set_local $2 (set_local $2
@ -3049,7 +3027,6 @@
(get_local $0) (get_local $0)
) )
) )
(return
(if (result f32) (if (result f32)
(i32.lt_u (i32.lt_u
(get_local $1) (get_local $1)
@ -3061,7 +3038,6 @@
) )
) )
(block $~lib/internal/arraybuffer/loadUnsafe<f32,f32>|inlined.0 (result f32) (block $~lib/internal/arraybuffer/loadUnsafe<f32,f32>|inlined.0 (result f32)
(br $~lib/internal/arraybuffer/loadUnsafe<f32,f32>|inlined.0
(f32.load offset=8 (f32.load offset=8
(i32.add (i32.add
(get_local $2) (get_local $2)
@ -3072,11 +3048,9 @@
) )
) )
) )
)
(unreachable) (unreachable)
) )
) )
)
(func $~lib/array/Array<f32>#__set (; 16 ;) (type $iifv) (param $0 i32) (param $1 i32) (param $2 f32) (func $~lib/array/Array<f32>#__set (; 16 ;) (type $iifv) (param $0 i32) (param $1 i32) (param $2 f32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
@ -3153,12 +3127,10 @@
) )
) )
(func $~lib/array/Array<f64>#get:length (; 17 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/array/Array<f64>#get:length (; 17 ;) (type $ii) (param $0 i32) (result i32)
(return
(i32.load offset=4 (i32.load offset=4
(get_local $0) (get_local $0)
) )
) )
)
(func $~lib/array/Array<f64>#__get (; 18 ;) (type $iiF) (param $0 i32) (param $1 i32) (result f64) (func $~lib/array/Array<f64>#__get (; 18 ;) (type $iiF) (param $0 i32) (param $1 i32) (result f64)
(local $2 i32) (local $2 i32)
(set_local $2 (set_local $2
@ -3166,7 +3138,6 @@
(get_local $0) (get_local $0)
) )
) )
(return
(if (result f64) (if (result f64)
(i32.lt_u (i32.lt_u
(get_local $1) (get_local $1)
@ -3178,7 +3149,6 @@
) )
) )
(block $~lib/internal/arraybuffer/loadUnsafe<f64,f64>|inlined.0 (result f64) (block $~lib/internal/arraybuffer/loadUnsafe<f64,f64>|inlined.0 (result f64)
(br $~lib/internal/arraybuffer/loadUnsafe<f64,f64>|inlined.0
(f64.load offset=8 (f64.load offset=8
(i32.add (i32.add
(get_local $2) (get_local $2)
@ -3189,11 +3159,9 @@
) )
) )
) )
)
(unreachable) (unreachable)
) )
) )
)
(func $~lib/array/Array<f64>#__set (; 19 ;) (type $iiFv) (param $0 i32) (param $1 i32) (param $2 f64) (func $~lib/array/Array<f64>#__set (; 19 ;) (type $iiFv) (param $0 i32) (param $1 i32) (param $2 f64)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)

@ -175,10 +175,8 @@
) )
) )
) )
(return
(get_local $1) (get_local $1)
) )
)
(func $~lib/allocator/arena/allocate_memory (; 2 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/allocator/arena/allocate_memory (; 2 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(local $2 i32) (local $2 i32)
@ -285,10 +283,8 @@
) )
) )
) )
(return
(i32.const 0) (i32.const 0)
) )
)
(func $~lib/string/String#toUTF8 (; 3 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/string/String#toUTF8 (; 3 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(local $2 i32) (local $2 i32)
@ -599,10 +595,8 @@
) )
(i32.const 0) (i32.const 0)
) )
(return
(get_local $1) (get_local $1)
) )
)
(func $~lib/allocator/arena/free_memory (; 4 ;) (type $iv) (param $0 i32) (func $~lib/allocator/arena/free_memory (; 4 ;) (type $iv) (param $0 i32)
(nop) (nop)
) )

@ -116,7 +116,6 @@
(i32.const -1) (i32.const -1)
) )
) )
(return
(i32.load16_u offset=4 (i32.load16_u offset=4
(i32.add (i32.add
(get_local $0) (get_local $0)
@ -127,7 +126,6 @@
) )
) )
) )
)
(func $~lib/memory/compare_memory (; 2 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (func $~lib/memory/compare_memory (; 2 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(if (if
(i32.eq (i32.eq
@ -179,7 +177,6 @@
) )
) )
) )
(return
(if (result i32) (if (result i32)
(get_local $2) (get_local $2)
(i32.sub (i32.sub
@ -193,7 +190,6 @@
(i32.const 0) (i32.const 0)
) )
) )
)
(func $~lib/string/String#startsWith (; 3 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (func $~lib/string/String#startsWith (; 3 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
@ -277,7 +273,6 @@
(i32.const 0) (i32.const 0)
) )
) )
(return
(i32.eqz (i32.eqz
(call $~lib/memory/compare_memory (call $~lib/memory/compare_memory
(i32.add (i32.add
@ -301,7 +296,6 @@
) )
) )
) )
)
(func $~lib/string/String#endsWith (; 4 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (func $~lib/string/String#endsWith (; 4 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
@ -381,7 +375,6 @@
(i32.const 0) (i32.const 0)
) )
) )
(return
(i32.eqz (i32.eqz
(call $~lib/memory/compare_memory (call $~lib/memory/compare_memory
(i32.add (i32.add
@ -405,7 +398,6 @@
) )
) )
) )
)
(func $~lib/string/String#endsWith|trampoline (; 5 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (func $~lib/string/String#endsWith|trampoline (; 5 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(block $1of1 (block $1of1
(block $0of1 (block $0of1
@ -552,12 +544,9 @@
(br $repeat|0) (br $repeat|0)
) )
) )
(return
(i32.const -1) (i32.const -1)
) )
)
(func $~lib/string/String#includes (; 7 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (func $~lib/string/String#includes (; 7 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(return
(i32.ne (i32.ne
(call $~lib/string/String#indexOf (call $~lib/string/String#indexOf
(get_local $0) (get_local $0)
@ -567,12 +556,9 @@
(i32.const -1) (i32.const -1)
) )
) )
)
(func $std/string/getString (; 8 ;) (type $i) (result i32) (func $std/string/getString (; 8 ;) (type $i) (result i32)
(return
(get_global $std/string/str) (get_global $std/string/str)
) )
)
(func $~lib/internal/string/parse<f64> (; 9 ;) (type $iiF) (param $0 i32) (param $1 i32) (result f64) (func $~lib/internal/string/parse<f64> (; 9 ;) (type $iiF) (param $0 i32) (param $1 i32) (result f64)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
@ -958,21 +944,17 @@
) )
) )
) )
(return
(f64.mul (f64.mul
(get_local $5) (get_local $5)
(get_local $7) (get_local $7)
) )
) )
)
(func $~lib/string/parseInt (; 10 ;) (type $iiF) (param $0 i32) (param $1 i32) (result f64) (func $~lib/string/parseInt (; 10 ;) (type $iiF) (param $0 i32) (param $1 i32) (result f64)
(return
(call $~lib/internal/string/parse<f64> (call $~lib/internal/string/parse<f64>
(get_local $0) (get_local $0)
(get_local $1) (get_local $1)
) )
) )
)
(func $~lib/string/parseFloat (; 11 ;) (type $iF) (param $0 i32) (result f64) (func $~lib/string/parseFloat (; 11 ;) (type $iF) (param $0 i32) (result f64)
(local $1 i32) (local $1 i32)
(local $2 i32) (local $2 i32)
@ -1245,13 +1227,11 @@
) )
) )
) )
(return
(f64.mul (f64.mul
(get_local $4) (get_local $4)
(get_local $5) (get_local $5)
) )
) )
)
(func $~lib/allocator/arena/allocate_memory (; 12 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/allocator/arena/allocate_memory (; 12 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(local $2 i32) (local $2 i32)
@ -1358,10 +1338,8 @@
) )
) )
) )
(return
(i32.const 0) (i32.const 0)
) )
)
(func $~lib/internal/string/allocate (; 13 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/internal/string/allocate (; 13 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(local $2 i32) (local $2 i32)
@ -1406,10 +1384,8 @@
(get_local $2) (get_local $2)
(get_local $0) (get_local $0)
) )
(return
(get_local $2) (get_local $2)
) )
)
(func $~lib/memory/copy_memory (; 14 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (func $~lib/memory/copy_memory (; 14 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
@ -3625,10 +3601,8 @@
(i32.const 1) (i32.const 1)
) )
) )
(return
(get_local $5) (get_local $5)
) )
)
(func $~lib/string/String.__concat (; 17 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/string/String.__concat (; 17 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(if (if
(i32.eqz (i32.eqz
@ -3638,13 +3612,11 @@
(i32.const 116) (i32.const 116)
) )
) )
(return
(call $~lib/string/String#concat (call $~lib/string/String#concat
(get_local $0) (get_local $0)
(get_local $1) (get_local $1)
) )
) )
)
(func $~lib/string/String.__eq (; 18 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/string/String.__eq (; 18 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
@ -3691,7 +3663,6 @@
(i32.const 0) (i32.const 0)
) )
) )
(return
(i32.eqz (i32.eqz
(call $~lib/memory/compare_memory (call $~lib/memory/compare_memory
(i32.add (i32.add
@ -3709,9 +3680,7 @@
) )
) )
) )
)
(func $~lib/string/String.__ne (; 19 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/string/String.__ne (; 19 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(return
(i32.eqz (i32.eqz
(call $~lib/string/String.__eq (call $~lib/string/String.__eq
(get_local $0) (get_local $0)
@ -3719,7 +3688,6 @@
) )
) )
) )
)
(func $~lib/string/String.__gt (; 20 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/string/String.__gt (; 20 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
@ -3793,7 +3761,6 @@
) )
) )
) )
(return
(i32.gt_s (i32.gt_s
(call $~lib/memory/compare_memory (call $~lib/memory/compare_memory
(i32.add (i32.add
@ -3812,7 +3779,6 @@
(i32.const 0) (i32.const 0)
) )
) )
)
(func $~lib/string/String.__gte (; 21 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/string/String.__gte (; 21 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
@ -3888,7 +3854,6 @@
) )
) )
) )
(return
(i32.ge_s (i32.ge_s
(call $~lib/memory/compare_memory (call $~lib/memory/compare_memory
(i32.add (i32.add
@ -3907,7 +3872,6 @@
(i32.const 0) (i32.const 0)
) )
) )
)
(func $~lib/string/String.__lt (; 22 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/string/String.__lt (; 22 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
@ -3981,7 +3945,6 @@
) )
) )
) )
(return
(i32.lt_s (i32.lt_s
(call $~lib/memory/compare_memory (call $~lib/memory/compare_memory
(i32.add (i32.add
@ -4000,7 +3963,6 @@
(i32.const 0) (i32.const 0)
) )
) )
)
(func $~lib/string/String.__lte (; 23 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/string/String.__lte (; 23 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
@ -4076,7 +4038,6 @@
) )
) )
) )
(return
(i32.le_s (i32.le_s
(call $~lib/memory/compare_memory (call $~lib/memory/compare_memory
(i32.add (i32.add
@ -4095,7 +4056,6 @@
(i32.const 0) (i32.const 0)
) )
) )
)
(func $~lib/string/String#repeat (; 24 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/string/String#repeat (; 24 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
@ -4238,10 +4198,8 @@
(br $repeat|0) (br $repeat|0)
) )
) )
(return
(get_local $4) (get_local $4)
) )
)
(func $start (; 25 ;) (type $v) (func $start (; 25 ;) (type $v)
(set_global $~lib/allocator/arena/startOffset (set_global $~lib/allocator/arena/startOffset
(i32.and (i32.and

@ -1,16 +1,16 @@
(module (module
(type $iii (func (param i32 i32) (result i32)))
(type $iiiiv (func (param i32 i32 i32 i32)))
(type $ii (func (param i32) (result i32))) (type $ii (func (param i32) (result i32)))
(type $iiiiv (func (param i32 i32 i32 i32)))
(type $iv (func (param i32))) (type $iv (func (param i32)))
(type $iiii (func (param i32 i32 i32) (result i32))) (type $iiii (func (param i32 i32 i32) (result i32)))
(type $iiiv (func (param i32 i32 i32))) (type $iiiv (func (param i32 i32 i32)))
(type $iii (func (param i32 i32) (result i32)))
(type $iiv (func (param i32 i32))) (type $iiv (func (param i32 i32)))
(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)))
(global $~lib/allocator/arena/startOffset (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)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0))
(global $~lib/symbol/nextId (mut i32) (i32.const 1)) (global $~lib/symbol/nextId (mut i32) (i32.const 12))
(global $std/symbol/sym1 (mut i32) (i32.const 0)) (global $std/symbol/sym1 (mut i32) (i32.const 0))
(global $std/symbol/sym2 (mut i32) (i32.const 0)) (global $std/symbol/sym2 (mut i32) (i32.const 0))
(global $~lib/symbol/stringToId (mut i32) (i32.const 0)) (global $~lib/symbol/stringToId (mut i32) (i32.const 0))
@ -29,7 +29,7 @@
(data (i32.const 96) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") (data (i32.const 96) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s")
(export "memory" (memory $0)) (export "memory" (memory $0))
(start $start) (start $start)
(func $~lib/symbol/Symbol#constructor (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/symbol/Symbol (; 1 ;) (type $ii) (param $0 i32) (result i32)
(set_global $~lib/symbol/nextId (set_global $~lib/symbol/nextId
(i32.add (i32.add
(tee_local $0 (tee_local $0
@ -914,8 +914,7 @@
(call $~lib/arraybuffer/ArrayBuffer#constructor (call $~lib/arraybuffer/ArrayBuffer#constructor
(i32.const 0) (i32.const 0)
(i32.mul (i32.mul
(tee_local $2 (tee_local $7
(tee_local $8
(i32.trunc_s/f64 (i32.trunc_s/f64
(f64.mul (f64.mul
(f64.convert_s/i32 (f64.convert_s/i32
@ -925,16 +924,14 @@
) )
) )
) )
)
(i32.const 12) (i32.const 12)
) )
(i32.const 1) (i32.const 1)
) )
) )
(set_local $6 (set_local $8
(i32.add (i32.add
(tee_local $3 (tee_local $3
(tee_local $2
(i32.add (i32.add
(i32.load offset=8 (i32.load offset=8
(get_local $0) (get_local $0)
@ -942,18 +939,15 @@
(i32.const 8) (i32.const 8)
) )
) )
)
(i32.mul (i32.mul
(tee_local $6
(i32.load offset=16 (i32.load offset=16
(get_local $0) (get_local $0)
) )
)
(i32.const 12) (i32.const 12)
) )
) )
) )
(set_local $3 (set_local $2
(i32.add (i32.add
(get_local $5) (get_local $5)
(i32.const 8) (i32.const 8)
@ -962,44 +956,44 @@
(loop $continue|0 (loop $continue|0
(if (if
(i32.ne (i32.ne
(get_local $2) (get_local $3)
(get_local $6) (get_local $8)
) )
(block (block
(if (if
(i32.eqz (i32.eqz
(i32.and (i32.and
(i32.load offset=8 (i32.load offset=8
(get_local $2) (get_local $3)
) )
(i32.const 1) (i32.const 1)
) )
) )
(block (block
(i32.store (i32.store
(get_local $3)
(i32.load
(get_local $2) (get_local $2)
(i32.load
(get_local $3)
) )
) )
(i32.store offset=4 (i32.store offset=4
(get_local $3)
(i32.load offset=4
(get_local $2) (get_local $2)
(i32.load offset=4
(get_local $3)
) )
) )
(i32.store offset=8 (i32.store offset=8
(get_local $3) (get_local $2)
(i32.load offset=8 (i32.load offset=8
(tee_local $7 (tee_local $6
(i32.add (i32.add
(get_local $4) (get_local $4)
(i32.shl (i32.shl
(i32.and (i32.and
(tee_local $7 (tee_local $6
(call $~lib/internal/hash/hashStr (call $~lib/internal/hash/hashStr
(i32.load (i32.load
(get_local $2) (get_local $3)
) )
) )
) )
@ -1012,20 +1006,20 @@
) )
) )
(i32.store offset=8 (i32.store offset=8
(get_local $7) (get_local $6)
(get_local $3) (get_local $2)
) )
(set_local $3 (set_local $2
(i32.add (i32.add
(get_local $3) (get_local $2)
(i32.const 12) (i32.const 12)
) )
) )
) )
) )
(set_local $2 (set_local $3
(i32.add (i32.add
(get_local $2) (get_local $3)
(i32.const 12) (i32.const 12)
) )
) )
@ -1047,7 +1041,7 @@
) )
(i32.store offset=12 (i32.store offset=12
(get_local $0) (get_local $0)
(get_local $8) (get_local $7)
) )
(i32.store offset=16 (i32.store offset=16
(get_local $0) (get_local $0)
@ -1088,7 +1082,7 @@
) )
(call $~lib/map/Map<String,usize>#rehash (call $~lib/map/Map<String,usize>#rehash
(get_local $0) (get_local $0)
(tee_local $4 (tee_local $3
(if (result i32) (if (result i32)
(i32.lt_s (i32.lt_s
(i32.load offset=20 (i32.load offset=20
@ -1122,12 +1116,9 @@
) )
) )
(set_local $3 (set_local $3
(i32.add
(i32.load offset=8 (i32.load offset=8
(get_local $0) (get_local $0)
) )
(i32.const 8)
)
) )
(i32.store offset=16 (i32.store offset=16
(get_local $0) (get_local $0)
@ -1142,8 +1133,11 @@
) )
(i32.store (i32.store
(tee_local $3 (tee_local $3
(i32.add
(i32.add (i32.add
(get_local $3) (get_local $3)
(i32.const 8)
)
(i32.mul (i32.mul
(get_local $4) (get_local $4)
(i32.const 12) (i32.const 12)
@ -1328,8 +1322,7 @@
(call $~lib/arraybuffer/ArrayBuffer#constructor (call $~lib/arraybuffer/ArrayBuffer#constructor
(i32.const 0) (i32.const 0)
(i32.mul (i32.mul
(tee_local $2 (tee_local $7
(tee_local $8
(i32.trunc_s/f64 (i32.trunc_s/f64
(f64.mul (f64.mul
(f64.convert_s/i32 (f64.convert_s/i32
@ -1339,16 +1332,14 @@
) )
) )
) )
)
(i32.const 12) (i32.const 12)
) )
(i32.const 1) (i32.const 1)
) )
) )
(set_local $6 (set_local $8
(i32.add (i32.add
(tee_local $3 (tee_local $3
(tee_local $2
(i32.add (i32.add
(i32.load offset=8 (i32.load offset=8
(get_local $0) (get_local $0)
@ -1356,18 +1347,15 @@
(i32.const 8) (i32.const 8)
) )
) )
)
(i32.mul (i32.mul
(tee_local $6
(i32.load offset=16 (i32.load offset=16
(get_local $0) (get_local $0)
) )
)
(i32.const 12) (i32.const 12)
) )
) )
) )
(set_local $3 (set_local $2
(i32.add (i32.add
(get_local $5) (get_local $5)
(i32.const 8) (i32.const 8)
@ -1376,44 +1364,44 @@
(loop $continue|0 (loop $continue|0
(if (if
(i32.ne (i32.ne
(get_local $2) (get_local $3)
(get_local $6) (get_local $8)
) )
(block (block
(if (if
(i32.eqz (i32.eqz
(i32.and (i32.and
(i32.load offset=8 (i32.load offset=8
(get_local $2) (get_local $3)
) )
(i32.const 1) (i32.const 1)
) )
) )
(block (block
(i32.store (i32.store
(get_local $3)
(i32.load
(get_local $2) (get_local $2)
(i32.load
(get_local $3)
) )
) )
(i32.store offset=4 (i32.store offset=4
(get_local $3)
(i32.load offset=4
(get_local $2) (get_local $2)
(i32.load offset=4
(get_local $3)
) )
) )
(i32.store offset=8 (i32.store offset=8
(get_local $3) (get_local $2)
(i32.load offset=8 (i32.load offset=8
(tee_local $7 (tee_local $6
(i32.add (i32.add
(get_local $4) (get_local $4)
(i32.shl (i32.shl
(i32.and (i32.and
(tee_local $7 (tee_local $6
(call $~lib/internal/hash/hash32 (call $~lib/internal/hash/hash32
(i32.load (i32.load
(get_local $2) (get_local $3)
) )
) )
) )
@ -1426,20 +1414,20 @@
) )
) )
(i32.store offset=8 (i32.store offset=8
(get_local $7) (get_local $6)
(get_local $3) (get_local $2)
) )
(set_local $3 (set_local $2
(i32.add (i32.add
(get_local $3) (get_local $2)
(i32.const 12) (i32.const 12)
) )
) )
) )
) )
(set_local $2 (set_local $3
(i32.add (i32.add
(get_local $2) (get_local $3)
(i32.const 12) (i32.const 12)
) )
) )
@ -1461,7 +1449,7 @@
) )
(i32.store offset=12 (i32.store offset=12
(get_local $0) (get_local $0)
(get_local $8) (get_local $7)
) )
(i32.store offset=16 (i32.store offset=16
(get_local $0) (get_local $0)
@ -1502,7 +1490,7 @@
) )
(call $~lib/map/Map<usize,String>#rehash (call $~lib/map/Map<usize,String>#rehash
(get_local $0) (get_local $0)
(tee_local $4 (tee_local $3
(if (result i32) (if (result i32)
(i32.lt_s (i32.lt_s
(i32.load offset=20 (i32.load offset=20
@ -1536,12 +1524,9 @@
) )
) )
(set_local $3 (set_local $3
(i32.add
(i32.load offset=8 (i32.load offset=8
(get_local $0) (get_local $0)
) )
(i32.const 8)
)
) )
(i32.store offset=16 (i32.store offset=16
(get_local $0) (get_local $0)
@ -1556,8 +1541,11 @@
) )
(i32.store (i32.store
(tee_local $3 (tee_local $3
(i32.add
(i32.add (i32.add
(get_local $3) (get_local $3)
(i32.const 8)
)
(i32.mul (i32.mul
(get_local $4) (get_local $4)
(i32.const 12) (i32.const 12)
@ -1734,14 +1722,12 @@
(get_global $~lib/allocator/arena/startOffset) (get_global $~lib/allocator/arena/startOffset)
) )
(set_global $std/symbol/sym1 (set_global $std/symbol/sym1
(call $~lib/symbol/Symbol#constructor (call $~lib/symbol/Symbol
(i32.const 0)
(i32.const 8) (i32.const 8)
) )
) )
(set_global $std/symbol/sym2 (set_global $std/symbol/sym2
(call $~lib/symbol/Symbol#constructor (call $~lib/symbol/Symbol
(i32.const 0)
(i32.const 8) (i32.const 8)
) )
) )

@ -1,7 +1,7 @@
import "allocator/arena"; import "allocator/arena";
var sym1 = new Symbol("123"); var sym1 = Symbol("123");
var sym2 = new Symbol("123"); var sym2 = Symbol("123");
assert(sym1 !== sym2); assert(sym1 !== sym2);
@ -21,3 +21,7 @@ var key4 = Symbol.keyFor(sym4);
assert(key3 == "123"); assert(key3 == "123");
assert(key3 == key4); assert(key3 == key4);
Symbol.hasInstance;
Symbol.concatSpreadable;
// ...

@ -1,10 +1,10 @@
(module (module
(type $iii (func (param i32 i32) (result i32)))
(type $iiiiv (func (param i32 i32 i32 i32)))
(type $ii (func (param i32) (result i32))) (type $ii (func (param i32) (result i32)))
(type $iiiiv (func (param i32 i32 i32 i32)))
(type $iv (func (param i32))) (type $iv (func (param i32)))
(type $iiii (func (param i32 i32 i32) (result i32))) (type $iiii (func (param i32 i32 i32) (result i32)))
(type $iiiv (func (param i32 i32 i32))) (type $iiiv (func (param i32 i32 i32)))
(type $iii (func (param i32 i32) (result i32)))
(type $iiv (func (param i32 i32))) (type $iiv (func (param i32 i32)))
(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)))
@ -14,7 +14,7 @@
(global $~lib/internal/allocator/MAX_SIZE_32 i32 (i32.const 1073741824)) (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/startOffset (mut i32) (i32.const 0))
(global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0))
(global $~lib/symbol/nextId (mut i32) (i32.const 1)) (global $~lib/symbol/nextId (mut i32) (i32.const 12))
(global $std/symbol/sym1 (mut i32) (i32.const 0)) (global $std/symbol/sym1 (mut i32) (i32.const 0))
(global $std/symbol/sym2 (mut i32) (i32.const 0)) (global $std/symbol/sym2 (mut i32) (i32.const 0))
(global $~lib/symbol/stringToId (mut i32) (i32.const 0)) (global $~lib/symbol/stringToId (mut i32) (i32.const 0))
@ -43,32 +43,30 @@
(data (i32.const 96) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") (data (i32.const 96) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00")
(export "memory" (memory $0)) (export "memory" (memory $0))
(start $start) (start $start)
(func $~lib/symbol/Symbol#constructor (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/symbol/Symbol (; 1 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32) (local $2 i32)
(local $3 i32)
(set_local $3
(block (result i32)
(set_local $2 (set_local $2
(block (result i32)
(set_local $1
(get_global $~lib/symbol/nextId) (get_global $~lib/symbol/nextId)
) )
(set_global $~lib/symbol/nextId (set_global $~lib/symbol/nextId
(i32.add (i32.add
(get_local $2) (get_local $1)
(i32.const 1) (i32.const 1)
) )
) )
(get_local $2) (get_local $1)
) )
) )
(if (if
(i32.eqz (i32.eqz
(get_local $3) (get_local $2)
) )
(unreachable) (unreachable)
) )
(return (get_local $2)
(get_local $3)
)
) )
(func $~lib/allocator/arena/allocate_memory (; 2 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/allocator/arena/allocate_memory (; 2 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
@ -176,12 +174,9 @@
) )
) )
) )
(return
(i32.const 0) (i32.const 0)
) )
)
(func $~lib/internal/arraybuffer/computeSize (; 3 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/internal/arraybuffer/computeSize (; 3 ;) (type $ii) (param $0 i32) (result i32)
(return
(i32.shl (i32.shl
(i32.const 1) (i32.const 1)
(i32.sub (i32.sub
@ -198,7 +193,6 @@
) )
) )
) )
)
(func $~lib/internal/arraybuffer/allocUnsafe (; 4 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/internal/arraybuffer/allocUnsafe (; 4 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(if (if
@ -229,10 +223,8 @@
(get_local $1) (get_local $1)
(get_local $0) (get_local $0)
) )
(return
(get_local $1) (get_local $1)
) )
)
(func $~lib/memory/set_memory (; 5 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (func $~lib/memory/set_memory (; 5 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
@ -623,10 +615,8 @@
(get_local $1) (get_local $1)
) )
) )
(return
(get_local $3) (get_local $3)
) )
)
(func $~lib/map/Map<String,usize>#clear (; 7 ;) (type $iv) (param $0 i32) (func $~lib/map/Map<String,usize>#clear (; 7 ;) (type $iv) (param $0 i32)
(i32.store (i32.store
(get_local $0) (get_local $0)
@ -846,10 +836,8 @@
(br $repeat|0) (br $repeat|0)
) )
) )
(return
(get_local $1) (get_local $1)
) )
)
(func $~lib/memory/compare_memory (; 12 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (func $~lib/memory/compare_memory (; 12 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(if (if
(i32.eq (i32.eq
@ -901,7 +889,6 @@
) )
) )
) )
(return
(if (result i32) (if (result i32)
(get_local $2) (get_local $2)
(i32.sub (i32.sub
@ -915,7 +902,6 @@
(i32.const 0) (i32.const 0)
) )
) )
)
(func $~lib/string/String.__eq (; 13 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/string/String.__eq (; 13 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
@ -962,7 +948,6 @@
(i32.const 0) (i32.const 0)
) )
) )
(return
(i32.eqz (i32.eqz
(call $~lib/memory/compare_memory (call $~lib/memory/compare_memory
(i32.add (i32.add
@ -980,7 +965,6 @@
) )
) )
) )
)
(func $~lib/map/Map<String,usize>#find (; 14 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (func $~lib/map/Map<String,usize>#find (; 14 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
@ -1049,12 +1033,9 @@
) )
) )
) )
(return
(i32.const 0) (i32.const 0)
) )
)
(func $~lib/map/Map<String,usize>#has (; 15 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/map/Map<String,usize>#has (; 15 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(return
(i32.ne (i32.ne
(call $~lib/map/Map<String,usize>#find (call $~lib/map/Map<String,usize>#find
(get_local $0) (get_local $0)
@ -1070,7 +1051,6 @@
(i32.const 0) (i32.const 0)
) )
) )
)
(func $~lib/map/Map<String,usize>#get (; 16 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/map/Map<String,usize>#get (; 16 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
(set_local $2 (set_local $2
@ -1086,7 +1066,6 @@
) )
) )
) )
(return
(if (result i32) (if (result i32)
(get_local $2) (get_local $2)
(i32.load offset=4 (i32.load offset=4
@ -1095,7 +1074,6 @@
(unreachable) (unreachable)
) )
) )
)
(func $~lib/map/Map<String,usize>#rehash (; 17 ;) (type $iiv) (param $0 i32) (param $1 i32) (func $~lib/map/Map<String,usize>#rehash (; 17 ;) (type $iiv) (param $0 i32) (param $1 i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
@ -1140,11 +1118,9 @@
(i32.mul (i32.mul
(get_local $4) (get_local $4)
(block $~lib/map/ENTRY_SIZE<String,usize>|inlined.1 (result i32) (block $~lib/map/ENTRY_SIZE<String,usize>|inlined.1 (result i32)
(br $~lib/map/ENTRY_SIZE<String,usize>|inlined.1
(i32.const 12) (i32.const 12)
) )
) )
)
(i32.const 1) (i32.const 1)
) )
) )
@ -1164,13 +1140,11 @@
(get_local $0) (get_local $0)
) )
(block $~lib/map/ENTRY_SIZE<String,usize>|inlined.2 (result i32) (block $~lib/map/ENTRY_SIZE<String,usize>|inlined.2 (result i32)
(br $~lib/map/ENTRY_SIZE<String,usize>|inlined.2
(i32.const 12) (i32.const 12)
) )
) )
) )
) )
)
(set_local $8 (set_local $8
(i32.add (i32.add
(get_local $5) (get_local $5)
@ -1254,25 +1228,21 @@
(i32.add (i32.add
(get_local $8) (get_local $8)
(block $~lib/map/ENTRY_SIZE<String,usize>|inlined.3 (result i32) (block $~lib/map/ENTRY_SIZE<String,usize>|inlined.3 (result i32)
(br $~lib/map/ENTRY_SIZE<String,usize>|inlined.3
(i32.const 12) (i32.const 12)
) )
) )
) )
) )
) )
)
(set_local $6 (set_local $6
(i32.add (i32.add
(get_local $6) (get_local $6)
(block $~lib/map/ENTRY_SIZE<String,usize>|inlined.4 (result i32) (block $~lib/map/ENTRY_SIZE<String,usize>|inlined.4 (result i32)
(br $~lib/map/ENTRY_SIZE<String,usize>|inlined.4
(i32.const 12) (i32.const 12)
) )
) )
) )
) )
)
(br $continue|0) (br $continue|0)
) )
) )
@ -1399,13 +1369,11 @@
(get_local $6) (get_local $6)
) )
(block $~lib/map/ENTRY_SIZE<String,usize>|inlined.5 (result i32) (block $~lib/map/ENTRY_SIZE<String,usize>|inlined.5 (result i32)
(br $~lib/map/ENTRY_SIZE<String,usize>|inlined.5
(i32.const 12) (i32.const 12)
) )
) )
) )
) )
)
(i32.store (i32.store
(get_local $4) (get_local $4)
(get_local $1) (get_local $1)
@ -1511,10 +1479,8 @@
(i32.const 16777619) (i32.const 16777619)
) )
) )
(return
(get_local $1) (get_local $1)
) )
)
(func $~lib/map/Map<usize,String>#find (; 20 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (func $~lib/map/Map<usize,String>#find (; 20 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
@ -1583,10 +1549,8 @@
) )
) )
) )
(return
(i32.const 0) (i32.const 0)
) )
)
(func $~lib/map/Map<usize,String>#rehash (; 21 ;) (type $iiv) (param $0 i32) (param $1 i32) (func $~lib/map/Map<usize,String>#rehash (; 21 ;) (type $iiv) (param $0 i32) (param $1 i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
@ -1631,11 +1595,9 @@
(i32.mul (i32.mul
(get_local $4) (get_local $4)
(block $~lib/map/ENTRY_SIZE<usize,String>|inlined.1 (result i32) (block $~lib/map/ENTRY_SIZE<usize,String>|inlined.1 (result i32)
(br $~lib/map/ENTRY_SIZE<usize,String>|inlined.1
(i32.const 12) (i32.const 12)
) )
) )
)
(i32.const 1) (i32.const 1)
) )
) )
@ -1655,13 +1617,11 @@
(get_local $0) (get_local $0)
) )
(block $~lib/map/ENTRY_SIZE<usize,String>|inlined.2 (result i32) (block $~lib/map/ENTRY_SIZE<usize,String>|inlined.2 (result i32)
(br $~lib/map/ENTRY_SIZE<usize,String>|inlined.2
(i32.const 12) (i32.const 12)
) )
) )
) )
) )
)
(set_local $8 (set_local $8
(i32.add (i32.add
(get_local $5) (get_local $5)
@ -1745,25 +1705,21 @@
(i32.add (i32.add
(get_local $8) (get_local $8)
(block $~lib/map/ENTRY_SIZE<usize,String>|inlined.3 (result i32) (block $~lib/map/ENTRY_SIZE<usize,String>|inlined.3 (result i32)
(br $~lib/map/ENTRY_SIZE<usize,String>|inlined.3
(i32.const 12) (i32.const 12)
) )
) )
) )
) )
) )
)
(set_local $6 (set_local $6
(i32.add (i32.add
(get_local $6) (get_local $6)
(block $~lib/map/ENTRY_SIZE<usize,String>|inlined.4 (result i32) (block $~lib/map/ENTRY_SIZE<usize,String>|inlined.4 (result i32)
(br $~lib/map/ENTRY_SIZE<usize,String>|inlined.4
(i32.const 12) (i32.const 12)
) )
) )
) )
) )
)
(br $continue|0) (br $continue|0)
) )
) )
@ -1890,13 +1846,11 @@
(get_local $6) (get_local $6)
) )
(block $~lib/map/ENTRY_SIZE<usize,String>|inlined.5 (result i32) (block $~lib/map/ENTRY_SIZE<usize,String>|inlined.5 (result i32)
(br $~lib/map/ENTRY_SIZE<usize,String>|inlined.5
(i32.const 12) (i32.const 12)
) )
) )
) )
) )
)
(i32.store (i32.store
(get_local $4) (get_local $4)
(get_local $1) (get_local $1)
@ -2005,12 +1959,9 @@
(get_local $2) (get_local $2)
(get_local $0) (get_local $0)
) )
(return
(get_local $2) (get_local $2)
) )
)
(func $~lib/map/Map<usize,String>#has (; 24 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/map/Map<usize,String>#has (; 24 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(return
(i32.ne (i32.ne
(call $~lib/map/Map<usize,String>#find (call $~lib/map/Map<usize,String>#find
(get_local $0) (get_local $0)
@ -2026,7 +1977,6 @@
(i32.const 0) (i32.const 0)
) )
) )
)
(func $~lib/map/Map<usize,String>#get (; 25 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/map/Map<usize,String>#get (; 25 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
(set_local $2 (set_local $2
@ -2042,7 +1992,6 @@
) )
) )
) )
(return
(if (result i32) (if (result i32)
(get_local $2) (get_local $2)
(i32.load offset=4 (i32.load offset=4
@ -2051,10 +2000,8 @@
(unreachable) (unreachable)
) )
) )
)
(func $~lib/symbol/Symbol.keyFor (; 26 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/symbol/Symbol.keyFor (; 26 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(return
(if (result i32) (if (result i32)
(if (result i32) (if (result i32)
(tee_local $1 (tee_local $1
@ -2076,7 +2023,6 @@
(i32.const 0) (i32.const 0)
) )
) )
)
(func $start (; 27 ;) (type $v) (func $start (; 27 ;) (type $v)
(set_global $~lib/allocator/arena/startOffset (set_global $~lib/allocator/arena/startOffset
(i32.and (i32.and
@ -2094,14 +2040,12 @@
(get_global $~lib/allocator/arena/startOffset) (get_global $~lib/allocator/arena/startOffset)
) )
(set_global $std/symbol/sym1 (set_global $std/symbol/sym1
(call $~lib/symbol/Symbol#constructor (call $~lib/symbol/Symbol
(i32.const 0)
(i32.const 8) (i32.const 8)
) )
) )
(set_global $std/symbol/sym2 (set_global $std/symbol/sym2
(call $~lib/symbol/Symbol#constructor (call $~lib/symbol/Symbol
(i32.const 0)
(i32.const 8) (i32.const 8)
) )
) )
@ -2237,5 +2181,11 @@
(unreachable) (unreachable)
) )
) )
(drop
(i32.const 1)
)
(drop
(i32.const 2)
)
) )
) )

@ -1489,7 +1489,6 @@
(unreachable) (unreachable)
) )
) )
(tee_local $0
(i32.load offset=8 (i32.load offset=8
(i32.add (i32.add
(i32.add (i32.add
@ -1505,11 +1504,9 @@
) )
) )
) )
)
(func $~lib/typedarray/Int32Array#subarray (; 16 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (func $~lib/typedarray/Int32Array#subarray (; 16 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
(block $~lib/internal/typedarray/TypedArray<i32,i32>#subarray|inlined.0
(set_local $4 (set_local $4
(call $~lib/internal/typedarray/TypedArray<i32,i32>#get:length (call $~lib/internal/typedarray/TypedArray<i32,i32>#get:length
(get_local $0) (get_local $0)
@ -1608,7 +1605,6 @@
(i32.const 2) (i32.const 2)
) )
) )
)
(get_local $3) (get_local $3)
) )
(func $~lib/internal/typedarray/TypedArray<u8,u32>#__set (; 17 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (func $~lib/internal/typedarray/TypedArray<u8,u32>#__set (; 17 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
@ -1700,7 +1696,6 @@
(unreachable) (unreachable)
) )
) )
(tee_local $0
(i32.load8_u offset=8 (i32.load8_u offset=8
(i32.add (i32.add
(i32.add (i32.add
@ -1713,7 +1708,6 @@
) )
) )
) )
)
(func $start (; 20 ;) (type $v) (func $start (; 20 ;) (type $v)
(set_global $~lib/allocator/arena/startOffset (set_global $~lib/allocator/arena/startOffset
(i32.and (i32.and

@ -26,7 +26,6 @@
(export "memory" (memory $0)) (export "memory" (memory $0))
(start $start) (start $start)
(func $~lib/internal/arraybuffer/computeSize (; 1 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/internal/arraybuffer/computeSize (; 1 ;) (type $ii) (param $0 i32) (result i32)
(return
(i32.shl (i32.shl
(i32.const 1) (i32.const 1)
(i32.sub (i32.sub
@ -43,7 +42,6 @@
) )
) )
) )
)
(func $~lib/allocator/arena/allocate_memory (; 2 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/allocator/arena/allocate_memory (; 2 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(local $2 i32) (local $2 i32)
@ -150,10 +148,8 @@
) )
) )
) )
(return
(i32.const 0) (i32.const 0)
) )
)
(func $~lib/internal/arraybuffer/allocUnsafe (; 3 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/internal/arraybuffer/allocUnsafe (; 3 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(if (if
@ -184,10 +180,8 @@
(get_local $1) (get_local $1)
(get_local $0) (get_local $0)
) )
(return
(get_local $1) (get_local $1)
) )
)
(func $~lib/memory/set_memory (; 4 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (func $~lib/memory/set_memory (; 4 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
@ -622,7 +616,6 @@
(get_local $0) (get_local $0)
) )
(func $~lib/internal/typedarray/TypedArray<i8,i32>#get:length (; 6 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/internal/typedarray/TypedArray<i8,i32>#get:length (; 6 ;) (type $ii) (param $0 i32) (result i32)
(return
(i32.shr_s (i32.shr_s
(i32.sub (i32.sub
(i32.load offset=8 (i32.load offset=8
@ -635,7 +628,6 @@
(i32.const 0) (i32.const 0)
) )
) )
)
(func $~lib/internal/typedarray/TypedArray<u8,u32>#constructor (; 7 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/internal/typedarray/TypedArray<u8,u32>#constructor (; 7 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
@ -718,7 +710,6 @@
(get_local $0) (get_local $0)
) )
(func $~lib/internal/typedarray/TypedArray<u8,u32>#get:length (; 8 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/internal/typedarray/TypedArray<u8,u32>#get:length (; 8 ;) (type $ii) (param $0 i32) (result i32)
(return
(i32.shr_s (i32.shr_s
(i32.sub (i32.sub
(i32.load offset=8 (i32.load offset=8
@ -731,7 +722,6 @@
(i32.const 0) (i32.const 0)
) )
) )
)
(func $~lib/internal/typedarray/TypedArray<i16,i32>#constructor (; 9 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/internal/typedarray/TypedArray<i16,i32>#constructor (; 9 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
@ -814,7 +804,6 @@
(get_local $0) (get_local $0)
) )
(func $~lib/internal/typedarray/TypedArray<i16,i32>#get:length (; 10 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/internal/typedarray/TypedArray<i16,i32>#get:length (; 10 ;) (type $ii) (param $0 i32) (result i32)
(return
(i32.shr_s (i32.shr_s
(i32.sub (i32.sub
(i32.load offset=8 (i32.load offset=8
@ -827,7 +816,6 @@
(i32.const 1) (i32.const 1)
) )
) )
)
(func $~lib/internal/typedarray/TypedArray<u16,u32>#constructor (; 11 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/internal/typedarray/TypedArray<u16,u32>#constructor (; 11 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
@ -910,7 +898,6 @@
(get_local $0) (get_local $0)
) )
(func $~lib/internal/typedarray/TypedArray<u16,u32>#get:length (; 12 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/internal/typedarray/TypedArray<u16,u32>#get:length (; 12 ;) (type $ii) (param $0 i32) (result i32)
(return
(i32.shr_s (i32.shr_s
(i32.sub (i32.sub
(i32.load offset=8 (i32.load offset=8
@ -923,7 +910,6 @@
(i32.const 1) (i32.const 1)
) )
) )
)
(func $~lib/internal/typedarray/TypedArray<i32,i32>#constructor (; 13 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/internal/typedarray/TypedArray<i32,i32>#constructor (; 13 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
@ -1006,7 +992,6 @@
(get_local $0) (get_local $0)
) )
(func $~lib/internal/typedarray/TypedArray<i32,i32>#get:length (; 14 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/internal/typedarray/TypedArray<i32,i32>#get:length (; 14 ;) (type $ii) (param $0 i32) (result i32)
(return
(i32.shr_s (i32.shr_s
(i32.sub (i32.sub
(i32.load offset=8 (i32.load offset=8
@ -1019,7 +1004,6 @@
(i32.const 2) (i32.const 2)
) )
) )
)
(func $~lib/internal/typedarray/TypedArray<u32,u32>#constructor (; 15 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/internal/typedarray/TypedArray<u32,u32>#constructor (; 15 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
@ -1102,7 +1086,6 @@
(get_local $0) (get_local $0)
) )
(func $~lib/internal/typedarray/TypedArray<u32,u32>#get:length (; 16 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/internal/typedarray/TypedArray<u32,u32>#get:length (; 16 ;) (type $ii) (param $0 i32) (result i32)
(return
(i32.shr_s (i32.shr_s
(i32.sub (i32.sub
(i32.load offset=8 (i32.load offset=8
@ -1115,7 +1098,6 @@
(i32.const 2) (i32.const 2)
) )
) )
)
(func $~lib/internal/typedarray/TypedArray<i64,i64>#constructor (; 17 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/internal/typedarray/TypedArray<i64,i64>#constructor (; 17 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
@ -1198,7 +1180,6 @@
(get_local $0) (get_local $0)
) )
(func $~lib/internal/typedarray/TypedArray<i64,i64>#get:length (; 18 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/internal/typedarray/TypedArray<i64,i64>#get:length (; 18 ;) (type $ii) (param $0 i32) (result i32)
(return
(i32.shr_s (i32.shr_s
(i32.sub (i32.sub
(i32.load offset=8 (i32.load offset=8
@ -1211,7 +1192,6 @@
(i32.const 3) (i32.const 3)
) )
) )
)
(func $~lib/internal/typedarray/TypedArray<u64,u64>#constructor (; 19 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/internal/typedarray/TypedArray<u64,u64>#constructor (; 19 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
@ -1294,7 +1274,6 @@
(get_local $0) (get_local $0)
) )
(func $~lib/internal/typedarray/TypedArray<u64,u64>#get:length (; 20 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/internal/typedarray/TypedArray<u64,u64>#get:length (; 20 ;) (type $ii) (param $0 i32) (result i32)
(return
(i32.shr_s (i32.shr_s
(i32.sub (i32.sub
(i32.load offset=8 (i32.load offset=8
@ -1307,7 +1286,6 @@
(i32.const 3) (i32.const 3)
) )
) )
)
(func $~lib/internal/typedarray/TypedArray<f32,f32>#constructor (; 21 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/internal/typedarray/TypedArray<f32,f32>#constructor (; 21 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
@ -1390,7 +1368,6 @@
(get_local $0) (get_local $0)
) )
(func $~lib/internal/typedarray/TypedArray<f32,f32>#get:length (; 22 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/internal/typedarray/TypedArray<f32,f32>#get:length (; 22 ;) (type $ii) (param $0 i32) (result i32)
(return
(i32.shr_s (i32.shr_s
(i32.sub (i32.sub
(i32.load offset=8 (i32.load offset=8
@ -1403,7 +1380,6 @@
(i32.const 2) (i32.const 2)
) )
) )
)
(func $~lib/internal/typedarray/TypedArray<f64,f64>#constructor (; 23 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/internal/typedarray/TypedArray<f64,f64>#constructor (; 23 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
@ -1486,7 +1462,6 @@
(get_local $0) (get_local $0)
) )
(func $~lib/internal/typedarray/TypedArray<f64,f64>#get:length (; 24 ;) (type $ii) (param $0 i32) (result i32) (func $~lib/internal/typedarray/TypedArray<f64,f64>#get:length (; 24 ;) (type $ii) (param $0 i32) (result i32)
(return
(i32.shr_s (i32.shr_s
(i32.sub (i32.sub
(i32.load offset=8 (i32.load offset=8
@ -1499,7 +1474,6 @@
(i32.const 3) (i32.const 3)
) )
) )
)
(func $std/typedarray/testInstantiate (; 25 ;) (type $iv) (param $0 i32) (func $std/typedarray/testInstantiate (; 25 ;) (type $iv) (param $0 i32)
(local $1 i32) (local $1 i32)
(local $2 i32) (local $2 i32)
@ -2330,14 +2304,12 @@
(unreachable) (unreachable)
) )
) )
(return
(block $~lib/internal/arraybuffer/loadUnsafeWithOffset<i32,i32>|inlined.0 (result i32) (block $~lib/internal/arraybuffer/loadUnsafeWithOffset<i32,i32>|inlined.0 (result i32)
(set_local $4 (set_local $4
(i32.load (i32.load
(get_local $0) (get_local $0)
) )
) )
(br $~lib/internal/arraybuffer/loadUnsafeWithOffset<i32,i32>|inlined.0
(i32.load offset=8 (i32.load offset=8
(i32.add (i32.add
(i32.add (i32.add
@ -2352,13 +2324,10 @@
) )
) )
) )
)
)
(func $~lib/typedarray/Int32Array#subarray (; 28 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (func $~lib/typedarray/Int32Array#subarray (; 28 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
(local $5 i32) (local $5 i32)
(return
(block $~lib/internal/typedarray/TypedArray<i32,i32>#subarray|inlined.0 (result i32) (block $~lib/internal/typedarray/TypedArray<i32,i32>#subarray|inlined.0 (result i32)
(set_local $3 (set_local $3
(call $~lib/internal/typedarray/TypedArray<i32,i32>#get:length (call $~lib/internal/typedarray/TypedArray<i32,i32>#get:length
@ -2475,12 +2444,9 @@
(i32.const 2) (i32.const 2)
) )
) )
(br $~lib/internal/typedarray/TypedArray<i32,i32>#subarray|inlined.0
(get_local $4) (get_local $4)
) )
) )
)
)
(func $~lib/internal/typedarray/TypedArray<u8,u32>#__set (; 29 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (func $~lib/internal/typedarray/TypedArray<u8,u32>#__set (; 29 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
@ -2603,14 +2569,12 @@
(unreachable) (unreachable)
) )
) )
(return
(block $~lib/internal/arraybuffer/loadUnsafeWithOffset<u8,u8>|inlined.0 (result i32) (block $~lib/internal/arraybuffer/loadUnsafeWithOffset<u8,u8>|inlined.0 (result i32)
(set_local $4 (set_local $4
(i32.load (i32.load
(get_local $0) (get_local $0)
) )
) )
(br $~lib/internal/arraybuffer/loadUnsafeWithOffset<u8,u8>|inlined.0
(i32.load8_u offset=8 (i32.load8_u offset=8
(i32.add (i32.add
(i32.add (i32.add
@ -2625,8 +2589,6 @@
) )
) )
) )
)
)
(func $start (; 32 ;) (type $v) (func $start (; 32 ;) (type $v)
(if (if
(i32.eqz (i32.eqz

@ -98,10 +98,8 @@
(i32.const 23) (i32.const 23)
) )
) )
(return
(i32.const 0) (i32.const 0)
) )
)
(func $switch/doSwitchBreakCase (; 3 ;) (type $ii) (param $0 i32) (result i32) (func $switch/doSwitchBreakCase (; 3 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(block $break|0 (block $break|0
@ -124,10 +122,8 @@
(i32.const 2) (i32.const 2)
) )
) )
(return
(i32.const 1) (i32.const 1)
) )
)
(func $switch/doSwitchBreakDefault (; 4 ;) (type $ii) (param $0 i32) (result i32) (func $switch/doSwitchBreakDefault (; 4 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(block $break|0 (block $break|0
@ -150,10 +146,8 @@
) )
(br $break|0) (br $break|0)
) )
(return
(i32.const 2) (i32.const 2)
) )
)
(func $switch/doSwitchFallThroughCase (; 5 ;) (type $ii) (param $0 i32) (result i32) (func $switch/doSwitchFallThroughCase (; 5 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(block $break|0 (block $break|0
@ -175,10 +169,8 @@
) )
) )
) )
(return
(i32.const 1) (i32.const 1)
) )
)
(func $switch/doSwitchFallThroughDefault (; 6 ;) (type $ii) (param $0 i32) (result i32) (func $switch/doSwitchFallThroughDefault (; 6 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(block $break|0 (block $break|0
@ -200,18 +192,14 @@
) )
) )
) )
(return
(i32.const 2) (i32.const 2)
) )
)
(func $switch/doSwitchEmpty (; 7 ;) (type $ii) (param $0 i32) (result i32) (func $switch/doSwitchEmpty (; 7 ;) (type $ii) (param $0 i32) (result i32)
(drop (drop
(get_local $0) (get_local $0)
) )
(return
(i32.const 2) (i32.const 2)
) )
)
(func $start (; 8 ;) (type $v) (func $start (; 8 ;) (type $v)
(if (if
(i32.eqz (i32.eqz

@ -7,10 +7,8 @@
(export "memory" (memory $0)) (export "memory" (memory $0))
(start $start) (start $start)
(func $typealias/alias (; 0 ;) (type $ii) (param $0 i32) (result i32) (func $typealias/alias (; 0 ;) (type $ii) (param $0 i32) (result i32)
(return
(get_local $0) (get_local $0)
) )
)
(func $start (; 1 ;) (type $v) (func $start (; 1 ;) (type $v)
(nop) (nop)
) )

@ -8,10 +8,8 @@
(export "memory" (memory $0)) (export "memory" (memory $0))
(start $start) (start $start)
(func $void/anInt (; 0 ;) (type $i) (result i32) (func $void/anInt (; 0 ;) (type $i) (result i32)
(return
(i32.const 2) (i32.const 2)
) )
)
(func $start (; 1 ;) (type $v) (func $start (; 1 ;) (type $v)
(drop (drop
(i32.const 1) (i32.const 1)