mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-04-25 15:12:12 +00:00
Properly inline getters; Simplify blocks when last statement returns
This commit is contained in:
parent
525795b354
commit
7a8995b18b
2
dist/asc.js
vendored
2
dist/asc.js
vendored
File diff suppressed because one or more lines are too long
2
dist/asc.js.map
vendored
2
dist/asc.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/assemblyscript.js
vendored
2
dist/assemblyscript.js
vendored
File diff suppressed because one or more lines are too long
2
dist/assemblyscript.js.map
vendored
2
dist/assemblyscript.js.map
vendored
File diff suppressed because one or more lines are too long
14
src/ast.ts
14
src/ast.ts
@ -1413,6 +1413,20 @@ export class UnaryPrefixExpression extends UnaryExpression {
|
||||
|
||||
// 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. */
|
||||
export abstract class Statement extends Node { }
|
||||
|
||||
|
@ -128,7 +128,8 @@ import {
|
||||
UnaryPrefixExpression,
|
||||
FieldDeclaration,
|
||||
|
||||
nodeIsConstantValue
|
||||
nodeIsConstantValue,
|
||||
isLastStatement
|
||||
} from "./ast";
|
||||
|
||||
import {
|
||||
@ -1486,11 +1487,17 @@ export class Compiler extends DiagnosticEmitter {
|
||||
this.currentFunction.flow = blockFlow;
|
||||
|
||||
var stmts = this.compileStatements(statements);
|
||||
var lastType: NativeType;
|
||||
var stmt = stmts.length == 0
|
||||
? this.module.createNop()
|
||||
: stmts.length == 1
|
||||
? 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
|
||||
var parentFlow = blockFlow.leaveBranchOrScope();
|
||||
@ -1776,6 +1783,9 @@ export class Compiler extends DiagnosticEmitter {
|
||||
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)
|
||||
return flow.is(FlowFlags.INLINE_CONTEXT)
|
||||
? module.createBreak(assert(flow.returnLabel), 0, expr)
|
||||
@ -6440,6 +6450,7 @@ export class Compiler extends DiagnosticEmitter {
|
||||
)) {
|
||||
return module.createUnreachable();
|
||||
}
|
||||
let inline = (instance.decoratorFlags & DecoratorFlags.INLINE) != 0;
|
||||
if (instance.is(CommonFlags.INSTANCE)) {
|
||||
let parent = assert(instance.parent);
|
||||
assert(parent.kind == ElementKind.CLASS);
|
||||
@ -6450,10 +6461,10 @@ export class Compiler extends DiagnosticEmitter {
|
||||
WrapMode.NONE
|
||||
);
|
||||
this.currentType = signature.returnType;
|
||||
return this.compileCallDirect(instance, [], propertyAccess, thisExpr);
|
||||
return this.compileCallDirect(instance, [], propertyAccess, thisExpr, inline);
|
||||
} else {
|
||||
this.currentType = signature.returnType;
|
||||
return this.compileCallDirect(instance, [], propertyAccess);
|
||||
return this.compileCallDirect(instance, [], propertyAccess, 0, inline);
|
||||
}
|
||||
} else {
|
||||
this.error(
|
||||
|
11
std/assembly.d.ts
vendored
11
std/assembly.d.ts
vendored
@ -3,6 +3,8 @@
|
||||
* @module std/assembly
|
||||
*//***/
|
||||
|
||||
/// <reference no-default-lib="true"/>
|
||||
|
||||
// Types
|
||||
|
||||
/** An 8-bit signed integer. */
|
||||
@ -467,11 +469,12 @@ declare class Set<T> {
|
||||
clear(): void;
|
||||
}
|
||||
|
||||
declare class Symbol {
|
||||
constructor(description?: string | null);
|
||||
static for(key: string): Symbol;
|
||||
static keyFor(sym: Symbol): string | null;
|
||||
interface SymbolConstructor {
|
||||
(description?: string | null): symbol;
|
||||
for(key: string): symbol;
|
||||
keyFor(sym: symbol): string | null;
|
||||
}
|
||||
declare const Symbol: SymbolConstructor;
|
||||
|
||||
interface IMath<T> {
|
||||
/** The base of natural logarithms, e, approximately 2.718. */
|
||||
|
@ -1,30 +1,50 @@
|
||||
import { Map } from "./map";
|
||||
|
||||
var nextId: usize = 1;
|
||||
var stringToId: Map<string, usize>;
|
||||
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(); }
|
||||
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++;
|
||||
if (!id) unreachable(); // out of ids
|
||||
stringToId.set(key, id);
|
||||
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))
|
||||
? idToString.get(changetype<usize>(sym))
|
||||
: 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
15
std/portable.d.ts
vendored
@ -12,6 +12,8 @@
|
||||
* @module std/portable
|
||||
*//***/
|
||||
|
||||
/// <reference no-default-lib="true"/>
|
||||
|
||||
// Portable types
|
||||
|
||||
declare type i8 = number;
|
||||
@ -309,11 +311,6 @@ declare class Error {
|
||||
stack: string | null;
|
||||
}
|
||||
|
||||
declare class Symbol {
|
||||
private constructor();
|
||||
static readonly iterator: symbol;
|
||||
}
|
||||
|
||||
declare class Set<T> {
|
||||
constructor(entries?: T[]);
|
||||
readonly size: i32;
|
||||
@ -337,6 +334,14 @@ declare class Map<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> {
|
||||
[Symbol.iterator](): Iterator<T>;
|
||||
}
|
||||
|
@ -14,35 +14,27 @@
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $abi/exported (; 1 ;) (type $i) (result i32)
|
||||
(return
|
||||
(i32.shr_s
|
||||
(i32.shl
|
||||
(i32.const 128)
|
||||
(i32.const 24)
|
||||
)
|
||||
(i32.shr_s
|
||||
(i32.shl
|
||||
(i32.const 128)
|
||||
(i32.const 24)
|
||||
)
|
||||
(i32.const 24)
|
||||
)
|
||||
)
|
||||
(func $abi/exportedExported (; 2 ;) (type $i) (result i32)
|
||||
(return
|
||||
(call $abi/exported)
|
||||
)
|
||||
(call $abi/exported)
|
||||
)
|
||||
(func $abi/internal (; 3 ;) (type $i) (result i32)
|
||||
(return
|
||||
(i32.const 128)
|
||||
)
|
||||
(i32.const 128)
|
||||
)
|
||||
(func $abi/exportedInternal (; 4 ;) (type $i) (result i32)
|
||||
(return
|
||||
(i32.shr_s
|
||||
(i32.shl
|
||||
(call $abi/internal)
|
||||
(i32.const 24)
|
||||
)
|
||||
(i32.shr_s
|
||||
(i32.shl
|
||||
(call $abi/internal)
|
||||
(i32.const 24)
|
||||
)
|
||||
(i32.const 24)
|
||||
)
|
||||
)
|
||||
(func $start (; 5 ;) (type $v)
|
||||
|
@ -119,19 +119,17 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(f64.mul
|
||||
(get_local $2)
|
||||
(f64.reinterpret/i64
|
||||
(i64.shl
|
||||
(i64.add
|
||||
(i64.const 1023)
|
||||
(i64.extend_u/i32
|
||||
(get_local $1)
|
||||
)
|
||||
(f64.mul
|
||||
(get_local $2)
|
||||
(f64.reinterpret/i64
|
||||
(i64.shl
|
||||
(i64.add
|
||||
(i64.const 1023)
|
||||
(i64.extend_u/i32
|
||||
(get_local $1)
|
||||
)
|
||||
(i64.const 52)
|
||||
)
|
||||
(i64.const 52)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -1689,19 +1687,15 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(f64.mul
|
||||
(get_local $14)
|
||||
(get_local $13)
|
||||
)
|
||||
(f64.mul
|
||||
(get_local $14)
|
||||
(get_local $13)
|
||||
)
|
||||
)
|
||||
(func $isNaN<f32> (; 2 ;) (type $fi) (param $0 f32) (result i32)
|
||||
(return
|
||||
(f32.ne
|
||||
(get_local $0)
|
||||
(get_local $0)
|
||||
)
|
||||
(f32.ne
|
||||
(get_local $0)
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $~lib/math/NativeMathf.mod (; 3 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32)
|
||||
@ -2121,10 +2115,8 @@
|
||||
(get_local $6)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(f32.reinterpret/i32
|
||||
(get_local $2)
|
||||
)
|
||||
(f32.reinterpret/i32
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(func $~lib/math/NativeMathf.scalbn (; 4 ;) (type $fif) (param $0 f32) (param $1 i32) (result f32)
|
||||
@ -2230,17 +2222,15 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(f32.mul
|
||||
(get_local $2)
|
||||
(f32.reinterpret/i32
|
||||
(i32.shl
|
||||
(i32.add
|
||||
(i32.const 127)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.const 23)
|
||||
(f32.mul
|
||||
(get_local $2)
|
||||
(f32.reinterpret/i32
|
||||
(i32.shl
|
||||
(i32.add
|
||||
(i32.const 127)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.const 23)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -3555,19 +3545,15 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(f32.mul
|
||||
(get_local $12)
|
||||
(get_local $11)
|
||||
)
|
||||
(f32.mul
|
||||
(get_local $12)
|
||||
(get_local $11)
|
||||
)
|
||||
)
|
||||
(func $isNaN<f64> (; 6 ;) (type $Fi) (param $0 f64) (result i32)
|
||||
(return
|
||||
(f64.ne
|
||||
(get_local $0)
|
||||
(get_local $0)
|
||||
)
|
||||
(f64.ne
|
||||
(get_local $0)
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $~lib/math/NativeMath.mod (; 7 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
|
||||
@ -4006,10 +3992,8 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(f64.reinterpret/i64
|
||||
(get_local $2)
|
||||
)
|
||||
(f64.reinterpret/i64
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(func $start (; 8 ;) (type $v)
|
||||
|
@ -28,41 +28,33 @@
|
||||
(export "table" (table $0))
|
||||
(start $start)
|
||||
(func $isNaN<f32> (; 1 ;) (type $fi) (param $0 f32) (result i32)
|
||||
(return
|
||||
(f32.ne
|
||||
(get_local $0)
|
||||
(get_local $0)
|
||||
)
|
||||
(f32.ne
|
||||
(get_local $0)
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $isFinite<f32> (; 2 ;) (type $fi) (param $0 f32) (result i32)
|
||||
(return
|
||||
(f32.eq
|
||||
(f32.sub
|
||||
(get_local $0)
|
||||
(get_local $0)
|
||||
)
|
||||
(f32.const 0)
|
||||
(f32.eq
|
||||
(f32.sub
|
||||
(get_local $0)
|
||||
(get_local $0)
|
||||
)
|
||||
(f32.const 0)
|
||||
)
|
||||
)
|
||||
(func $isNaN<f64> (; 3 ;) (type $Fi) (param $0 f64) (result i32)
|
||||
(return
|
||||
(f64.ne
|
||||
(get_local $0)
|
||||
(get_local $0)
|
||||
)
|
||||
(f64.ne
|
||||
(get_local $0)
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $isFinite<f64> (; 4 ;) (type $Fi) (param $0 f64) (result i32)
|
||||
(return
|
||||
(f64.eq
|
||||
(f64.sub
|
||||
(get_local $0)
|
||||
(get_local $0)
|
||||
)
|
||||
(f64.const 0)
|
||||
(f64.eq
|
||||
(f64.sub
|
||||
(get_local $0)
|
||||
(get_local $0)
|
||||
)
|
||||
(f64.const 0)
|
||||
)
|
||||
)
|
||||
(func $start~anonymous|0 (; 5 ;) (type $iiv) (param $0 i32) (param $1 i32)
|
||||
|
@ -11,24 +11,16 @@
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(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)
|
||||
(return
|
||||
(get_local $0)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
(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)
|
||||
(return
|
||||
(get_local $0)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
(func $start (; 5 ;) (type $v)
|
||||
(if
|
||||
|
@ -14,14 +14,12 @@
|
||||
(export "table" (table $0))
|
||||
(start $start)
|
||||
(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
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(get_local $2)
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(func $call-optional/opt|trampoline (; 2 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
|
@ -10,10 +10,8 @@
|
||||
(get_local $0)
|
||||
(i32.const 1)
|
||||
)
|
||||
(return
|
||||
(i32.load8_u
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load8_u
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -15,50 +15,42 @@
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $class/Animal.add (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(return
|
||||
(i32.add
|
||||
(i32.add
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(get_global $class/Animal.ONE)
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(get_global $class/Animal.ONE)
|
||||
)
|
||||
)
|
||||
(func $class/Animal.sub<f32> (; 2 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32)
|
||||
(return
|
||||
(f32.add
|
||||
(f32.sub
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(f32.convert_s/i32
|
||||
(get_global $class/Animal.ONE)
|
||||
)
|
||||
(f32.add
|
||||
(f32.sub
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(f32.convert_s/i32
|
||||
(get_global $class/Animal.ONE)
|
||||
)
|
||||
)
|
||||
)
|
||||
(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
|
||||
(get_local $1)
|
||||
(get_local $2)
|
||||
)
|
||||
(get_global $class/Animal.ONE)
|
||||
(get_local $1)
|
||||
(get_local $2)
|
||||
)
|
||||
(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)
|
||||
(return
|
||||
(f32.add
|
||||
(f32.sub
|
||||
(get_local $1)
|
||||
(get_local $2)
|
||||
)
|
||||
(f32.convert_s/i32
|
||||
(get_global $class/Animal.ONE)
|
||||
)
|
||||
(f32.add
|
||||
(f32.sub
|
||||
(get_local $1)
|
||||
(get_local $2)
|
||||
)
|
||||
(f32.convert_s/i32
|
||||
(get_global $class/Animal.ONE)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -124,9 +116,7 @@
|
||||
(set_local $2
|
||||
(get_local $1)
|
||||
)
|
||||
(return
|
||||
(get_local $2)
|
||||
)
|
||||
(get_local $2)
|
||||
)
|
||||
(func $start (; 6 ;) (type $v)
|
||||
(if
|
||||
|
@ -37,9 +37,7 @@
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $enum/getZero (; 0 ;) (type $i) (result i32)
|
||||
(return
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(func $start (; 1 ;) (type $v)
|
||||
(set_global $enum/NonConstant.ZERO
|
||||
|
@ -15,27 +15,21 @@
|
||||
(export "ns.two" (func $export/ns.two))
|
||||
(export "memory" (memory $0))
|
||||
(func $export/add (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(return
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func $export/sub (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(return
|
||||
(i32.sub
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.sub
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func $export/mul (; 2 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(return
|
||||
(i32.mul
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.mul
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func $export/ns.two (; 3 ;) (type $v)
|
||||
|
@ -49,19 +49,15 @@
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $exports/add (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(return
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func $exports/subOpt (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(return
|
||||
(i32.sub
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.sub
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func $exports/subOpt|trampoline (; 2 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
@ -92,17 +88,13 @@
|
||||
)
|
||||
)
|
||||
(func $exports/math.sub (; 4 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(return
|
||||
(i32.sub
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.sub
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(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)
|
||||
(local $1 i32)
|
||||
@ -210,9 +202,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(func $exports/Car#constructor (; 7 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
@ -272,10 +262,8 @@
|
||||
)
|
||||
)
|
||||
(func $exports/Car#get:numDoors (; 11 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(return
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $exports/Car#set:numDoors (; 12 ;) (type $iiv) (param $0 i32) (param $1 i32)
|
||||
@ -288,9 +276,7 @@
|
||||
(nop)
|
||||
)
|
||||
(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)
|
||||
(local $2 i32)
|
||||
@ -350,10 +336,8 @@
|
||||
)
|
||||
)
|
||||
(func $exports/vehicles.Car#get:numDoors (; 19 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(return
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $exports/vehicles.Car#set:numDoors (; 20 ;) (type $iiv) (param $0 i32) (param $1 i32)
|
||||
|
@ -18,14 +18,10 @@
|
||||
(export "table" (table $0))
|
||||
(start $start)
|
||||
(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)
|
||||
(return
|
||||
(get_local $0)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
(func $start~someName|2 (; 3 ;) (type $v)
|
||||
(nop)
|
||||
|
@ -19,92 +19,66 @@
|
||||
(export "table" (table $0))
|
||||
(start $start)
|
||||
(func $function-types/makeAdder<i32>~anonymous|0 (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(return
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(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)
|
||||
(return
|
||||
(i64.add
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(i64.add
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(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)
|
||||
(return
|
||||
(f64.add
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(f64.add
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(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)
|
||||
(return
|
||||
(block (result i32)
|
||||
(set_global $~argc
|
||||
(i32.const 2)
|
||||
)
|
||||
(call_indirect (type $iii)
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(set_global $~argc
|
||||
(i32.const 2)
|
||||
)
|
||||
(call_indirect (type $iii)
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(func $function-types/doAdd<i32> (; 8 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(return
|
||||
(block (result i32)
|
||||
(set_global $~argc
|
||||
(i32.const 2)
|
||||
)
|
||||
(call_indirect (type $iii)
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
(call $function-types/makeAdder<i32>)
|
||||
)
|
||||
)
|
||||
(set_global $~argc
|
||||
(i32.const 2)
|
||||
)
|
||||
(call_indirect (type $iii)
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
(call $function-types/makeAdder<i32>)
|
||||
)
|
||||
)
|
||||
(func $function-types/addI32 (; 9 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(return
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(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
|
||||
(i32.const 2)
|
||||
)
|
||||
(call_indirect (type $iii)
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(set_global $~argc
|
||||
(i32.const 2)
|
||||
)
|
||||
(call_indirect (type $iii)
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(func $function-types/makeAndAdd<i32>|trampoline (; 11 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
|
@ -22,83 +22,59 @@
|
||||
(nop)
|
||||
)
|
||||
(func $function/i (; 1 ;) (type $i) (result i32)
|
||||
(return
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(func $function/I (; 2 ;) (type $I) (result i64)
|
||||
(return
|
||||
(i64.const 0)
|
||||
)
|
||||
(i64.const 0)
|
||||
)
|
||||
(func $function/f (; 3 ;) (type $f) (result f32)
|
||||
(return
|
||||
(f32.const 0)
|
||||
)
|
||||
(f32.const 0)
|
||||
)
|
||||
(func $function/F (; 4 ;) (type $F) (result f64)
|
||||
(return
|
||||
(f64.const 0)
|
||||
)
|
||||
(f64.const 0)
|
||||
)
|
||||
(func $function/iv (; 5 ;) (type $iv) (param $0 i32)
|
||||
(nop)
|
||||
)
|
||||
(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)
|
||||
(return
|
||||
(get_local $0)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
(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)
|
||||
(return
|
||||
(get_local $0)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
(func $function/iiv (; 10 ;) (type $iiv) (param $0 i32) (param $1 i32)
|
||||
(nop)
|
||||
)
|
||||
(func $function/iii (; 11 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(return
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func $function/III (; 12 ;) (type $IiI) (param $0 i64) (param $1 i32) (result i64)
|
||||
(return
|
||||
(i64.add
|
||||
(get_local $0)
|
||||
(i64.extend_s/i32
|
||||
(get_local $1)
|
||||
)
|
||||
(i64.add
|
||||
(get_local $0)
|
||||
(i64.extend_s/i32
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $function/fff (; 13 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32)
|
||||
(return
|
||||
(f32.add
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(f32.add
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func $function/FFF (; 14 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
|
||||
(return
|
||||
(f64.add
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(f64.add
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func $start (; 15 ;) (type $v)
|
||||
|
@ -11,9 +11,7 @@
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(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)
|
||||
(set_global $getter-setter/Foo._bar
|
||||
|
@ -41,14 +41,10 @@
|
||||
(export "ge_u" (func $../../examples/i64-polyfill/assembly/i64/ge_u))
|
||||
(export "memory" (memory $0))
|
||||
(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)
|
||||
(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)
|
||||
(local $2 i64)
|
||||
|
@ -30,9 +30,7 @@
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(func $if/ifThenElseBlock (; 3 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(if
|
||||
|
@ -9,27 +9,21 @@
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $export/add (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(return
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func $export/sub (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(return
|
||||
(i32.sub
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.sub
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func $export/mul (; 2 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(return
|
||||
(i32.mul
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.mul
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func $export/ns.two (; 3 ;) (type $v)
|
||||
|
@ -47,24 +47,16 @@
|
||||
)
|
||||
)
|
||||
(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)
|
||||
(return
|
||||
(i64.const 0)
|
||||
)
|
||||
(i64.const 0)
|
||||
)
|
||||
(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)
|
||||
(return
|
||||
(f64.const 0)
|
||||
)
|
||||
(f64.const 0)
|
||||
)
|
||||
(func $start (; 6 ;) (type $v)
|
||||
(local $0 i32)
|
||||
|
@ -16,11 +16,9 @@
|
||||
(export "table" (table $0))
|
||||
(start $start)
|
||||
(func $inlining/test (; 1 ;) (type $i) (result i32)
|
||||
(return
|
||||
(i32.add
|
||||
(i32.const 1)
|
||||
(i32.const 2)
|
||||
)
|
||||
(i32.add
|
||||
(i32.const 1)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
(func $inlining/test_funcs~anonymous|0 (; 2 ;) (type $ii) (param $0 i32) (result i32)
|
||||
@ -59,15 +57,13 @@
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(br $inlining/func_ii|inlined.0
|
||||
(if (result i32)
|
||||
(i32.lt_s
|
||||
(get_local $2)
|
||||
(i32.const 42)
|
||||
)
|
||||
(i32.const 2)
|
||||
(i32.const 3)
|
||||
(if (result i32)
|
||||
(i32.lt_s
|
||||
(get_local $2)
|
||||
(i32.const 42)
|
||||
)
|
||||
(i32.const 2)
|
||||
(i32.const 3)
|
||||
)
|
||||
)
|
||||
(i32.const 1)
|
||||
@ -99,15 +95,13 @@
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(br $inlining/func_ii|inlined.1
|
||||
(if (result i32)
|
||||
(i32.lt_s
|
||||
(get_local $2)
|
||||
(i32.const 42)
|
||||
)
|
||||
(i32.const 2)
|
||||
(i32.const 3)
|
||||
(if (result i32)
|
||||
(i32.lt_s
|
||||
(get_local $2)
|
||||
(i32.const 42)
|
||||
)
|
||||
(i32.const 2)
|
||||
(i32.const 3)
|
||||
)
|
||||
)
|
||||
(i32.const 2)
|
||||
@ -139,15 +133,13 @@
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(br $inlining/func_ii|inlined.2
|
||||
(if (result i32)
|
||||
(i32.lt_s
|
||||
(get_local $2)
|
||||
(i32.const 42)
|
||||
)
|
||||
(i32.const 2)
|
||||
(i32.const 3)
|
||||
(if (result i32)
|
||||
(i32.lt_s
|
||||
(get_local $2)
|
||||
(i32.const 42)
|
||||
)
|
||||
(i32.const 2)
|
||||
(i32.const 3)
|
||||
)
|
||||
)
|
||||
(i32.const 3)
|
||||
@ -170,9 +162,7 @@
|
||||
(set_local $2
|
||||
(i32.const 0)
|
||||
)
|
||||
(br $inlining/func_ii_opt|inlined.0
|
||||
(get_local $2)
|
||||
)
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
@ -194,9 +184,7 @@
|
||||
(set_local $2
|
||||
(i32.const 1)
|
||||
)
|
||||
(br $inlining/func_ii_opt|inlined.1
|
||||
(get_local $2)
|
||||
)
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.const 1)
|
||||
)
|
||||
@ -235,9 +223,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(br $inlining/func_ii_loc|inlined.0
|
||||
(get_local $4)
|
||||
)
|
||||
(get_local $4)
|
||||
)
|
||||
(i32.const 3)
|
||||
)
|
||||
@ -276,9 +262,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(br $inlining/func_ii_loc|inlined.1
|
||||
(get_local $2)
|
||||
)
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.const 4)
|
||||
)
|
||||
@ -308,9 +292,7 @@
|
||||
(call_indirect (type $ii)
|
||||
(i32.const 2)
|
||||
(block $inlining/func_fe|inlined.0 (result i32)
|
||||
(br $inlining/func_fe|inlined.0
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -337,11 +319,9 @@
|
||||
(set_local $3
|
||||
(i32.const 2)
|
||||
)
|
||||
(br $inlining/Foo.method_static|inlined.0
|
||||
(i32.add
|
||||
(get_local $2)
|
||||
(get_local $3)
|
||||
)
|
||||
(i32.add
|
||||
(get_local $2)
|
||||
(get_local $3)
|
||||
)
|
||||
)
|
||||
(i32.const 44)
|
||||
@ -370,9 +350,7 @@
|
||||
(set_local $2
|
||||
(i32.const 3)
|
||||
)
|
||||
(br $inlining/Foo#method_this|inlined.0
|
||||
(get_local $7)
|
||||
)
|
||||
(get_local $7)
|
||||
)
|
||||
(i32.const 123)
|
||||
)
|
||||
|
@ -290,8 +290,8 @@
|
||||
(local $4 f64)
|
||||
(local $5 f64)
|
||||
(local $6 f64)
|
||||
(local $7 f64)
|
||||
(local $8 i32)
|
||||
(local $7 i32)
|
||||
(local $8 f64)
|
||||
(local $9 f64)
|
||||
(local $10 f64)
|
||||
(local $11 f64)
|
||||
@ -312,7 +312,7 @@
|
||||
(f64.convert_u/i32
|
||||
(get_local $0)
|
||||
)
|
||||
(tee_local $7
|
||||
(tee_local $8
|
||||
(f64.div
|
||||
(tee_local $4
|
||||
(f64.convert_u/i32
|
||||
@ -344,7 +344,7 @@
|
||||
(loop $repeat|0
|
||||
(br_if $break|0
|
||||
(i32.ge_u
|
||||
(get_local $8)
|
||||
(get_local $7)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
@ -352,7 +352,7 @@
|
||||
(f64.mul
|
||||
(f64.sub
|
||||
(f64.convert_u/i32
|
||||
(get_local $8)
|
||||
(get_local $7)
|
||||
)
|
||||
(get_local $11)
|
||||
)
|
||||
@ -379,7 +379,7 @@
|
||||
(get_local $4)
|
||||
)
|
||||
)
|
||||
(tee_local $7
|
||||
(tee_local $8
|
||||
(f64.mul
|
||||
(get_local $5)
|
||||
(get_local $5)
|
||||
@ -405,7 +405,7 @@
|
||||
(f64.add
|
||||
(f64.sub
|
||||
(get_local $6)
|
||||
(get_local $7)
|
||||
(get_local $8)
|
||||
)
|
||||
(get_local $10)
|
||||
)
|
||||
@ -447,7 +447,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(set_local $7
|
||||
(set_local $8
|
||||
(f64.add
|
||||
(f64.sub
|
||||
(f64.mul
|
||||
@ -475,7 +475,7 @@
|
||||
)
|
||||
)
|
||||
(set_local $4
|
||||
(get_local $7)
|
||||
(get_local $8)
|
||||
)
|
||||
(set_local $2
|
||||
(i32.add
|
||||
@ -493,7 +493,7 @@
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(get_local $8)
|
||||
(get_local $7)
|
||||
)
|
||||
(i32.const 1)
|
||||
)
|
||||
@ -504,17 +504,15 @@
|
||||
(f64.div
|
||||
(call $~lib/math/NativeMath.log
|
||||
(call $~lib/math/NativeMath.log
|
||||
(tee_local $7
|
||||
(f64.sqrt
|
||||
(f64.add
|
||||
(f64.mul
|
||||
(get_local $4)
|
||||
(get_local $4)
|
||||
)
|
||||
(f64.mul
|
||||
(get_local $5)
|
||||
(get_local $5)
|
||||
)
|
||||
(f64.sqrt
|
||||
(f64.add
|
||||
(f64.mul
|
||||
(get_local $4)
|
||||
(get_local $4)
|
||||
)
|
||||
(f64.mul
|
||||
(get_local $5)
|
||||
(get_local $5)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -551,9 +549,9 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(set_local $8
|
||||
(set_local $7
|
||||
(i32.add
|
||||
(get_local $8)
|
||||
(get_local $7)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
|
@ -279,58 +279,52 @@
|
||||
(set_local $13
|
||||
(get_local $3)
|
||||
)
|
||||
(return
|
||||
(f64.add
|
||||
(f64.add
|
||||
(f64.add
|
||||
(f64.sub
|
||||
(f64.add
|
||||
(f64.mul
|
||||
(get_local $7)
|
||||
(f64.add
|
||||
(get_local $6)
|
||||
(get_local $12)
|
||||
)
|
||||
)
|
||||
(f64.mul
|
||||
(f64.convert_s/i32
|
||||
(get_local $13)
|
||||
)
|
||||
(f64.const 1.9082149292705877e-10)
|
||||
(f64.sub
|
||||
(f64.add
|
||||
(f64.mul
|
||||
(get_local $7)
|
||||
(f64.add
|
||||
(get_local $6)
|
||||
(get_local $12)
|
||||
)
|
||||
)
|
||||
(get_local $6)
|
||||
(f64.mul
|
||||
(f64.convert_s/i32
|
||||
(get_local $13)
|
||||
)
|
||||
(f64.const 1.9082149292705877e-10)
|
||||
)
|
||||
)
|
||||
(get_local $5)
|
||||
(get_local $6)
|
||||
)
|
||||
(f64.mul
|
||||
(f64.convert_s/i32
|
||||
(get_local $13)
|
||||
)
|
||||
(f64.const 0.6931471803691238)
|
||||
(get_local $5)
|
||||
)
|
||||
(f64.mul
|
||||
(f64.convert_s/i32
|
||||
(get_local $13)
|
||||
)
|
||||
(f64.const 0.6931471803691238)
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $isFinite<f64> (; 1 ;) (type $Fi) (param $0 f64) (result i32)
|
||||
(return
|
||||
(f64.eq
|
||||
(f64.sub
|
||||
(get_local $0)
|
||||
(get_local $0)
|
||||
)
|
||||
(f64.const 0)
|
||||
(f64.eq
|
||||
(f64.sub
|
||||
(get_local $0)
|
||||
(get_local $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)
|
||||
(return
|
||||
(f64.min
|
||||
(f64.max
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(get_local $2)
|
||||
(f64.min
|
||||
(f64.max
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(func $../../examples/mandelbrot/assembly/index/computeLine (; 3 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32)
|
||||
@ -573,10 +567,8 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(br $~lib/math/NativeMath.sqrt|inlined.0
|
||||
(f64.sqrt
|
||||
(get_local $15)
|
||||
)
|
||||
(f64.sqrt
|
||||
(get_local $15)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -523,9 +523,7 @@
|
||||
(set_local $128
|
||||
(get_local $127)
|
||||
)
|
||||
(return
|
||||
(get_local $128)
|
||||
)
|
||||
(get_local $128)
|
||||
)
|
||||
(func $many-locals/testI8 (; 2 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
@ -1040,14 +1038,12 @@
|
||||
(set_local $128
|
||||
(get_local $127)
|
||||
)
|
||||
(return
|
||||
(i32.shr_s
|
||||
(i32.shl
|
||||
(get_local $128)
|
||||
(i32.const 24)
|
||||
)
|
||||
(i32.shr_s
|
||||
(i32.shl
|
||||
(get_local $128)
|
||||
(i32.const 24)
|
||||
)
|
||||
(i32.const 24)
|
||||
)
|
||||
)
|
||||
(func $start (; 3 ;) (type $v)
|
||||
|
@ -1812,9 +1812,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(get_local $3)
|
||||
)
|
||||
(get_local $3)
|
||||
)
|
||||
(func $start (; 2 ;) (type $v)
|
||||
(i64.store
|
||||
|
@ -308,9 +308,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(get_local $3)
|
||||
)
|
||||
(get_local $3)
|
||||
)
|
||||
(func $start (; 2 ;) (type $v)
|
||||
(i64.store
|
||||
|
@ -376,9 +376,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(get_local $3)
|
||||
)
|
||||
(get_local $3)
|
||||
)
|
||||
(func $start (; 2 ;) (type $v)
|
||||
(set_global $memset/dest
|
||||
|
@ -5,8 +5,6 @@
|
||||
(export "default" (func $named-export-default/get3))
|
||||
(export "memory" (memory $0))
|
||||
(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 "memory" (memory $0))
|
||||
(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)
|
||||
(return
|
||||
(call $named-export-default/get3)
|
||||
)
|
||||
(call $named-export-default/get3)
|
||||
)
|
||||
)
|
||||
|
@ -10,14 +10,10 @@
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(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)
|
||||
(return
|
||||
(i32.const 3)
|
||||
)
|
||||
(i32.const 3)
|
||||
)
|
||||
(func $start (; 2 ;) (type $v)
|
||||
(drop
|
||||
|
@ -14,19 +14,17 @@
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(i32.add
|
||||
(call $recursive/fib
|
||||
(i32.sub
|
||||
(get_local $0)
|
||||
(i32.const 1)
|
||||
)
|
||||
(i32.add
|
||||
(call $recursive/fib
|
||||
(i32.sub
|
||||
(get_local $0)
|
||||
(i32.const 1)
|
||||
)
|
||||
(call $recursive/fib
|
||||
(i32.sub
|
||||
(get_local $0)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
(call $recursive/fib
|
||||
(i32.sub
|
||||
(get_local $0)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -19,27 +19,21 @@
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $export/add (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(return
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func $export/sub (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(return
|
||||
(i32.sub
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.sub
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func $export/mul (; 2 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(return
|
||||
(i32.mul
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.mul
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func $export/ns.two (; 3 ;) (type $v)
|
||||
|
@ -10,9 +10,7 @@
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(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)
|
||||
(if
|
||||
|
@ -127,9 +127,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(func $~lib/memory/set_memory (; 2 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
|
||||
(local $3 i32)
|
||||
@ -2654,19 +2652,17 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(if (result i32)
|
||||
(get_local $2)
|
||||
(i32.sub
|
||||
(i32.load8_u
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load8_u
|
||||
(get_local $1)
|
||||
)
|
||||
(if (result i32)
|
||||
(get_local $2)
|
||||
(i32.sub
|
||||
(i32.load8_u
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load8_u
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(func $~lib/allocator/arena/free_memory (; 6 ;) (type $iv) (param $0 i32)
|
||||
|
@ -27,32 +27,28 @@
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(if (result i32)
|
||||
(i32.lt_u
|
||||
(get_local $1)
|
||||
(i32.shr_u
|
||||
(i32.load
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.const 2)
|
||||
(if (result i32)
|
||||
(i32.lt_u
|
||||
(get_local $1)
|
||||
(i32.shr_u
|
||||
(i32.load
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.const 2)
|
||||
)
|
||||
(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.add
|
||||
(get_local $2)
|
||||
(i32.shl
|
||||
(get_local $1)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
(block $~lib/internal/arraybuffer/loadUnsafe<Array<i32>,Array<i32>>|inlined.0 (result i32)
|
||||
(i32.load offset=8
|
||||
(i32.add
|
||||
(get_local $2)
|
||||
(i32.shl
|
||||
(get_local $1)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(func $~lib/array/Array<i32>#__get (; 2 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
@ -62,43 +58,37 @@
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(if (result i32)
|
||||
(i32.lt_u
|
||||
(get_local $1)
|
||||
(i32.shr_u
|
||||
(i32.load
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.const 2)
|
||||
(if (result i32)
|
||||
(i32.lt_u
|
||||
(get_local $1)
|
||||
(i32.shr_u
|
||||
(i32.load
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.const 2)
|
||||
)
|
||||
(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.add
|
||||
(get_local $2)
|
||||
(i32.shl
|
||||
(get_local $1)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
(block $~lib/internal/arraybuffer/loadUnsafe<i32,i32>|inlined.0 (result i32)
|
||||
(i32.load offset=8
|
||||
(i32.add
|
||||
(get_local $2)
|
||||
(i32.shl
|
||||
(get_local $1)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(func $std/array-access/i32ArrayArrayElementAccess (; 3 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(return
|
||||
(call $~lib/array/Array<i32>#__get
|
||||
(call $~lib/array/Array<Array<i32>>#__get
|
||||
(get_local $0)
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.const 1)
|
||||
(call $~lib/array/Array<i32>#__get
|
||||
(call $~lib/array/Array<Array<i32>>#__get
|
||||
(get_local $0)
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(func $~lib/array/Array<String>#__get (; 4 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
@ -108,41 +98,35 @@
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(if (result i32)
|
||||
(i32.lt_u
|
||||
(get_local $1)
|
||||
(i32.shr_u
|
||||
(i32.load
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.const 2)
|
||||
(if (result i32)
|
||||
(i32.lt_u
|
||||
(get_local $1)
|
||||
(i32.shr_u
|
||||
(i32.load
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.const 2)
|
||||
)
|
||||
(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.add
|
||||
(get_local $2)
|
||||
(i32.shl
|
||||
(get_local $1)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
(block $~lib/internal/arraybuffer/loadUnsafe<String,String>|inlined.0 (result i32)
|
||||
(i32.load offset=8
|
||||
(i32.add
|
||||
(get_local $2)
|
||||
(i32.shl
|
||||
(get_local $1)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(func $std/array-access/stringArrayPropertyAccess (; 5 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(return
|
||||
(i32.load
|
||||
(call $~lib/array/Array<String>#__get
|
||||
(get_local $0)
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.load
|
||||
(call $~lib/array/Array<String>#__get
|
||||
(get_local $0)
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -197,19 +181,17 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(if (result i32)
|
||||
(get_local $2)
|
||||
(i32.sub
|
||||
(i32.load8_u
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load8_u
|
||||
(get_local $1)
|
||||
)
|
||||
(if (result i32)
|
||||
(get_local $2)
|
||||
(i32.sub
|
||||
(i32.load8_u
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load8_u
|
||||
(get_local $1)
|
||||
)
|
||||
(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)
|
||||
@ -295,41 +277,37 @@
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(i32.eqz
|
||||
(call $~lib/memory/compare_memory
|
||||
(i32.eqz
|
||||
(call $~lib/memory/compare_memory
|
||||
(i32.add
|
||||
(i32.add
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.const 4)
|
||||
)
|
||||
(i32.shl
|
||||
(get_local $7)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
(get_local $0)
|
||||
(i32.const 4)
|
||||
)
|
||||
(i32.shl
|
||||
(get_local $8)
|
||||
(get_local $7)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
(i32.const 4)
|
||||
)
|
||||
(i32.shl
|
||||
(get_local $8)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $std/array-access/stringArrayMethodCall (; 8 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(return
|
||||
(call $~lib/string/String#startsWith
|
||||
(call $~lib/array/Array<String>#__get
|
||||
(get_local $0)
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.const 8)
|
||||
(call $~lib/string/String#startsWith
|
||||
(call $~lib/array/Array<String>#__get
|
||||
(get_local $0)
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.const 8)
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(func $~lib/array/Array<Array<String>>#__get (; 9 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
@ -339,60 +317,52 @@
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(if (result i32)
|
||||
(i32.lt_u
|
||||
(get_local $1)
|
||||
(i32.shr_u
|
||||
(i32.load
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.const 2)
|
||||
(if (result i32)
|
||||
(i32.lt_u
|
||||
(get_local $1)
|
||||
(i32.shr_u
|
||||
(i32.load
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.const 2)
|
||||
)
|
||||
(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.add
|
||||
(get_local $2)
|
||||
(i32.shl
|
||||
(get_local $1)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
(block $~lib/internal/arraybuffer/loadUnsafe<Array<String>,Array<String>>|inlined.0 (result i32)
|
||||
(i32.load offset=8
|
||||
(i32.add
|
||||
(get_local $2)
|
||||
(i32.shl
|
||||
(get_local $1)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(func $std/array-access/stringArrayArrayPropertyAccess (; 10 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(return
|
||||
(i32.load
|
||||
(call $~lib/array/Array<String>#__get
|
||||
(call $~lib/array/Array<Array<String>>#__get
|
||||
(get_local $0)
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.const 1)
|
||||
(i32.load
|
||||
(call $~lib/array/Array<String>#__get
|
||||
(call $~lib/array/Array<Array<String>>#__get
|
||||
(get_local $0)
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $std/array-access/stringArrayArrayMethodCall (; 11 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(return
|
||||
(call $~lib/string/String#startsWith
|
||||
(call $~lib/array/Array<String>#__get
|
||||
(call $~lib/array/Array<Array<String>>#__get
|
||||
(get_local $0)
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.const 1)
|
||||
(call $~lib/string/String#startsWith
|
||||
(call $~lib/array/Array<String>#__get
|
||||
(call $~lib/array/Array<Array<String>>#__get
|
||||
(get_local $0)
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.const 8)
|
||||
(i32.const 0)
|
||||
(i32.const 1)
|
||||
)
|
||||
(i32.const 8)
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -26,10 +26,8 @@
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $~lib/array/Array<i32>#get:length (; 1 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(return
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $~lib/array/Array<i32>#__get (; 2 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
@ -39,48 +37,42 @@
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(if (result i32)
|
||||
(i32.lt_u
|
||||
(get_local $1)
|
||||
(i32.shr_u
|
||||
(i32.load
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.const 2)
|
||||
(if (result i32)
|
||||
(i32.lt_u
|
||||
(get_local $1)
|
||||
(i32.shr_u
|
||||
(i32.load
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.const 2)
|
||||
)
|
||||
(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.add
|
||||
(get_local $2)
|
||||
(i32.shl
|
||||
(get_local $1)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
(block $~lib/internal/arraybuffer/loadUnsafe<i32,i32>|inlined.0 (result i32)
|
||||
(i32.load offset=8
|
||||
(i32.add
|
||||
(get_local $2)
|
||||
(i32.shl
|
||||
(get_local $1)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(func $~lib/internal/arraybuffer/computeSize (; 3 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(return
|
||||
(i32.shl
|
||||
(i32.const 1)
|
||||
(i32.sub
|
||||
(i32.const 32)
|
||||
(i32.clz
|
||||
(i32.sub
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.const 8)
|
||||
)
|
||||
(i32.const 1)
|
||||
(i32.shl
|
||||
(i32.const 1)
|
||||
(i32.sub
|
||||
(i32.const 32)
|
||||
(i32.clz
|
||||
(i32.sub
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.const 8)
|
||||
)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -192,9 +184,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(func $~lib/internal/arraybuffer/allocUnsafe (; 5 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
@ -226,9 +216,7 @@
|
||||
(get_local $1)
|
||||
(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)
|
||||
(local $3 i32)
|
||||
|
@ -2877,14 +2877,12 @@
|
||||
(block
|
||||
(if
|
||||
(i32.eq
|
||||
(tee_local $3
|
||||
(i32.load offset=8
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.shl
|
||||
(get_local $2)
|
||||
(i32.const 2)
|
||||
)
|
||||
(i32.load offset=8
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.shl
|
||||
(get_local $2)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -2969,14 +2967,12 @@
|
||||
(block
|
||||
(if
|
||||
(i32.eq
|
||||
(tee_local $3
|
||||
(i32.load offset=8
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.shl
|
||||
(get_local $2)
|
||||
(i32.const 2)
|
||||
)
|
||||
(i32.load offset=8
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.shl
|
||||
(get_local $2)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -3212,14 +3208,12 @@
|
||||
(if
|
||||
(i32.and
|
||||
(call_indirect (type $iiii)
|
||||
(tee_local $3
|
||||
(i32.load offset=8
|
||||
(i32.add
|
||||
(get_local $4)
|
||||
(i32.shl
|
||||
(get_local $2)
|
||||
(i32.const 2)
|
||||
)
|
||||
(i32.load offset=8
|
||||
(i32.add
|
||||
(get_local $4)
|
||||
(i32.shl
|
||||
(get_local $2)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -3331,14 +3325,12 @@
|
||||
(if
|
||||
(i32.and
|
||||
(call_indirect (type $iiii)
|
||||
(tee_local $3
|
||||
(i32.load offset=8
|
||||
(i32.add
|
||||
(get_local $4)
|
||||
(i32.shl
|
||||
(get_local $2)
|
||||
(i32.const 2)
|
||||
)
|
||||
(i32.load offset=8
|
||||
(i32.add
|
||||
(get_local $4)
|
||||
(i32.shl
|
||||
(get_local $2)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -3450,14 +3442,12 @@
|
||||
(if
|
||||
(i32.and
|
||||
(call_indirect (type $iiii)
|
||||
(tee_local $3
|
||||
(i32.load offset=8
|
||||
(i32.add
|
||||
(get_local $4)
|
||||
(i32.shl
|
||||
(get_local $2)
|
||||
(i32.const 2)
|
||||
)
|
||||
(i32.load offset=8
|
||||
(i32.add
|
||||
(get_local $4)
|
||||
(i32.shl
|
||||
(get_local $2)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -3569,14 +3559,12 @@
|
||||
(i32.const 3)
|
||||
)
|
||||
(call_indirect (type $iiiv)
|
||||
(tee_local $3
|
||||
(i32.load offset=8
|
||||
(i32.add
|
||||
(get_local $4)
|
||||
(i32.shl
|
||||
(get_local $2)
|
||||
(i32.const 2)
|
||||
)
|
||||
(i32.load offset=8
|
||||
(i32.add
|
||||
(get_local $4)
|
||||
(i32.shl
|
||||
(get_local $2)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -3687,14 +3675,12 @@
|
||||
)
|
||||
)
|
||||
(call_indirect (type $iiif)
|
||||
(tee_local $3
|
||||
(i32.load offset=8
|
||||
(i32.add
|
||||
(get_local $4)
|
||||
(i32.shl
|
||||
(get_local $2)
|
||||
(i32.const 2)
|
||||
)
|
||||
(i32.load offset=8
|
||||
(i32.add
|
||||
(get_local $4)
|
||||
(i32.shl
|
||||
(get_local $2)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -3817,14 +3803,12 @@
|
||||
)
|
||||
)
|
||||
(call_indirect (type $iiii)
|
||||
(tee_local $3
|
||||
(i32.load offset=8
|
||||
(i32.add
|
||||
(get_local $4)
|
||||
(i32.shl
|
||||
(get_local $2)
|
||||
(i32.const 2)
|
||||
)
|
||||
(i32.load offset=8
|
||||
(i32.add
|
||||
(get_local $4)
|
||||
(i32.shl
|
||||
(get_local $2)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -4057,14 +4041,12 @@
|
||||
(set_local $2
|
||||
(call_indirect (type $iiiii)
|
||||
(get_local $2)
|
||||
(tee_local $4
|
||||
(i32.load offset=8
|
||||
(i32.add
|
||||
(get_local $5)
|
||||
(i32.shl
|
||||
(get_local $3)
|
||||
(i32.const 2)
|
||||
)
|
||||
(i32.load offset=8
|
||||
(i32.add
|
||||
(get_local $5)
|
||||
(i32.shl
|
||||
(get_local $3)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -4443,7 +4425,7 @@
|
||||
(get_local $7)
|
||||
)
|
||||
)
|
||||
(set_local $5
|
||||
(set_local $6
|
||||
(i32.load offset=8
|
||||
(i32.add
|
||||
(get_local $4)
|
||||
@ -4468,7 +4450,7 @@
|
||||
(i32.const 0)
|
||||
)
|
||||
(block
|
||||
(set_local $6
|
||||
(set_local $5
|
||||
(i32.load offset=8
|
||||
(i32.add
|
||||
(get_local $4)
|
||||
@ -4485,8 +4467,10 @@
|
||||
(br_if $break|1
|
||||
(i32.ge_s
|
||||
(call_indirect (type $iii)
|
||||
(get_local $5)
|
||||
(get_local $6)
|
||||
(tee_local $8
|
||||
(get_local $5)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.const 0)
|
||||
@ -4494,7 +4478,7 @@
|
||||
)
|
||||
(set_local $3
|
||||
(i32.sub
|
||||
(tee_local $8
|
||||
(tee_local $5
|
||||
(get_local $3)
|
||||
)
|
||||
(i32.const 1)
|
||||
@ -4505,13 +4489,13 @@
|
||||
(get_local $4)
|
||||
(i32.shl
|
||||
(i32.add
|
||||
(get_local $8)
|
||||
(get_local $5)
|
||||
(i32.const 1)
|
||||
)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
(get_local $6)
|
||||
(get_local $8)
|
||||
)
|
||||
(br $continue|1)
|
||||
)
|
||||
@ -4529,7 +4513,7 @@
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
(get_local $5)
|
||||
(get_local $6)
|
||||
)
|
||||
(set_local $2
|
||||
(i32.add
|
||||
@ -4557,7 +4541,7 @@
|
||||
(call $~lib/memory/set_memory
|
||||
(tee_local $7
|
||||
(call $~lib/allocator/arena/allocate_memory
|
||||
(tee_local $2
|
||||
(tee_local $6
|
||||
(i32.shl
|
||||
(i32.shr_s
|
||||
(i32.add
|
||||
@ -4576,15 +4560,15 @@
|
||||
)
|
||||
)
|
||||
(i32.const 0)
|
||||
(get_local $2)
|
||||
(get_local $6)
|
||||
)
|
||||
(set_local $3
|
||||
(set_local $2
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(block $break|0
|
||||
(set_local $4
|
||||
(set_local $3
|
||||
(i32.sub
|
||||
(get_local $8)
|
||||
(i32.const 1)
|
||||
@ -4593,18 +4577,18 @@
|
||||
(loop $repeat|0
|
||||
(br_if $break|0
|
||||
(i32.le_s
|
||||
(get_local $4)
|
||||
(get_local $3)
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(set_local $2
|
||||
(get_local $4)
|
||||
(set_local $4
|
||||
(get_local $3)
|
||||
)
|
||||
(loop $continue|1
|
||||
(if
|
||||
(i32.eq
|
||||
(i32.and
|
||||
(get_local $2)
|
||||
(get_local $4)
|
||||
(i32.const 1)
|
||||
)
|
||||
(i32.and
|
||||
@ -4614,7 +4598,7 @@
|
||||
(get_local $7)
|
||||
(i32.shl
|
||||
(i32.shr_s
|
||||
(get_local $2)
|
||||
(get_local $4)
|
||||
(i32.const 6)
|
||||
)
|
||||
(i32.const 2)
|
||||
@ -4623,7 +4607,7 @@
|
||||
)
|
||||
(i32.and
|
||||
(i32.shr_s
|
||||
(get_local $2)
|
||||
(get_local $4)
|
||||
(i32.const 1)
|
||||
)
|
||||
(i32.const 31)
|
||||
@ -4633,9 +4617,9 @@
|
||||
)
|
||||
)
|
||||
(block
|
||||
(set_local $2
|
||||
(set_local $4
|
||||
(i32.shr_s
|
||||
(get_local $2)
|
||||
(get_local $4)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
@ -4643,14 +4627,14 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(set_local $2
|
||||
(set_local $4
|
||||
(i32.load offset=8
|
||||
(i32.add
|
||||
(get_local $3)
|
||||
(get_local $2)
|
||||
(i32.shl
|
||||
(tee_local $5
|
||||
(i32.shr_s
|
||||
(get_local $2)
|
||||
(get_local $4)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
@ -4662,9 +4646,9 @@
|
||||
(set_local $6
|
||||
(i32.load offset=8
|
||||
(i32.add
|
||||
(get_local $3)
|
||||
(get_local $2)
|
||||
(i32.shl
|
||||
(get_local $4)
|
||||
(get_local $3)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
@ -4676,7 +4660,7 @@
|
||||
(if
|
||||
(i32.lt_s
|
||||
(call_indirect (type $iii)
|
||||
(get_local $2)
|
||||
(get_local $4)
|
||||
(get_local $6)
|
||||
(get_local $1)
|
||||
)
|
||||
@ -4689,7 +4673,7 @@
|
||||
(get_local $7)
|
||||
(i32.shl
|
||||
(i32.shr_s
|
||||
(get_local $4)
|
||||
(get_local $3)
|
||||
(i32.const 5)
|
||||
)
|
||||
(i32.const 2)
|
||||
@ -4703,7 +4687,7 @@
|
||||
(i32.shl
|
||||
(i32.const 1)
|
||||
(i32.and
|
||||
(get_local $4)
|
||||
(get_local $3)
|
||||
(i32.const 31)
|
||||
)
|
||||
)
|
||||
@ -4711,17 +4695,17 @@
|
||||
)
|
||||
(i32.store offset=8
|
||||
(i32.add
|
||||
(get_local $3)
|
||||
(get_local $2)
|
||||
(i32.shl
|
||||
(get_local $4)
|
||||
(get_local $3)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
(get_local $2)
|
||||
(get_local $4)
|
||||
)
|
||||
(i32.store offset=8
|
||||
(i32.add
|
||||
(get_local $3)
|
||||
(get_local $2)
|
||||
(i32.shl
|
||||
(get_local $5)
|
||||
(i32.const 2)
|
||||
@ -4731,9 +4715,9 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(set_local $4
|
||||
(set_local $3
|
||||
(i32.sub
|
||||
(get_local $4)
|
||||
(get_local $3)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
@ -4741,7 +4725,7 @@
|
||||
)
|
||||
)
|
||||
(block $break|2
|
||||
(set_local $4
|
||||
(set_local $3
|
||||
(i32.sub
|
||||
(get_local $8)
|
||||
(i32.const 1)
|
||||
@ -4750,34 +4734,32 @@
|
||||
(loop $repeat|2
|
||||
(br_if $break|2
|
||||
(i32.lt_s
|
||||
(get_local $4)
|
||||
(get_local $3)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
(set_local $6
|
||||
(i32.load offset=8
|
||||
(get_local $3)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(i32.store offset=8
|
||||
(get_local $3)
|
||||
(tee_local $5
|
||||
(i32.load offset=8
|
||||
(i32.add
|
||||
(get_local $2)
|
||||
(i32.load offset=8
|
||||
(i32.add
|
||||
(get_local $2)
|
||||
(i32.shl
|
||||
(get_local $3)
|
||||
(i32.shl
|
||||
(get_local $4)
|
||||
(i32.const 2)
|
||||
)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(i32.store offset=8
|
||||
(i32.add
|
||||
(get_local $3)
|
||||
(get_local $2)
|
||||
(i32.shl
|
||||
(get_local $4)
|
||||
(get_local $3)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
@ -4789,7 +4771,7 @@
|
||||
(loop $continue|3
|
||||
(if
|
||||
(i32.lt_s
|
||||
(tee_local $2
|
||||
(tee_local $4
|
||||
(i32.add
|
||||
(i32.shl
|
||||
(get_local $5)
|
||||
@ -4818,11 +4800,11 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(get_local $4)
|
||||
(get_local $3)
|
||||
)
|
||||
(block
|
||||
(set_local $5
|
||||
(get_local $2)
|
||||
(get_local $4)
|
||||
)
|
||||
(br $continue|3)
|
||||
)
|
||||
@ -4837,13 +4819,13 @@
|
||||
(block
|
||||
(set_local $6
|
||||
(i32.load offset=8
|
||||
(get_local $3)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(set_local $2
|
||||
(set_local $4
|
||||
(i32.load offset=8
|
||||
(i32.add
|
||||
(get_local $3)
|
||||
(get_local $2)
|
||||
(i32.shl
|
||||
(get_local $5)
|
||||
(i32.const 2)
|
||||
@ -4858,7 +4840,7 @@
|
||||
(i32.lt_s
|
||||
(call_indirect (type $iii)
|
||||
(get_local $6)
|
||||
(get_local $2)
|
||||
(get_local $4)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.const 0)
|
||||
@ -4892,7 +4874,7 @@
|
||||
)
|
||||
(i32.store offset=8
|
||||
(i32.add
|
||||
(get_local $3)
|
||||
(get_local $2)
|
||||
(i32.shl
|
||||
(get_local $5)
|
||||
(i32.const 2)
|
||||
@ -4901,8 +4883,8 @@
|
||||
(get_local $6)
|
||||
)
|
||||
(i32.store offset=8
|
||||
(get_local $3)
|
||||
(get_local $2)
|
||||
(get_local $4)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -4916,9 +4898,9 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(set_local $4
|
||||
(set_local $3
|
||||
(i32.sub
|
||||
(get_local $4)
|
||||
(get_local $3)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
@ -4931,24 +4913,22 @@
|
||||
(set_local $1
|
||||
(i32.load offset=8
|
||||
(i32.add
|
||||
(get_local $3)
|
||||
(get_local $2)
|
||||
(i32.const 4)
|
||||
)
|
||||
)
|
||||
)
|
||||
(i32.store offset=8
|
||||
(i32.add
|
||||
(get_local $3)
|
||||
(get_local $2)
|
||||
(i32.const 4)
|
||||
)
|
||||
(tee_local $2
|
||||
(i32.load offset=8
|
||||
(get_local $3)
|
||||
)
|
||||
(i32.load offset=8
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(i32.store offset=8
|
||||
(get_local $3)
|
||||
(get_local $2)
|
||||
(get_local $1)
|
||||
)
|
||||
(get_local $0)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -24,19 +24,17 @@
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $~lib/internal/arraybuffer/computeSize (; 1 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(return
|
||||
(i32.shl
|
||||
(i32.const 1)
|
||||
(i32.sub
|
||||
(i32.const 32)
|
||||
(i32.clz
|
||||
(i32.sub
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.const 8)
|
||||
)
|
||||
(i32.const 1)
|
||||
(i32.shl
|
||||
(i32.const 1)
|
||||
(i32.sub
|
||||
(i32.const 32)
|
||||
(i32.clz
|
||||
(i32.sub
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.const 8)
|
||||
)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -148,9 +146,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(func $~lib/internal/arraybuffer/allocUnsafe (; 3 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
@ -182,9 +178,7 @@
|
||||
(get_local $1)
|
||||
(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)
|
||||
(local $3 i32)
|
||||
@ -576,9 +570,7 @@
|
||||
(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)
|
||||
(local $3 i32)
|
||||
@ -2821,9 +2813,7 @@
|
||||
)
|
||||
(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)
|
||||
(block $2of2
|
||||
|
@ -128,9 +128,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(func $std/constructor/EmptyCtor#constructor (; 1 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
@ -201,10 +199,8 @@
|
||||
)
|
||||
)
|
||||
(func $std/constructor/CtorReturns#constructor (; 4 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(return
|
||||
(call $~lib/allocator/arena/allocate_memory
|
||||
(i32.const 0)
|
||||
)
|
||||
(call $~lib/allocator/arena/allocate_memory
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(func $std/constructor/CtorConditionallyReturns#constructor (; 5 ;) (type $ii) (param $0 i32) (result i32)
|
||||
|
@ -76,9 +76,7 @@
|
||||
(br $repeat|0)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(get_local $1)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
(func $~lib/internal/hash/hash32 (; 2 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
@ -139,9 +137,7 @@
|
||||
(i32.const 16777619)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(get_local $1)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
(func $~lib/internal/hash/hash64 (; 3 ;) (type $Ii) (param $0 i64) (result i32)
|
||||
(local $1 i32)
|
||||
@ -271,9 +267,7 @@
|
||||
(i32.const 16777619)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(get_local $3)
|
||||
)
|
||||
(get_local $3)
|
||||
)
|
||||
(func $start (; 4 ;) (type $v)
|
||||
(local $0 i32)
|
||||
|
@ -5775,21 +5775,19 @@
|
||||
)
|
||||
)
|
||||
(func $std/libm/sign (; 51 ;) (type $FF) (param $0 f64) (result f64)
|
||||
(if
|
||||
(if (result f64)
|
||||
(f64.gt
|
||||
(f64.abs
|
||||
(get_local $0)
|
||||
)
|
||||
(f64.const 0)
|
||||
)
|
||||
(set_local $0
|
||||
(f64.copysign
|
||||
(f64.const 1)
|
||||
(get_local $0)
|
||||
)
|
||||
(f64.copysign
|
||||
(f64.const 1)
|
||||
(get_local $0)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
(func $~lib/math/NativeMath.sinh (; 52 ;) (type $FF) (param $0 f64) (result f64)
|
||||
(local $1 f64)
|
||||
|
@ -59,13 +59,9 @@
|
||||
(export "trunc" (func $std/libm/trunc))
|
||||
(export "memory" (memory $0))
|
||||
(func $std/libm/abs (; 0 ;) (type $FF) (param $0 f64) (result f64)
|
||||
(return
|
||||
(block $~lib/math/NativeMath.abs|inlined.0 (result f64)
|
||||
(br $~lib/math/NativeMath.abs|inlined.0
|
||||
(f64.abs
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(block $~lib/math/NativeMath.abs|inlined.0 (result f64)
|
||||
(f64.abs
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -135,11 +131,9 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(f64.div
|
||||
(get_local $1)
|
||||
(get_local $2)
|
||||
)
|
||||
(f64.div
|
||||
(get_local $1)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(func $~lib/math/NativeMath.acos (; 2 ;) (type $FF) (param $0 f64) (result f64)
|
||||
@ -362,21 +356,17 @@
|
||||
(get_local $8)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(f64.mul
|
||||
(f64.const 2)
|
||||
(f64.add
|
||||
(get_local $7)
|
||||
(get_local $5)
|
||||
)
|
||||
(f64.mul
|
||||
(f64.const 2)
|
||||
(f64.add
|
||||
(get_local $7)
|
||||
(get_local $5)
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $std/libm/acos (; 3 ;) (type $FF) (param $0 f64) (result f64)
|
||||
(return
|
||||
(call $~lib/math/NativeMath.acos
|
||||
(get_local $0)
|
||||
)
|
||||
(call $~lib/math/NativeMath.acos
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $~lib/math/NativeMath.log1p (; 4 ;) (type $FF) (param $0 f64) (result f64)
|
||||
@ -703,34 +693,32 @@
|
||||
(get_local $3)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(f64.add
|
||||
(f64.add
|
||||
(f64.add
|
||||
(f64.sub
|
||||
(f64.add
|
||||
(f64.mul
|
||||
(get_local $9)
|
||||
(f64.add
|
||||
(get_local $8)
|
||||
(get_local $14)
|
||||
)
|
||||
)
|
||||
(f64.sub
|
||||
(f64.add
|
||||
(f64.mul
|
||||
(get_local $9)
|
||||
(f64.add
|
||||
(f64.mul
|
||||
(get_local $15)
|
||||
(f64.const 1.9082149292705877e-10)
|
||||
)
|
||||
(get_local $4)
|
||||
(get_local $8)
|
||||
(get_local $14)
|
||||
)
|
||||
)
|
||||
(get_local $8)
|
||||
(f64.add
|
||||
(f64.mul
|
||||
(get_local $15)
|
||||
(f64.const 1.9082149292705877e-10)
|
||||
)
|
||||
(get_local $4)
|
||||
)
|
||||
)
|
||||
(get_local $5)
|
||||
)
|
||||
(f64.mul
|
||||
(get_local $15)
|
||||
(f64.const 0.6931471803691238)
|
||||
(get_local $8)
|
||||
)
|
||||
(get_local $5)
|
||||
)
|
||||
(f64.mul
|
||||
(get_local $15)
|
||||
(f64.const 0.6931471803691238)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -1005,35 +993,33 @@
|
||||
(set_local $13
|
||||
(get_local $3)
|
||||
)
|
||||
(return
|
||||
(f64.add
|
||||
(f64.add
|
||||
(f64.add
|
||||
(f64.sub
|
||||
(f64.add
|
||||
(f64.mul
|
||||
(get_local $7)
|
||||
(f64.add
|
||||
(get_local $6)
|
||||
(get_local $12)
|
||||
)
|
||||
)
|
||||
(f64.mul
|
||||
(f64.convert_s/i32
|
||||
(get_local $13)
|
||||
)
|
||||
(f64.const 1.9082149292705877e-10)
|
||||
(f64.sub
|
||||
(f64.add
|
||||
(f64.mul
|
||||
(get_local $7)
|
||||
(f64.add
|
||||
(get_local $6)
|
||||
(get_local $12)
|
||||
)
|
||||
)
|
||||
(get_local $6)
|
||||
(f64.mul
|
||||
(f64.convert_s/i32
|
||||
(get_local $13)
|
||||
)
|
||||
(f64.const 1.9082149292705877e-10)
|
||||
)
|
||||
)
|
||||
(get_local $5)
|
||||
(get_local $6)
|
||||
)
|
||||
(f64.mul
|
||||
(f64.convert_s/i32
|
||||
(get_local $13)
|
||||
)
|
||||
(f64.const 0.6931471803691238)
|
||||
(get_local $5)
|
||||
)
|
||||
(f64.mul
|
||||
(f64.convert_s/i32
|
||||
(get_local $13)
|
||||
)
|
||||
(f64.const 0.6931471803691238)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -1124,20 +1110,16 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(f64.add
|
||||
(call $~lib/math/NativeMath.log
|
||||
(get_local $0)
|
||||
)
|
||||
(f64.const 0.6931471805599453)
|
||||
(f64.add
|
||||
(call $~lib/math/NativeMath.log
|
||||
(get_local $0)
|
||||
)
|
||||
(f64.const 0.6931471805599453)
|
||||
)
|
||||
)
|
||||
(func $std/libm/acosh (; 7 ;) (type $FF) (param $0 f64) (result f64)
|
||||
(return
|
||||
(call $~lib/math/NativeMath.acosh
|
||||
(get_local $0)
|
||||
)
|
||||
(call $~lib/math/NativeMath.acosh
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $~lib/math/NativeMath.asin (; 8 ;) (type $FF) (param $0 f64) (result f64)
|
||||
@ -1371,15 +1353,11 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(get_local $0)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
(func $std/libm/asin (; 9 ;) (type $FF) (param $0 f64) (result f64)
|
||||
(return
|
||||
(call $~lib/math/NativeMath.asin
|
||||
(get_local $0)
|
||||
)
|
||||
(call $~lib/math/NativeMath.asin
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $~lib/math/NativeMath.asinh (; 10 ;) (type $FF) (param $0 f64) (result f64)
|
||||
@ -1502,32 +1480,26 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(if (result f64)
|
||||
(i64.ne
|
||||
(get_local $3)
|
||||
(i64.const 0)
|
||||
)
|
||||
(f64.neg
|
||||
(get_local $0)
|
||||
)
|
||||
(if (result f64)
|
||||
(i64.ne
|
||||
(get_local $3)
|
||||
(i64.const 0)
|
||||
)
|
||||
(f64.neg
|
||||
(get_local $0)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $std/libm/asinh (; 11 ;) (type $FF) (param $0 f64) (result f64)
|
||||
(return
|
||||
(call $~lib/math/NativeMath.asinh
|
||||
(get_local $0)
|
||||
)
|
||||
(call $~lib/math/NativeMath.asinh
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $isNaN<f64> (; 12 ;) (type $Fi) (param $0 f64) (result i32)
|
||||
(return
|
||||
(f64.ne
|
||||
(get_local $0)
|
||||
(get_local $0)
|
||||
)
|
||||
(f64.ne
|
||||
(get_local $0)
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $~lib/math/NativeMath.atan (; 13 ;) (type $FF) (param $0 f64) (result f64)
|
||||
@ -1928,21 +1900,17 @@
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
(return
|
||||
(if (result f64)
|
||||
(get_local $2)
|
||||
(f64.neg
|
||||
(get_local $3)
|
||||
)
|
||||
(if (result f64)
|
||||
(get_local $2)
|
||||
(f64.neg
|
||||
(get_local $3)
|
||||
)
|
||||
(get_local $3)
|
||||
)
|
||||
)
|
||||
(func $std/libm/atan (; 14 ;) (type $FF) (param $0 f64) (result f64)
|
||||
(return
|
||||
(call $~lib/math/NativeMath.atan
|
||||
(get_local $0)
|
||||
)
|
||||
(call $~lib/math/NativeMath.atan
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $~lib/math/NativeMath.atanh (; 15 ;) (type $FF) (param $0 f64) (result f64)
|
||||
@ -2042,24 +2010,20 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(if (result f64)
|
||||
(i64.ne
|
||||
(get_local $3)
|
||||
(i64.const 0)
|
||||
)
|
||||
(f64.neg
|
||||
(get_local $4)
|
||||
)
|
||||
(if (result f64)
|
||||
(i64.ne
|
||||
(get_local $3)
|
||||
(i64.const 0)
|
||||
)
|
||||
(f64.neg
|
||||
(get_local $4)
|
||||
)
|
||||
(get_local $4)
|
||||
)
|
||||
)
|
||||
(func $std/libm/atanh (; 16 ;) (type $FF) (param $0 f64) (result f64)
|
||||
(return
|
||||
(call $~lib/math/NativeMath.atanh
|
||||
(get_local $0)
|
||||
)
|
||||
(call $~lib/math/NativeMath.atanh
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $~lib/math/NativeMath.atan2 (; 17 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
|
||||
@ -2530,16 +2494,12 @@
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(return
|
||||
(f64.const 0)
|
||||
)
|
||||
(f64.const 0)
|
||||
)
|
||||
(func $std/libm/atan2 (; 18 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
|
||||
(return
|
||||
(call $~lib/math/NativeMath.atan2
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(call $~lib/math/NativeMath.atan2
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func $~lib/math/NativeMath.cbrt (; 19 ;) (type $FF) (param $0 f64) (result f64)
|
||||
@ -2756,38 +2716,26 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(get_local $3)
|
||||
)
|
||||
(get_local $3)
|
||||
)
|
||||
(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)
|
||||
)
|
||||
)
|
||||
(func $std/libm/ceil (; 21 ;) (type $FF) (param $0 f64) (result f64)
|
||||
(block $~lib/math/NativeMath.ceil|inlined.0 (result f64)
|
||||
(f64.ceil
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $std/libm/ceil (; 21 ;) (type $FF) (param $0 f64) (result f64)
|
||||
(return
|
||||
(block $~lib/math/NativeMath.ceil|inlined.0 (result f64)
|
||||
(br $~lib/math/NativeMath.ceil|inlined.0
|
||||
(f64.ceil
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $std/libm/clz32 (; 22 ;) (type $FF) (param $0 f64) (result f64)
|
||||
(return
|
||||
(block $~lib/math/NativeMath.clz32|inlined.0 (result f64)
|
||||
(br $~lib/math/NativeMath.clz32|inlined.0
|
||||
(f64.convert_s/i32
|
||||
(i32.clz
|
||||
(i32.trunc_s/f64
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(block $~lib/math/NativeMath.clz32|inlined.0 (result f64)
|
||||
(f64.convert_s/i32
|
||||
(i32.clz
|
||||
(i32.trunc_s/f64
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -2795,15 +2743,11 @@
|
||||
)
|
||||
(func $~lib/math/NativeMath.cos (; 23 ;) (type $FF) (param $0 f64) (result f64)
|
||||
(unreachable)
|
||||
(return
|
||||
(f64.const 0)
|
||||
)
|
||||
(f64.const 0)
|
||||
)
|
||||
(func $std/libm/cos (; 24 ;) (type $FF) (param $0 f64) (result f64)
|
||||
(return
|
||||
(call $~lib/math/NativeMath.cos
|
||||
(get_local $0)
|
||||
)
|
||||
(call $~lib/math/NativeMath.cos
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $~lib/math/NativeMath.expm1 (; 25 ;) (type $FF) (param $0 f64) (result f64)
|
||||
@ -3287,9 +3231,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(get_local $14)
|
||||
)
|
||||
(get_local $14)
|
||||
)
|
||||
(func $~lib/math/NativeMath.scalbn (; 26 ;) (type $FiF) (param $0 f64) (param $1 i32) (result f64)
|
||||
(local $2 f64)
|
||||
@ -3394,19 +3336,17 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(f64.mul
|
||||
(get_local $2)
|
||||
(f64.reinterpret/i64
|
||||
(i64.shl
|
||||
(i64.add
|
||||
(i64.const 1023)
|
||||
(i64.extend_u/i32
|
||||
(get_local $1)
|
||||
)
|
||||
(f64.mul
|
||||
(get_local $2)
|
||||
(f64.reinterpret/i64
|
||||
(i64.shl
|
||||
(i64.add
|
||||
(i64.const 1023)
|
||||
(i64.extend_u/i32
|
||||
(get_local $1)
|
||||
)
|
||||
(i64.const 52)
|
||||
)
|
||||
(i64.const 52)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -3636,11 +3576,9 @@
|
||||
(get_local $8)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(call $~lib/math/NativeMath.scalbn
|
||||
(get_local $8)
|
||||
(get_local $5)
|
||||
)
|
||||
(call $~lib/math/NativeMath.scalbn
|
||||
(get_local $8)
|
||||
(get_local $5)
|
||||
)
|
||||
)
|
||||
(func $~lib/math/expo2 (; 28 ;) (type $FF) (param $0 f64) (result f64)
|
||||
@ -3664,19 +3602,17 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(f64.mul
|
||||
(f64.mul
|
||||
(f64.mul
|
||||
(call $~lib/math/NativeMath.exp
|
||||
(f64.sub
|
||||
(get_local $0)
|
||||
(f64.const 1416.0996898839683)
|
||||
)
|
||||
(call $~lib/math/NativeMath.exp
|
||||
(f64.sub
|
||||
(get_local $0)
|
||||
(f64.const 1416.0996898839683)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func $~lib/math/NativeMath.cosh (; 29 ;) (type $FF) (param $0 f64) (result f64)
|
||||
@ -3783,50 +3719,34 @@
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(get_local $3)
|
||||
)
|
||||
(get_local $3)
|
||||
)
|
||||
(func $std/libm/cosh (; 30 ;) (type $FF) (param $0 f64) (result f64)
|
||||
(return
|
||||
(call $~lib/math/NativeMath.cosh
|
||||
(get_local $0)
|
||||
)
|
||||
(call $~lib/math/NativeMath.cosh
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $std/libm/exp (; 31 ;) (type $FF) (param $0 f64) (result f64)
|
||||
(return
|
||||
(call $~lib/math/NativeMath.exp
|
||||
(get_local $0)
|
||||
)
|
||||
(call $~lib/math/NativeMath.exp
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $std/libm/expm1 (; 32 ;) (type $FF) (param $0 f64) (result f64)
|
||||
(return
|
||||
(call $~lib/math/NativeMath.expm1
|
||||
(get_local $0)
|
||||
)
|
||||
(call $~lib/math/NativeMath.expm1
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $std/libm/floor (; 33 ;) (type $FF) (param $0 f64) (result f64)
|
||||
(return
|
||||
(block $~lib/math/NativeMath.floor|inlined.0 (result f64)
|
||||
(br $~lib/math/NativeMath.floor|inlined.0
|
||||
(f64.floor
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(block $~lib/math/NativeMath.floor|inlined.0 (result f64)
|
||||
(f64.floor
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $std/libm/fround (; 34 ;) (type $Ff) (param $0 f64) (result f32)
|
||||
(return
|
||||
(block $~lib/math/NativeMath.fround|inlined.0 (result f32)
|
||||
(br $~lib/math/NativeMath.fround|inlined.0
|
||||
(f32.demote/f64
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(block $~lib/math/NativeMath.fround|inlined.0 (result f32)
|
||||
(f32.demote/f64
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -4109,59 +4029,49 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(f64.mul
|
||||
(get_local $8)
|
||||
(f64.sqrt
|
||||
(f64.mul
|
||||
(get_local $8)
|
||||
(f64.sqrt
|
||||
(f64.add
|
||||
(f64.add
|
||||
(f64.add
|
||||
(f64.add
|
||||
(get_local $15)
|
||||
(get_local $13)
|
||||
)
|
||||
(get_local $14)
|
||||
(get_local $15)
|
||||
(get_local $13)
|
||||
)
|
||||
(get_local $12)
|
||||
(get_local $14)
|
||||
)
|
||||
(get_local $12)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $std/libm/hypot (; 36 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
|
||||
(return
|
||||
(call $~lib/math/NativeMath.hypot
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(call $~lib/math/NativeMath.hypot
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func $~lib/math/NativeMath.imul (; 37 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
|
||||
(return
|
||||
(f64.convert_s/i32
|
||||
(i32.mul
|
||||
(i32.trunc_s/f64
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.trunc_s/f64
|
||||
(get_local $1)
|
||||
)
|
||||
(f64.convert_s/i32
|
||||
(i32.mul
|
||||
(i32.trunc_s/f64
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.trunc_s/f64
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $std/libm/imul (; 38 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
|
||||
(return
|
||||
(call $~lib/math/NativeMath.imul
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(call $~lib/math/NativeMath.imul
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func $std/libm/log (; 39 ;) (type $FF) (param $0 f64) (result f64)
|
||||
(return
|
||||
(call $~lib/math/NativeMath.log
|
||||
(get_local $0)
|
||||
)
|
||||
(call $~lib/math/NativeMath.log
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $~lib/math/NativeMath.log10 (; 40 ;) (type $FF) (param $0 f64) (result f64)
|
||||
@ -4536,25 +4446,19 @@
|
||||
(set_local $15
|
||||
(get_local $9)
|
||||
)
|
||||
(return
|
||||
(f64.add
|
||||
(get_local $18)
|
||||
(get_local $15)
|
||||
)
|
||||
(f64.add
|
||||
(get_local $18)
|
||||
(get_local $15)
|
||||
)
|
||||
)
|
||||
(func $std/libm/log10 (; 41 ;) (type $FF) (param $0 f64) (result f64)
|
||||
(return
|
||||
(call $~lib/math/NativeMath.log10
|
||||
(get_local $0)
|
||||
)
|
||||
(call $~lib/math/NativeMath.log10
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $std/libm/log1p (; 42 ;) (type $FF) (param $0 f64) (result f64)
|
||||
(return
|
||||
(call $~lib/math/NativeMath.log1p
|
||||
(get_local $0)
|
||||
)
|
||||
(call $~lib/math/NativeMath.log1p
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $~lib/math/NativeMath.log2 (; 43 ;) (type $FF) (param $0 f64) (result f64)
|
||||
@ -4916,41 +4820,29 @@
|
||||
(set_local $15
|
||||
(get_local $9)
|
||||
)
|
||||
(return
|
||||
(f64.add
|
||||
(get_local $16)
|
||||
(get_local $15)
|
||||
)
|
||||
(f64.add
|
||||
(get_local $16)
|
||||
(get_local $15)
|
||||
)
|
||||
)
|
||||
(func $std/libm/log2 (; 44 ;) (type $FF) (param $0 f64) (result f64)
|
||||
(return
|
||||
(call $~lib/math/NativeMath.log2
|
||||
(get_local $0)
|
||||
)
|
||||
(call $~lib/math/NativeMath.log2
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(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)
|
||||
(br $~lib/math/NativeMath.max|inlined.0
|
||||
(f64.max
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(block $~lib/math/NativeMath.max|inlined.0 (result f64)
|
||||
(f64.max
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(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)
|
||||
(br $~lib/math/NativeMath.min|inlined.0
|
||||
(f64.min
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(block $~lib/math/NativeMath.min|inlined.0 (result f64)
|
||||
(f64.min
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -6507,19 +6399,15 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(f64.mul
|
||||
(get_local $14)
|
||||
(get_local $13)
|
||||
)
|
||||
(f64.mul
|
||||
(get_local $14)
|
||||
(get_local $13)
|
||||
)
|
||||
)
|
||||
(func $std/libm/pow (; 48 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
|
||||
(return
|
||||
(call $~lib/math/NativeMath.pow
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(call $~lib/math/NativeMath.pow
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func $~lib/math/NativeMath.round (; 49 ;) (type $FF) (param $0 f64) (result f64)
|
||||
@ -6678,49 +6566,37 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(get_local $3)
|
||||
)
|
||||
(get_local $3)
|
||||
)
|
||||
(func $std/libm/round (; 50 ;) (type $FF) (param $0 f64) (result f64)
|
||||
(return
|
||||
(call $~lib/math/NativeMath.round
|
||||
(get_local $0)
|
||||
)
|
||||
(call $~lib/math/NativeMath.round
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $std/libm/sign (; 51 ;) (type $FF) (param $0 f64) (result f64)
|
||||
(return
|
||||
(block $~lib/math/NativeMath.sign|inlined.0 (result f64)
|
||||
(br $~lib/math/NativeMath.sign|inlined.0
|
||||
(if (result f64)
|
||||
(f64.gt
|
||||
(f64.abs
|
||||
(get_local $0)
|
||||
)
|
||||
(f64.const 0)
|
||||
)
|
||||
(f64.copysign
|
||||
(f64.const 1)
|
||||
(get_local $0)
|
||||
)
|
||||
(block $~lib/math/NativeMath.sign|inlined.0 (result f64)
|
||||
(if (result f64)
|
||||
(f64.gt
|
||||
(f64.abs
|
||||
(get_local $0)
|
||||
)
|
||||
(f64.const 0)
|
||||
)
|
||||
(f64.copysign
|
||||
(f64.const 1)
|
||||
(get_local $0)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $~lib/math/NativeMath.sin (; 52 ;) (type $FF) (param $0 f64) (result f64)
|
||||
(unreachable)
|
||||
(return
|
||||
(f64.const 0)
|
||||
)
|
||||
(f64.const 0)
|
||||
)
|
||||
(func $std/libm/sin (; 53 ;) (type $FF) (param $0 f64) (result f64)
|
||||
(return
|
||||
(call $~lib/math/NativeMath.sin
|
||||
(get_local $0)
|
||||
)
|
||||
(call $~lib/math/NativeMath.sin
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $~lib/math/NativeMath.sinh (; 54 ;) (type $FF) (param $0 f64) (result f64)
|
||||
@ -6853,39 +6729,27 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(get_local $5)
|
||||
)
|
||||
(get_local $5)
|
||||
)
|
||||
(func $std/libm/sinh (; 55 ;) (type $FF) (param $0 f64) (result f64)
|
||||
(return
|
||||
(call $~lib/math/NativeMath.sinh
|
||||
(get_local $0)
|
||||
)
|
||||
(call $~lib/math/NativeMath.sinh
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $std/libm/sqrt (; 56 ;) (type $FF) (param $0 f64) (result f64)
|
||||
(return
|
||||
(block $~lib/math/NativeMath.sqrt|inlined.0 (result f64)
|
||||
(br $~lib/math/NativeMath.sqrt|inlined.0
|
||||
(f64.sqrt
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(block $~lib/math/NativeMath.sqrt|inlined.0 (result f64)
|
||||
(f64.sqrt
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $~lib/math/NativeMath.tan (; 57 ;) (type $FF) (param $0 f64) (result f64)
|
||||
(unreachable)
|
||||
(return
|
||||
(f64.const 0)
|
||||
)
|
||||
(f64.const 0)
|
||||
)
|
||||
(func $std/libm/tan (; 58 ;) (type $FF) (param $0 f64) (result f64)
|
||||
(return
|
||||
(call $~lib/math/NativeMath.tan
|
||||
(get_local $0)
|
||||
)
|
||||
(call $~lib/math/NativeMath.tan
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $~lib/math/NativeMath.tanh (; 59 ;) (type $FF) (param $0 f64) (result f64)
|
||||
@ -7023,32 +6887,24 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(if (result f64)
|
||||
(get_local $2)
|
||||
(f64.neg
|
||||
(get_local $4)
|
||||
)
|
||||
(if (result f64)
|
||||
(get_local $2)
|
||||
(f64.neg
|
||||
(get_local $4)
|
||||
)
|
||||
(get_local $4)
|
||||
)
|
||||
)
|
||||
(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)
|
||||
)
|
||||
)
|
||||
(func $std/libm/trunc (; 61 ;) (type $FF) (param $0 f64) (result f64)
|
||||
(block $~lib/math/NativeMath.trunc|inlined.0 (result f64)
|
||||
(f64.trunc
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $std/libm/trunc (; 61 ;) (type $FF) (param $0 f64) (result f64)
|
||||
(return
|
||||
(block $~lib/math/NativeMath.trunc|inlined.0 (result f64)
|
||||
(br $~lib/math/NativeMath.trunc|inlined.0
|
||||
(f64.trunc
|
||||
(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)
|
||||
(if
|
||||
(f32.gt
|
||||
(f32.abs
|
||||
(get_local $0)
|
||||
(call $std/math/check<f32>
|
||||
(if (result f32)
|
||||
(f32.gt
|
||||
(f32.abs
|
||||
(get_local $0)
|
||||
)
|
||||
(f32.const 0)
|
||||
)
|
||||
(f32.const 0)
|
||||
)
|
||||
(set_local $0
|
||||
(f32.copysign
|
||||
(f32.const 1)
|
||||
(get_local $0)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(call $std/math/check<f32>
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
(get_local $2)
|
||||
(get_local $3)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -20,11 +20,9 @@
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $isNaN<f64> (; 2 ;) (type $Fi) (param $0 f64) (result i32)
|
||||
(return
|
||||
(f64.ne
|
||||
(get_local $0)
|
||||
(get_local $0)
|
||||
)
|
||||
(f64.ne
|
||||
(get_local $0)
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $~lib/math/NativeMath.mod (; 3 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
|
||||
@ -463,10 +461,8 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(f64.reinterpret/i64
|
||||
(get_local $2)
|
||||
)
|
||||
(f64.reinterpret/i64
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(func $std/mod/check<f64> (; 4 ;) (type $FFi) (param $0 f64) (param $1 f64) (result i32)
|
||||
@ -500,51 +496,45 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(f64.eq
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(f64.eq
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func $std/mod/test_fmod (; 5 ;) (type $FFFi) (param $0 f64) (param $1 f64) (param $2 f64) (result i32)
|
||||
(local $3 i32)
|
||||
(return
|
||||
(if (result i32)
|
||||
(tee_local $3
|
||||
(call $std/mod/check<f64>
|
||||
(call $~lib/math/NativeMath.mod
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(if (result i32)
|
||||
(tee_local $3
|
||||
(call $std/mod/check<f64>
|
||||
(call $~lib/math/NativeMath.mod
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(if (result i32)
|
||||
(tee_local $3
|
||||
(i32.eqz
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(get_local $3)
|
||||
(call $std/mod/check<f64>
|
||||
(call $std/mod/JSOp.mod
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(get_local $2)
|
||||
(i32.eqz
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(get_local $3)
|
||||
(call $std/mod/check<f64>
|
||||
(call $std/mod/JSOp.mod
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(get_local $3)
|
||||
)
|
||||
)
|
||||
(func $isNaN<f32> (; 6 ;) (type $fi) (param $0 f32) (result i32)
|
||||
(return
|
||||
(f32.ne
|
||||
(get_local $0)
|
||||
(get_local $0)
|
||||
)
|
||||
(f32.ne
|
||||
(get_local $0)
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $~lib/math/NativeMathf.mod (; 7 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32)
|
||||
@ -964,10 +954,8 @@
|
||||
(get_local $6)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(f32.reinterpret/i32
|
||||
(get_local $2)
|
||||
)
|
||||
(f32.reinterpret/i32
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(func $std/mod/check<f32> (; 8 ;) (type $ffi) (param $0 f32) (param $1 f32) (result i32)
|
||||
@ -1001,22 +989,18 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(f32.eq
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(f32.eq
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(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 $~lib/math/NativeMathf.mod
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(get_local $2)
|
||||
(call $std/mod/check<f32>
|
||||
(call $~lib/math/NativeMathf.mod
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(func $start (; 10 ;) (type $v)
|
||||
|
@ -119,9 +119,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(func $std/new/AClass#constructor (; 1 ;) (type $ifi) (param $0 i32) (param $1 f32) (result i32)
|
||||
(local $2 i32)
|
||||
|
@ -3417,30 +3417,28 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/operator-overloading/ais
|
||||
(tee_local $0
|
||||
(call $std/operator-overloading/Tester#constructor
|
||||
(i32.const 0)
|
||||
(i32.add
|
||||
(i32.load
|
||||
(tee_local $0
|
||||
(get_global $std/operator-overloading/ais1)
|
||||
)
|
||||
)
|
||||
(i32.load
|
||||
(tee_local $1
|
||||
(get_global $std/operator-overloading/ais2)
|
||||
)
|
||||
(call $std/operator-overloading/Tester#constructor
|
||||
(i32.const 0)
|
||||
(i32.add
|
||||
(i32.load
|
||||
(tee_local $0
|
||||
(get_global $std/operator-overloading/ais1)
|
||||
)
|
||||
)
|
||||
(i32.add
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $1)
|
||||
(i32.load
|
||||
(tee_local $1
|
||||
(get_global $std/operator-overloading/ais2)
|
||||
)
|
||||
)
|
||||
)
|
||||
(i32.add
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if
|
||||
@ -3490,30 +3488,28 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/operator-overloading/aii
|
||||
(tee_local $0
|
||||
(call $std/operator-overloading/Tester#constructor
|
||||
(i32.const 0)
|
||||
(i32.add
|
||||
(i32.load
|
||||
(tee_local $1
|
||||
(get_global $std/operator-overloading/aii1)
|
||||
)
|
||||
)
|
||||
(i32.load
|
||||
(tee_local $0
|
||||
(get_global $std/operator-overloading/aii2)
|
||||
)
|
||||
(call $std/operator-overloading/Tester#constructor
|
||||
(i32.const 0)
|
||||
(i32.add
|
||||
(i32.load
|
||||
(tee_local $1
|
||||
(get_global $std/operator-overloading/aii1)
|
||||
)
|
||||
)
|
||||
(i32.add
|
||||
(i32.load offset=4
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
(i32.load
|
||||
(tee_local $0
|
||||
(get_global $std/operator-overloading/aii2)
|
||||
)
|
||||
)
|
||||
)
|
||||
(i32.add
|
||||
(i32.load offset=4
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if
|
||||
|
@ -190,9 +190,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(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)
|
||||
(local $3 i32)
|
||||
@ -223,116 +221,106 @@
|
||||
)
|
||||
)
|
||||
(func $std/operator-overloading/Tester.add (; 3 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(return
|
||||
(call $std/operator-overloading/Tester#constructor
|
||||
(i32.const 0)
|
||||
(i32.add
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load
|
||||
(get_local $1)
|
||||
)
|
||||
(call $std/operator-overloading/Tester#constructor
|
||||
(i32.const 0)
|
||||
(i32.add
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.add
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.load
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(i32.add
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $std/operator-overloading/Tester.sub (; 4 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(return
|
||||
(call $std/operator-overloading/Tester#constructor
|
||||
(i32.const 0)
|
||||
(i32.sub
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load
|
||||
(get_local $1)
|
||||
)
|
||||
(call $std/operator-overloading/Tester#constructor
|
||||
(i32.const 0)
|
||||
(i32.sub
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.sub
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.load
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(i32.sub
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $std/operator-overloading/Tester.mul (; 5 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(return
|
||||
(call $std/operator-overloading/Tester#constructor
|
||||
(i32.const 0)
|
||||
(i32.mul
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load
|
||||
(get_local $1)
|
||||
)
|
||||
(call $std/operator-overloading/Tester#constructor
|
||||
(i32.const 0)
|
||||
(i32.mul
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.mul
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.load
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(i32.mul
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $std/operator-overloading/Tester.div (; 6 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(return
|
||||
(call $std/operator-overloading/Tester#constructor
|
||||
(i32.const 0)
|
||||
(i32.div_s
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load
|
||||
(get_local $1)
|
||||
)
|
||||
(call $std/operator-overloading/Tester#constructor
|
||||
(i32.const 0)
|
||||
(i32.div_s
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.div_s
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.load
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(i32.div_s
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $std/operator-overloading/Tester.mod (; 7 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(return
|
||||
(call $std/operator-overloading/Tester#constructor
|
||||
(i32.const 0)
|
||||
(i32.rem_s
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load
|
||||
(get_local $1)
|
||||
)
|
||||
(call $std/operator-overloading/Tester#constructor
|
||||
(i32.const 0)
|
||||
(i32.rem_s
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.rem_s
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.load
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(i32.rem_s
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -440,19 +428,17 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(f64.mul
|
||||
(get_local $2)
|
||||
(f64.reinterpret/i64
|
||||
(i64.shl
|
||||
(i64.add
|
||||
(i64.const 1023)
|
||||
(i64.extend_u/i32
|
||||
(get_local $1)
|
||||
)
|
||||
(f64.mul
|
||||
(get_local $2)
|
||||
(f64.reinterpret/i64
|
||||
(i64.shl
|
||||
(i64.add
|
||||
(i64.const 1023)
|
||||
(i64.extend_u/i32
|
||||
(get_local $1)
|
||||
)
|
||||
(i64.const 52)
|
||||
)
|
||||
(i64.const 52)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -2010,42 +1996,38 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(f64.mul
|
||||
(get_local $14)
|
||||
(get_local $13)
|
||||
)
|
||||
(f64.mul
|
||||
(get_local $14)
|
||||
(get_local $13)
|
||||
)
|
||||
)
|
||||
(func $std/operator-overloading/Tester.pow (; 10 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(return
|
||||
(call $std/operator-overloading/Tester#constructor
|
||||
(i32.const 0)
|
||||
(i32.trunc_s/f64
|
||||
(call $~lib/math/NativeMath.pow
|
||||
(f64.convert_s/i32
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(call $std/operator-overloading/Tester#constructor
|
||||
(i32.const 0)
|
||||
(i32.trunc_s/f64
|
||||
(call $~lib/math/NativeMath.pow
|
||||
(f64.convert_s/i32
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(f64.convert_s/i32
|
||||
(i32.load
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(f64.convert_s/i32
|
||||
(i32.load
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(i32.trunc_s/f64
|
||||
(call $~lib/math/NativeMath.pow
|
||||
(f64.convert_s/i32
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(i32.trunc_s/f64
|
||||
(call $~lib/math/NativeMath.pow
|
||||
(f64.convert_s/i32
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(f64.convert_s/i32
|
||||
(i32.load offset=4
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(f64.convert_s/i32
|
||||
(i32.load offset=4
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -2053,356 +2035,324 @@
|
||||
)
|
||||
)
|
||||
(func $std/operator-overloading/Tester.and (; 11 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(return
|
||||
(call $std/operator-overloading/Tester#constructor
|
||||
(i32.const 0)
|
||||
(i32.and
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load
|
||||
(get_local $1)
|
||||
)
|
||||
(call $std/operator-overloading/Tester#constructor
|
||||
(i32.const 0)
|
||||
(i32.and
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.and
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.load
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(i32.and
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $std/operator-overloading/Tester.or (; 12 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(return
|
||||
(call $std/operator-overloading/Tester#constructor
|
||||
(i32.const 0)
|
||||
(i32.or
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load
|
||||
(get_local $1)
|
||||
)
|
||||
(call $std/operator-overloading/Tester#constructor
|
||||
(i32.const 0)
|
||||
(i32.or
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.or
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.load
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(i32.or
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $std/operator-overloading/Tester.xor (; 13 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(return
|
||||
(call $std/operator-overloading/Tester#constructor
|
||||
(i32.const 0)
|
||||
(i32.xor
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load
|
||||
(get_local $1)
|
||||
)
|
||||
(call $std/operator-overloading/Tester#constructor
|
||||
(i32.const 0)
|
||||
(i32.xor
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.xor
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.load
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(i32.xor
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $std/operator-overloading/Tester.equals (; 14 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
(return
|
||||
(if (result i32)
|
||||
(tee_local $2
|
||||
(i32.eq
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (result i32)
|
||||
(tee_local $2
|
||||
(i32.eq
|
||||
(i32.load offset=4
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(i32.load
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.eq
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(func $std/operator-overloading/Tester.notEquals (; 15 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
(return
|
||||
(if (result i32)
|
||||
(tee_local $2
|
||||
(i32.ne
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (result i32)
|
||||
(tee_local $2
|
||||
(i32.ne
|
||||
(i32.load offset=4
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(i32.load
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.ne
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(func $std/operator-overloading/Tester.greater (; 16 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
(return
|
||||
(if (result i32)
|
||||
(tee_local $2
|
||||
(i32.gt_s
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (result i32)
|
||||
(tee_local $2
|
||||
(i32.gt_s
|
||||
(i32.load offset=4
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(i32.load
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.gt_s
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(func $std/operator-overloading/Tester.greaterEquals (; 17 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
(return
|
||||
(if (result i32)
|
||||
(tee_local $2
|
||||
(i32.ge_s
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (result i32)
|
||||
(tee_local $2
|
||||
(i32.ge_s
|
||||
(i32.load offset=4
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(i32.load
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.ge_s
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(func $std/operator-overloading/Tester.less (; 18 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
(return
|
||||
(if (result i32)
|
||||
(tee_local $2
|
||||
(i32.lt_s
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (result i32)
|
||||
(tee_local $2
|
||||
(i32.lt_s
|
||||
(i32.load offset=4
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(i32.load
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.lt_s
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(func $std/operator-overloading/Tester.lessEquals (; 19 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
(return
|
||||
(if (result i32)
|
||||
(tee_local $2
|
||||
(i32.le_s
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (result i32)
|
||||
(tee_local $2
|
||||
(i32.le_s
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $std/operator-overloading/Tester.shr (; 20 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(return
|
||||
(call $std/operator-overloading/Tester#constructor
|
||||
(i32.const 0)
|
||||
(i32.shr_s
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.shr_s
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
(i32.load
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(i32.le_s
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(func $std/operator-overloading/Tester.shr (; 20 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(call $std/operator-overloading/Tester#constructor
|
||||
(i32.const 0)
|
||||
(i32.shr_s
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.shr_s
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $std/operator-overloading/Tester.shu (; 21 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(return
|
||||
(call $std/operator-overloading/Tester#constructor
|
||||
(i32.const 0)
|
||||
(i32.shr_u
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(get_local $1)
|
||||
(call $std/operator-overloading/Tester#constructor
|
||||
(i32.const 0)
|
||||
(i32.shr_u
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.shr_u
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(get_local $1)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.shr_u
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $std/operator-overloading/Tester.shl (; 22 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(return
|
||||
(call $std/operator-overloading/Tester#constructor
|
||||
(i32.const 0)
|
||||
(i32.shl
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(get_local $1)
|
||||
(call $std/operator-overloading/Tester#constructor
|
||||
(i32.const 0)
|
||||
(i32.shl
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.shl
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(get_local $1)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.shl
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(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.load
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $std/operator-overloading/Tester.neg (; 24 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(call $std/operator-overloading/Tester#constructor
|
||||
(i32.const 0)
|
||||
(i32.sub
|
||||
(i32.const 0)
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(i32.sub
|
||||
(i32.const 0)
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $std/operator-overloading/Tester.neg (; 24 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(return
|
||||
(call $std/operator-overloading/Tester#constructor
|
||||
(i32.const 0)
|
||||
(i32.sub
|
||||
(i32.const 0)
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(i32.sub
|
||||
(i32.const 0)
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $std/operator-overloading/Tester.not (; 25 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(return
|
||||
(call $std/operator-overloading/Tester#constructor
|
||||
(i32.const 0)
|
||||
(i32.xor
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.const -1)
|
||||
(call $std/operator-overloading/Tester#constructor
|
||||
(i32.const 0)
|
||||
(i32.xor
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.xor
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.const -1)
|
||||
(i32.const -1)
|
||||
)
|
||||
(i32.xor
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.const -1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $std/operator-overloading/Tester.excl (; 26 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
(return
|
||||
(if (result i32)
|
||||
(tee_local $1
|
||||
(i32.eqz
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (result i32)
|
||||
(tee_local $1
|
||||
(i32.eqz
|
||||
(i32.load offset=4
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.eqz
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func $std/operator-overloading/Tester#inc (; 27 ;) (type $ii) (param $0 i32) (result i32)
|
||||
@ -2424,9 +2374,7 @@
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(get_local $0)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
(func $std/operator-overloading/Tester#dec (; 28 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(i32.store
|
||||
@ -2447,9 +2395,7 @@
|
||||
(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)
|
||||
(local $3 i32)
|
||||
@ -3681,24 +3627,22 @@
|
||||
(set_local $1
|
||||
(get_global $std/operator-overloading/ais2)
|
||||
)
|
||||
(br $std/operator-overloading/TesterInlineStatic.add|inlined.0
|
||||
(call $std/operator-overloading/TesterInlineStatic#constructor
|
||||
(i32.const 0)
|
||||
(i32.add
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load
|
||||
(get_local $1)
|
||||
)
|
||||
(call $std/operator-overloading/TesterInlineStatic#constructor
|
||||
(i32.const 0)
|
||||
(i32.add
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.add
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.load
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(i32.add
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -3756,24 +3700,22 @@
|
||||
(set_local $0
|
||||
(get_global $std/operator-overloading/aii2)
|
||||
)
|
||||
(br $std/operator-overloading/TesterInlineInstance#add|inlined.0
|
||||
(call $std/operator-overloading/TesterInlineInstance#constructor
|
||||
(i32.const 0)
|
||||
(i32.add
|
||||
(i32.load
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(call $std/operator-overloading/TesterInlineInstance#constructor
|
||||
(i32.const 0)
|
||||
(i32.add
|
||||
(i32.load
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.add
|
||||
(i32.load offset=4
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(i32.add
|
||||
(i32.load offset=4
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -1,7 +1,6 @@
|
||||
(module
|
||||
(type $iii (func (param i32 i32) (result i32)))
|
||||
(type $iv (func (param i32)))
|
||||
(type $ii (func (param i32) (result i32)))
|
||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(type $v (func))
|
||||
(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")
|
||||
(export "_setargc" (func $~setargc))
|
||||
(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))
|
||||
(start $start)
|
||||
(func $std/pointer/Pointer<Entry>#constructor (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
@ -46,10 +43,7 @@
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $std/pointer/Pointer<Entry>#get:offset (; 4 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(get_local $0)
|
||||
)
|
||||
(func $start (; 5 ;) (type $v)
|
||||
(func $start (; 4 ;) (type $v)
|
||||
(set_global $std/pointer/one
|
||||
(call $std/pointer/Pointer<Entry>#constructor
|
||||
(i32.const 0)
|
||||
@ -64,16 +58,14 @@
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call $std/pointer/Pointer<Entry>#get:offset
|
||||
(get_global $std/pointer/one)
|
||||
)
|
||||
(get_global $std/pointer/one)
|
||||
(i32.const 8)
|
||||
)
|
||||
(block
|
||||
(call $~lib/env/abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 54)
|
||||
(i32.const 52)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
@ -81,39 +73,31 @@
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call $std/pointer/Pointer<Entry>#get:offset
|
||||
(get_global $std/pointer/two)
|
||||
)
|
||||
(get_global $std/pointer/two)
|
||||
(i32.const 24)
|
||||
)
|
||||
(block
|
||||
(call $~lib/env/abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 55)
|
||||
(i32.const 53)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(i32.store
|
||||
(call $std/pointer/Pointer<Entry>#get:offset
|
||||
(get_global $std/pointer/one)
|
||||
)
|
||||
(get_global $std/pointer/one)
|
||||
(i32.const 1)
|
||||
)
|
||||
(i32.store offset=4
|
||||
(call $std/pointer/Pointer<Entry>#get:offset
|
||||
(get_global $std/pointer/one)
|
||||
)
|
||||
(get_global $std/pointer/one)
|
||||
(i32.const 2)
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(i32.load
|
||||
(call $std/pointer/Pointer<Entry>#get:offset
|
||||
(get_global $std/pointer/one)
|
||||
)
|
||||
(get_global $std/pointer/one)
|
||||
)
|
||||
(i32.const 1)
|
||||
)
|
||||
@ -121,7 +105,7 @@
|
||||
(call $~lib/env/abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 59)
|
||||
(i32.const 57)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
@ -130,9 +114,7 @@
|
||||
(if
|
||||
(i32.ne
|
||||
(i32.load offset=4
|
||||
(call $std/pointer/Pointer<Entry>#get:offset
|
||||
(get_global $std/pointer/one)
|
||||
)
|
||||
(get_global $std/pointer/one)
|
||||
)
|
||||
(i32.const 2)
|
||||
)
|
||||
@ -140,7 +122,7 @@
|
||||
(call $~lib/env/abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 60)
|
||||
(i32.const 58)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
@ -154,16 +136,14 @@
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call $std/pointer/Pointer<Entry>#get:offset
|
||||
(get_global $std/pointer/add)
|
||||
)
|
||||
(get_global $std/pointer/add)
|
||||
(i32.const 32)
|
||||
)
|
||||
(block
|
||||
(call $~lib/env/abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 63)
|
||||
(i32.const 61)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
@ -177,16 +157,14 @@
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call $std/pointer/Pointer<Entry>#get:offset
|
||||
(get_global $std/pointer/sub)
|
||||
)
|
||||
(get_global $std/pointer/sub)
|
||||
(i32.const 16)
|
||||
)
|
||||
(block
|
||||
(call $~lib/env/abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 66)
|
||||
(i32.const 64)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
@ -194,16 +172,14 @@
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call $std/pointer/Pointer<Entry>#get:offset
|
||||
(get_global $std/pointer/one)
|
||||
)
|
||||
(get_global $std/pointer/one)
|
||||
(i32.const 8)
|
||||
)
|
||||
(block
|
||||
(call $~lib/env/abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 68)
|
||||
(i32.const 66)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
@ -227,7 +203,7 @@
|
||||
(call $~lib/env/abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 70)
|
||||
(i32.const 68)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
@ -235,11 +211,24 @@
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call $std/pointer/Pointer<Entry>#get:offset
|
||||
(get_global $std/pointer/one)
|
||||
)
|
||||
(get_global $std/pointer/one)
|
||||
(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
|
||||
(call $~lib/env/abort
|
||||
(i32.const 0)
|
||||
@ -250,41 +239,56 @@
|
||||
(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
|
||||
(i32.ne
|
||||
(call $std/pointer/Pointer<Entry>#get:offset
|
||||
(get_global $std/pointer/two)
|
||||
)
|
||||
(i32.const 24)
|
||||
(get_global $std/pointer/two)
|
||||
(i32.const 8)
|
||||
)
|
||||
(block
|
||||
(call $~lib/env/abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 73)
|
||||
(i32.const 74)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(set_global $std/pointer/two
|
||||
(i32.sub
|
||||
(get_global $std/pointer/two)
|
||||
(i32.const 8)
|
||||
(if
|
||||
(i32.ne
|
||||
(i32.load
|
||||
(get_global $std/pointer/two)
|
||||
)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(set_global $std/pointer/two
|
||||
(i32.sub
|
||||
(get_global $std/pointer/two)
|
||||
(i32.const 8)
|
||||
(block
|
||||
(call $~lib/env/abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 75)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call $std/pointer/Pointer<Entry>#get:offset
|
||||
(i32.load offset=4
|
||||
(get_global $std/pointer/two)
|
||||
)
|
||||
(i32.const 8)
|
||||
(i32.const 2)
|
||||
)
|
||||
(block
|
||||
(call $~lib/env/abort
|
||||
@ -296,43 +300,5 @@
|
||||
(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);
|
||||
}
|
||||
|
||||
// FIXME: does not inline
|
||||
@inline get offset(): usize {
|
||||
return changetype<usize>(this);
|
||||
}
|
||||
|
||||
// FIXME: does not inline
|
||||
@inline get value(): T {
|
||||
return changetype<T>(changetype<usize>(this));
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
(module
|
||||
(type $iii (func (param i32 i32) (result i32)))
|
||||
(type $iv (func (param i32)))
|
||||
(type $ii (func (param i32) (result i32)))
|
||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(type $v (func))
|
||||
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
|
||||
@ -16,14 +15,10 @@
|
||||
(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 "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))
|
||||
(start $start)
|
||||
(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)
|
||||
(block $1of1
|
||||
@ -49,17 +44,7 @@
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $std/pointer/Pointer<Entry>#get:offset (; 4 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(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)
|
||||
(func $start (; 4 ;) (type $v)
|
||||
(local $0 i32)
|
||||
(local $1 i32)
|
||||
(set_global $std/pointer/one
|
||||
@ -77,8 +62,11 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call $std/pointer/Pointer<Entry>#get:offset
|
||||
(get_global $std/pointer/one)
|
||||
(block $std/pointer/Pointer<Entry>#get:offset|inlined.0 (result i32)
|
||||
(set_local $0
|
||||
(get_global $std/pointer/one)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.const 8)
|
||||
)
|
||||
@ -87,7 +75,7 @@
|
||||
(call $~lib/env/abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 54)
|
||||
(i32.const 52)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
@ -96,8 +84,11 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call $std/pointer/Pointer<Entry>#get:offset
|
||||
(get_global $std/pointer/two)
|
||||
(block $std/pointer/Pointer<Entry>#get:offset|inlined.1 (result i32)
|
||||
(set_local $0
|
||||
(get_global $std/pointer/two)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.const 24)
|
||||
)
|
||||
@ -106,21 +97,27 @@
|
||||
(call $~lib/env/abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 55)
|
||||
(i32.const 53)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(i32.store
|
||||
(call $std/pointer/Pointer<Entry>#get:value
|
||||
(get_global $std/pointer/one)
|
||||
(block $std/pointer/Pointer<Entry>#get:value|inlined.0 (result i32)
|
||||
(set_local $0
|
||||
(get_global $std/pointer/one)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.const 1)
|
||||
)
|
||||
(i32.store offset=4
|
||||
(call $std/pointer/Pointer<Entry>#get:value
|
||||
(get_global $std/pointer/one)
|
||||
(block $std/pointer/Pointer<Entry>#get:value|inlined.1 (result i32)
|
||||
(set_local $0
|
||||
(get_global $std/pointer/one)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.const 2)
|
||||
)
|
||||
@ -128,8 +125,11 @@
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(i32.load
|
||||
(call $std/pointer/Pointer<Entry>#get:value
|
||||
(get_global $std/pointer/one)
|
||||
(block $std/pointer/Pointer<Entry>#get:value|inlined.2 (result i32)
|
||||
(set_local $0
|
||||
(get_global $std/pointer/one)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(i32.const 1)
|
||||
@ -139,7 +139,7 @@
|
||||
(call $~lib/env/abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 59)
|
||||
(i32.const 57)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
@ -149,8 +149,11 @@
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(i32.load offset=4
|
||||
(call $std/pointer/Pointer<Entry>#get:value
|
||||
(get_global $std/pointer/one)
|
||||
(block $std/pointer/Pointer<Entry>#get:value|inlined.3 (result i32)
|
||||
(set_local $0
|
||||
(get_global $std/pointer/one)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(i32.const 2)
|
||||
@ -160,7 +163,7 @@
|
||||
(call $~lib/env/abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 60)
|
||||
(i32.const 58)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
@ -174,19 +177,20 @@
|
||||
(set_local $1
|
||||
(get_global $std/pointer/two)
|
||||
)
|
||||
(br $std/pointer/Pointer<Entry>#add|inlined.0
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call $std/pointer/Pointer<Entry>#get:offset
|
||||
(get_global $std/pointer/add)
|
||||
(block $std/pointer/Pointer<Entry>#get:offset|inlined.2 (result i32)
|
||||
(set_local $1
|
||||
(get_global $std/pointer/add)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.const 32)
|
||||
)
|
||||
@ -195,7 +199,7 @@
|
||||
(call $~lib/env/abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 63)
|
||||
(i32.const 61)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
@ -209,23 +213,46 @@
|
||||
(set_local $0
|
||||
(get_global $std/pointer/one)
|
||||
)
|
||||
(br $std/pointer/Pointer<Entry>#sub|inlined.0
|
||||
(i32.sub
|
||||
(get_local $1)
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.sub
|
||||
(get_local $1)
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call $std/pointer/Pointer<Entry>#get:offset
|
||||
(get_global $std/pointer/sub)
|
||||
(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
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(block $std/pointer/Pointer<Entry>#get:offset|inlined.4 (result i32)
|
||||
(set_local $0
|
||||
(get_global $std/pointer/one)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.const 8)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(call $~lib/env/abort
|
||||
(i32.const 0)
|
||||
@ -236,25 +263,6 @@
|
||||
(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
|
||||
(block (result i32)
|
||||
(set_global $std/pointer/one
|
||||
@ -262,11 +270,9 @@
|
||||
(set_local $0
|
||||
(get_global $std/pointer/one)
|
||||
)
|
||||
(br $std/pointer/Pointer<Entry>#inc|inlined.0
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.const 8)
|
||||
)
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.const 8)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -284,7 +290,7 @@
|
||||
(call $~lib/env/abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 70)
|
||||
(i32.const 68)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
@ -293,12 +299,37 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call $std/pointer/Pointer<Entry>#get:offset
|
||||
(get_global $std/pointer/one)
|
||||
(block $std/pointer/Pointer<Entry>#get:offset|inlined.5 (result i32)
|
||||
(set_local $0
|
||||
(get_global $std/pointer/one)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
(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
|
||||
(call $~lib/env/abort
|
||||
(i32.const 0)
|
||||
@ -309,35 +340,14 @@
|
||||
(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
|
||||
(block $std/pointer/Pointer<Entry>#dec|inlined.0 (result i32)
|
||||
(set_local $0
|
||||
(get_global $std/pointer/two)
|
||||
)
|
||||
(br $std/pointer/Pointer<Entry>#dec|inlined.0
|
||||
(i32.sub
|
||||
(get_local $0)
|
||||
(i32.const 8)
|
||||
)
|
||||
(i32.sub
|
||||
(get_local $0)
|
||||
(i32.const 8)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -346,23 +356,72 @@
|
||||
(set_local $0
|
||||
(get_global $std/pointer/two)
|
||||
)
|
||||
(br $std/pointer/Pointer<Entry>#dec|inlined.1
|
||||
(i32.sub
|
||||
(get_local $0)
|
||||
(i32.const 8)
|
||||
)
|
||||
(i32.sub
|
||||
(get_local $0)
|
||||
(i32.const 8)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call $std/pointer/Pointer<Entry>#get:offset
|
||||
(get_global $std/pointer/two)
|
||||
(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
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(i32.load
|
||||
(block $std/pointer/Pointer<Entry>#get:value|inlined.4 (result i32)
|
||||
(set_local $0
|
||||
(get_global $std/pointer/two)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(call $~lib/env/abort
|
||||
(i32.const 0)
|
||||
(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
|
||||
(call $~lib/env/abort
|
||||
(i32.const 0)
|
||||
@ -373,47 +432,5 @@
|
||||
(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,9 +89,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(get_local $0)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
(func $~lib/polyfills/bswap<u16> (; 2 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
@ -227,9 +225,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(get_local $0)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
(func $~lib/polyfills/bswap<i16> (; 4 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
@ -825,9 +821,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(get_local $0)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
(func $~lib/polyfills/bswap16<i32> (; 12 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
@ -905,9 +899,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(get_local $0)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
(func $start (; 13 ;) (type $v)
|
||||
(if
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -35,10 +35,8 @@
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $~lib/array/Array<i32>#get:length (; 1 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(return
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $~lib/array/Array<i32>#__get (; 2 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
@ -48,48 +46,42 @@
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(if (result i32)
|
||||
(i32.lt_u
|
||||
(get_local $1)
|
||||
(i32.shr_u
|
||||
(i32.load
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.const 2)
|
||||
(if (result i32)
|
||||
(i32.lt_u
|
||||
(get_local $1)
|
||||
(i32.shr_u
|
||||
(i32.load
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.const 2)
|
||||
)
|
||||
(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.add
|
||||
(get_local $2)
|
||||
(i32.shl
|
||||
(get_local $1)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
(block $~lib/internal/arraybuffer/loadUnsafe<i32,i32>|inlined.0 (result i32)
|
||||
(i32.load offset=8
|
||||
(i32.add
|
||||
(get_local $2)
|
||||
(i32.shl
|
||||
(get_local $1)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(func $~lib/internal/arraybuffer/computeSize (; 3 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(return
|
||||
(i32.shl
|
||||
(i32.const 1)
|
||||
(i32.sub
|
||||
(i32.const 32)
|
||||
(i32.clz
|
||||
(i32.sub
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.const 8)
|
||||
)
|
||||
(i32.const 1)
|
||||
(i32.shl
|
||||
(i32.const 1)
|
||||
(i32.sub
|
||||
(i32.const 32)
|
||||
(i32.clz
|
||||
(i32.sub
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.const 8)
|
||||
)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -553,9 +545,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(func $~lib/internal/arraybuffer/allocUnsafe (; 6 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
@ -587,9 +577,7 @@
|
||||
(get_local $1)
|
||||
(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)
|
||||
(local $3 i32)
|
||||
@ -2839,9 +2827,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(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)
|
||||
(local $3 i32)
|
||||
@ -2919,10 +2905,8 @@
|
||||
)
|
||||
)
|
||||
(func $~lib/array/Array<i64>#get:length (; 11 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(return
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $~lib/array/Array<i64>#__get (; 12 ;) (type $iiI) (param $0 i32) (param $1 i32) (result i64)
|
||||
@ -2932,32 +2916,28 @@
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(if (result i64)
|
||||
(i32.lt_u
|
||||
(get_local $1)
|
||||
(i32.shr_u
|
||||
(i32.load
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.const 3)
|
||||
(if (result i64)
|
||||
(i32.lt_u
|
||||
(get_local $1)
|
||||
(i32.shr_u
|
||||
(i32.load
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.const 3)
|
||||
)
|
||||
(block $~lib/internal/arraybuffer/loadUnsafe<i64,i64>|inlined.0 (result i64)
|
||||
(br $~lib/internal/arraybuffer/loadUnsafe<i64,i64>|inlined.0
|
||||
(i64.load offset=8
|
||||
(i32.add
|
||||
(get_local $2)
|
||||
(i32.shl
|
||||
(get_local $1)
|
||||
(i32.const 3)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
(block $~lib/internal/arraybuffer/loadUnsafe<i64,i64>|inlined.0 (result i64)
|
||||
(i64.load offset=8
|
||||
(i32.add
|
||||
(get_local $2)
|
||||
(i32.shl
|
||||
(get_local $1)
|
||||
(i32.const 3)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(func $~lib/array/Array<i64>#__set (; 13 ;) (type $iiIv) (param $0 i32) (param $1 i32) (param $2 i64)
|
||||
@ -3036,10 +3016,8 @@
|
||||
)
|
||||
)
|
||||
(func $~lib/array/Array<f32>#get:length (; 14 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(return
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $~lib/array/Array<f32>#__get (; 15 ;) (type $iif) (param $0 i32) (param $1 i32) (result f32)
|
||||
@ -3049,32 +3027,28 @@
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(if (result f32)
|
||||
(i32.lt_u
|
||||
(get_local $1)
|
||||
(i32.shr_u
|
||||
(i32.load
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.const 2)
|
||||
(if (result f32)
|
||||
(i32.lt_u
|
||||
(get_local $1)
|
||||
(i32.shr_u
|
||||
(i32.load
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.const 2)
|
||||
)
|
||||
(block $~lib/internal/arraybuffer/loadUnsafe<f32,f32>|inlined.0 (result f32)
|
||||
(br $~lib/internal/arraybuffer/loadUnsafe<f32,f32>|inlined.0
|
||||
(f32.load offset=8
|
||||
(i32.add
|
||||
(get_local $2)
|
||||
(i32.shl
|
||||
(get_local $1)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
(block $~lib/internal/arraybuffer/loadUnsafe<f32,f32>|inlined.0 (result f32)
|
||||
(f32.load offset=8
|
||||
(i32.add
|
||||
(get_local $2)
|
||||
(i32.shl
|
||||
(get_local $1)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(func $~lib/array/Array<f32>#__set (; 16 ;) (type $iifv) (param $0 i32) (param $1 i32) (param $2 f32)
|
||||
@ -3153,10 +3127,8 @@
|
||||
)
|
||||
)
|
||||
(func $~lib/array/Array<f64>#get:length (; 17 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(return
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $~lib/array/Array<f64>#__get (; 18 ;) (type $iiF) (param $0 i32) (param $1 i32) (result f64)
|
||||
@ -3166,32 +3138,28 @@
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(if (result f64)
|
||||
(i32.lt_u
|
||||
(get_local $1)
|
||||
(i32.shr_u
|
||||
(i32.load
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.const 3)
|
||||
(if (result f64)
|
||||
(i32.lt_u
|
||||
(get_local $1)
|
||||
(i32.shr_u
|
||||
(i32.load
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.const 3)
|
||||
)
|
||||
(block $~lib/internal/arraybuffer/loadUnsafe<f64,f64>|inlined.0 (result f64)
|
||||
(br $~lib/internal/arraybuffer/loadUnsafe<f64,f64>|inlined.0
|
||||
(f64.load offset=8
|
||||
(i32.add
|
||||
(get_local $2)
|
||||
(i32.shl
|
||||
(get_local $1)
|
||||
(i32.const 3)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
(block $~lib/internal/arraybuffer/loadUnsafe<f64,f64>|inlined.0 (result f64)
|
||||
(f64.load offset=8
|
||||
(i32.add
|
||||
(get_local $2)
|
||||
(i32.shl
|
||||
(get_local $1)
|
||||
(i32.const 3)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(func $~lib/array/Array<f64>#__set (; 19 ;) (type $iiFv) (param $0 i32) (param $1 i32) (param $2 f64)
|
||||
|
@ -175,9 +175,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(get_local $1)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
(func $~lib/allocator/arena/allocate_memory (; 2 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
@ -285,9 +283,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(func $~lib/string/String#toUTF8 (; 3 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
@ -599,9 +595,7 @@
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(return
|
||||
(get_local $1)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
(func $~lib/allocator/arena/free_memory (; 4 ;) (type $iv) (param $0 i32)
|
||||
(nop)
|
||||
|
@ -116,14 +116,12 @@
|
||||
(i32.const -1)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(i32.load16_u offset=4
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.shl
|
||||
(get_local $1)
|
||||
(i32.const 1)
|
||||
)
|
||||
(i32.load16_u offset=4
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.shl
|
||||
(get_local $1)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -179,19 +177,17 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(if (result i32)
|
||||
(get_local $2)
|
||||
(i32.sub
|
||||
(i32.load8_u
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load8_u
|
||||
(get_local $1)
|
||||
)
|
||||
(if (result i32)
|
||||
(get_local $2)
|
||||
(i32.sub
|
||||
(i32.load8_u
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load8_u
|
||||
(get_local $1)
|
||||
)
|
||||
(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)
|
||||
@ -277,28 +273,26 @@
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(i32.eqz
|
||||
(call $~lib/memory/compare_memory
|
||||
(i32.eqz
|
||||
(call $~lib/memory/compare_memory
|
||||
(i32.add
|
||||
(i32.add
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.const 4)
|
||||
)
|
||||
(i32.shl
|
||||
(get_local $7)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
(get_local $0)
|
||||
(i32.const 4)
|
||||
)
|
||||
(i32.shl
|
||||
(get_local $8)
|
||||
(get_local $7)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
(i32.const 4)
|
||||
)
|
||||
(i32.shl
|
||||
(get_local $8)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -381,28 +375,26 @@
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(i32.eqz
|
||||
(call $~lib/memory/compare_memory
|
||||
(i32.eqz
|
||||
(call $~lib/memory/compare_memory
|
||||
(i32.add
|
||||
(i32.add
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.const 4)
|
||||
)
|
||||
(i32.shl
|
||||
(get_local $7)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
(get_local $0)
|
||||
(i32.const 4)
|
||||
)
|
||||
(i32.shl
|
||||
(get_local $6)
|
||||
(get_local $7)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
(i32.const 4)
|
||||
)
|
||||
(i32.shl
|
||||
(get_local $6)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -552,26 +544,20 @@
|
||||
(br $repeat|0)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(i32.const -1)
|
||||
)
|
||||
(func $~lib/string/String#includes (; 7 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(i32.ne
|
||||
(call $~lib/string/String#indexOf
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.const -1)
|
||||
)
|
||||
)
|
||||
(func $~lib/string/String#includes (; 7 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(return
|
||||
(i32.ne
|
||||
(call $~lib/string/String#indexOf
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.const -1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(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)
|
||||
(local $2 i32)
|
||||
@ -958,19 +944,15 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(f64.mul
|
||||
(get_local $5)
|
||||
(get_local $7)
|
||||
)
|
||||
(f64.mul
|
||||
(get_local $5)
|
||||
(get_local $7)
|
||||
)
|
||||
)
|
||||
(func $~lib/string/parseInt (; 10 ;) (type $iiF) (param $0 i32) (param $1 i32) (result f64)
|
||||
(return
|
||||
(call $~lib/internal/string/parse<f64>
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(call $~lib/internal/string/parse<f64>
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func $~lib/string/parseFloat (; 11 ;) (type $iF) (param $0 i32) (result f64)
|
||||
@ -1245,11 +1227,9 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(f64.mul
|
||||
(get_local $4)
|
||||
(get_local $5)
|
||||
)
|
||||
(f64.mul
|
||||
(get_local $4)
|
||||
(get_local $5)
|
||||
)
|
||||
)
|
||||
(func $~lib/allocator/arena/allocate_memory (; 12 ;) (type $ii) (param $0 i32) (result i32)
|
||||
@ -1358,9 +1338,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(func $~lib/internal/string/allocate (; 13 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
@ -1406,9 +1384,7 @@
|
||||
(get_local $2)
|
||||
(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)
|
||||
(local $3 i32)
|
||||
@ -3625,9 +3601,7 @@
|
||||
(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)
|
||||
(if
|
||||
@ -3638,11 +3612,9 @@
|
||||
(i32.const 116)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(call $~lib/string/String#concat
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(call $~lib/string/String#concat
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func $~lib/string/String.__eq (; 18 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
@ -3691,32 +3663,28 @@
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(i32.eqz
|
||||
(call $~lib/memory/compare_memory
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.const 4)
|
||||
)
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
(i32.const 4)
|
||||
)
|
||||
(i32.shl
|
||||
(get_local $3)
|
||||
(i32.const 1)
|
||||
)
|
||||
(i32.eqz
|
||||
(call $~lib/memory/compare_memory
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.const 4)
|
||||
)
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
(i32.const 4)
|
||||
)
|
||||
(i32.shl
|
||||
(get_local $3)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $~lib/string/String.__ne (; 19 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(return
|
||||
(i32.eqz
|
||||
(call $~lib/string/String.__eq
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.eqz
|
||||
(call $~lib/string/String.__eq
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -3793,24 +3761,22 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(i32.gt_s
|
||||
(call $~lib/memory/compare_memory
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.const 4)
|
||||
)
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
(i32.const 4)
|
||||
)
|
||||
(i32.shl
|
||||
(get_local $6)
|
||||
(i32.const 1)
|
||||
)
|
||||
(i32.gt_s
|
||||
(call $~lib/memory/compare_memory
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.const 4)
|
||||
)
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
(i32.const 4)
|
||||
)
|
||||
(i32.shl
|
||||
(get_local $6)
|
||||
(i32.const 1)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(func $~lib/string/String.__gte (; 21 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
@ -3888,24 +3854,22 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(i32.ge_s
|
||||
(call $~lib/memory/compare_memory
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.const 4)
|
||||
)
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
(i32.const 4)
|
||||
)
|
||||
(i32.shl
|
||||
(get_local $6)
|
||||
(i32.const 1)
|
||||
)
|
||||
(i32.ge_s
|
||||
(call $~lib/memory/compare_memory
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.const 4)
|
||||
)
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
(i32.const 4)
|
||||
)
|
||||
(i32.shl
|
||||
(get_local $6)
|
||||
(i32.const 1)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(func $~lib/string/String.__lt (; 22 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
@ -3981,24 +3945,22 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(i32.lt_s
|
||||
(call $~lib/memory/compare_memory
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.const 4)
|
||||
)
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
(i32.const 4)
|
||||
)
|
||||
(i32.shl
|
||||
(get_local $6)
|
||||
(i32.const 1)
|
||||
)
|
||||
(i32.lt_s
|
||||
(call $~lib/memory/compare_memory
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.const 4)
|
||||
)
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
(i32.const 4)
|
||||
)
|
||||
(i32.shl
|
||||
(get_local $6)
|
||||
(i32.const 1)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(func $~lib/string/String.__lte (; 23 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
@ -4076,24 +4038,22 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(i32.le_s
|
||||
(call $~lib/memory/compare_memory
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.const 4)
|
||||
)
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
(i32.const 4)
|
||||
)
|
||||
(i32.shl
|
||||
(get_local $6)
|
||||
(i32.const 1)
|
||||
)
|
||||
(i32.le_s
|
||||
(call $~lib/memory/compare_memory
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.const 4)
|
||||
)
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
(i32.const 4)
|
||||
)
|
||||
(i32.shl
|
||||
(get_local $6)
|
||||
(i32.const 1)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(func $~lib/string/String#repeat (; 24 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
@ -4238,9 +4198,7 @@
|
||||
(br $repeat|0)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(get_local $4)
|
||||
)
|
||||
(get_local $4)
|
||||
)
|
||||
(func $start (; 25 ;) (type $v)
|
||||
(set_global $~lib/allocator/arena/startOffset
|
||||
|
@ -1,16 +1,16 @@
|
||||
(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 $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(type $iv (func (param i32)))
|
||||
(type $iiii (func (param i32 i32 i32) (result i32)))
|
||||
(type $iiiv (func (param i32 i32 i32)))
|
||||
(type $iii (func (param i32 i32) (result i32)))
|
||||
(type $iiv (func (param i32 i32)))
|
||||
(type $v (func))
|
||||
(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/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/sym2 (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")
|
||||
(export "memory" (memory $0))
|
||||
(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
|
||||
(i32.add
|
||||
(tee_local $0
|
||||
@ -914,15 +914,13 @@
|
||||
(call $~lib/arraybuffer/ArrayBuffer#constructor
|
||||
(i32.const 0)
|
||||
(i32.mul
|
||||
(tee_local $2
|
||||
(tee_local $8
|
||||
(i32.trunc_s/f64
|
||||
(f64.mul
|
||||
(f64.convert_s/i32
|
||||
(get_local $2)
|
||||
)
|
||||
(f64.const 2.6666666666666665)
|
||||
(tee_local $7
|
||||
(i32.trunc_s/f64
|
||||
(f64.mul
|
||||
(f64.convert_s/i32
|
||||
(get_local $2)
|
||||
)
|
||||
(f64.const 2.6666666666666665)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -931,29 +929,25 @@
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(set_local $6
|
||||
(set_local $8
|
||||
(i32.add
|
||||
(tee_local $3
|
||||
(tee_local $2
|
||||
(i32.add
|
||||
(i32.load offset=8
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.const 8)
|
||||
(i32.add
|
||||
(i32.load offset=8
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.const 8)
|
||||
)
|
||||
)
|
||||
(i32.mul
|
||||
(tee_local $6
|
||||
(i32.load offset=16
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=16
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.const 12)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set_local $3
|
||||
(set_local $2
|
||||
(i32.add
|
||||
(get_local $5)
|
||||
(i32.const 8)
|
||||
@ -962,44 +956,44 @@
|
||||
(loop $continue|0
|
||||
(if
|
||||
(i32.ne
|
||||
(get_local $2)
|
||||
(get_local $6)
|
||||
(get_local $3)
|
||||
(get_local $8)
|
||||
)
|
||||
(block
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.and
|
||||
(i32.load offset=8
|
||||
(get_local $2)
|
||||
(get_local $3)
|
||||
)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(i32.store
|
||||
(get_local $3)
|
||||
(get_local $2)
|
||||
(i32.load
|
||||
(get_local $2)
|
||||
(get_local $3)
|
||||
)
|
||||
)
|
||||
(i32.store offset=4
|
||||
(get_local $3)
|
||||
(get_local $2)
|
||||
(i32.load offset=4
|
||||
(get_local $2)
|
||||
(get_local $3)
|
||||
)
|
||||
)
|
||||
(i32.store offset=8
|
||||
(get_local $3)
|
||||
(get_local $2)
|
||||
(i32.load offset=8
|
||||
(tee_local $7
|
||||
(tee_local $6
|
||||
(i32.add
|
||||
(get_local $4)
|
||||
(i32.shl
|
||||
(i32.and
|
||||
(tee_local $7
|
||||
(tee_local $6
|
||||
(call $~lib/internal/hash/hashStr
|
||||
(i32.load
|
||||
(get_local $2)
|
||||
(get_local $3)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -1012,20 +1006,20 @@
|
||||
)
|
||||
)
|
||||
(i32.store offset=8
|
||||
(get_local $7)
|
||||
(get_local $3)
|
||||
(get_local $6)
|
||||
(get_local $2)
|
||||
)
|
||||
(set_local $3
|
||||
(set_local $2
|
||||
(i32.add
|
||||
(get_local $3)
|
||||
(get_local $2)
|
||||
(i32.const 12)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set_local $2
|
||||
(set_local $3
|
||||
(i32.add
|
||||
(get_local $2)
|
||||
(get_local $3)
|
||||
(i32.const 12)
|
||||
)
|
||||
)
|
||||
@ -1047,7 +1041,7 @@
|
||||
)
|
||||
(i32.store offset=12
|
||||
(get_local $0)
|
||||
(get_local $8)
|
||||
(get_local $7)
|
||||
)
|
||||
(i32.store offset=16
|
||||
(get_local $0)
|
||||
@ -1088,7 +1082,7 @@
|
||||
)
|
||||
(call $~lib/map/Map<String,usize>#rehash
|
||||
(get_local $0)
|
||||
(tee_local $4
|
||||
(tee_local $3
|
||||
(if (result i32)
|
||||
(i32.lt_s
|
||||
(i32.load offset=20
|
||||
@ -1122,11 +1116,8 @@
|
||||
)
|
||||
)
|
||||
(set_local $3
|
||||
(i32.add
|
||||
(i32.load offset=8
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.const 8)
|
||||
(i32.load offset=8
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(i32.store offset=16
|
||||
@ -1143,7 +1134,10 @@
|
||||
(i32.store
|
||||
(tee_local $3
|
||||
(i32.add
|
||||
(get_local $3)
|
||||
(i32.add
|
||||
(get_local $3)
|
||||
(i32.const 8)
|
||||
)
|
||||
(i32.mul
|
||||
(get_local $4)
|
||||
(i32.const 12)
|
||||
@ -1328,15 +1322,13 @@
|
||||
(call $~lib/arraybuffer/ArrayBuffer#constructor
|
||||
(i32.const 0)
|
||||
(i32.mul
|
||||
(tee_local $2
|
||||
(tee_local $8
|
||||
(i32.trunc_s/f64
|
||||
(f64.mul
|
||||
(f64.convert_s/i32
|
||||
(get_local $2)
|
||||
)
|
||||
(f64.const 2.6666666666666665)
|
||||
(tee_local $7
|
||||
(i32.trunc_s/f64
|
||||
(f64.mul
|
||||
(f64.convert_s/i32
|
||||
(get_local $2)
|
||||
)
|
||||
(f64.const 2.6666666666666665)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -1345,29 +1337,25 @@
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(set_local $6
|
||||
(set_local $8
|
||||
(i32.add
|
||||
(tee_local $3
|
||||
(tee_local $2
|
||||
(i32.add
|
||||
(i32.load offset=8
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.const 8)
|
||||
(i32.add
|
||||
(i32.load offset=8
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.const 8)
|
||||
)
|
||||
)
|
||||
(i32.mul
|
||||
(tee_local $6
|
||||
(i32.load offset=16
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=16
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.const 12)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set_local $3
|
||||
(set_local $2
|
||||
(i32.add
|
||||
(get_local $5)
|
||||
(i32.const 8)
|
||||
@ -1376,44 +1364,44 @@
|
||||
(loop $continue|0
|
||||
(if
|
||||
(i32.ne
|
||||
(get_local $2)
|
||||
(get_local $6)
|
||||
(get_local $3)
|
||||
(get_local $8)
|
||||
)
|
||||
(block
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.and
|
||||
(i32.load offset=8
|
||||
(get_local $2)
|
||||
(get_local $3)
|
||||
)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(i32.store
|
||||
(get_local $3)
|
||||
(get_local $2)
|
||||
(i32.load
|
||||
(get_local $2)
|
||||
(get_local $3)
|
||||
)
|
||||
)
|
||||
(i32.store offset=4
|
||||
(get_local $3)
|
||||
(get_local $2)
|
||||
(i32.load offset=4
|
||||
(get_local $2)
|
||||
(get_local $3)
|
||||
)
|
||||
)
|
||||
(i32.store offset=8
|
||||
(get_local $3)
|
||||
(get_local $2)
|
||||
(i32.load offset=8
|
||||
(tee_local $7
|
||||
(tee_local $6
|
||||
(i32.add
|
||||
(get_local $4)
|
||||
(i32.shl
|
||||
(i32.and
|
||||
(tee_local $7
|
||||
(tee_local $6
|
||||
(call $~lib/internal/hash/hash32
|
||||
(i32.load
|
||||
(get_local $2)
|
||||
(get_local $3)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -1426,20 +1414,20 @@
|
||||
)
|
||||
)
|
||||
(i32.store offset=8
|
||||
(get_local $7)
|
||||
(get_local $3)
|
||||
(get_local $6)
|
||||
(get_local $2)
|
||||
)
|
||||
(set_local $3
|
||||
(set_local $2
|
||||
(i32.add
|
||||
(get_local $3)
|
||||
(get_local $2)
|
||||
(i32.const 12)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set_local $2
|
||||
(set_local $3
|
||||
(i32.add
|
||||
(get_local $2)
|
||||
(get_local $3)
|
||||
(i32.const 12)
|
||||
)
|
||||
)
|
||||
@ -1461,7 +1449,7 @@
|
||||
)
|
||||
(i32.store offset=12
|
||||
(get_local $0)
|
||||
(get_local $8)
|
||||
(get_local $7)
|
||||
)
|
||||
(i32.store offset=16
|
||||
(get_local $0)
|
||||
@ -1502,7 +1490,7 @@
|
||||
)
|
||||
(call $~lib/map/Map<usize,String>#rehash
|
||||
(get_local $0)
|
||||
(tee_local $4
|
||||
(tee_local $3
|
||||
(if (result i32)
|
||||
(i32.lt_s
|
||||
(i32.load offset=20
|
||||
@ -1536,11 +1524,8 @@
|
||||
)
|
||||
)
|
||||
(set_local $3
|
||||
(i32.add
|
||||
(i32.load offset=8
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.const 8)
|
||||
(i32.load offset=8
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(i32.store offset=16
|
||||
@ -1557,7 +1542,10 @@
|
||||
(i32.store
|
||||
(tee_local $3
|
||||
(i32.add
|
||||
(get_local $3)
|
||||
(i32.add
|
||||
(get_local $3)
|
||||
(i32.const 8)
|
||||
)
|
||||
(i32.mul
|
||||
(get_local $4)
|
||||
(i32.const 12)
|
||||
@ -1734,14 +1722,12 @@
|
||||
(get_global $~lib/allocator/arena/startOffset)
|
||||
)
|
||||
(set_global $std/symbol/sym1
|
||||
(call $~lib/symbol/Symbol#constructor
|
||||
(i32.const 0)
|
||||
(call $~lib/symbol/Symbol
|
||||
(i32.const 8)
|
||||
)
|
||||
)
|
||||
(set_global $std/symbol/sym2
|
||||
(call $~lib/symbol/Symbol#constructor
|
||||
(i32.const 0)
|
||||
(call $~lib/symbol/Symbol
|
||||
(i32.const 8)
|
||||
)
|
||||
)
|
||||
|
@ -1,7 +1,7 @@
|
||||
import "allocator/arena";
|
||||
|
||||
var sym1 = new Symbol("123");
|
||||
var sym2 = new Symbol("123");
|
||||
var sym1 = Symbol("123");
|
||||
var sym2 = Symbol("123");
|
||||
|
||||
assert(sym1 !== sym2);
|
||||
|
||||
@ -21,3 +21,7 @@ var key4 = Symbol.keyFor(sym4);
|
||||
|
||||
assert(key3 == "123");
|
||||
assert(key3 == key4);
|
||||
|
||||
Symbol.hasInstance;
|
||||
Symbol.concatSpreadable;
|
||||
// ...
|
||||
|
@ -1,10 +1,10 @@
|
||||
(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 $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(type $iv (func (param i32)))
|
||||
(type $iiii (func (param i32 i32 i32) (result i32)))
|
||||
(type $iiiv (func (param i32 i32 i32)))
|
||||
(type $iii (func (param i32 i32) (result i32)))
|
||||
(type $iiv (func (param i32 i32)))
|
||||
(type $v (func))
|
||||
(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/allocator/arena/startOffset (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/sym2 (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")
|
||||
(export "memory" (memory $0))
|
||||
(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 $3 i32)
|
||||
(set_local $3
|
||||
(set_local $2
|
||||
(block (result i32)
|
||||
(set_local $2
|
||||
(set_local $1
|
||||
(get_global $~lib/symbol/nextId)
|
||||
)
|
||||
(set_global $~lib/symbol/nextId
|
||||
(i32.add
|
||||
(get_local $2)
|
||||
(get_local $1)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(get_local $2)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.eqz
|
||||
(get_local $3)
|
||||
(get_local $2)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
(return
|
||||
(get_local $3)
|
||||
)
|
||||
(get_local $2)
|
||||
)
|
||||
(func $~lib/allocator/arena/allocate_memory (; 2 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
@ -176,24 +174,20 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(func $~lib/internal/arraybuffer/computeSize (; 3 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(return
|
||||
(i32.shl
|
||||
(i32.const 1)
|
||||
(i32.sub
|
||||
(i32.const 32)
|
||||
(i32.clz
|
||||
(i32.sub
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.const 8)
|
||||
)
|
||||
(i32.const 1)
|
||||
(i32.shl
|
||||
(i32.const 1)
|
||||
(i32.sub
|
||||
(i32.const 32)
|
||||
(i32.clz
|
||||
(i32.sub
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.const 8)
|
||||
)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -229,9 +223,7 @@
|
||||
(get_local $1)
|
||||
(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)
|
||||
(local $3 i32)
|
||||
@ -623,9 +615,7 @@
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(get_local $3)
|
||||
)
|
||||
(get_local $3)
|
||||
)
|
||||
(func $~lib/map/Map<String,usize>#clear (; 7 ;) (type $iv) (param $0 i32)
|
||||
(i32.store
|
||||
@ -846,9 +836,7 @@
|
||||
(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)
|
||||
(if
|
||||
@ -901,19 +889,17 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(if (result i32)
|
||||
(get_local $2)
|
||||
(i32.sub
|
||||
(i32.load8_u
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load8_u
|
||||
(get_local $1)
|
||||
)
|
||||
(if (result i32)
|
||||
(get_local $2)
|
||||
(i32.sub
|
||||
(i32.load8_u
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load8_u
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(func $~lib/string/String.__eq (; 13 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
@ -962,21 +948,19 @@
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(i32.eqz
|
||||
(call $~lib/memory/compare_memory
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.const 4)
|
||||
)
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
(i32.const 4)
|
||||
)
|
||||
(i32.shl
|
||||
(get_local $3)
|
||||
(i32.const 1)
|
||||
)
|
||||
(i32.eqz
|
||||
(call $~lib/memory/compare_memory
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.const 4)
|
||||
)
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
(i32.const 4)
|
||||
)
|
||||
(i32.shl
|
||||
(get_local $3)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -1049,26 +1033,22 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(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)
|
||||
(return
|
||||
(i32.ne
|
||||
(call $~lib/map/Map<String,usize>#find
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
(block $~lib/internal/hash/hash<String>|inlined.0 (result i32)
|
||||
(br $~lib/internal/hash/hash<String>|inlined.0
|
||||
(call $~lib/internal/hash/hashStr
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.ne
|
||||
(call $~lib/map/Map<String,usize>#find
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
(block $~lib/internal/hash/hash<String>|inlined.0 (result i32)
|
||||
(br $~lib/internal/hash/hash<String>|inlined.0
|
||||
(call $~lib/internal/hash/hashStr
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(func $~lib/map/Map<String,usize>#get (; 16 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
@ -1086,14 +1066,12 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(if (result i32)
|
||||
(if (result i32)
|
||||
(get_local $2)
|
||||
(i32.load offset=4
|
||||
(get_local $2)
|
||||
(i32.load offset=4
|
||||
(get_local $2)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(func $~lib/map/Map<String,usize>#rehash (; 17 ;) (type $iiv) (param $0 i32) (param $1 i32)
|
||||
@ -1140,9 +1118,7 @@
|
||||
(i32.mul
|
||||
(get_local $4)
|
||||
(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)
|
||||
@ -1164,9 +1140,7 @@
|
||||
(get_local $0)
|
||||
)
|
||||
(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)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -1254,9 +1228,7 @@
|
||||
(i32.add
|
||||
(get_local $8)
|
||||
(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)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -1266,9 +1238,7 @@
|
||||
(i32.add
|
||||
(get_local $6)
|
||||
(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)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -1399,9 +1369,7 @@
|
||||
(get_local $6)
|
||||
)
|
||||
(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)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -1511,9 +1479,7 @@
|
||||
(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)
|
||||
(local $3 i32)
|
||||
@ -1583,9 +1549,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(func $~lib/map/Map<usize,String>#rehash (; 21 ;) (type $iiv) (param $0 i32) (param $1 i32)
|
||||
(local $2 i32)
|
||||
@ -1631,9 +1595,7 @@
|
||||
(i32.mul
|
||||
(get_local $4)
|
||||
(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)
|
||||
@ -1655,9 +1617,7 @@
|
||||
(get_local $0)
|
||||
)
|
||||
(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)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -1745,9 +1705,7 @@
|
||||
(i32.add
|
||||
(get_local $8)
|
||||
(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)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -1757,9 +1715,7 @@
|
||||
(i32.add
|
||||
(get_local $6)
|
||||
(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)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -1890,9 +1846,7 @@
|
||||
(get_local $6)
|
||||
)
|
||||
(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)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -2005,26 +1959,22 @@
|
||||
(get_local $2)
|
||||
(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)
|
||||
(return
|
||||
(i32.ne
|
||||
(call $~lib/map/Map<usize,String>#find
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
(block $~lib/internal/hash/hash<usize>|inlined.2 (result i32)
|
||||
(br $~lib/internal/hash/hash<usize>|inlined.2
|
||||
(call $~lib/internal/hash/hash32
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.ne
|
||||
(call $~lib/map/Map<usize,String>#find
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
(block $~lib/internal/hash/hash<usize>|inlined.2 (result i32)
|
||||
(br $~lib/internal/hash/hash<usize>|inlined.2
|
||||
(call $~lib/internal/hash/hash32
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(func $~lib/map/Map<usize,String>#get (; 25 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
@ -2042,39 +1992,35 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(if (result i32)
|
||||
(if (result i32)
|
||||
(get_local $2)
|
||||
(i32.load offset=4
|
||||
(get_local $2)
|
||||
(i32.load offset=4
|
||||
(get_local $2)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(func $~lib/symbol/Symbol.keyFor (; 26 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
(return
|
||||
(if (result i32)
|
||||
(if (result i32)
|
||||
(if (result i32)
|
||||
(tee_local $1
|
||||
(i32.ne
|
||||
(get_global $~lib/symbol/idToString)
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(call $~lib/map/Map<usize,String>#has
|
||||
(tee_local $1
|
||||
(i32.ne
|
||||
(get_global $~lib/symbol/idToString)
|
||||
(get_local $0)
|
||||
(i32.const 0)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
(call $~lib/map/Map<usize,String>#get
|
||||
(call $~lib/map/Map<usize,String>#has
|
||||
(get_global $~lib/symbol/idToString)
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.const 0)
|
||||
(get_local $1)
|
||||
)
|
||||
(call $~lib/map/Map<usize,String>#get
|
||||
(get_global $~lib/symbol/idToString)
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(func $start (; 27 ;) (type $v)
|
||||
@ -2094,14 +2040,12 @@
|
||||
(get_global $~lib/allocator/arena/startOffset)
|
||||
)
|
||||
(set_global $std/symbol/sym1
|
||||
(call $~lib/symbol/Symbol#constructor
|
||||
(i32.const 0)
|
||||
(call $~lib/symbol/Symbol
|
||||
(i32.const 8)
|
||||
)
|
||||
)
|
||||
(set_global $std/symbol/sym2
|
||||
(call $~lib/symbol/Symbol#constructor
|
||||
(i32.const 0)
|
||||
(call $~lib/symbol/Symbol
|
||||
(i32.const 8)
|
||||
)
|
||||
)
|
||||
@ -2237,5 +2181,11 @@
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(drop
|
||||
(i32.const 1)
|
||||
)
|
||||
(drop
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -1489,19 +1489,17 @@
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(tee_local $0
|
||||
(i32.load offset=8
|
||||
(i32.load offset=8
|
||||
(i32.add
|
||||
(i32.add
|
||||
(i32.add
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.shl
|
||||
(get_local $1)
|
||||
(i32.const 2)
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.shl
|
||||
(get_local $1)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -1509,104 +1507,102 @@
|
||||
(func $~lib/typedarray/Int32Array#subarray (; 16 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
(block $~lib/internal/typedarray/TypedArray<i32,i32>#subarray|inlined.0
|
||||
(set_local $4
|
||||
(call $~lib/internal/typedarray/TypedArray<i32,i32>#get:length
|
||||
(get_local $0)
|
||||
)
|
||||
(set_local $4
|
||||
(call $~lib/internal/typedarray/TypedArray<i32,i32>#get:length
|
||||
(get_local $0)
|
||||
)
|
||||
(set_local $1
|
||||
(if (result i32)
|
||||
(i32.lt_s
|
||||
(get_local $1)
|
||||
(i32.const 0)
|
||||
)
|
||||
(select
|
||||
(tee_local $3
|
||||
(i32.add
|
||||
(get_local $4)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(i32.const 0)
|
||||
(i32.gt_s
|
||||
(get_local $3)
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(select
|
||||
(tee_local $3
|
||||
(get_local $1)
|
||||
)
|
||||
(get_local $4)
|
||||
(i32.lt_s
|
||||
(get_local $1)
|
||||
(get_local $4)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set_local $2
|
||||
(if (result i32)
|
||||
(i32.lt_s
|
||||
(get_local $2)
|
||||
(i32.const 0)
|
||||
)
|
||||
(select
|
||||
(tee_local $3
|
||||
(i32.add
|
||||
(get_local $4)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(get_local $1)
|
||||
(i32.gt_s
|
||||
(get_local $3)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(select
|
||||
(tee_local $3
|
||||
(select
|
||||
(get_local $2)
|
||||
(get_local $4)
|
||||
(i32.lt_s
|
||||
(get_local $2)
|
||||
(get_local $4)
|
||||
)
|
||||
)
|
||||
)
|
||||
(get_local $1)
|
||||
(i32.gt_s
|
||||
(get_local $3)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(i32.store
|
||||
(tee_local $3
|
||||
(call $~lib/allocator/arena/allocate_memory
|
||||
(i32.const 12)
|
||||
)
|
||||
)
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(i32.store offset=4
|
||||
(get_local $3)
|
||||
(i32.shl
|
||||
)
|
||||
(set_local $1
|
||||
(if (result i32)
|
||||
(i32.lt_s
|
||||
(get_local $1)
|
||||
(i32.const 2)
|
||||
(i32.const 0)
|
||||
)
|
||||
(select
|
||||
(tee_local $3
|
||||
(i32.add
|
||||
(get_local $4)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(i32.const 0)
|
||||
(i32.gt_s
|
||||
(get_local $3)
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(select
|
||||
(tee_local $3
|
||||
(get_local $1)
|
||||
)
|
||||
(get_local $4)
|
||||
(i32.lt_s
|
||||
(get_local $1)
|
||||
(get_local $4)
|
||||
)
|
||||
)
|
||||
)
|
||||
(i32.store offset=8
|
||||
(get_local $3)
|
||||
(i32.shl
|
||||
)
|
||||
(set_local $2
|
||||
(if (result i32)
|
||||
(i32.lt_s
|
||||
(get_local $2)
|
||||
(i32.const 2)
|
||||
(i32.const 0)
|
||||
)
|
||||
(select
|
||||
(tee_local $3
|
||||
(i32.add
|
||||
(get_local $4)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(get_local $1)
|
||||
(i32.gt_s
|
||||
(get_local $3)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(select
|
||||
(tee_local $3
|
||||
(select
|
||||
(get_local $2)
|
||||
(get_local $4)
|
||||
(i32.lt_s
|
||||
(get_local $2)
|
||||
(get_local $4)
|
||||
)
|
||||
)
|
||||
)
|
||||
(get_local $1)
|
||||
(i32.gt_s
|
||||
(get_local $3)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(i32.store
|
||||
(tee_local $3
|
||||
(call $~lib/allocator/arena/allocate_memory
|
||||
(i32.const 12)
|
||||
)
|
||||
)
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(i32.store offset=4
|
||||
(get_local $3)
|
||||
(i32.shl
|
||||
(get_local $1)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
(i32.store offset=8
|
||||
(get_local $3)
|
||||
(i32.shl
|
||||
(get_local $2)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
(get_local $3)
|
||||
@ -1700,17 +1696,15 @@
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(tee_local $0
|
||||
(i32.load8_u offset=8
|
||||
(i32.load8_u offset=8
|
||||
(i32.add
|
||||
(i32.add
|
||||
(i32.add
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(get_local $2)
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(get_local $1)
|
||||
(get_local $2)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -26,19 +26,17 @@
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $~lib/internal/arraybuffer/computeSize (; 1 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(return
|
||||
(i32.shl
|
||||
(i32.const 1)
|
||||
(i32.sub
|
||||
(i32.const 32)
|
||||
(i32.clz
|
||||
(i32.sub
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.const 8)
|
||||
)
|
||||
(i32.const 1)
|
||||
(i32.shl
|
||||
(i32.const 1)
|
||||
(i32.sub
|
||||
(i32.const 32)
|
||||
(i32.clz
|
||||
(i32.sub
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.const 8)
|
||||
)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -150,9 +148,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(func $~lib/internal/arraybuffer/allocUnsafe (; 3 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
@ -184,9 +180,7 @@
|
||||
(get_local $1)
|
||||
(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)
|
||||
(local $3 i32)
|
||||
@ -622,18 +616,16 @@
|
||||
(get_local $0)
|
||||
)
|
||||
(func $~lib/internal/typedarray/TypedArray<i8,i32>#get:length (; 6 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(return
|
||||
(i32.shr_s
|
||||
(i32.sub
|
||||
(i32.load offset=8
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.shr_s
|
||||
(i32.sub
|
||||
(i32.load offset=8
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(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)
|
||||
@ -718,18 +710,16 @@
|
||||
(get_local $0)
|
||||
)
|
||||
(func $~lib/internal/typedarray/TypedArray<u8,u32>#get:length (; 8 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(return
|
||||
(i32.shr_s
|
||||
(i32.sub
|
||||
(i32.load offset=8
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.shr_s
|
||||
(i32.sub
|
||||
(i32.load offset=8
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(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)
|
||||
@ -814,18 +804,16 @@
|
||||
(get_local $0)
|
||||
)
|
||||
(func $~lib/internal/typedarray/TypedArray<i16,i32>#get:length (; 10 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(return
|
||||
(i32.shr_s
|
||||
(i32.sub
|
||||
(i32.load offset=8
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.shr_s
|
||||
(i32.sub
|
||||
(i32.load offset=8
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(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)
|
||||
@ -910,18 +898,16 @@
|
||||
(get_local $0)
|
||||
)
|
||||
(func $~lib/internal/typedarray/TypedArray<u16,u32>#get:length (; 12 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(return
|
||||
(i32.shr_s
|
||||
(i32.sub
|
||||
(i32.load offset=8
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.shr_s
|
||||
(i32.sub
|
||||
(i32.load offset=8
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(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)
|
||||
@ -1006,18 +992,16 @@
|
||||
(get_local $0)
|
||||
)
|
||||
(func $~lib/internal/typedarray/TypedArray<i32,i32>#get:length (; 14 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(return
|
||||
(i32.shr_s
|
||||
(i32.sub
|
||||
(i32.load offset=8
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.shr_s
|
||||
(i32.sub
|
||||
(i32.load offset=8
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(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)
|
||||
@ -1102,18 +1086,16 @@
|
||||
(get_local $0)
|
||||
)
|
||||
(func $~lib/internal/typedarray/TypedArray<u32,u32>#get:length (; 16 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(return
|
||||
(i32.shr_s
|
||||
(i32.sub
|
||||
(i32.load offset=8
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.shr_s
|
||||
(i32.sub
|
||||
(i32.load offset=8
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(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)
|
||||
@ -1198,18 +1180,16 @@
|
||||
(get_local $0)
|
||||
)
|
||||
(func $~lib/internal/typedarray/TypedArray<i64,i64>#get:length (; 18 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(return
|
||||
(i32.shr_s
|
||||
(i32.sub
|
||||
(i32.load offset=8
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.shr_s
|
||||
(i32.sub
|
||||
(i32.load offset=8
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(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)
|
||||
@ -1294,18 +1274,16 @@
|
||||
(get_local $0)
|
||||
)
|
||||
(func $~lib/internal/typedarray/TypedArray<u64,u64>#get:length (; 20 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(return
|
||||
(i32.shr_s
|
||||
(i32.sub
|
||||
(i32.load offset=8
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.shr_s
|
||||
(i32.sub
|
||||
(i32.load offset=8
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(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)
|
||||
@ -1390,18 +1368,16 @@
|
||||
(get_local $0)
|
||||
)
|
||||
(func $~lib/internal/typedarray/TypedArray<f32,f32>#get:length (; 22 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(return
|
||||
(i32.shr_s
|
||||
(i32.sub
|
||||
(i32.load offset=8
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.shr_s
|
||||
(i32.sub
|
||||
(i32.load offset=8
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(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)
|
||||
@ -1486,18 +1462,16 @@
|
||||
(get_local $0)
|
||||
)
|
||||
(func $~lib/internal/typedarray/TypedArray<f64,f64>#get:length (; 24 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(return
|
||||
(i32.shr_s
|
||||
(i32.sub
|
||||
(i32.load offset=8
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.shr_s
|
||||
(i32.sub
|
||||
(i32.load offset=8
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.const 3)
|
||||
)
|
||||
(i32.const 3)
|
||||
)
|
||||
)
|
||||
(func $std/typedarray/testInstantiate (; 25 ;) (type $iv) (param $0 i32)
|
||||
@ -2330,25 +2304,21 @@
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(block $~lib/internal/arraybuffer/loadUnsafeWithOffset<i32,i32>|inlined.0 (result i32)
|
||||
(set_local $4
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(block $~lib/internal/arraybuffer/loadUnsafeWithOffset<i32,i32>|inlined.0 (result i32)
|
||||
(set_local $4
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(br $~lib/internal/arraybuffer/loadUnsafeWithOffset<i32,i32>|inlined.0
|
||||
(i32.load offset=8
|
||||
(i32.add
|
||||
(i32.add
|
||||
(get_local $4)
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.shl
|
||||
(get_local $1)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
)
|
||||
(i32.load offset=8
|
||||
(i32.add
|
||||
(i32.add
|
||||
(get_local $4)
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.shl
|
||||
(get_local $1)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -2358,127 +2328,123 @@
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
(local $5 i32)
|
||||
(return
|
||||
(block $~lib/internal/typedarray/TypedArray<i32,i32>#subarray|inlined.0 (result i32)
|
||||
(set_local $3
|
||||
(call $~lib/internal/typedarray/TypedArray<i32,i32>#get:length
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.lt_s
|
||||
(get_local $1)
|
||||
(i32.const 0)
|
||||
)
|
||||
(set_local $1
|
||||
(select
|
||||
(tee_local $4
|
||||
(i32.add
|
||||
(get_local $3)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(tee_local $5
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.gt_s
|
||||
(get_local $4)
|
||||
(get_local $5)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set_local $1
|
||||
(select
|
||||
(tee_local $4
|
||||
(get_local $1)
|
||||
)
|
||||
(tee_local $5
|
||||
(get_local $3)
|
||||
)
|
||||
(i32.lt_s
|
||||
(get_local $4)
|
||||
(get_local $5)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.lt_s
|
||||
(get_local $2)
|
||||
(i32.const 0)
|
||||
)
|
||||
(set_local $2
|
||||
(select
|
||||
(tee_local $4
|
||||
(i32.add
|
||||
(get_local $3)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(tee_local $5
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.gt_s
|
||||
(get_local $4)
|
||||
(get_local $5)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set_local $2
|
||||
(select
|
||||
(tee_local $4
|
||||
(select
|
||||
(tee_local $4
|
||||
(get_local $2)
|
||||
)
|
||||
(tee_local $5
|
||||
(get_local $3)
|
||||
)
|
||||
(i32.lt_s
|
||||
(get_local $4)
|
||||
(get_local $5)
|
||||
)
|
||||
)
|
||||
)
|
||||
(tee_local $5
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.gt_s
|
||||
(get_local $4)
|
||||
(get_local $5)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set_local $4
|
||||
(call $~lib/allocator/arena/allocate_memory
|
||||
(i32.const 12)
|
||||
)
|
||||
)
|
||||
(i32.store
|
||||
(get_local $4)
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(i32.store offset=4
|
||||
(get_local $4)
|
||||
(i32.shl
|
||||
(get_local $1)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
(i32.store offset=8
|
||||
(get_local $4)
|
||||
(i32.shl
|
||||
(get_local $2)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
(br $~lib/internal/typedarray/TypedArray<i32,i32>#subarray|inlined.0
|
||||
(get_local $4)
|
||||
(block $~lib/internal/typedarray/TypedArray<i32,i32>#subarray|inlined.0 (result i32)
|
||||
(set_local $3
|
||||
(call $~lib/internal/typedarray/TypedArray<i32,i32>#get:length
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.lt_s
|
||||
(get_local $1)
|
||||
(i32.const 0)
|
||||
)
|
||||
(set_local $1
|
||||
(select
|
||||
(tee_local $4
|
||||
(i32.add
|
||||
(get_local $3)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(tee_local $5
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.gt_s
|
||||
(get_local $4)
|
||||
(get_local $5)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set_local $1
|
||||
(select
|
||||
(tee_local $4
|
||||
(get_local $1)
|
||||
)
|
||||
(tee_local $5
|
||||
(get_local $3)
|
||||
)
|
||||
(i32.lt_s
|
||||
(get_local $4)
|
||||
(get_local $5)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.lt_s
|
||||
(get_local $2)
|
||||
(i32.const 0)
|
||||
)
|
||||
(set_local $2
|
||||
(select
|
||||
(tee_local $4
|
||||
(i32.add
|
||||
(get_local $3)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(tee_local $5
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.gt_s
|
||||
(get_local $4)
|
||||
(get_local $5)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set_local $2
|
||||
(select
|
||||
(tee_local $4
|
||||
(select
|
||||
(tee_local $4
|
||||
(get_local $2)
|
||||
)
|
||||
(tee_local $5
|
||||
(get_local $3)
|
||||
)
|
||||
(i32.lt_s
|
||||
(get_local $4)
|
||||
(get_local $5)
|
||||
)
|
||||
)
|
||||
)
|
||||
(tee_local $5
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.gt_s
|
||||
(get_local $4)
|
||||
(get_local $5)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set_local $4
|
||||
(call $~lib/allocator/arena/allocate_memory
|
||||
(i32.const 12)
|
||||
)
|
||||
)
|
||||
(i32.store
|
||||
(get_local $4)
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(i32.store offset=4
|
||||
(get_local $4)
|
||||
(i32.shl
|
||||
(get_local $1)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
(i32.store offset=8
|
||||
(get_local $4)
|
||||
(i32.shl
|
||||
(get_local $2)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
(get_local $4)
|
||||
)
|
||||
)
|
||||
(func $~lib/internal/typedarray/TypedArray<u8,u32>#__set (; 29 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
|
||||
@ -2603,25 +2569,21 @@
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(block $~lib/internal/arraybuffer/loadUnsafeWithOffset<u8,u8>|inlined.0 (result i32)
|
||||
(set_local $4
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(block $~lib/internal/arraybuffer/loadUnsafeWithOffset<u8,u8>|inlined.0 (result i32)
|
||||
(set_local $4
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(br $~lib/internal/arraybuffer/loadUnsafeWithOffset<u8,u8>|inlined.0
|
||||
(i32.load8_u offset=8
|
||||
(i32.add
|
||||
(i32.add
|
||||
(get_local $4)
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.shl
|
||||
(get_local $1)
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(i32.load8_u offset=8
|
||||
(i32.add
|
||||
(i32.add
|
||||
(get_local $4)
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.shl
|
||||
(get_local $1)
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -98,9 +98,7 @@
|
||||
(i32.const 23)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(func $switch/doSwitchBreakCase (; 3 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
@ -124,9 +122,7 @@
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(i32.const 1)
|
||||
)
|
||||
(i32.const 1)
|
||||
)
|
||||
(func $switch/doSwitchBreakDefault (; 4 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
@ -150,9 +146,7 @@
|
||||
)
|
||||
(br $break|0)
|
||||
)
|
||||
(return
|
||||
(i32.const 2)
|
||||
)
|
||||
(i32.const 2)
|
||||
)
|
||||
(func $switch/doSwitchFallThroughCase (; 5 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
@ -175,9 +169,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(i32.const 1)
|
||||
)
|
||||
(i32.const 1)
|
||||
)
|
||||
(func $switch/doSwitchFallThroughDefault (; 6 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
@ -200,17 +192,13 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(i32.const 2)
|
||||
)
|
||||
(i32.const 2)
|
||||
)
|
||||
(func $switch/doSwitchEmpty (; 7 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(drop
|
||||
(get_local $0)
|
||||
)
|
||||
(return
|
||||
(i32.const 2)
|
||||
)
|
||||
(i32.const 2)
|
||||
)
|
||||
(func $start (; 8 ;) (type $v)
|
||||
(if
|
||||
|
@ -7,9 +7,7 @@
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $typealias/alias (; 0 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(return
|
||||
(get_local $0)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
(func $start (; 1 ;) (type $v)
|
||||
(nop)
|
||||
|
@ -8,9 +8,7 @@
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $void/anInt (; 0 ;) (type $i) (result i32)
|
||||
(return
|
||||
(i32.const 2)
|
||||
)
|
||||
(i32.const 2)
|
||||
)
|
||||
(func $start (; 1 ;) (type $v)
|
||||
(drop
|
||||
|
Loading…
x
Reference in New Issue
Block a user