diff --git a/src/builtins.ts b/src/builtins.ts index f7eaefab..797655b3 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -62,11 +62,12 @@ import { Field, Global, DecoratorFlags, - ClassPrototype + ClassPrototype, + Local } from "./program"; import { - FlowFlags + FlowFlags, Flow } from "./flow"; import { @@ -4214,14 +4215,21 @@ export function compileArraySet( valueExpression: Expression, contextualType: Type ): ExpressionRef { + var program = compiler.program; var type = typedArraySymbolToType(target.internalName); - if (type) { - return compileTypedArraySet(compiler, target, type, thisExpression, - elementExpression, valueExpression, contextualType); + if (!type) { + assert(target.prototype == program.arrayPrototype); + type = assert(target.typeArguments)[0]; } - assert(target.prototype == compiler.program.arrayPrototype); - type = assert(target.typeArguments)[0]; - throw new Error("not implemented"); + return compileTypedArraySet( + compiler, + target, + type, + thisExpression, + elementExpression, + valueExpression, + contextualType + ); } function compileTypedArraySet( @@ -4233,7 +4241,6 @@ function compileTypedArraySet( valueExpression: Expression, contextualType: Type ): ExpressionRef { - var type = typedArraySymbolToType(target.internalName); var module = compiler.module; var dataStart = assert(target.lookupInSelf("dataStart")); @@ -4267,16 +4274,22 @@ function compileTypedArraySet( } } + var typeIsManaged = type.is(TypeFlags.REFERENCE); // FIXME: .isManaged var usizeType = compiler.options.usizeType; var nativeSizeType = compiler.options.nativeSizeType; + var thisExpr = compiler.compileExpression( + thisExpression, + target.type, + ConversionKind.IMPLICIT, + WrapMode.NONE + ); + var tempThis: Local | null = null; + if (typeIsManaged) { + tempThis = compiler.currentFlow.getTempLocal(target.type, false); + thisExpr = module.createTeeLocal(tempThis.index, thisExpr); + } var dataStartExpr = module.createLoad(usizeType.byteSize, true, - compiler.compileExpression( - thisExpression, - target.type, - ConversionKind.IMPLICIT, - WrapMode.NONE - ), - nativeSizeType, (dataStart).memoryOffset + thisExpr, nativeSizeType, (dataStart).memoryOffset ); var typeAlignLog2 = type.alignLog2; @@ -4316,10 +4329,33 @@ function compileTypedArraySet( WrapMode.NONE ); - // clamp - if (target.internalName == BuiltinSymbols.Uint8ClampedArray) { + // handle Array: value = LINK(value, this), value + if (typeIsManaged) { + let program = compiler.program; + let linkPrototype = assert(program.linkPrototype); + let linkInstance = compiler.resolver.resolveFunction(linkPrototype, [ type, target.type ]); + if (!linkInstance) return module.createUnreachable(); + let previousFlow = compiler.currentFlow; + let tempValue = previousFlow.getTempLocal(type, false); + let flow = Flow.createInline(previousFlow.parentFunction, linkInstance); + compiler.currentFlow = flow; + flow.addScopedAlias(linkInstance.signature.getParameterName(0), type, tempValue.index); + flow.addScopedAlias(linkInstance.signature.getParameterName(1), target.type, assert(tempThis).index); + let body = compiler.compileFunctionBody(linkInstance); + body.unshift( + module.createSetLocal(tempValue.index, valueExpr) + ); + body.push( + module.createGetLocal(tempValue.index, nativeSizeType) + ); + previousFlow.freeTempLocal(tempValue); + previousFlow.freeTempLocal(tempThis!); tempThis = null; + compiler.currentFlow = previousFlow; + valueExpr = module.createBlock(flow.inlineReturnLabel, body, nativeSizeType); + + // handle Uint8ClampedArray: value = ~(value >> 31) & (((255 - value) >> 31) | value) + } else if (target.internalName == BuiltinSymbols.Uint8ClampedArray) { let tempLocal = compiler.currentFlow.getAndFreeTempLocal(Type.i32, true); - // ~(value >> 31) & (((255 - value) >> 31) | value) valueExpr = module.createBinary(BinaryOp.AndI32, module.createBinary(BinaryOp.XorI32, module.createBinary(BinaryOp.ShrI32, @@ -4340,6 +4376,7 @@ function compileTypedArraySet( ) ); } + assert(!tempThis); var nativeType = type.toNativeType(); diff --git a/src/compiler.ts b/src/compiler.ts index 180f10a0..4e595273 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -1065,7 +1065,7 @@ export class Compiler extends DiagnosticEmitter { } /** Compiles the body of a function within the specified flow. */ - private compileFunctionBody(instance: Function): ExpressionRef[] { + compileFunctionBody(instance: Function): ExpressionRef[] { var module = this.module; var bodyNode = assert(instance.prototype.bodyNode); var returnType = instance.signature.returnType; @@ -4689,22 +4689,22 @@ export class Compiler extends DiagnosticEmitter { case ElementKind.CLASS: { let elementExpression = resolver.currentElementExpression; if (elementExpression) { // indexed access + let arrayBufferView = this.program.arrayBufferViewInstance; + if (arrayBufferView) { + if ((target).prototype.extends(arrayBufferView.prototype)) { + return compileArraySet( + this, + target, + assert(this.resolver.currentThisExpression), + elementExpression, + valueExpression, + contextualType + ); + } + } let isUnchecked = flow.is(FlowFlags.UNCHECKED_CONTEXT); let indexedSet = (target).lookupOverload(OperatorKind.INDEXED_SET, isUnchecked); if (!indexedSet) { - let arrayBufferView = this.program.arrayBufferViewInstance; - if (arrayBufferView) { - if ((target).prototype.extends(arrayBufferView.prototype)) { - return compileArraySet( - this, - target, - assert(this.resolver.currentThisExpression), - elementExpression, - valueExpression, - contextualType - ); - } - } let indexedGet = (target).lookupOverload(OperatorKind.INDEXED_GET, isUnchecked); if (!indexedGet) { this.error( diff --git a/src/diagnostics.ts b/src/diagnostics.ts index 9368bf94..2eff86a3 100644 --- a/src/diagnostics.ts +++ b/src/diagnostics.ts @@ -280,8 +280,8 @@ export abstract class DiagnosticEmitter { var message = DiagnosticMessage.create(code, category, arg0, arg1, arg2).withRange(range); if (relatedRange) message.relatedRange = relatedRange; this.diagnostics.push(message); - // console.log(formatDiagnosticMessage(message, true, true) + "\n"); // temporary - // console.log(new Error("stack").stack); + console.log(formatDiagnosticMessage(message, true, true) + "\n"); // temporary + console.log(new Error("stack").stack); } /** Emits an informatory diagnostic message. */ diff --git a/std/assembly/array.ts b/std/assembly/array.ts index 3d465a1b..975065de 100644 --- a/std/assembly/array.ts +++ b/std/assembly/array.ts @@ -346,12 +346,14 @@ export class Array extends ArrayBufferView { } reverse(): Array { - var base = this.dataStart; - for (let front = 0, back = this.length_ - 1; front < back; ++front, --back) { - let temp = load(base, front); - let dest = base + (back << alignof()); - store(base + (front << alignof()), load(dest)); - store(dest, temp); + var front = this.dataStart; + var back = this.dataEnd - sizeof(); + while (front < back) { + let temp = load(front); + store(front, load(back)); + store(back, temp); + front += sizeof(); + back -= sizeof(); } return this; } diff --git a/std/assembly/runtime.ts b/std/assembly/runtime.ts index c29c02a8..bb8944d7 100644 --- a/std/assembly/runtime.ts +++ b/std/assembly/runtime.ts @@ -192,7 +192,7 @@ function assertUnregistered(ref: usize): void { /** Asserts that a managed object has already been registered. */ // @ts-ignore: decorator function assertRegistered(ref: usize): void { - assert(ref > HEAP_BASE); // must be a heap object + // may be a static string or buffer (not a heap object) assert(changetype
(ref - HEADER_SIZE).classId != HEADER_MAGIC); } diff --git a/std/assembly/string.ts b/std/assembly/string.ts index 64c02c1e..6c242fbc 100644 --- a/std/assembly/string.ts +++ b/std/assembly/string.ts @@ -1,4 +1,4 @@ -import { ALLOCATE, REGISTER, HEADER, HEADER_SIZE } from "./runtime"; +import { ALLOCATE, REGISTER, HEADER, HEADER_SIZE, ArrayBufferView, LINK } from "./runtime"; import { MAX_SIZE_32 } from "./util/allocator"; import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./util/string"; @@ -359,22 +359,20 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut // split by chars length = min(length, limit); let result = new Array(length); - let buffer = unreachable(); // TODO - // let buffer = result.buffer_; + let resultStart = changetype(result).dataStart; for (let i: isize = 0; i < length; ++i) { - let char = ALLOCATE(2); + let charStr = ALLOCATE(2); store( - changetype(char), - load( - changetype(this) + (i << 1) - ) + charStr, + load(changetype(this) + (i << 1)) ); - store(changetype(buffer) + (i << 1), char); + store(resultStart + (i << alignof()), REGISTER(charStr)); + LINK(charStr, result); } return result; } else if (!length) { let result = new Array(1); - unchecked(result[0] = changetype("")); + store(changetype(result).dataStart, ""); // no need to register/link return result; } var result = new Array(); diff --git a/tests/compiler/std/array.ts b/tests/compiler/std/array.ts index 777d62a4..551c3691 100644 --- a/tests/compiler/std/array.ts +++ b/tests/compiler/std/array.ts @@ -1,12 +1,12 @@ import "allocator/arena"; import { Array } from "array"; -import { COMPARATOR } from "internal/sort"; +import { COMPARATOR } from "util/sort"; // Obtains the internal capacity of an array from its backing buffer. function internalCapacity(array: Array): i32 { // the memory region used by the backing buffer might still be larger in that the ArrayBuffer // pre-allocates a power of 2 sized buffer itself and reuses it as long as it isn't exceeded. - var buffer: ArrayBuffer = array.buffer_; + var buffer: ArrayBuffer = array.data; return buffer.byteLength >> alignof(); } diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index b951d9c6..2a488e58 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -1,18 +1,19 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$di (func (param i32) (result f64))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$ij (func (param i64) (result i32))) (type $FUNCSIG$viji (func (param i32 i64 i32))) (type $FUNCSIG$id (func (param f64) (result i32))) (type $FUNCSIG$iid (func (param i32 f64) (result i32))) (type $FUNCSIG$iijijiji (func (param i32 i64 i32 i64 i32 i64 i32) (result i32))) + (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -80,115 +81,114 @@ (data (i32.const 1296) "\01\00\00\00\n\00\00\00c\00d\00e\00f\00g") (data (i32.const 1320) "\01\00\00\00\n\00\00\00d\00e\00f\00g\00h") (data (i32.const 1344) "\01\00\00\00\1a\00\00\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m") - (data (i32.const 1384) "\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 1424) "\01\00\00\008\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 1488) "\01\00\00\00\n\00\00\00a\00,\00b\00,\00c") - (data (i32.const 1512) "\01\00\00\00\02\00\00\00.") - (data (i32.const 1528) "\01\00\00\00\02\00\00\00c") - (data (i32.const 1544) "\01\00\00\00\0e\00\00\00a\00,\00 \00b\00,\00 \00c") - (data (i32.const 1568) "\01\00\00\00\04\00\00\00,\00 ") - (data (i32.const 1584) "\01\00\00\00\0c\00\00\00a\00,\00b\00,\00,\00c") - (data (i32.const 1608) "\01\00\00\00\0c\00\00\00,\00a\00,\00b\00,\00c") - (data (i32.const 1632) "\01\00\00\00\0c\00\00\00a\00,\00b\00,\00c\00,") - (data (i32.const 1656) "\90\01\00\00\00\00\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") - (data (i32.const 2168) "x\06\00\00d") - (data (i32.const 2176) "\01\00\00\00\02\00\00\008") - (data (i32.const 2192) "\01\00\00\00\n\00\00\00-\001\000\000\000") - (data (i32.const 2216) "\01\00\00\00\08\00\00\001\002\003\004") - (data (i32.const 2232) "\01\00\00\00\n\00\00\001\002\003\004\005") - (data (i32.const 2256) "\01\00\00\00\0c\00\00\001\002\003\004\005\006") - (data (i32.const 2280) "\01\00\00\00\0e\00\00\001\001\001\001\001\001\001") - (data (i32.const 2304) "\01\00\00\00\0e\00\00\001\002\003\004\005\006\007") - (data (i32.const 2328) "\01\00\00\00\14\00\00\002\001\004\007\004\008\003\006\004\006") - (data (i32.const 2360) "\01\00\00\00\14\00\00\002\001\004\007\004\008\003\006\004\007") - (data (i32.const 2392) "\01\00\00\00\16\00\00\00-\002\001\004\007\004\008\003\006\004\008") - (data (i32.const 2424) "\01\00\00\00\04\00\00\00-\001") - (data (i32.const 2440) "\01\00\00\00\08\00\00\001\000\000\000") - (data (i32.const 2456) "\01\00\00\00\14\00\00\002\001\004\007\004\008\003\006\004\008") - (data (i32.const 2488) "\01\00\00\00\14\00\00\004\002\009\004\009\006\007\002\009\005") - (data (i32.const 2520) "\01\00\00\00\10\00\00\009\009\009\009\009\009\009\009") - (data (i32.const 2544) "\01\00\00\00\12\00\00\001\000\000\000\000\000\000\000\000") - (data (i32.const 2576) "\01\00\00\00\16\00\00\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2608) "\01\00\00\00\18\00\00\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2640) "\01\00\00\00\1e\00\00\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2680) "\01\00\00\00 \00\00\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2720) "\01\00\00\00\"\00\00\001\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2768) "\01\00\00\00(\00\00\001\008\004\004\006\007\004\004\000\007\003\007\000\009\005\005\001\006\001\005") - (data (i32.const 2816) "\01\00\00\00\n\00\00\00-\001\002\003\004") - (data (i32.const 2840) "\01\00\00\00\16\00\00\00-\004\002\009\004\009\006\007\002\009\005") - (data (i32.const 2872) "\01\00\00\00\18\00\00\00-\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2904) "\01\00\00\00\1a\00\00\00-\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2944) "\01\00\00\00 \00\00\00-\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2984) "\01\00\00\00$\00\00\00-\001\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 3032) "\01\00\00\00&\00\00\009\002\002\003\003\007\002\000\003\006\008\005\004\007\007\005\008\000\007") - (data (i32.const 3080) "\01\00\00\00(\00\00\00-\009\002\002\003\003\007\002\000\003\006\008\005\004\007\007\005\008\000\008") - (data (i32.const 3128) "\01\00\00\00\06\00\00\000\00.\000") - (data (i32.const 3144) "\01\00\00\00\06\00\00\00N\00a\00N") - (data (i32.const 3160) "\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 3192) "\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 3216) "\b8\02\00\00\00\00\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8 (; 20 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/util/string/parse (; 19 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2551,7 +2304,7 @@ local.get $5 f64.mul ) - (func $~lib/string/parseFloat (; 21 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/string/parseFloat (; 20 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2663,7 +2416,7 @@ if i32.const 0 i32.const 96 - i32.const 591 + i32.const 569 i32.const 10 call $~lib/env/abort unreachable @@ -2722,7 +2475,7 @@ local.get $4 f64.mul ) - (func $~lib/string/String#concat (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2731,7 +2484,7 @@ if i32.const 0 i32.const 96 - i32.const 97 + i32.const 65 i32.const 4 call $~lib/env/abort unreachable @@ -2766,24 +2519,22 @@ return end local.get $2 - call $~lib/runtime/ALLOC + call $~lib/runtime/doAllocate local.tee $2 local.get $0 local.get $3 - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy local.get $2 local.get $3 i32.add local.get $1 local.get $4 - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy local.get $2 - call $~lib/runtime/unref i32.const 1 - i32.store - local.get $2 + call $~lib/runtime/doRegister ) - (func $~lib/string/String.concat (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.concat (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 240 local.get $0 @@ -2791,13 +2542,13 @@ local.get $1 call $~lib/string/String#concat ) - (func $~lib/string/String.ne (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.ne (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.eq i32.eqz ) - (func $~lib/string/String.gt (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.gt (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block (result i32) @@ -2858,11 +2609,11 @@ local.get $3 i32.lt_s select - call $~lib/string/compareImpl + call $~lib/util/string/compareImpl i32.const 0 i32.gt_s ) - (func $~lib/string/String.lt (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.lt (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block (result i32) @@ -2923,23 +2674,23 @@ local.get $3 i32.lt_s select - call $~lib/string/compareImpl + call $~lib/util/string/compareImpl i32.const 0 i32.lt_s ) - (func $~lib/string/String.gte (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.gte (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.lt i32.eqz ) - (func $~lib/string/String.lte (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String.lte (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 312 local.get $0 call $~lib/string/String.gt i32.eqz ) - (func $~lib/string/String#repeat (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#repeat (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2947,7 +2698,7 @@ if i32.const 0 i32.const 96 - i32.const 349 + i32.const 324 i32.const 4 call $~lib/env/abort unreachable @@ -2977,7 +2728,7 @@ if i32.const 0 i32.const 96 - i32.const 354 + i32.const 329 i32.const 6 call $~lib/env/abort unreachable @@ -3007,21 +2758,19 @@ i32.mul i32.const 1 i32.shl - call $~lib/runtime/ALLOC + call $~lib/runtime/doAllocate local.tee $2 local.get $0 local.get $3 i32.const 1 i32.shl local.get $1 - call $~lib/runtime/memory.repeat + call $~lib/memory/memory.repeat local.get $2 - call $~lib/runtime/unref i32.const 1 - i32.store - local.get $2 + call $~lib/runtime/doRegister ) - (func $~lib/string/String#slice (; 30 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#slice (; 29 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -3087,132 +2836,333 @@ local.get $3 i32.const 1 i32.shl - local.tee $1 - call $~lib/runtime/ALLOC local.tee $2 + call $~lib/runtime/doAllocate + local.tee $1 local.get $4 i32.const 1 i32.shl local.get $0 i32.add - local.get $1 - call $~lib/internal/memory/memmove local.get $2 - call $~lib/runtime/unref + call $~lib/memory/memory.copy + local.get $1 i32.const 1 - i32.store - local.get $2 + call $~lib/runtime/doRegister ) - (func $~lib/string/String#slice|trampoline (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/memory/memory.fill (; 30 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 1 + block $~lib/util/memory/memset|inlined.0 + local.get $1 + i32.eqz + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 0 + i32.store8 + local.get $0 + local.get $1 + i32.add + i32.const 1 + i32.sub + i32.const 0 + i32.store8 + local.get $1 + i32.const 2 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 1 + i32.add + i32.const 0 + i32.store8 + local.get $0 + i32.const 2 + i32.add + i32.const 0 + i32.store8 + local.get $0 + local.get $1 + i32.add + local.tee $2 + i32.const 2 + i32.sub + i32.const 0 + i32.store8 + local.get $2 + i32.const 3 + i32.sub + i32.const 0 + i32.store8 + local.get $1 + i32.const 6 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 3 + i32.add + i32.const 0 + i32.store8 + local.get $0 + local.get $1 + i32.add + i32.const 4 + i32.sub + i32.const 0 + i32.store8 + local.get $1 + i32.const 8 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $1 + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.tee $2 + i32.sub + local.set $1 + local.get $0 + local.get $2 + i32.add + local.tee $0 + i32.const 0 + i32.store + local.get $1 + i32.const -4 + i32.and + local.tee $1 + local.get $0 + i32.add + i32.const 4 + i32.sub + i32.const 0 + i32.store + local.get $1 + i32.const 8 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 4 + i32.add + i32.const 0 + i32.store + local.get $0 + i32.const 8 + i32.add + i32.const 0 + i32.store + local.get $0 + local.get $1 + i32.add + local.tee $2 + i32.const 12 + i32.sub + i32.const 0 + i32.store + local.get $2 + i32.const 8 + i32.sub + i32.const 0 + i32.store + local.get $1 + i32.const 24 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 12 + i32.add + i32.const 0 + i32.store + local.get $0 + i32.const 16 + i32.add + i32.const 0 + i32.store + local.get $0 + i32.const 20 + i32.add + i32.const 0 + i32.store + local.get $0 + i32.const 24 + i32.add + i32.const 0 + i32.store + local.get $0 + local.get $1 + i32.add + local.tee $2 + i32.const 28 + i32.sub + i32.const 0 + i32.store + local.get $2 + i32.const 24 + i32.sub + i32.const 0 + i32.store + local.get $2 + i32.const 20 + i32.sub + i32.const 0 + i32.store + local.get $2 + i32.const 16 + i32.sub + i32.const 0 + i32.store + local.get $0 + i32.const 4 + i32.and + i32.const 24 + i32.add + local.tee $2 + local.get $0 + i32.add + local.set $0 + local.get $1 + local.get $2 + i32.sub + local.set $1 + loop $continue|0 + local.get $1 + i32.const 32 + i32.ge_u + if + local.get $0 + i64.const 0 + i64.store + local.get $0 + i32.const 8 + i32.add + i64.const 0 + i64.store + local.get $0 + i32.const 16 + i32.add + i64.const 0 + i64.store + local.get $0 + i32.const 24 + i32.add + i64.const 0 + i64.store + local.get $1 + i32.const 32 i32.sub - br_table $0of1 $1of1 $outOfRange + local.set $1 + local.get $0 + i32.const 32 + i32.add + local.set $0 + br $continue|0 end - unreachable end - i32.const 2147483647 - local.set $2 end - local.get $0 - local.get $1 - local.get $2 - call $~lib/string/String#slice ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741816 i32.gt_u if i32.const 0 - i32.const 1432 - i32.const 26 - i32.const 2 + i32.const 1392 + i32.const 24 + i32.const 43 call $~lib/env/abort unreachable end - i32.const 1 - i32.const 32 local.get $0 - i32.const 7 - i32.add - i32.clz - i32.sub - i32.shl - call $~lib/allocator/arena/memory.allocate + call $~lib/runtime/doAllocate local.tee $1 local.get $0 - i32.store + call $~lib/memory/memory.fill local.get $1 + i32.const 2 + call $~lib/runtime/doRegister ) - (func $~lib/array/Array#constructor (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/runtime/ArrayBufferView#constructor (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) - local.get $0 + local.get $1 i32.const 268435454 i32.gt_u if i32.const 0 - i32.const 1392 - i32.const 45 - i32.const 39 + i32.const 136 + i32.const 223 + i32.const 57 call $~lib/env/abort unreachable end - local.get $0 + local.get $1 i32.const 2 i32.shl - local.tee $3 - call $~lib/internal/arraybuffer/allocateUnsafe + local.tee $1 + call $~lib/arraybuffer/ArrayBuffer#constructor local.set $2 - i32.const 8 - call $~lib/allocator/arena/memory.allocate + local.get $0 + i32.eqz + if + i32.const 12 + call $~lib/runtime/doAllocate + i32.const 3 + call $~lib/runtime/doRegister + local.set $0 + end + local.get $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + local.get $2 + i32.store + local.get $0 + local.get $2 + i32.store offset=4 + local.get $0 + local.get $1 + local.get $2 + i32.add + i32.store offset=8 + local.get $0 + ) + (func $~lib/array/Array#constructor (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + i32.const 16 + call $~lib/runtime/doAllocate + i32.const 4 + call $~lib/runtime/doRegister + local.get $0 + call $~lib/runtime/ArrayBufferView#constructor local.tee $1 i32.const 0 - i32.store - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - local.get $2 - i32.store + i32.store offset=12 local.get $1 local.get $0 - i32.store offset=4 - local.get $2 - i32.const 8 - i32.add - local.get $3 - call $~lib/internal/memory/memset + i32.store offset=12 local.get $1 ) - (func $~lib/internal/arraybuffer/reallocateUnsafe (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/doReallocate (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - local.get $1 + (local $4 i32) + (local $5 i32) local.get $0 - i32.load + i32.const 8 + i32.sub + local.tee $3 + i32.load offset=4 local.tee $2 - i32.gt_s + local.get $1 + i32.lt_u if - local.get $1 - i32.const 1073741816 - i32.gt_s - if - i32.const 0 - i32.const 1432 - i32.const 40 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 i32.const 1 i32.const 32 local.get $2 @@ -3221,110 +3171,192 @@ i32.clz i32.sub i32.shl - i32.const 8 - i32.sub - i32.le_s - if - local.get $0 - local.get $1 - i32.store - else - local.get $1 - call $~lib/internal/arraybuffer/allocateUnsafe - local.tee $3 - i32.const 8 - i32.add - local.get $0 - i32.const 8 - i32.add - local.get $2 - call $~lib/internal/memory/memmove - local.get $3 - local.set $0 - end + i32.const 0 local.get $0 - i32.const 8 - i32.add - local.get $2 - i32.add + i32.const 5544 + i32.gt_u + select + i32.const 1 + i32.const 32 local.get $1 - local.get $2 + i32.const 7 + i32.add + i32.clz i32.sub - call $~lib/internal/memory/memset - else - local.get $1 - local.get $2 - i32.lt_s + i32.shl + local.tee $4 + i32.lt_u if - local.get $1 - i32.const 0 - i32.lt_s - if - i32.const 0 - i32.const 1432 - i32.const 62 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $1 + local.get $4 + call $~lib/memory/memory.allocate + local.tee $4 + local.get $3 + i32.load i32.store + local.get $4 + i32.const 8 + i32.add + local.tee $5 + local.get $0 + local.get $2 + call $~lib/memory/memory.copy + local.get $2 + local.get $5 + i32.add + local.get $1 + local.get $2 + i32.sub + call $~lib/memory/memory.fill + local.get $3 + i32.load + i32.const -1520547049 + i32.eq + if + local.get $0 + i32.const 5544 + i32.le_u + if + i32.const 0 + i32.const 136 + i32.const 100 + i32.const 8 + call $~lib/env/abort + unreachable + end + end + local.get $4 + local.set $3 + local.get $5 + local.set $0 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.sub + call $~lib/memory/memory.fill end end + local.get $3 + local.get $1 + i32.store offset=4 local.get $0 ) - (func $~lib/array/Array#push (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#resize (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) + local.get $1 local.get $0 - i32.load offset=4 + i32.load local.tee $2 - i32.const 1 - i32.add - local.set $4 - local.get $2 - local.get $0 - i32.load - local.tee $3 - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 2 i32.shr_u - i32.ge_u + i32.gt_u if - local.get $2 + local.get $1 i32.const 268435454 - i32.ge_u + i32.gt_u if i32.const 0 - i32.const 1392 - i32.const 182 - i32.const 42 + i32.const 1440 + i32.const 37 + i32.const 41 call $~lib/env/abort unreachable end - local.get $0 - local.get $3 - local.get $4 + local.get $2 + local.tee $3 + local.get $1 i32.const 2 i32.shl - call $~lib/internal/arraybuffer/reallocateUnsafe - local.tee $3 - i32.store + local.tee $2 + call $~lib/runtime/doReallocate + local.tee $1 + local.get $3 + i32.ne + if + local.get $0 + local.get $1 + i32.store + local.get $0 + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + local.get $2 + i32.add + i32.store offset=8 + end end + ) + (func $~lib/array/Array#__set (; 36 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + i32.const 1 + call $~lib/array/Array#resize + local.get $0 + i32.load offset=4 + local.get $1 + i32.store + i32.const 0 + local.get $0 + i32.load offset=12 + i32.ge_s + if + local.get $0 + i32.const 1 + i32.store offset=12 + end + ) + (func $~lib/runtime/assertRegistered (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 8 + i32.sub + i32.load + i32.const -1520547049 + i32.eq + if + i32.const 0 + i32.const 136 + i32.const 196 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $~lib/runtime/doLink (; 38 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + call $~lib/runtime/assertRegistered + local.get $1 + call $~lib/runtime/assertRegistered + ) + (func $~lib/array/Array#push (; 39 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + local.get $0 + i32.load offset=12 + i32.const 1 + i32.add + local.tee $2 + call $~lib/array/Array#resize local.get $0 - local.get $4 - i32.store offset=4 local.get $2 + i32.store offset=12 + local.get $0 + i32.load offset=4 + local.get $2 + i32.const 1 + i32.sub i32.const 2 i32.shl - local.get $3 i32.add local.get $1 - i32.store offset=8 + i32.store ) - (func $~lib/string/String#split (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#split (; 40 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3338,7 +3370,7 @@ if i32.const 0 i32.const 96 - i32.const 376 + i32.const 351 i32.const 4 call $~lib/env/abort unreachable @@ -3356,9 +3388,8 @@ i32.const 1 call $~lib/array/Array#constructor local.tee $3 - i32.load local.get $0 - i32.store offset=8 + call $~lib/array/Array#__set local.get $3 return end @@ -3368,7 +3399,7 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $4 + local.set $6 i32.const 2147483647 local.get $2 local.get $2 @@ -3384,210 +3415,187 @@ i32.shr_u local.tee $3 local.set $9 - block $folding-inner0 - local.get $3 - if - local.get $4 - i32.eqz - if - i32.const 1 - call $~lib/array/Array#constructor - local.tee $3 - i32.load - i32.const 312 - i32.store offset=8 - br $folding-inner0 - end - else - local.get $4 - i32.eqz - if - i32.const 0 - call $~lib/array/Array#constructor - return - end - local.get $4 - local.tee $3 - local.get $2 - local.get $3 - local.get $2 - i32.lt_s - select - local.tee $4 - call $~lib/array/Array#constructor - local.tee $3 - i32.load - local.set $7 - i32.const 0 - local.set $2 - loop $repeat|0 - local.get $2 - local.get $4 - i32.lt_s - if - i32.const 2 - call $~lib/runtime/ALLOC - local.tee $1 - local.get $2 - i32.const 1 - i32.shl - local.get $0 - i32.add - i32.load16_u - i32.store16 - local.get $2 - i32.const 2 - i32.shl - local.get $7 - i32.add - local.get $1 - i32.store offset=8 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $repeat|0 - end - end - local.get $3 - return - end - i32.const 0 - call $~lib/array/Array#constructor - local.set $5 - loop $continue|1 - local.get $0 - local.get $1 - local.get $6 - call $~lib/string/String#indexOf - local.tee $8 - i32.const -1 - i32.ne - if - local.get $8 - local.get $6 - i32.sub - local.tee $7 - i32.const 0 - i32.gt_s - if - local.get $7 - i32.const 1 - i32.shl - local.tee $7 - call $~lib/runtime/ALLOC - local.tee $3 - local.get $6 - i32.const 1 - i32.shl - local.get $0 - i32.add - local.get $7 - call $~lib/internal/memory/memmove - local.get $3 - call $~lib/runtime/unref - i32.const 1 - i32.store - local.get $5 - local.get $3 - call $~lib/array/Array#push - else - local.get $5 - i32.const 312 - call $~lib/array/Array#push - end - local.get $10 - i32.const 1 - i32.add - local.tee $10 - local.get $2 - i32.eq - if - local.get $5 - return - end - local.get $8 - local.get $9 - i32.add - local.set $6 - br $continue|1 - end - end + local.get $3 + if local.get $6 i32.eqz if i32.const 1 call $~lib/array/Array#constructor - local.tee $3 - i32.load - local.get $0 - i32.store offset=8 - br $folding-inner0 - end - local.get $4 - local.get $6 - i32.sub - local.tee $1 - i32.const 0 - i32.gt_s - if - local.get $1 - i32.const 1 - i32.shl - local.tee $1 - call $~lib/runtime/ALLOC - local.tee $3 - local.get $6 - i32.const 1 - i32.shl - local.get $0 - i32.add - local.get $1 - call $~lib/internal/memory/memmove - local.get $3 - call $~lib/runtime/unref - i32.const 1 + local.tee $5 + i32.load offset=4 + i32.const 312 i32.store local.get $5 - local.get $3 - call $~lib/array/Array#push - else - local.get $5 - i32.const 312 - call $~lib/array/Array#push + return end - local.get $5 + else + local.get $6 + i32.eqz + if + i32.const 0 + call $~lib/array/Array#constructor + return + end + local.get $6 + local.tee $3 + local.get $2 + local.get $3 + local.get $2 + i32.lt_s + select + local.tee $6 + call $~lib/array/Array#constructor + local.tee $3 + i32.load offset=4 + local.set $5 + loop $repeat|0 + local.get $4 + local.get $6 + i32.lt_s + if + i32.const 2 + call $~lib/runtime/doAllocate + local.tee $1 + local.get $4 + i32.const 1 + i32.shl + local.get $0 + i32.add + i32.load16_u + i32.store16 + local.get $4 + i32.const 2 + i32.shl + local.get $5 + i32.add + local.get $1 + i32.const 1 + call $~lib/runtime/doRegister + i32.store + local.get $1 + local.get $3 + call $~lib/runtime/doLink + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $repeat|0 + end + end + local.get $3 return end - local.get $3 - i32.load - i32.load offset=8 - drop - local.get $3 - ) - (func $~lib/string/String#split|trampoline (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - block $2of2 - block $1of2 - block $0of2 - block $outOfRange - global.get $~lib/argc - br_table $0of2 $1of2 $2of2 $outOfRange - end - unreachable - end + i32.const 0 + call $~lib/array/Array#constructor + local.set $7 + loop $continue|1 + local.get $0 + local.get $1 + local.get $4 + call $~lib/string/String#indexOf + local.tee $8 + i32.const -1 + i32.ne + if + local.get $8 + local.get $4 + i32.sub + local.tee $5 i32.const 0 - local.set $1 + i32.gt_s + if + local.get $5 + i32.const 1 + i32.shl + local.tee $5 + call $~lib/runtime/doAllocate + local.tee $3 + local.get $4 + i32.const 1 + i32.shl + local.get $0 + i32.add + local.get $5 + call $~lib/memory/memory.copy + local.get $7 + local.get $3 + i32.const 1 + call $~lib/runtime/doRegister + call $~lib/array/Array#push + else + local.get $7 + i32.const 312 + call $~lib/array/Array#push + end + local.get $10 + i32.const 1 + i32.add + local.tee $10 + local.get $2 + i32.eq + if + local.get $7 + return + end + local.get $8 + local.get $9 + i32.add + local.set $4 + br $continue|1 end - i32.const 2147483647 - local.set $2 end - local.get $0 - local.get $1 - local.get $2 - call $~lib/string/String#split + local.get $4 + i32.eqz + if + i32.const 1 + call $~lib/array/Array#constructor + local.tee $3 + i32.load offset=4 + local.set $1 + local.get $0 + local.tee $4 + local.get $3 + call $~lib/runtime/doLink + local.get $1 + local.get $4 + i32.store + local.get $3 + return + end + local.get $6 + local.get $4 + i32.sub + local.tee $1 + i32.const 0 + i32.gt_s + if + local.get $1 + i32.const 1 + i32.shl + local.tee $1 + call $~lib/runtime/doAllocate + local.tee $5 + local.get $4 + i32.const 1 + i32.shl + local.get $0 + i32.add + local.get $1 + call $~lib/memory/memory.copy + local.get $7 + local.get $5 + i32.const 1 + call $~lib/runtime/doRegister + call $~lib/array/Array#push + else + local.get $7 + i32.const 312 + call $~lib/array/Array#push + end + local.get $7 ) - (func $~lib/internal/number/decimalCount32 (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 100000 i32.lt_u @@ -3641,10 +3649,10 @@ end end ) - (func $~lib/internal/number/utoa32_lut (; 39 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 42 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - i32.const 2168 + i32.const 2060 i32.load local.set $3 loop $continue|0 @@ -3668,22 +3676,22 @@ i32.shl local.get $0 i32.add - local.get $3 local.get $4 i32.const 100 i32.div_u i32.const 2 i32.shl - i32.add - i64.load32_u offset=8 local.get $3 + i32.add + i64.load32_u local.get $4 i32.const 100 i32.rem_u i32.const 2 i32.shl + local.get $3 i32.add - i64.load32_u offset=8 + i64.load32_u i64.const 32 i64.shl i64.or @@ -3711,12 +3719,12 @@ i32.shl local.get $0 i32.add - local.get $3 local.get $4 i32.const 2 i32.shl + local.get $3 i32.add - i32.load offset=8 + i32.load i32.store end local.get $1 @@ -3730,12 +3738,12 @@ i32.shl local.get $0 i32.add - local.get $3 local.get $1 i32.const 2 i32.shl + local.get $3 i32.add - i32.load offset=8 + i32.load i32.store else local.get $2 @@ -3751,7 +3759,7 @@ i32.store16 end ) - (func $~lib/internal/number/itoa32 (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3764,7 +3772,7 @@ local.get $0 i32.const 0 i32.lt_s - local.tee $2 + local.tee $1 if i32.const 0 local.get $0 @@ -3772,30 +3780,28 @@ local.set $0 end local.get $0 - call $~lib/internal/number/decimalCount32 - local.get $2 + call $~lib/util/number/decimalCount32 + local.get $1 i32.add local.tee $3 i32.const 1 i32.shl - call $~lib/runtime/ALLOC - local.tee $1 + call $~lib/runtime/doAllocate + local.tee $2 local.get $0 local.get $3 - call $~lib/internal/number/utoa32_lut - local.get $2 + call $~lib/util/number/utoa32_lut + local.get $1 if - local.get $1 + local.get $2 i32.const 45 i32.store16 end - local.get $1 - call $~lib/runtime/unref + local.get $2 i32.const 1 - i32.store - local.get $1 + call $~lib/runtime/doRegister ) - (func $~lib/internal/number/utoa32 (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 44 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -3805,22 +3811,20 @@ return end local.get $0 - call $~lib/internal/number/decimalCount32 - local.tee $2 + call $~lib/util/number/decimalCount32 + local.tee $1 i32.const 1 i32.shl - call $~lib/runtime/ALLOC - local.tee $1 + call $~lib/runtime/doAllocate + local.tee $2 local.get $0 + local.get $1 + call $~lib/util/number/utoa32_lut local.get $2 - call $~lib/internal/number/utoa32_lut - local.get $1 - call $~lib/runtime/unref i32.const 1 - i32.store - local.get $1 + call $~lib/runtime/doRegister ) - (func $~lib/internal/number/decimalCount64 (; 42 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 45 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 i64.const 1000000000000000 i64.lt_u @@ -3874,12 +3878,12 @@ end end ) - (func $~lib/internal/number/utoa64_lut (; 43 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 46 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - i32.const 2168 + i32.const 2060 i32.load local.set $3 loop $continue|0 @@ -3915,7 +3919,6 @@ i32.shl local.get $0 i32.add - local.get $3 local.get $4 i32.const 10000 i32.rem_u @@ -3924,16 +3927,17 @@ i32.div_u i32.const 2 i32.shl - i32.add - i64.load32_u offset=8 local.get $3 + i32.add + i64.load32_u local.get $4 i32.const 100 i32.rem_u i32.const 2 i32.shl + local.get $3 i32.add - i64.load32_u offset=8 + i64.load32_u i64.const 32 i64.shl i64.or @@ -3946,18 +3950,18 @@ i32.shl local.get $0 i32.add - local.get $3 local.get $6 i32.const 2 i32.shl - i32.add - i64.load32_u offset=8 local.get $3 + i32.add + i64.load32_u local.get $5 i32.const 2 i32.shl + local.get $3 i32.add - i64.load32_u offset=8 + i64.load32_u i64.const 32 i64.shl i64.or @@ -3969,9 +3973,9 @@ local.get $1 i32.wrap_i64 local.get $2 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut ) - (func $~lib/internal/number/utoa64 (; 44 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 47 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3988,35 +3992,32 @@ local.get $0 i32.wrap_i64 local.tee $3 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.tee $1 i32.const 1 i32.shl - call $~lib/runtime/ALLOC + call $~lib/runtime/doAllocate local.tee $2 local.get $3 local.get $1 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut else local.get $0 - call $~lib/internal/number/decimalCount64 + call $~lib/util/number/decimalCount64 local.tee $1 i32.const 1 i32.shl - call $~lib/runtime/ALLOC + call $~lib/runtime/doAllocate local.tee $2 local.get $0 local.get $1 - call $~lib/internal/number/utoa64_lut + call $~lib/util/number/utoa64_lut end local.get $2 - local.tee $1 - call $~lib/runtime/unref i32.const 1 - i32.store - local.get $1 + call $~lib/runtime/doRegister ) - (func $~lib/internal/number/itoa64 (; 45 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 48 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4031,7 +4032,7 @@ local.get $0 i64.const 0 i64.lt_s - local.tee $2 + local.tee $1 if i64.const 0 local.get $0 @@ -4046,45 +4047,42 @@ local.get $0 i32.wrap_i64 local.tee $4 - call $~lib/internal/number/decimalCount32 - local.get $2 + call $~lib/util/number/decimalCount32 + local.get $1 i32.add - local.tee $1 + local.tee $2 i32.const 1 i32.shl - call $~lib/runtime/ALLOC + call $~lib/runtime/doAllocate local.tee $3 local.get $4 - local.get $1 - call $~lib/internal/number/utoa32_lut + local.get $2 + call $~lib/util/number/utoa32_lut else local.get $0 - call $~lib/internal/number/decimalCount64 - local.get $2 + call $~lib/util/number/decimalCount64 + local.get $1 i32.add - local.tee $1 + local.tee $2 i32.const 1 i32.shl - call $~lib/runtime/ALLOC + call $~lib/runtime/doAllocate local.tee $3 local.get $0 - local.get $1 - call $~lib/internal/number/utoa64_lut + local.get $2 + call $~lib/util/number/utoa64_lut end - local.get $2 + local.get $1 if local.get $3 i32.const 45 i32.store16 end local.get $3 - local.tee $1 - call $~lib/runtime/unref i32.const 1 - i32.store - local.get $1 + call $~lib/runtime/doRegister ) - (func $~lib/internal/number/genDigits (; 46 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/util/number/genDigits (; 49 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i32) (local $9 i64) @@ -4117,9 +4115,9 @@ i64.shr_u i32.wrap_i64 local.tee $7 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $8 - i32.const 4576 + i32.const 4108 i32.load local.set $12 loop $continue|0 @@ -4283,20 +4281,20 @@ local.get $5 i64.le_u if - global.get $~lib/internal/number/_K + global.get $~lib/util/number/_K local.get $8 i32.add - global.set $~lib/internal/number/_K + global.set $~lib/util/number/_K local.get $5 local.set $9 local.get $3 local.set $1 - local.get $12 local.get $8 i32.const 2 i32.shl + local.get $12 i32.add - i64.load32_u offset=8 + i64.load32_u local.get $10 i64.extend_i32_s i64.shl @@ -4304,16 +4302,15 @@ local.get $11 local.set $5 local.get $6 - local.tee $7 i32.const 1 i32.sub i32.const 1 i32.shl local.get $0 i32.add - local.tee $2 + local.tee $4 i32.load16_u - local.set $6 + local.set $7 loop $continue|2 local.get $1 local.get $5 @@ -4351,10 +4348,10 @@ end local.get $0 if - local.get $6 + local.get $7 i32.const 1 i32.sub - local.set $6 + local.set $7 local.get $1 local.get $3 i64.add @@ -4362,10 +4359,10 @@ br $continue|2 end end - local.get $2 - local.get $6 - i32.store16 + local.get $4 local.get $7 + i32.store16 + local.get $6 return end br $continue|0 @@ -4419,26 +4416,27 @@ local.get $5 i64.ge_u br_if $continue|3 - global.get $~lib/internal/number/_K + global.get $~lib/util/number/_K local.get $8 i32.add - global.set $~lib/internal/number/_K + global.set $~lib/util/number/_K local.get $1 local.set $3 local.get $9 local.set $1 - local.get $12 i32.const 0 local.get $8 i32.sub i32.const 2 i32.shl + local.get $12 i32.add - i64.load32_u offset=8 + i64.load32_u local.get $11 i64.mul local.set $9 local.get $6 + local.tee $7 i32.const 1 i32.sub i32.const 1 @@ -4447,7 +4445,7 @@ i32.add local.tee $4 i32.load16_u - local.set $7 + local.set $6 loop $continue|4 local.get $3 local.get $9 @@ -4485,10 +4483,10 @@ end local.get $2 if - local.get $7 + local.get $6 i32.const 1 i32.sub - local.set $7 + local.set $6 local.get $1 local.get $3 i64.add @@ -4497,12 +4495,12 @@ end end local.get $4 - local.get $7 - i32.store16 local.get $6 + i32.store16 + local.get $7 end ) - (func $~lib/internal/number/prettify (; 47 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 50 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $2 @@ -4594,12 +4592,8 @@ i32.sub i32.const 1 i32.shl - call $~lib/internal/memory/memmove - local.get $3 - i32.const 1 - i32.shl - local.get $0 - i32.add + call $~lib/memory/memory.copy + local.get $4 i32.const 46 i32.store16 local.get $1 @@ -4630,7 +4624,7 @@ local.get $1 i32.const 1 i32.shl - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy local.get $0 i32.const 3014704 i32.store @@ -4688,11 +4682,11 @@ local.get $3 end local.get $3 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 i32.const 1 i32.add local.tee $2 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut local.get $4 i32.const 45 i32.const 43 @@ -4715,7 +4709,7 @@ local.tee $2 i32.const 2 i32.sub - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy local.get $0 i32.const 46 i32.store16 offset=2 @@ -4728,7 +4722,7 @@ local.get $0 i32.const 4 i32.add - local.tee $4 + local.tee $0 block (result i32) local.get $3 i32.const 1 @@ -4736,7 +4730,7 @@ local.tee $3 i32.const 0 i32.lt_s - local.tee $0 + local.tee $4 if i32.const 0 local.get $3 @@ -4746,15 +4740,15 @@ local.get $3 end local.get $3 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 i32.const 1 i32.add local.tee $2 - call $~lib/internal/number/utoa32_lut - local.get $4 + call $~lib/util/number/utoa32_lut + local.get $0 i32.const 45 i32.const 43 - local.get $0 + local.get $4 select i32.store16 local.get $1 @@ -4767,21 +4761,20 @@ end end ) - (func $~lib/internal/number/dtoa_core (; 48 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) - (local $2 i64) + (func $~lib/util/number/dtoa_core (; 51 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (local $2 i32) (local $3 i64) (local $4 i64) - (local $5 i32) - (local $6 i32) + (local $5 i64) + (local $6 i64) (local $7 i32) - (local $8 i64) + (local $8 i32) (local $9 i64) (local $10 i64) (local $11 i64) (local $12 i32) (local $13 i64) - (local $14 i32) - (local $15 i64) + (local $14 i64) local.get $1 f64.const 0 f64.lt @@ -4802,68 +4795,68 @@ i64.const 52 i64.shr_u i32.wrap_i64 - local.set $6 + local.set $7 local.get $3 i64.const 4503599627370495 i64.and - local.get $6 + local.get $7 i32.const 0 i32.ne - local.tee $7 + local.tee $8 i64.extend_i32_u i64.const 52 i64.shl i64.add - local.tee $4 + local.tee $3 i64.const 1 i64.shl i64.const 1 i64.add - local.tee $3 + local.tee $5 i64.clz i32.wrap_i64 - local.set $5 - local.get $3 + local.set $2 local.get $5 + local.get $2 i64.extend_i32_s i64.shl - global.set $~lib/internal/number/_frc_plus - local.get $6 - i32.const 1 + global.set $~lib/util/number/_frc_plus local.get $7 + i32.const 1 + local.get $8 select i32.const 1075 i32.sub - local.tee $6 + local.tee $7 i32.const 1 i32.sub - local.get $5 + local.get $2 i32.sub - local.set $5 - local.get $4 - local.get $4 + local.set $2 + local.get $3 + local.get $3 i64.const 4503599627370496 i64.eq i32.const 1 i32.add - local.tee $7 + local.tee $8 i64.extend_i32_s i64.shl i64.const 1 i64.sub - local.get $6 local.get $7 + local.get $8 i32.sub - local.get $5 + local.get $2 i32.sub i64.extend_i32_s i64.shl - global.set $~lib/internal/number/_frc_minus - local.get $5 - global.set $~lib/internal/number/_exp + global.set $~lib/util/number/_frc_minus + local.get $2 + global.set $~lib/util/number/_exp i32.const 348 i32.const -61 - global.get $~lib/internal/number/_exp + global.get $~lib/util/number/_exp i32.sub f64.convert_i32_s f64.const 0.30102999566398114 @@ -4872,8 +4865,8 @@ f64.add local.tee $1 i32.trunc_f64_s - local.tee $5 - local.get $5 + local.tee $2 + local.get $2 f64.convert_i32_s local.get $1 f64.ne @@ -4882,107 +4875,105 @@ i32.shr_s i32.const 1 i32.add - local.tee $5 + local.tee $2 i32.const 3 i32.shl - local.tee $14 + local.tee $8 i32.sub - global.set $~lib/internal/number/_K - i32.const 4504 + global.set $~lib/util/number/_K + i32.const 3828 i32.load - local.set $7 - i32.const 4240 - i32.load - local.get $14 + local.get $8 i32.add - i64.load offset=8 - global.set $~lib/internal/number/_frc_pow - local.get $7 - local.get $5 + i64.load + global.set $~lib/util/number/_frc_pow + i32.const 4036 + i32.load + local.get $2 i32.const 1 i32.shl i32.add - i32.load16_s offset=8 - global.set $~lib/internal/number/_exp_pow - local.get $4 - local.get $4 + i32.load16_s + global.set $~lib/util/number/_exp_pow + local.get $3 + local.get $3 i64.clz i32.wrap_i64 - local.tee $7 + local.tee $2 i64.extend_i32_s i64.shl - local.tee $4 - i64.const 4294967295 - i64.and - local.tee $9 - global.get $~lib/internal/number/_frc_pow local.tee $3 i64.const 4294967295 i64.and + local.tee $9 + global.get $~lib/util/number/_frc_pow + local.tee $5 + i64.const 4294967295 + i64.and local.tee $10 i64.mul - local.set $13 - local.get $3 - i64.const 32 - i64.shr_u - local.tee $8 - local.get $9 - i64.mul - local.get $4 - i64.const 32 - i64.shr_u - local.tee $11 - local.get $10 - i64.mul - local.get $13 - i64.const 32 - i64.shr_u - i64.add - local.tee $2 - i64.const 4294967295 - i64.and - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - local.get $8 - local.get $11 - i64.mul - local.get $2 - i64.const 32 - i64.shr_u - i64.add - i64.add - local.set $15 - local.get $3 - i64.const 4294967295 - i64.and - local.tee $11 - global.get $~lib/internal/number/_frc_plus - local.tee $2 - i64.const 4294967295 - i64.and - local.tee $8 - i64.mul local.set $4 - local.get $8 + local.get $5 + i64.const 32 + i64.shr_u + local.tee $11 + local.get $9 + i64.mul local.get $3 i64.const 32 i64.shr_u - local.tee $9 - i64.mul - local.get $11 - local.get $2 - i64.const 32 - i64.shr_u - local.tee $10 + local.tee $6 + local.get $10 i64.mul local.get $4 i64.const 32 i64.shr_u i64.add - local.tee $2 + local.tee $4 + i64.const 4294967295 + i64.and + i64.add + i64.const 2147483647 + i64.add + i64.const 32 + i64.shr_u + local.get $6 + local.get $11 + i64.mul + local.get $4 + i64.const 32 + i64.shr_u + i64.add + i64.add + local.set $14 + local.get $5 + i64.const 4294967295 + i64.and + local.tee $6 + global.get $~lib/util/number/_frc_plus + local.tee $4 + i64.const 4294967295 + i64.and + local.tee $11 + i64.mul + local.set $3 + local.get $11 + local.get $5 + i64.const 32 + i64.shr_u + local.tee $9 + i64.mul + local.get $6 + local.get $4 + i64.const 32 + i64.shr_u + local.tee $10 + i64.mul + local.get $3 + i64.const 32 + i64.shr_u + i64.add + local.tee $13 i64.const 4294967295 i64.and i64.add @@ -4993,45 +4984,45 @@ local.get $9 local.get $10 i64.mul - local.get $2 - i64.const 32 - i64.shr_u - i64.add - i64.add - local.set $8 - global.get $~lib/internal/number/_frc_minus - local.tee $2 - i64.const 4294967295 - i64.and - local.tee $9 - local.get $3 - local.tee $4 - i64.const 4294967295 - i64.and - local.tee $10 - i64.mul - local.set $13 - local.get $8 - i64.const 1 - i64.sub - local.tee $3 - local.get $4 - i64.const 32 - i64.shr_u - local.tee $8 - local.get $9 - i64.mul - local.get $2 - i64.const 32 - i64.shr_u - local.tee $11 - local.get $10 - i64.mul local.get $13 i64.const 32 i64.shr_u i64.add - local.tee $2 + i64.add + local.set $6 + global.get $~lib/util/number/_frc_minus + local.tee $13 + i64.const 4294967295 + i64.and + local.tee $9 + local.get $5 + local.tee $3 + i64.const 4294967295 + i64.and + local.tee $10 + i64.mul + local.set $4 + local.get $6 + i64.const 1 + i64.sub + local.tee $5 + local.get $3 + i64.const 32 + i64.shr_u + local.tee $11 + local.get $9 + i64.mul + local.get $13 + i64.const 32 + i64.shr_u + local.tee $6 + local.get $10 + i64.mul + local.get $4 + i64.const 32 + i64.shr_u + i64.add + local.tee $4 i64.const 4294967295 i64.and i64.add @@ -5039,10 +5030,10 @@ i64.add i64.const 32 i64.shr_u - local.get $8 + local.get $6 local.get $11 i64.mul - local.get $2 + local.get $4 i64.const 32 i64.shr_u i64.add @@ -5050,39 +5041,39 @@ i64.const 1 i64.add i64.sub - local.set $2 + local.set $4 local.get $12 i32.const 1 i32.shl local.get $0 i32.add local.get $0 - local.get $15 - local.get $6 + local.get $14 local.get $7 - i32.sub - global.get $~lib/internal/number/_exp_pow - local.tee $6 - i32.add - i32.const -64 - i32.sub - local.get $3 - global.get $~lib/internal/number/_exp - local.get $6 - i32.add - i32.const -64 - i32.sub local.get $2 + i32.sub + global.get $~lib/util/number/_exp_pow + local.tee $2 + i32.add + i32.const -64 + i32.sub + local.get $5 + global.get $~lib/util/number/_exp + local.get $2 + i32.add + i32.const -64 + i32.sub + local.get $4 local.get $12 - call $~lib/internal/number/genDigits + call $~lib/util/number/genDigits local.get $12 i32.sub - global.get $~lib/internal/number/_K - call $~lib/internal/number/prettify + global.get $~lib/util/number/_K + call $~lib/util/number/prettify local.get $12 i32.add ) - (func $~lib/string/String#substring (; 49 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 52 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5091,7 +5082,7 @@ if i32.const 0 i32.const 96 - i32.const 215 + i32.const 190 i32.const 4 call $~lib/env/abort unreachable @@ -5169,27 +5160,25 @@ return end local.get $3 - call $~lib/runtime/ALLOC + call $~lib/runtime/doAllocate local.tee $2 local.get $0 local.get $4 i32.add local.get $3 - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy local.get $2 - call $~lib/runtime/unref i32.const 1 - i32.store - local.get $2 + call $~lib/runtime/doRegister ) - (func $~lib/internal/number/dtoa (; 50 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 53 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) local.get $0 f64.const 0 f64.eq if - i32.const 3136 + i32.const 3032 return end local.get $0 @@ -5202,11 +5191,11 @@ local.get $0 f64.ne if - i32.const 3152 + i32.const 3048 return end - i32.const 3168 - i32.const 3200 + i32.const 3064 + i32.const 3096 local.get $0 f64.const 0 f64.lt @@ -5214,27 +5203,21 @@ return end i32.const 56 - call $~lib/runtime/ALLOC + call $~lib/runtime/doAllocate local.tee $2 local.get $0 - call $~lib/internal/number/dtoa_core + call $~lib/util/number/dtoa_core local.set $1 local.get $2 local.get $1 call $~lib/string/String#substring local.set $1 local.get $2 - call $~lib/runtime/unref - drop + call $~lib/runtime/assertUnregistered local.get $1 ) - (func $start:std/string (; 51 ;) (type $FUNCSIG$v) + (func $start:std/string (; 54 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 i32) - i32.const 6008 - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset global.get $std/string/str i32.const 16 i32.ne @@ -5274,6 +5257,10 @@ call $~lib/env/abort unreachable end + i32.const 5544 + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset i32.const 0 call $~lib/string/String.fromCharCode i32.const 176 @@ -5361,25 +5348,7 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/string/str - local.set $1 - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - i32.const 536870908 - local.set $0 - end - local.get $1 - local.get $0 call $~lib/string/String#endsWith i32.eqz if @@ -5777,11 +5746,10 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc i32.const 312 i32.const 312 - call $~lib/string/String#lastIndexOf|trampoline + i32.const 2147483647 + call $~lib/string/String#lastIndexOf if i32.const 0 i32.const 56 @@ -5790,11 +5758,10 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc i32.const 312 i32.const 224 - call $~lib/string/String#lastIndexOf|trampoline + i32.const 2147483647 + call $~lib/string/String#lastIndexOf i32.const -1 i32.ne if @@ -5805,11 +5772,10 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/string/str i32.const 312 - call $~lib/string/String#lastIndexOf|trampoline + i32.const 2147483647 + call $~lib/string/String#lastIndexOf global.get $std/string/str i32.const 8 i32.sub @@ -5825,11 +5791,10 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/string/str i32.const 528 - call $~lib/string/String#lastIndexOf|trampoline + i32.const 2147483647 + call $~lib/string/String#lastIndexOf i32.const 2 i32.ne if @@ -5840,11 +5805,10 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/string/str i32.const 544 - call $~lib/string/String#lastIndexOf|trampoline + i32.const 2147483647 + call $~lib/string/String#lastIndexOf i32.const -1 i32.ne if @@ -5855,11 +5819,10 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/string/str i32.const 576 - call $~lib/string/String#lastIndexOf|trampoline + i32.const 2147483647 + call $~lib/string/String#lastIndexOf i32.const 15 i32.ne if @@ -5939,7 +5902,7 @@ unreachable end i32.const 608 - call $~lib/internal/string/parse + call $~lib/util/string/parse f64.const 0 f64.ne if @@ -5951,7 +5914,7 @@ unreachable end i32.const 624 - call $~lib/internal/string/parse + call $~lib/util/string/parse f64.const 1 f64.ne if @@ -5963,7 +5926,7 @@ unreachable end i32.const 640 - call $~lib/internal/string/parse + call $~lib/util/string/parse f64.const 5 f64.ne if @@ -5975,7 +5938,7 @@ unreachable end i32.const 664 - call $~lib/internal/string/parse + call $~lib/util/string/parse f64.const 455 f64.ne if @@ -5987,7 +5950,7 @@ unreachable end i32.const 688 - call $~lib/internal/string/parse + call $~lib/util/string/parse f64.const 3855 f64.ne if @@ -5999,7 +5962,7 @@ unreachable end i32.const 712 - call $~lib/internal/string/parse + call $~lib/util/string/parse f64.const 3855 f64.ne if @@ -6011,7 +5974,7 @@ unreachable end i32.const 736 - call $~lib/internal/string/parse + call $~lib/util/string/parse f64.const 11 f64.ne if @@ -6023,7 +5986,7 @@ unreachable end i32.const 752 - call $~lib/internal/string/parse + call $~lib/util/string/parse f64.const 1 f64.ne if @@ -6624,11 +6587,10 @@ end i32.const 1224 global.set $std/string/str - i32.const 1 - global.set $~lib/argc global.get $std/string/str i32.const 0 - call $~lib/string/String#slice|trampoline + i32.const 2147483647 + call $~lib/string/String#slice i32.const 1224 call $~lib/string/String.eq i32.eqz @@ -6640,11 +6602,10 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/string/str i32.const -1 - call $~lib/string/String#slice|trampoline + i32.const 2147483647 + call $~lib/string/String#slice i32.const 1264 call $~lib/string/String.eq i32.eqz @@ -6656,11 +6617,10 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/string/str i32.const -5 - call $~lib/string/String#slice|trampoline + i32.const 2147483647 + call $~lib/string/String#slice i32.const 1280 call $~lib/string/String.eq i32.eqz @@ -6732,32 +6692,20 @@ call $~lib/env/abort unreachable end - i32.const 0 - global.set $~lib/argc i32.const 312 i32.const 0 - call $~lib/string/String#split|trampoline + i32.const 2147483647 + call $~lib/string/String#split global.set $std/string/sa global.get $std/string/sa - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.eq local.tee $0 if (result i32) - i32.const 0 global.get $std/string/sa + i32.load offset=4 i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end i32.const 312 call $~lib/string/String.eq else @@ -6772,14 +6720,13 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc i32.const 312 i32.const 312 - call $~lib/string/String#split|trampoline + i32.const 2147483647 + call $~lib/string/String#split global.set $std/string/sa global.get $std/string/sa - i32.load offset=4 + i32.load offset=12 if i32.const 0 i32.const 56 @@ -6788,32 +6735,20 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc i32.const 312 i32.const 528 - call $~lib/string/String#split|trampoline + i32.const 2147483647 + call $~lib/string/String#split global.set $std/string/sa global.get $std/string/sa - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.eq local.tee $0 if (result i32) - i32.const 0 global.get $std/string/sa + i32.load offset=4 i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end i32.const 312 call $~lib/string/String.eq else @@ -6828,33 +6763,21 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc - i32.const 1496 - i32.const 1520 - call $~lib/string/String#split|trampoline + i32.const 1480 + i32.const 1504 + i32.const 2147483647 + call $~lib/string/String#split global.set $std/string/sa global.get $std/string/sa - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.eq local.tee $0 if (result i32) - i32.const 0 global.get $std/string/sa + i32.load offset=4 i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end - i32.const 1496 + i32.const 1480 call $~lib/string/String.eq else local.get $0 @@ -6868,34 +6791,22 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc - i32.const 1496 + i32.const 1480 i32.const 528 - call $~lib/string/String#split|trampoline + i32.const 2147483647 + call $~lib/string/String#split global.set $std/string/sa block (result i32) block (result i32) global.get $std/string/sa - i32.load offset=4 + i32.load offset=12 i32.const 3 i32.eq local.tee $0 if - i32.const 0 global.get $std/string/sa + i32.load offset=4 i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end i32.const 336 call $~lib/string/String.eq local.set $0 @@ -6903,22 +6814,9 @@ local.get $0 end if - i32.const 1 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + i32.load offset=4 + i32.load offset=4 i32.const 824 call $~lib/string/String.eq local.set $0 @@ -6926,23 +6824,10 @@ local.get $0 end if (result i32) - i32.const 2 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 1536 + i32.load offset=4 + i32.load offset=8 + i32.const 1520 call $~lib/string/String.eq else local.get $0 @@ -6956,34 +6841,22 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc - i32.const 1552 - i32.const 1576 - call $~lib/string/String#split|trampoline + i32.const 1536 + i32.const 1560 + i32.const 2147483647 + call $~lib/string/String#split global.set $std/string/sa block (result i32) block (result i32) global.get $std/string/sa - i32.load offset=4 + i32.load offset=12 i32.const 3 i32.eq local.tee $0 if - i32.const 0 global.get $std/string/sa + i32.load offset=4 i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end i32.const 336 call $~lib/string/String.eq local.set $0 @@ -6991,22 +6864,9 @@ local.get $0 end if - i32.const 1 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + i32.load offset=4 + i32.load offset=4 i32.const 824 call $~lib/string/String.eq local.set $0 @@ -7014,23 +6874,10 @@ local.get $0 end if (result i32) - i32.const 2 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 1536 + i32.load offset=4 + i32.load offset=8 + i32.const 1520 call $~lib/string/String.eq else local.get $0 @@ -7044,35 +6891,23 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc - i32.const 1592 + i32.const 1576 i32.const 528 - call $~lib/string/String#split|trampoline + i32.const 2147483647 + call $~lib/string/String#split global.set $std/string/sa block (result i32) block (result i32) block (result i32) global.get $std/string/sa - i32.load offset=4 + i32.load offset=12 i32.const 4 i32.eq local.tee $0 if - i32.const 0 global.get $std/string/sa + i32.load offset=4 i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end i32.const 336 call $~lib/string/String.eq local.set $0 @@ -7080,22 +6915,9 @@ local.get $0 end if - i32.const 1 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + i32.load offset=4 + i32.load offset=4 i32.const 824 call $~lib/string/String.eq local.set $0 @@ -7103,22 +6925,9 @@ local.get $0 end if - i32.const 2 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end + i32.load offset=4 + i32.load offset=8 i32.const 312 call $~lib/string/String.eq local.set $0 @@ -7126,23 +6935,10 @@ local.get $0 end if (result i32) - i32.const 3 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 12 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 1536 + i32.load offset=4 + i32.load offset=12 + i32.const 1520 call $~lib/string/String.eq else local.get $0 @@ -7156,35 +6952,23 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc - i32.const 1616 + i32.const 1600 i32.const 528 - call $~lib/string/String#split|trampoline + i32.const 2147483647 + call $~lib/string/String#split global.set $std/string/sa block (result i32) block (result i32) block (result i32) global.get $std/string/sa - i32.load offset=4 + i32.load offset=12 i32.const 4 i32.eq local.tee $0 if - i32.const 0 global.get $std/string/sa + i32.load offset=4 i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end i32.const 312 call $~lib/string/String.eq local.set $0 @@ -7192,22 +6976,9 @@ local.get $0 end if - i32.const 1 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + i32.load offset=4 + i32.load offset=4 i32.const 336 call $~lib/string/String.eq local.set $0 @@ -7215,22 +6986,9 @@ local.get $0 end if - i32.const 2 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end + i32.load offset=4 + i32.load offset=8 i32.const 824 call $~lib/string/String.eq local.set $0 @@ -7238,23 +6996,10 @@ local.get $0 end if (result i32) - i32.const 3 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 12 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 1536 + i32.load offset=4 + i32.load offset=12 + i32.const 1520 call $~lib/string/String.eq else local.get $0 @@ -7268,35 +7013,23 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc - i32.const 1640 + i32.const 1624 i32.const 528 - call $~lib/string/String#split|trampoline + i32.const 2147483647 + call $~lib/string/String#split global.set $std/string/sa block (result i32) block (result i32) block (result i32) global.get $std/string/sa - i32.load offset=4 + i32.load offset=12 i32.const 4 i32.eq local.tee $0 if - i32.const 0 global.get $std/string/sa + i32.load offset=4 i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end i32.const 336 call $~lib/string/String.eq local.set $0 @@ -7304,22 +7037,9 @@ local.get $0 end if - i32.const 1 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + i32.load offset=4 + i32.load offset=4 i32.const 824 call $~lib/string/String.eq local.set $0 @@ -7327,45 +7047,19 @@ local.get $0 end if - i32.const 2 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 1536 + i32.load offset=4 + i32.load offset=8 + i32.const 1520 call $~lib/string/String.eq local.set $0 end local.get $0 end if (result i32) - i32.const 3 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 12 - i32.add - i32.load offset=8 - else - unreachable - end + i32.load offset=4 + i32.load offset=12 i32.const 312 call $~lib/string/String.eq else @@ -7380,34 +7074,22 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc i32.const 352 i32.const 312 - call $~lib/string/String#split|trampoline + i32.const 2147483647 + call $~lib/string/String#split global.set $std/string/sa block (result i32) block (result i32) global.get $std/string/sa - i32.load offset=4 + i32.load offset=12 i32.const 3 i32.eq local.tee $0 if - i32.const 0 global.get $std/string/sa + i32.load offset=4 i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end i32.const 336 call $~lib/string/String.eq local.set $0 @@ -7415,22 +7097,9 @@ local.get $0 end if - i32.const 1 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + i32.load offset=4 + i32.load offset=4 i32.const 824 call $~lib/string/String.eq local.set $0 @@ -7438,23 +7107,10 @@ local.get $0 end if (result i32) - i32.const 2 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 1536 + i32.load offset=4 + i32.load offset=8 + i32.const 1520 call $~lib/string/String.eq else local.get $0 @@ -7474,7 +7130,7 @@ call $~lib/string/String#split global.set $std/string/sa global.get $std/string/sa - i32.load offset=4 + i32.load offset=12 if i32.const 0 i32.const 56 @@ -7489,25 +7145,14 @@ call $~lib/string/String#split global.set $std/string/sa global.get $std/string/sa - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.eq local.tee $0 if (result i32) - i32.const 0 global.get $std/string/sa + i32.load offset=4 i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end i32.const 336 call $~lib/string/String.eq else @@ -7522,31 +7167,20 @@ call $~lib/env/abort unreachable end - i32.const 1496 + i32.const 1480 i32.const 528 i32.const 1 call $~lib/string/String#split global.set $std/string/sa global.get $std/string/sa - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.eq local.tee $0 if (result i32) - i32.const 0 global.get $std/string/sa + i32.load offset=4 i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end i32.const 336 call $~lib/string/String.eq else @@ -7569,25 +7203,14 @@ block (result i32) block (result i32) global.get $std/string/sa - i32.load offset=4 + i32.load offset=12 i32.const 3 i32.eq local.tee $0 if - i32.const 0 global.get $std/string/sa + i32.load offset=4 i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end i32.const 336 call $~lib/string/String.eq local.set $0 @@ -7595,22 +7218,9 @@ local.get $0 end if - i32.const 1 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + i32.load offset=4 + i32.load offset=4 i32.const 824 call $~lib/string/String.eq local.set $0 @@ -7618,23 +7228,10 @@ local.get $0 end if (result i32) - i32.const 2 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 1536 + i32.load offset=4 + i32.load offset=8 + i32.const 1520 call $~lib/string/String.eq else local.get $0 @@ -7656,25 +7253,14 @@ block (result i32) block (result i32) global.get $std/string/sa - i32.load offset=4 + i32.load offset=12 i32.const 3 i32.eq local.tee $0 if - i32.const 0 global.get $std/string/sa + i32.load offset=4 i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end i32.const 336 call $~lib/string/String.eq local.set $0 @@ -7682,22 +7268,9 @@ local.get $0 end if - i32.const 1 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + i32.load offset=4 + i32.load offset=4 i32.const 824 call $~lib/string/String.eq local.set $0 @@ -7705,23 +7278,10 @@ local.get $0 end if (result i32) - i32.const 2 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 1536 + i32.load offset=4 + i32.load offset=8 + i32.const 1520 call $~lib/string/String.eq else local.get $0 @@ -7735,7 +7295,7 @@ call $~lib/env/abort unreachable end - i32.const 1496 + i32.const 1480 i32.const 528 i32.const -1 call $~lib/string/String#split @@ -7743,25 +7303,14 @@ block (result i32) block (result i32) global.get $std/string/sa - i32.load offset=4 + i32.load offset=12 i32.const 3 i32.eq local.tee $0 if - i32.const 0 global.get $std/string/sa + i32.load offset=4 i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end i32.const 336 call $~lib/string/String.eq local.set $0 @@ -7769,22 +7318,9 @@ local.get $0 end if - i32.const 1 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + i32.load offset=4 + i32.load offset=4 i32.const 824 call $~lib/string/String.eq local.set $0 @@ -7792,23 +7328,10 @@ local.get $0 end if (result i32) - i32.const 2 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 1536 + i32.load offset=4 + i32.load offset=8 + i32.const 1520 call $~lib/string/String.eq else local.get $0 @@ -7823,7 +7346,7 @@ unreachable end i32.const 0 - call $~lib/internal/number/itoa32 + call $~lib/util/number/itoa32 i32.const 608 call $~lib/string/String.eq i32.eqz @@ -7836,7 +7359,7 @@ unreachable end i32.const 1 - call $~lib/internal/number/itoa32 + call $~lib/util/number/itoa32 i32.const 624 call $~lib/string/String.eq i32.eqz @@ -7849,8 +7372,8 @@ unreachable end i32.const 8 - call $~lib/internal/number/itoa32 - i32.const 2184 + call $~lib/util/number/itoa32 + i32.const 2080 call $~lib/string/String.eq i32.eqz if @@ -7862,7 +7385,7 @@ unreachable end i32.const 123 - call $~lib/internal/number/itoa32 + call $~lib/util/number/itoa32 i32.const 392 call $~lib/string/String.eq i32.eqz @@ -7875,8 +7398,8 @@ unreachable end i32.const -1000 - call $~lib/internal/number/itoa32 - i32.const 2200 + call $~lib/util/number/itoa32 + i32.const 2096 call $~lib/string/String.eq i32.eqz if @@ -7888,8 +7411,8 @@ unreachable end i32.const 1234 - call $~lib/internal/number/itoa32 - i32.const 2224 + call $~lib/util/number/itoa32 + i32.const 2120 call $~lib/string/String.eq i32.eqz if @@ -7901,8 +7424,8 @@ unreachable end i32.const 12345 - call $~lib/internal/number/itoa32 - i32.const 2240 + call $~lib/util/number/itoa32 + i32.const 2136 call $~lib/string/String.eq i32.eqz if @@ -7914,8 +7437,8 @@ unreachable end i32.const 123456 - call $~lib/internal/number/itoa32 - i32.const 2264 + call $~lib/util/number/itoa32 + i32.const 2160 call $~lib/string/String.eq i32.eqz if @@ -7927,8 +7450,8 @@ unreachable end i32.const 1111111 - call $~lib/internal/number/itoa32 - i32.const 2288 + call $~lib/util/number/itoa32 + i32.const 2184 call $~lib/string/String.eq i32.eqz if @@ -7940,8 +7463,8 @@ unreachable end i32.const 1234567 - call $~lib/internal/number/itoa32 - i32.const 2312 + call $~lib/util/number/itoa32 + i32.const 2208 call $~lib/string/String.eq i32.eqz if @@ -7953,8 +7476,8 @@ unreachable end i32.const 2147483646 - call $~lib/internal/number/itoa32 - i32.const 2336 + call $~lib/util/number/itoa32 + i32.const 2232 call $~lib/string/String.eq i32.eqz if @@ -7966,8 +7489,8 @@ unreachable end i32.const 2147483647 - call $~lib/internal/number/itoa32 - i32.const 2368 + call $~lib/util/number/itoa32 + i32.const 2264 call $~lib/string/String.eq i32.eqz if @@ -7979,8 +7502,8 @@ unreachable end i32.const -2147483648 - call $~lib/internal/number/itoa32 - i32.const 2400 + call $~lib/util/number/itoa32 + i32.const 2296 call $~lib/string/String.eq i32.eqz if @@ -7992,8 +7515,8 @@ unreachable end i32.const -1 - call $~lib/internal/number/itoa32 - i32.const 2432 + call $~lib/util/number/itoa32 + i32.const 2328 call $~lib/string/String.eq i32.eqz if @@ -8005,7 +7528,7 @@ unreachable end i32.const 0 - call $~lib/internal/number/utoa32 + call $~lib/util/number/utoa32 i32.const 608 call $~lib/string/String.eq i32.eqz @@ -8018,8 +7541,8 @@ unreachable end i32.const 1000 - call $~lib/internal/number/utoa32 - i32.const 2448 + call $~lib/util/number/utoa32 + i32.const 2344 call $~lib/string/String.eq i32.eqz if @@ -8031,8 +7554,8 @@ unreachable end i32.const 2147483647 - call $~lib/internal/number/utoa32 - i32.const 2368 + call $~lib/util/number/utoa32 + i32.const 2264 call $~lib/string/String.eq i32.eqz if @@ -8044,8 +7567,8 @@ unreachable end i32.const -2147483648 - call $~lib/internal/number/utoa32 - i32.const 2464 + call $~lib/util/number/utoa32 + i32.const 2360 call $~lib/string/String.eq i32.eqz if @@ -8057,8 +7580,8 @@ unreachable end i32.const -1 - call $~lib/internal/number/utoa32 - i32.const 2496 + call $~lib/util/number/utoa32 + i32.const 2392 call $~lib/string/String.eq i32.eqz if @@ -8070,7 +7593,7 @@ unreachable end i64.const 0 - call $~lib/internal/number/utoa64 + call $~lib/util/number/utoa64 i32.const 608 call $~lib/string/String.eq i32.eqz @@ -8083,8 +7606,8 @@ unreachable end i64.const 1234 - call $~lib/internal/number/utoa64 - i32.const 2224 + call $~lib/util/number/utoa64 + i32.const 2120 call $~lib/string/String.eq i32.eqz if @@ -8096,8 +7619,8 @@ unreachable end i64.const 99999999 - call $~lib/internal/number/utoa64 - i32.const 2528 + call $~lib/util/number/utoa64 + i32.const 2424 call $~lib/string/String.eq i32.eqz if @@ -8109,8 +7632,8 @@ unreachable end i64.const 100000000 - call $~lib/internal/number/utoa64 - i32.const 2552 + call $~lib/util/number/utoa64 + i32.const 2448 call $~lib/string/String.eq i32.eqz if @@ -8122,8 +7645,8 @@ unreachable end i64.const 4294967295 - call $~lib/internal/number/utoa64 - i32.const 2496 + call $~lib/util/number/utoa64 + i32.const 2392 call $~lib/string/String.eq i32.eqz if @@ -8135,8 +7658,8 @@ unreachable end i64.const 68719476735 - call $~lib/internal/number/utoa64 - i32.const 2584 + call $~lib/util/number/utoa64 + i32.const 2480 call $~lib/string/String.eq i32.eqz if @@ -8148,8 +7671,8 @@ unreachable end i64.const 868719476735 - call $~lib/internal/number/utoa64 - i32.const 2616 + call $~lib/util/number/utoa64 + i32.const 2512 call $~lib/string/String.eq i32.eqz if @@ -8161,8 +7684,8 @@ unreachable end i64.const 999868719476735 - call $~lib/internal/number/utoa64 - i32.const 2648 + call $~lib/util/number/utoa64 + i32.const 2544 call $~lib/string/String.eq i32.eqz if @@ -8174,8 +7697,8 @@ unreachable end i64.const 9999868719476735 - call $~lib/internal/number/utoa64 - i32.const 2688 + call $~lib/util/number/utoa64 + i32.const 2584 call $~lib/string/String.eq i32.eqz if @@ -8187,8 +7710,8 @@ unreachable end i64.const 19999868719476735 - call $~lib/internal/number/utoa64 - i32.const 2728 + call $~lib/util/number/utoa64 + i32.const 2624 call $~lib/string/String.eq i32.eqz if @@ -8200,8 +7723,8 @@ unreachable end i64.const -1 - call $~lib/internal/number/utoa64 - i32.const 2776 + call $~lib/util/number/utoa64 + i32.const 2672 call $~lib/string/String.eq i32.eqz if @@ -8213,7 +7736,7 @@ unreachable end i64.const 0 - call $~lib/internal/number/itoa64 + call $~lib/util/number/itoa64 i32.const 608 call $~lib/string/String.eq i32.eqz @@ -8226,8 +7749,8 @@ unreachable end i64.const -1234 - call $~lib/internal/number/itoa64 - i32.const 2824 + call $~lib/util/number/itoa64 + i32.const 2720 call $~lib/string/String.eq i32.eqz if @@ -8239,8 +7762,8 @@ unreachable end i64.const 4294967295 - call $~lib/internal/number/itoa64 - i32.const 2496 + call $~lib/util/number/itoa64 + i32.const 2392 call $~lib/string/String.eq i32.eqz if @@ -8252,8 +7775,8 @@ unreachable end i64.const -4294967295 - call $~lib/internal/number/itoa64 - i32.const 2848 + call $~lib/util/number/itoa64 + i32.const 2744 call $~lib/string/String.eq i32.eqz if @@ -8265,8 +7788,8 @@ unreachable end i64.const 68719476735 - call $~lib/internal/number/itoa64 - i32.const 2584 + call $~lib/util/number/itoa64 + i32.const 2480 call $~lib/string/String.eq i32.eqz if @@ -8278,8 +7801,8 @@ unreachable end i64.const -68719476735 - call $~lib/internal/number/itoa64 - i32.const 2880 + call $~lib/util/number/itoa64 + i32.const 2776 call $~lib/string/String.eq i32.eqz if @@ -8291,8 +7814,8 @@ unreachable end i64.const -868719476735 - call $~lib/internal/number/itoa64 - i32.const 2912 + call $~lib/util/number/itoa64 + i32.const 2808 call $~lib/string/String.eq i32.eqz if @@ -8304,8 +7827,8 @@ unreachable end i64.const -999868719476735 - call $~lib/internal/number/itoa64 - i32.const 2952 + call $~lib/util/number/itoa64 + i32.const 2848 call $~lib/string/String.eq i32.eqz if @@ -8317,8 +7840,8 @@ unreachable end i64.const -19999868719476735 - call $~lib/internal/number/itoa64 - i32.const 2992 + call $~lib/util/number/itoa64 + i32.const 2888 call $~lib/string/String.eq i32.eqz if @@ -8330,8 +7853,8 @@ unreachable end i64.const 9223372036854775807 - call $~lib/internal/number/itoa64 - i32.const 3040 + call $~lib/util/number/itoa64 + i32.const 2936 call $~lib/string/String.eq i32.eqz if @@ -8343,8 +7866,8 @@ unreachable end i64.const -9223372036854775808 - call $~lib/internal/number/itoa64 - i32.const 3088 + call $~lib/util/number/itoa64 + i32.const 2984 call $~lib/string/String.eq i32.eqz if @@ -8356,8 +7879,8 @@ unreachable end f64.const 0 - call $~lib/internal/number/dtoa - i32.const 3136 + call $~lib/util/number/dtoa + i32.const 3032 call $~lib/string/String.eq i32.eqz if @@ -8369,8 +7892,8 @@ unreachable end f64.const -0 - call $~lib/internal/number/dtoa - i32.const 3136 + call $~lib/util/number/dtoa + i32.const 3032 call $~lib/string/String.eq i32.eqz if @@ -8382,8 +7905,8 @@ unreachable end f64.const nan:0x8000000000000 - call $~lib/internal/number/dtoa - i32.const 3152 + call $~lib/util/number/dtoa + i32.const 3048 call $~lib/string/String.eq i32.eqz if @@ -8395,8 +7918,8 @@ unreachable end f64.const inf - call $~lib/internal/number/dtoa - i32.const 3200 + call $~lib/util/number/dtoa + i32.const 3096 call $~lib/string/String.eq i32.eqz if @@ -8408,8 +7931,8 @@ unreachable end f64.const -inf - call $~lib/internal/number/dtoa - i32.const 3168 + call $~lib/util/number/dtoa + i32.const 3064 call $~lib/string/String.eq i32.eqz if @@ -8421,8 +7944,8 @@ unreachable end f64.const 2.220446049250313e-16 - call $~lib/internal/number/dtoa - i32.const 4592 + call $~lib/util/number/dtoa + i32.const 4128 call $~lib/string/String.eq i32.eqz if @@ -8434,8 +7957,8 @@ unreachable end f64.const -2.220446049250313e-16 - call $~lib/internal/number/dtoa - i32.const 4648 + call $~lib/util/number/dtoa + i32.const 4184 call $~lib/string/String.eq i32.eqz if @@ -8447,8 +7970,8 @@ unreachable end f64.const 1797693134862315708145274e284 - call $~lib/internal/number/dtoa - i32.const 4704 + call $~lib/util/number/dtoa + i32.const 4240 call $~lib/string/String.eq i32.eqz if @@ -8460,8 +7983,8 @@ unreachable end f64.const -1797693134862315708145274e284 - call $~lib/internal/number/dtoa - i32.const 4760 + call $~lib/util/number/dtoa + i32.const 4296 call $~lib/string/String.eq i32.eqz if @@ -8473,8 +7996,8 @@ unreachable end f64.const 4185580496821356722454785e274 - call $~lib/internal/number/dtoa - i32.const 4816 + call $~lib/util/number/dtoa + i32.const 4352 call $~lib/string/String.eq i32.eqz if @@ -8486,8 +8009,8 @@ unreachable end f64.const 2.2250738585072014e-308 - call $~lib/internal/number/dtoa - i32.const 4872 + call $~lib/util/number/dtoa + i32.const 4408 call $~lib/string/String.eq i32.eqz if @@ -8499,8 +8022,8 @@ unreachable end f64.const 4.940656e-318 - call $~lib/internal/number/dtoa - i32.const 4928 + call $~lib/util/number/dtoa + i32.const 4464 call $~lib/string/String.eq i32.eqz if @@ -8512,8 +8035,8 @@ unreachable end f64.const 9060801153433600 - call $~lib/internal/number/dtoa - i32.const 4968 + call $~lib/util/number/dtoa + i32.const 4504 call $~lib/string/String.eq i32.eqz if @@ -8525,8 +8048,8 @@ unreachable end f64.const 4708356024711512064 - call $~lib/internal/number/dtoa - i32.const 5016 + call $~lib/util/number/dtoa + i32.const 4552 call $~lib/string/String.eq i32.eqz if @@ -8538,8 +8061,8 @@ unreachable end f64.const 9409340012568248320 - call $~lib/internal/number/dtoa - i32.const 5072 + call $~lib/util/number/dtoa + i32.const 4608 call $~lib/string/String.eq i32.eqz if @@ -8551,8 +8074,8 @@ unreachable end f64.const 5e-324 - call $~lib/internal/number/dtoa - i32.const 5128 + call $~lib/util/number/dtoa + i32.const 4664 call $~lib/string/String.eq i32.eqz if @@ -8564,8 +8087,8 @@ unreachable end f64.const 1 - call $~lib/internal/number/dtoa - i32.const 5152 + call $~lib/util/number/dtoa + i32.const 4688 call $~lib/string/String.eq i32.eqz if @@ -8577,7 +8100,7 @@ unreachable end f64.const 0.1 - call $~lib/internal/number/dtoa + call $~lib/util/number/dtoa i32.const 768 call $~lib/string/String.eq i32.eqz @@ -8590,8 +8113,8 @@ unreachable end f64.const -1 - call $~lib/internal/number/dtoa - i32.const 5168 + call $~lib/util/number/dtoa + i32.const 4704 call $~lib/string/String.eq i32.eqz if @@ -8603,8 +8126,8 @@ unreachable end f64.const -0.1 - call $~lib/internal/number/dtoa - i32.const 5184 + call $~lib/util/number/dtoa + i32.const 4720 call $~lib/string/String.eq i32.eqz if @@ -8616,8 +8139,8 @@ unreachable end f64.const 1e6 - call $~lib/internal/number/dtoa - i32.const 5200 + call $~lib/util/number/dtoa + i32.const 4736 call $~lib/string/String.eq i32.eqz if @@ -8629,8 +8152,8 @@ unreachable end f64.const 1e-06 - call $~lib/internal/number/dtoa - i32.const 5232 + call $~lib/util/number/dtoa + i32.const 4768 call $~lib/string/String.eq i32.eqz if @@ -8642,8 +8165,8 @@ unreachable end f64.const -1e6 - call $~lib/internal/number/dtoa - i32.const 5256 + call $~lib/util/number/dtoa + i32.const 4792 call $~lib/string/String.eq i32.eqz if @@ -8655,8 +8178,8 @@ unreachable end f64.const -1e-06 - call $~lib/internal/number/dtoa - i32.const 5288 + call $~lib/util/number/dtoa + i32.const 4824 call $~lib/string/String.eq i32.eqz if @@ -8668,8 +8191,8 @@ unreachable end f64.const 1e7 - call $~lib/internal/number/dtoa - i32.const 5320 + call $~lib/util/number/dtoa + i32.const 4856 call $~lib/string/String.eq i32.eqz if @@ -8681,8 +8204,8 @@ unreachable end f64.const 1e-07 - call $~lib/internal/number/dtoa - i32.const 5352 + call $~lib/util/number/dtoa + i32.const 4888 call $~lib/string/String.eq i32.eqz if @@ -8694,8 +8217,8 @@ unreachable end f64.const 1.e+308 - call $~lib/internal/number/dtoa - i32.const 5368 + call $~lib/util/number/dtoa + i32.const 4904 call $~lib/string/String.eq i32.eqz if @@ -8707,8 +8230,8 @@ unreachable end f64.const -1.e+308 - call $~lib/internal/number/dtoa - i32.const 5392 + call $~lib/util/number/dtoa + i32.const 4928 call $~lib/string/String.eq i32.eqz if @@ -8720,8 +8243,8 @@ unreachable end f64.const inf - call $~lib/internal/number/dtoa - i32.const 3200 + call $~lib/util/number/dtoa + i32.const 3096 call $~lib/string/String.eq i32.eqz if @@ -8733,8 +8256,8 @@ unreachable end f64.const -inf - call $~lib/internal/number/dtoa - i32.const 3168 + call $~lib/util/number/dtoa + i32.const 3064 call $~lib/string/String.eq i32.eqz if @@ -8746,8 +8269,8 @@ unreachable end f64.const 1e-308 - call $~lib/internal/number/dtoa - i32.const 5416 + call $~lib/util/number/dtoa + i32.const 4952 call $~lib/string/String.eq i32.eqz if @@ -8759,8 +8282,8 @@ unreachable end f64.const -1e-308 - call $~lib/internal/number/dtoa - i32.const 5440 + call $~lib/util/number/dtoa + i32.const 4976 call $~lib/string/String.eq i32.eqz if @@ -8772,8 +8295,8 @@ unreachable end f64.const 1e-323 - call $~lib/internal/number/dtoa - i32.const 5464 + call $~lib/util/number/dtoa + i32.const 5000 call $~lib/string/String.eq i32.eqz if @@ -8785,8 +8308,8 @@ unreachable end f64.const -1e-323 - call $~lib/internal/number/dtoa - i32.const 5488 + call $~lib/util/number/dtoa + i32.const 5024 call $~lib/string/String.eq i32.eqz if @@ -8798,8 +8321,8 @@ unreachable end f64.const 0 - call $~lib/internal/number/dtoa - i32.const 3136 + call $~lib/util/number/dtoa + i32.const 3032 call $~lib/string/String.eq i32.eqz if @@ -8811,8 +8334,8 @@ unreachable end f64.const 4294967272 - call $~lib/internal/number/dtoa - i32.const 5512 + call $~lib/util/number/dtoa + i32.const 5048 call $~lib/string/String.eq i32.eqz if @@ -8824,8 +8347,8 @@ unreachable end f64.const 1.2312145673456234e-08 - call $~lib/internal/number/dtoa - i32.const 5544 + call $~lib/util/number/dtoa + i32.const 5080 call $~lib/string/String.eq i32.eqz if @@ -8837,8 +8360,8 @@ unreachable end f64.const 555555555.5555556 - call $~lib/internal/number/dtoa - i32.const 5600 + call $~lib/util/number/dtoa + i32.const 5136 call $~lib/string/String.eq i32.eqz if @@ -8850,8 +8373,8 @@ unreachable end f64.const 0.9999999999999999 - call $~lib/internal/number/dtoa - i32.const 5648 + call $~lib/util/number/dtoa + i32.const 5184 call $~lib/string/String.eq i32.eqz if @@ -8863,8 +8386,8 @@ unreachable end f64.const 1 - call $~lib/internal/number/dtoa - i32.const 5152 + call $~lib/util/number/dtoa + i32.const 4688 call $~lib/string/String.eq i32.eqz if @@ -8876,8 +8399,8 @@ unreachable end f64.const 12.34 - call $~lib/internal/number/dtoa - i32.const 5696 + call $~lib/util/number/dtoa + i32.const 5232 call $~lib/string/String.eq i32.eqz if @@ -8889,8 +8412,8 @@ unreachable end f64.const 0.3333333333333333 - call $~lib/internal/number/dtoa - i32.const 5720 + call $~lib/util/number/dtoa + i32.const 5256 call $~lib/string/String.eq i32.eqz if @@ -8902,8 +8425,8 @@ unreachable end f64.const 1234e17 - call $~lib/internal/number/dtoa - i32.const 5768 + call $~lib/util/number/dtoa + i32.const 5304 call $~lib/string/String.eq i32.eqz if @@ -8915,8 +8438,8 @@ unreachable end f64.const 1234e18 - call $~lib/internal/number/dtoa - i32.const 5824 + call $~lib/util/number/dtoa + i32.const 5360 call $~lib/string/String.eq i32.eqz if @@ -8928,8 +8451,8 @@ unreachable end f64.const 2.71828 - call $~lib/internal/number/dtoa - i32.const 5856 + call $~lib/util/number/dtoa + i32.const 5392 call $~lib/string/String.eq i32.eqz if @@ -8941,8 +8464,8 @@ unreachable end f64.const 0.0271828 - call $~lib/internal/number/dtoa - i32.const 5880 + call $~lib/util/number/dtoa + i32.const 5416 call $~lib/string/String.eq i32.eqz if @@ -8954,8 +8477,8 @@ unreachable end f64.const 271.828 - call $~lib/internal/number/dtoa - i32.const 5912 + call $~lib/util/number/dtoa + i32.const 5448 call $~lib/string/String.eq i32.eqz if @@ -8967,8 +8490,8 @@ unreachable end f64.const 1.1e+128 - call $~lib/internal/number/dtoa - i32.const 5936 + call $~lib/util/number/dtoa + i32.const 5472 call $~lib/string/String.eq i32.eqz if @@ -8980,8 +8503,8 @@ unreachable end f64.const 1.1e-64 - call $~lib/internal/number/dtoa - i32.const 5960 + call $~lib/util/number/dtoa + i32.const 5496 call $~lib/string/String.eq i32.eqz if @@ -8993,8 +8516,8 @@ unreachable end f64.const 0.000035689 - call $~lib/internal/number/dtoa - i32.const 5984 + call $~lib/util/number/dtoa + i32.const 5520 call $~lib/string/String.eq i32.eqz if @@ -9006,13 +8529,13 @@ unreachable end ) - (func $std/string/getString (; 52 ;) (type $FUNCSIG$i) (result i32) + (func $std/string/getString (; 55 ;) (type $FUNCSIG$i) (result i32) global.get $std/string/str ) - (func $start (; 53 ;) (type $FUNCSIG$v) + (func $start (; 56 ;) (type $FUNCSIG$v) call $start:std/string ) - (func $null (; 54 ;) (type $FUNCSIG$v) + (func $null (; 57 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index a2421f45..dc77ca00 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -1,19 +1,20 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iiiiii (func (param i32 i32 i32 i32 i32) (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$dii (func (param i32 i32) (result f64))) (type $FUNCSIG$di (func (param i32) (result f64))) - (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$ij (func (param i64) (result i32))) (type $FUNCSIG$viji (func (param i32 i64 i32))) (type $FUNCSIG$id (func (param f64) (result i32))) (type $FUNCSIG$iid (func (param i32 f64) (result i32))) (type $FUNCSIG$iijijiji (func (param i32 i64 i32 i64 i32 i64 i32) (result i32))) + (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -81,150 +82,142 @@ (data (i32.const 1296) "\01\00\00\00\n\00\00\00c\00d\00e\00f\00g\00") (data (i32.const 1320) "\01\00\00\00\n\00\00\00d\00e\00f\00g\00h\00") (data (i32.const 1344) "\01\00\00\00\1a\00\00\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00") - (data (i32.const 1384) "\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 1424) "\01\00\00\008\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 1488) "\01\00\00\00\n\00\00\00a\00,\00b\00,\00c\00") - (data (i32.const 1512) "\01\00\00\00\02\00\00\00.\00") - (data (i32.const 1528) "\01\00\00\00\02\00\00\00c\00") - (data (i32.const 1544) "\01\00\00\00\0e\00\00\00a\00,\00 \00b\00,\00 \00c\00") - (data (i32.const 1568) "\01\00\00\00\04\00\00\00,\00 \00") - (data (i32.const 1584) "\01\00\00\00\0c\00\00\00a\00,\00b\00,\00,\00c\00") - (data (i32.const 1608) "\01\00\00\00\0c\00\00\00,\00a\00,\00b\00,\00c\00") - (data (i32.const 1632) "\01\00\00\00\0c\00\00\00a\00,\00b\00,\00c\00,\00") - (data (i32.const 1656) "\90\01\00\00\00\00\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2168) "x\06\00\00d\00\00\00") - (data (i32.const 2176) "\01\00\00\00\02\00\00\008\00") - (data (i32.const 2192) "\01\00\00\00\n\00\00\00-\001\000\000\000\00") - (data (i32.const 2216) "\01\00\00\00\08\00\00\001\002\003\004\00") - (data (i32.const 2232) "\01\00\00\00\n\00\00\001\002\003\004\005\00") - (data (i32.const 2256) "\01\00\00\00\0c\00\00\001\002\003\004\005\006\00") - (data (i32.const 2280) "\01\00\00\00\0e\00\00\001\001\001\001\001\001\001\00") - (data (i32.const 2304) "\01\00\00\00\0e\00\00\001\002\003\004\005\006\007\00") - (data (i32.const 2328) "\01\00\00\00\14\00\00\002\001\004\007\004\008\003\006\004\006\00") - (data (i32.const 2360) "\01\00\00\00\14\00\00\002\001\004\007\004\008\003\006\004\007\00") - (data (i32.const 2392) "\01\00\00\00\16\00\00\00-\002\001\004\007\004\008\003\006\004\008\00") - (data (i32.const 2424) "\01\00\00\00\04\00\00\00-\001\00") - (data (i32.const 2440) "\01\00\00\00\08\00\00\001\000\000\000\00") - (data (i32.const 2456) "\01\00\00\00\14\00\00\002\001\004\007\004\008\003\006\004\008\00") - (data (i32.const 2488) "\01\00\00\00\14\00\00\004\002\009\004\009\006\007\002\009\005\00") - (data (i32.const 2520) "\01\00\00\00\10\00\00\009\009\009\009\009\009\009\009\00") - (data (i32.const 2544) "\01\00\00\00\12\00\00\001\000\000\000\000\000\000\000\000\00") - (data (i32.const 2576) "\01\00\00\00\16\00\00\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2608) "\01\00\00\00\18\00\00\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2640) "\01\00\00\00\1e\00\00\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2680) "\01\00\00\00 \00\00\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2720) "\01\00\00\00\"\00\00\001\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2768) "\01\00\00\00(\00\00\001\008\004\004\006\007\004\004\000\007\003\007\000\009\005\005\001\006\001\005\00") - (data (i32.const 2816) "\01\00\00\00\n\00\00\00-\001\002\003\004\00") - (data (i32.const 2840) "\01\00\00\00\16\00\00\00-\004\002\009\004\009\006\007\002\009\005\00") - (data (i32.const 2872) "\01\00\00\00\18\00\00\00-\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2904) "\01\00\00\00\1a\00\00\00-\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2944) "\01\00\00\00 \00\00\00-\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2984) "\01\00\00\00$\00\00\00-\001\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 3032) "\01\00\00\00&\00\00\009\002\002\003\003\007\002\000\003\006\008\005\004\007\007\005\008\000\007\00") - (data (i32.const 3080) "\01\00\00\00(\00\00\00-\009\002\002\003\003\007\002\000\003\006\008\005\004\007\007\005\008\000\008\00") - (data (i32.const 3128) "\01\00\00\00\06\00\00\000\00.\000\00") - (data (i32.const 3144) "\01\00\00\00\06\00\00\00N\00a\00N\00") - (data (i32.const 3160) "\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y\00") - (data (i32.const 3192) "\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00") - (data (i32.const 3216) "\b8\02\00\00\00\00\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8|inlined.0 (result i32) + local.get $2 + local.set $1 local.get $1 - local.set $2 - local.get $2 - call $~lib/runtime/unref i32.const 1 - i32.store - local.get $2 + call $~lib/runtime/doRegister end ) - (func $~lib/string/compareImpl (; 10 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) + (func $~lib/util/string/compareImpl (; 9 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -738,7 +471,7 @@ end local.get $5 ) - (func $~lib/string/String.eq (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.eq (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -764,11 +497,11 @@ return end local.get $0 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length local.set $3 local.get $3 local.get $1 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length i32.ne if i32.const 0 @@ -779,10 +512,10 @@ local.get $1 i32.const 0 local.get $3 - call $~lib/string/compareImpl + call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String.fromCodePoint (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String.fromCodePoint (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -794,7 +527,7 @@ if i32.const 0 i32.const 96 - i32.const 53 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -803,17 +536,21 @@ i32.const 65535 i32.gt_s local.set $1 - local.get $1 - i32.const 1 - i32.add - i32.const 1 - i32.shl - call $~lib/runtime/ALLOC - local.set $2 + block $~lib/runtime/ALLOCATE|inlined.1 (result i32) + local.get $1 + i32.const 1 + i32.add + i32.const 1 + i32.shl + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end + local.set $3 local.get $1 i32.eqz if - local.get $2 + local.get $3 local.get $0 i32.store16 else @@ -826,15 +563,15 @@ i32.shr_u i32.const 55296 i32.add - local.set $3 + local.set $2 local.get $0 i32.const 1023 i32.and i32.const 56320 i32.add local.set $4 - local.get $2 local.get $3 + local.get $2 i32.const 16 i32.shl local.get $4 @@ -842,16 +579,14 @@ i32.store end block $~lib/runtime/REGISTER|inlined.1 (result i32) - local.get $2 + local.get $3 local.set $4 local.get $4 - call $~lib/runtime/unref i32.const 1 - i32.store - local.get $4 + call $~lib/runtime/doRegister end ) - (func $~lib/string/String#startsWith (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#startsWith (; 12 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -865,7 +600,7 @@ if i32.const 0 i32.const 96 - i32.const 191 + i32.const 165 i32.const 4 call $~lib/env/abort unreachable @@ -880,7 +615,7 @@ local.get $2 local.set $3 local.get $0 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length local.set $4 local.get $3 local.tee $5 @@ -899,7 +634,7 @@ select local.set $7 local.get $1 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length local.set $8 local.get $8 local.get $7 @@ -915,10 +650,10 @@ local.get $1 i32.const 0 local.get $8 - call $~lib/string/compareImpl + call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String#endsWith (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#endsWith (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -931,7 +666,7 @@ if i32.const 0 i32.const 96 - i32.const 110 + i32.const 78 i32.const 4 call $~lib/env/abort unreachable @@ -953,7 +688,7 @@ select local.tee $3 local.get $0 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length local.tee $4 local.get $3 local.get $4 @@ -961,7 +696,7 @@ select local.set $5 local.get $1 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length local.set $6 local.get $5 local.get $6 @@ -979,29 +714,10 @@ local.get $1 i32.const 0 local.get $6 - call $~lib/string/compareImpl + call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String#endsWith|trampoline (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - global.get $~lib/runtime/StringBase.MAX_LENGTH - local.set $2 - end - local.get $0 - local.get $1 - local.get $2 - call $~lib/string/String#endsWith - ) - (func $~lib/string/String#indexOf (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#indexOf (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1014,7 +730,7 @@ if i32.const 0 i32.const 96 - i32.const 162 + i32.const 134 i32.const 4 call $~lib/env/abort unreachable @@ -1027,7 +743,7 @@ local.set $1 end local.get $1 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length local.set $3 local.get $3 i32.eqz @@ -1036,7 +752,7 @@ return end local.get $0 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length local.set $4 local.get $4 i32.eqz @@ -1078,7 +794,7 @@ local.get $1 i32.const 0 local.get $3 - call $~lib/string/compareImpl + call $~lib/util/string/compareImpl i32.eqz if local.get $5 @@ -1095,7 +811,7 @@ end i32.const -1 ) - (func $~lib/internal/memory/memcpy (; 17 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 15 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2296,239 +2012,247 @@ i32.store8 end ) - (func $~lib/internal/memory/memmove (; 18 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 16 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - local.get $0 - local.get $1 - i32.eq - if - return - end - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $3 - if (result i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.set $3 + local.get $1 + local.set $4 + local.get $2 + local.set $5 local.get $3 - else - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - end - if - local.get $0 - local.get $1 - local.get $2 - call $~lib/internal/memory/memcpy - return - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and + local.get $4 i32.eq if - block $break|0 - loop $continue|0 - local.get $0 - i32.const 7 - i32.and + br $~lib/util/memory/memmove|inlined.0 + end + local.get $4 + local.get $5 + i32.add + local.get $3 + i32.le_u + local.tee $6 + if (result i32) + local.get $6 + else + local.get $3 + local.get $5 + i32.add + local.get $4 + i32.le_u + end + if + local.get $3 + local.get $4 + local.get $5 + call $~lib/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + end + local.get $3 + local.get $4 + i32.lt_u + if + local.get $4 + i32.const 7 + i32.and + local.get $3 + i32.const 7 + i32.and + i32.eq + if + block $break|0 + loop $continue|0 + local.get $3 + i32.const 7 + i32.and + if + block + local.get $5 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $5 + i32.const 1 + i32.sub + local.set $5 + block (result i32) + local.get $3 + local.tee $6 + i32.const 1 + i32.add + local.set $3 + local.get $6 + end + block (result i32) + local.get $4 + local.tee $6 + i32.const 1 + i32.add + local.set $4 + local.get $6 + end + i32.load8_u + i32.store8 + end + br $continue|0 + end + end + end + block $break|1 + loop $continue|1 + local.get $5 + i32.const 8 + i32.ge_u + if + block + local.get $3 + local.get $4 + i64.load + i64.store + local.get $5 + i32.const 8 + i32.sub + local.set $5 + local.get $3 + i32.const 8 + i32.add + local.set $3 + local.get $4 + i32.const 8 + i32.add + local.set $4 + end + br $continue|1 + end + end + end + end + block $break|2 + loop $continue|2 + local.get $5 if block - local.get $2 - i32.eqz - if - return - end - local.get $2 - i32.const 1 - i32.sub - local.set $2 block (result i32) - local.get $0 - local.tee $3 + local.get $3 + local.tee $6 i32.const 1 i32.add - local.set $0 - local.get $3 + local.set $3 + local.get $6 end block (result i32) - local.get $1 - local.tee $3 + local.get $4 + local.tee $6 i32.const 1 i32.add - local.set $1 - local.get $3 + local.set $4 + local.get $6 end i32.load8_u i32.store8 - end - br $continue|0 - end - end - end - block $break|1 - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $0 - local.get $1 - i64.load - i64.store - local.get $2 - i32.const 8 + local.get $5 + i32.const 1 i32.sub - local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 + local.set $5 end - br $continue|1 + br $continue|2 end end end - end - block $break|2 - loop $continue|2 - local.get $2 - if - block - block (result i32) - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 + else + local.get $4 + i32.const 7 + i32.and + local.get $3 + i32.const 7 + i32.and + i32.eq + if + block $break|3 + loop $continue|3 + local.get $3 + local.get $5 + i32.add + i32.const 7 + i32.and + if + block + local.get $5 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $3 + local.get $5 + i32.const 1 + i32.sub + local.tee $5 + i32.add + local.get $4 + local.get $5 + i32.add + i32.load8_u + i32.store8 + end + br $continue|3 end - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 + end + end + block $break|4 + loop $continue|4 + local.get $5 + i32.const 8 + i32.ge_u + if + block + local.get $5 + i32.const 8 + i32.sub + local.set $5 + local.get $3 + local.get $5 + i32.add + local.get $4 + local.get $5 + i32.add + i64.load + i64.store + end + br $continue|4 end - i32.load8_u - i32.store8 - local.get $2 + end + end + end + block $break|5 + loop $continue|5 + local.get $5 + if + local.get $3 + local.get $5 i32.const 1 i32.sub - local.set $2 + local.tee $5 + i32.add + local.get $4 + local.get $5 + i32.add + i32.load8_u + i32.store8 + br $continue|5 end - br $continue|2 - end - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - block $break|3 - loop $continue|3 - local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and - if - block - local.get $2 - i32.eqz - if - return - end - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - end - br $continue|3 - end - end - end - block $break|4 - loop $continue|4 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - local.get $2 - i32.add - local.get $1 - local.get $2 - i32.add - i64.load - i64.store - end - br $continue|4 - end - end - end - end - block $break|5 - loop $continue|5 - local.get $2 - if - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 end end end end ) - (func $~lib/runtime/memory.repeat (; 19 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/memory/memory.repeat (; 17 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) i32.const 0 local.set $4 local.get $2 @@ -2542,20 +2266,12 @@ i32.lt_u if block - block $~lib/runtime/memory.copy|inlined.0 - local.get $0 - local.get $4 - i32.add - local.set $6 - local.get $1 - local.set $7 - local.get $2 - local.set $8 - local.get $6 - local.get $7 - local.get $8 - call $~lib/internal/memory/memmove - end + local.get $0 + local.get $4 + i32.add + local.get $1 + local.get $2 + call $~lib/memory/memory.copy local.get $4 local.get $2 i32.add @@ -2566,7 +2282,7 @@ end end ) - (func $~lib/string/String#padStart (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#padStart (; 18 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2575,9 +2291,6 @@ (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) local.get $0 i32.const 0 i32.ne @@ -2585,13 +2298,13 @@ if i32.const 0 i32.const 96 - i32.const 307 + i32.const 282 i32.const 4 call $~lib/env/abort unreachable end local.get $0 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length i32.const 1 i32.shl local.set $3 @@ -2600,7 +2313,7 @@ i32.shl local.set $4 local.get $2 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length i32.const 1 i32.shl local.set $5 @@ -2622,8 +2335,12 @@ local.get $3 i32.sub local.set $7 - local.get $4 - call $~lib/runtime/ALLOC + block $~lib/runtime/ALLOCATE|inlined.2 (result i32) + local.get $4 + local.set $6 + local.get $6 + call $~lib/runtime/doAllocate + end local.set $8 local.get $7 local.get $5 @@ -2647,58 +2364,34 @@ local.get $2 local.get $5 local.get $6 - call $~lib/runtime/memory.repeat - block $~lib/runtime/memory.copy|inlined.1 - local.get $8 - local.get $9 - i32.add - local.set $11 - local.get $2 - local.set $12 - local.get $10 - local.set $13 - local.get $11 - local.get $12 - local.get $13 - call $~lib/internal/memory/memmove - end + call $~lib/memory/memory.repeat + local.get $8 + local.get $9 + i32.add + local.get $2 + local.get $10 + call $~lib/memory/memory.copy else local.get $8 - local.set $10 local.get $2 - local.set $9 local.get $7 - local.set $6 - local.get $10 - local.get $9 - local.get $6 - call $~lib/internal/memory/memmove - end - block $~lib/runtime/memory.copy|inlined.3 - local.get $8 - local.get $7 - i32.add - local.set $6 - local.get $0 - local.set $9 - local.get $3 - local.set $10 - local.get $6 - local.get $9 - local.get $10 - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy end + local.get $8 + local.get $7 + i32.add + local.get $0 + local.get $3 + call $~lib/memory/memory.copy block $~lib/runtime/REGISTER|inlined.2 (result i32) local.get $8 local.set $10 local.get $10 - call $~lib/runtime/unref i32.const 1 - i32.store - local.get $10 + call $~lib/runtime/doRegister end ) - (func $~lib/string/String#padEnd (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#padEnd (; 19 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2707,9 +2400,6 @@ (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) local.get $0 i32.const 0 i32.ne @@ -2717,13 +2407,13 @@ if i32.const 0 i32.const 96 - i32.const 328 + i32.const 303 i32.const 4 call $~lib/env/abort unreachable end local.get $0 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length i32.const 1 i32.shl local.set $3 @@ -2732,7 +2422,7 @@ i32.shl local.set $4 local.get $2 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length i32.const 1 i32.shl local.set $5 @@ -2754,21 +2444,17 @@ local.get $3 i32.sub local.set $7 - local.get $4 - call $~lib/runtime/ALLOC - local.set $8 - block $~lib/runtime/memory.copy|inlined.4 - local.get $8 + block $~lib/runtime/ALLOCATE|inlined.3 (result i32) + local.get $4 local.set $6 - local.get $0 - local.set $9 - local.get $3 - local.set $10 local.get $6 - local.get $9 - local.get $10 - call $~lib/internal/memory/memmove + call $~lib/runtime/doAllocate end + local.set $8 + local.get $8 + local.get $0 + local.get $3 + call $~lib/memory/memory.copy local.get $7 local.get $5 i32.gt_u @@ -2778,63 +2464,47 @@ i32.sub local.get $5 i32.div_u - local.set $10 - local.get $10 + local.set $6 + local.get $6 local.get $5 i32.mul local.set $9 local.get $7 local.get $9 i32.sub - local.set $6 + local.set $10 local.get $8 local.get $3 i32.add local.get $2 local.get $5 + local.get $6 + call $~lib/memory/memory.repeat + local.get $8 + local.get $3 + i32.add + local.get $9 + i32.add + local.get $2 local.get $10 - call $~lib/runtime/memory.repeat - block $~lib/runtime/memory.copy|inlined.5 - local.get $8 - local.get $3 - i32.add - local.get $9 - i32.add - local.set $11 - local.get $2 - local.set $12 - local.get $6 - local.set $13 - local.get $11 - local.get $12 - local.get $13 - call $~lib/internal/memory/memmove - end + call $~lib/memory/memory.copy else local.get $8 local.get $3 i32.add - local.set $6 local.get $2 - local.set $9 local.get $7 - local.set $10 - local.get $6 - local.get $9 - local.get $10 - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy end block $~lib/runtime/REGISTER|inlined.3 (result i32) local.get $8 local.set $10 local.get $10 - call $~lib/runtime/unref i32.const 1 - i32.store - local.get $10 + call $~lib/runtime/doRegister end ) - (func $~lib/string/String#lastIndexOf (; 22 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#lastIndexOf (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2847,7 +2517,7 @@ if i32.const 0 i32.const 96 - i32.const 177 + i32.const 150 i32.const 4 call $~lib/env/abort unreachable @@ -2860,10 +2530,10 @@ local.set $1 end local.get $0 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length local.set $3 local.get $1 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length local.set $4 local.get $4 i32.eqz @@ -2909,7 +2579,7 @@ local.get $1 i32.const 0 local.get $4 - call $~lib/string/compareImpl + call $~lib/util/string/compareImpl i32.eqz if local.get $5 @@ -2926,26 +2596,7 @@ end i32.const -1 ) - (func $~lib/string/String#lastIndexOf|trampoline (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - global.get $~lib/builtins/i32.MAX_VALUE - local.set $2 - end - local.get $0 - local.get $1 - local.get $2 - call $~lib/string/String#lastIndexOf - ) - (func $~lib/internal/string/parse (; 24 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/util/string/parse (; 21 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2953,7 +2604,7 @@ (local $6 i32) (local $7 f64) local.get $0 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length local.set $2 local.get $2 i32.eqz @@ -3246,12 +2897,12 @@ local.get $7 f64.mul ) - (func $~lib/string/parseInt (; 25 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/string/parseInt (; 22 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $0 local.get $1 - call $~lib/internal/string/parse + call $~lib/util/string/parse ) - (func $~lib/string/parseFloat (; 26 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/string/parseFloat (; 23 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3260,7 +2911,7 @@ (local $6 i32) (local $7 f64) local.get $0 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length local.set $1 local.get $1 i32.eqz @@ -3380,7 +3031,7 @@ if i32.const 0 i32.const 96 - i32.const 591 + i32.const 569 i32.const 10 call $~lib/env/abort unreachable @@ -3448,14 +3099,12 @@ local.get $5 f64.mul ) - (func $~lib/string/String#concat (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) local.get $0 i32.const 0 i32.ne @@ -3463,7 +3112,7 @@ if i32.const 0 i32.const 96 - i32.const 97 + i32.const 65 i32.const 4 call $~lib/env/abort unreachable @@ -3476,12 +3125,12 @@ local.set $1 end local.get $0 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length i32.const 1 i32.shl local.set $2 local.get $1 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length i32.const 1 i32.shl local.set $3 @@ -3496,46 +3145,32 @@ i32.const 312 return end - local.get $4 - call $~lib/runtime/ALLOC - local.set $5 - block $~lib/runtime/memory.copy|inlined.7 + block $~lib/runtime/ALLOCATE|inlined.4 (result i32) + local.get $4 + local.set $5 local.get $5 - local.set $6 - local.get $0 - local.set $7 - local.get $2 - local.set $8 - local.get $6 - local.get $7 - local.get $8 - call $~lib/internal/memory/memmove - end - block $~lib/runtime/memory.copy|inlined.8 - local.get $5 - local.get $2 - i32.add - local.set $8 - local.get $1 - local.set $7 - local.get $3 - local.set $6 - local.get $8 - local.get $7 - local.get $6 - call $~lib/internal/memory/memmove + call $~lib/runtime/doAllocate end + local.set $6 + local.get $6 + local.get $0 + local.get $2 + call $~lib/memory/memory.copy + local.get $6 + local.get $2 + i32.add + local.get $1 + local.get $3 + call $~lib/memory/memory.copy block $~lib/runtime/REGISTER|inlined.4 (result i32) + local.get $6 + local.set $5 local.get $5 - local.set $6 - local.get $6 - call $~lib/runtime/unref i32.const 1 - i32.store - local.get $6 + call $~lib/runtime/doRegister end ) - (func $~lib/string/String.concat (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.concat (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.eqz if @@ -3546,13 +3181,13 @@ local.get $1 call $~lib/string/String#concat ) - (func $~lib/string/String.ne (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.ne (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.eq i32.eqz ) - (func $~lib/string/String.gt (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.gt (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3581,10 +3216,10 @@ return end local.get $0 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length local.set $3 local.get $1 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length local.set $4 local.get $3 i32.eqz @@ -3610,11 +3245,11 @@ local.get $5 i32.lt_s select - call $~lib/string/compareImpl + call $~lib/util/string/compareImpl i32.const 0 i32.gt_s ) - (func $~lib/string/String.lt (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.lt (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3643,10 +3278,10 @@ return end local.get $0 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length local.set $3 local.get $1 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length local.set $4 local.get $4 i32.eqz @@ -3672,23 +3307,23 @@ local.get $5 i32.lt_s select - call $~lib/string/compareImpl + call $~lib/util/string/compareImpl i32.const 0 i32.lt_s ) - (func $~lib/string/String.gte (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.gte (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.lt i32.eqz ) - (func $~lib/string/String.lte (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.lte (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.gt i32.eqz ) - (func $~lib/string/String#repeat (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#repeat (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3699,13 +3334,13 @@ if i32.const 0 i32.const 96 - i32.const 349 + i32.const 324 i32.const 4 call $~lib/env/abort unreachable end local.get $0 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length local.set $2 local.get $1 i32.const 0 @@ -3727,7 +3362,7 @@ if i32.const 0 i32.const 96 - i32.const 354 + i32.const 329 i32.const 6 call $~lib/env/abort unreachable @@ -3753,12 +3388,16 @@ local.get $0 return end - local.get $2 - local.get $1 - i32.mul - i32.const 1 - i32.shl - call $~lib/runtime/ALLOC + block $~lib/runtime/ALLOCATE|inlined.5 (result i32) + local.get $2 + local.get $1 + i32.mul + i32.const 1 + i32.shl + local.set $3 + local.get $3 + call $~lib/runtime/doAllocate + end local.set $4 local.get $4 local.get $0 @@ -3766,27 +3405,24 @@ i32.const 1 i32.shl local.get $1 - call $~lib/runtime/memory.repeat + call $~lib/memory/memory.repeat block $~lib/runtime/REGISTER|inlined.5 (result i32) local.get $4 local.set $3 local.get $3 - call $~lib/runtime/unref i32.const 1 - i32.store - local.get $3 + call $~lib/runtime/doRegister end ) - (func $~lib/string/String#slice (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#slice (; 32 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) local.get $0 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length local.set $3 local.get $1 i32.const 0 @@ -3849,123 +3485,370 @@ i32.const 312 return end - local.get $3 - i32.const 1 - i32.shl - call $~lib/runtime/ALLOC - local.set $8 - block $~lib/runtime/memory.copy|inlined.9 - local.get $8 - local.set $4 - local.get $0 - local.get $6 - i32.const 1 - i32.shl - i32.add - local.set $5 + block $~lib/runtime/ALLOCATE|inlined.6 (result i32) local.get $3 i32.const 1 i32.shl - local.set $9 + local.set $4 local.get $4 - local.get $5 - local.get $9 - call $~lib/internal/memory/memmove + call $~lib/runtime/doAllocate end + local.set $8 + local.get $8 + local.get $0 + local.get $6 + i32.const 1 + i32.shl + i32.add + local.get $3 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy block $~lib/runtime/REGISTER|inlined.6 (result i32) local.get $8 - local.set $9 - local.get $9 - call $~lib/runtime/unref + local.set $4 + local.get $4 i32.const 1 - i32.store - local.get $9 + call $~lib/runtime/doRegister end ) - (func $~lib/string/String#slice|trampoline (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - global.get $~lib/builtins/i32.MAX_VALUE - local.set $2 - end - local.get $0 - local.get $1 - local.get $2 - call $~lib/string/String#slice - ) - (func $~lib/internal/arraybuffer/computeSize (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 1 - i32.const 32 - local.get $0 - i32.const 8 - i32.add - i32.const 1 - i32.sub - i32.clz - i32.sub - i32.shl - ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.const 1073741816 - i32.le_u - i32.eqz - if - i32.const 0 - i32.const 1432 - i32.const 26 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $0 - call $~lib/internal/arraybuffer/computeSize - call $~lib/allocator/arena/memory.allocate - local.set $1 - local.get $1 - local.get $0 - i32.store - local.get $1 - ) - (func $~lib/array/Array#constructor (; 39 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (func $~lib/memory/memory.fill (; 33 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) + (local $7 i32) + (local $8 i64) + block $~lib/util/memory/memset|inlined.0 + local.get $0 + local.set $3 + local.get $1 + local.set $4 + local.get $2 + local.set $5 + local.get $5 + i32.eqz + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $3 + local.get $4 + i32.store8 + local.get $3 + local.get $5 + i32.add + i32.const 1 + i32.sub + local.get $4 + i32.store8 + local.get $5 + i32.const 2 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $3 + i32.const 1 + i32.add + local.get $4 + i32.store8 + local.get $3 + i32.const 2 + i32.add + local.get $4 + i32.store8 + local.get $3 + local.get $5 + i32.add + i32.const 2 + i32.sub + local.get $4 + i32.store8 + local.get $3 + local.get $5 + i32.add + i32.const 3 + i32.sub + local.get $4 + i32.store8 + local.get $5 + i32.const 6 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $3 + i32.const 3 + i32.add + local.get $4 + i32.store8 + local.get $3 + local.get $5 + i32.add + i32.const 4 + i32.sub + local.get $4 + i32.store8 + local.get $5 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + i32.const 0 + local.get $3 + i32.sub + i32.const 3 + i32.and + local.set $6 + local.get $3 + local.get $6 + i32.add + local.set $3 + local.get $5 + local.get $6 + i32.sub + local.set $5 + local.get $5 + i32.const -4 + i32.and + local.set $5 + i32.const -1 + i32.const 255 + i32.div_u + local.get $4 + i32.const 255 + i32.and + i32.mul + local.set $7 + local.get $3 + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 4 + i32.sub + local.get $7 + i32.store + local.get $5 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $3 + i32.const 4 + i32.add + local.get $7 + i32.store + local.get $3 + i32.const 8 + i32.add + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 12 + i32.sub + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 8 + i32.sub + local.get $7 + i32.store + local.get $5 + i32.const 24 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $3 + i32.const 12 + i32.add + local.get $7 + i32.store + local.get $3 + i32.const 16 + i32.add + local.get $7 + i32.store + local.get $3 + i32.const 20 + i32.add + local.get $7 + i32.store + local.get $3 + i32.const 24 + i32.add + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 28 + i32.sub + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 24 + i32.sub + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 20 + i32.sub + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 16 + i32.sub + local.get $7 + i32.store + i32.const 24 + local.get $3 + i32.const 4 + i32.and + i32.add + local.set $6 + local.get $3 + local.get $6 + i32.add + local.set $3 + local.get $5 + local.get $6 + i32.sub + local.set $5 + local.get $7 + i64.extend_i32_u + local.get $7 + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + local.set $8 + block $break|0 + loop $continue|0 + local.get $5 + i32.const 32 + i32.ge_u + if + block + local.get $3 + local.get $8 + i64.store + local.get $3 + i32.const 8 + i32.add + local.get $8 + i64.store + local.get $3 + i32.const 16 + i32.add + local.get $8 + i64.store + local.get $3 + i32.const 24 + i32.add + local.get $8 + i64.store + local.get $5 + i32.const 32 + i32.sub + local.set $5 + local.get $3 + i32.const 32 + i32.add + local.set $3 + end + br $continue|0 + end + end + end + end + ) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) local.get $1 - i32.const 268435454 + global.get $~lib/runtime/MAX_BYTELENGTH i32.gt_u if i32.const 0 i32.const 1392 - i32.const 45 - i32.const 39 + i32.const 24 + i32.const 43 call $~lib/env/abort unreachable end + block $~lib/runtime/ALLOCATE|inlined.7 (result i32) + local.get $1 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end + local.set $3 + local.get $3 + i32.const 0 local.get $1 - i32.const 2 - i32.shl - local.set $2 + call $~lib/memory/memory.fill + block $~lib/runtime/REGISTER|inlined.0 (result i32) + local.get $3 + local.set $2 + local.get $2 + i32.const 2 + call $~lib/runtime/doRegister + end + ) + (func $~lib/runtime/ALLOCATE (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/runtime/doAllocate + ) + (func $~lib/runtime/ArrayBufferView#constructor (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + local.get $1 + global.get $~lib/runtime/MAX_BYTELENGTH local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe + i32.shr_u + i32.gt_u + if + i32.const 0 + i32.const 136 + i32.const 223 + i32.const 57 + call $~lib/env/abort + unreachable + end + i32.const 0 + local.get $1 + local.get $2 + i32.shl + local.tee $1 + call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 block (result i32) local.get $0 i32.eqz if - i32.const 8 - call $~lib/allocator/arena/memory.allocate + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 12 + call $~lib/runtime/ALLOCATE + local.set $4 + local.get $4 + i32.const 3 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 @@ -3975,251 +3858,296 @@ i32.const 0 i32.store offset=4 local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 end local.get $3 i32.store local.get $0 - local.get $1 + local.get $3 i32.store offset=4 - block $~lib/runtime/memory.fill|inlined.1 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end local.get $0 - ) - (func $~lib/array/Array#__unchecked_set (; 40 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.load - local.set $3 - local.get $1 - local.set $4 - local.get $2 - local.set $5 - i32.const 0 - local.set $6 local.get $3 - local.get $4 - i32.const 2 - i32.shl + local.get $1 i32.add - local.get $6 - i32.add - local.get $5 i32.store offset=8 - ) - (func $~lib/array/Array#__unchecked_get (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) local.get $0 - i32.load - local.set $2 + ) + (func $~lib/array/Array#constructor (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + if (result i32) + local.get $0 + else + i32.const 16 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 4 + call $~lib/runtime/doRegister + end local.get $1 - local.set $3 - i32.const 0 - local.set $4 - local.get $2 - local.get $3 i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - i32.load offset=8 + call $~lib/runtime/ArrayBufferView#constructor + local.set $0 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + local.get $1 + i32.store offset=12 + local.get $0 ) - (func $~lib/allocator/arena/memory.free (; 42 ;) (type $FUNCSIG$vi) (param $0 i32) - nop + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 ) - (func $~lib/internal/arraybuffer/reallocateUnsafe (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/memory/memory.free (; 39 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + local.set $1 + ) + (func $~lib/runtime/doReallocate (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) local.get $0 - i32.load + global.get $~lib/runtime/HEADER_SIZE + i32.sub local.set $2 - local.get $1 local.get $2 - i32.gt_s + i32.load offset=4 + local.set $3 + local.get $3 + local.get $1 + i32.lt_u if local.get $1 - i32.const 1073741816 - i32.le_s - i32.eqz + call $~lib/runtime/adjustToBlock + local.set $4 + local.get $3 + call $~lib/runtime/adjustToBlock + i32.const 0 + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + select + local.get $4 + i32.lt_u if - i32.const 0 - i32.const 1432 - i32.const 40 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - local.get $2 - call $~lib/internal/arraybuffer/computeSize - i32.const 8 - i32.sub - i32.le_s - if - local.get $0 - local.get $1 - i32.store - else - local.get $1 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block $~lib/runtime/memory.copy|inlined.11 - local.get $3 - i32.const 8 - i32.add - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memmove - end - local.get $0 - call $~lib/allocator/arena/memory.free - local.get $3 - local.set $0 - end - block $~lib/runtime/memory.fill|inlined.2 - local.get $0 - i32.const 8 - i32.add - local.get $2 - i32.add - local.set $3 - i32.const 0 - local.set $6 - local.get $1 - local.get $2 - i32.sub + local.get $4 + call $~lib/memory/memory.allocate local.set $5 - local.get $3 - local.get $6 local.get $5 - call $~lib/internal/memory/memset + local.get $2 + i32.load + i32.store + local.get $5 + global.get $~lib/runtime/HEADER_SIZE + i32.add + local.set $6 + local.get $6 + local.get $0 + local.get $3 + call $~lib/memory/memory.copy + local.get $6 + local.get $3 + i32.add + i32.const 0 + local.get $1 + local.get $3 + i32.sub + call $~lib/memory/memory.fill + local.get $2 + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq + if + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 136 + i32.const 100 + i32.const 8 + call $~lib/env/abort + unreachable + end + local.get $2 + call $~lib/memory/memory.free + else + nop + end + local.get $5 + local.set $2 + local.get $6 + local.set $0 + else + local.get $0 + local.get $3 + i32.add + i32.const 0 + local.get $1 + local.get $3 + i32.sub + call $~lib/memory/memory.fill end else - local.get $1 - local.get $2 - i32.lt_s - if - local.get $1 - i32.const 0 - i32.ge_s - i32.eqz - if - i32.const 0 - i32.const 1432 - i32.const 62 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $1 - i32.store - end + nop end + local.get $2 + local.get $1 + i32.store offset=4 local.get $0 ) - (func $~lib/array/Array#push (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#resize (; 41 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) local.get $0 - i32.load offset=4 + i32.load local.set $2 - local.get $0 - i32.load - local.set $3 - local.get $3 - i32.load + local.get $2 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength i32.const 2 i32.shr_u - local.set $4 - local.get $2 - i32.const 1 - i32.add - local.set $5 - local.get $2 - local.get $4 - i32.ge_u + local.set $3 + local.get $1 + local.get $3 + i32.gt_u if - local.get $2 + local.get $1 i32.const 268435454 - i32.ge_u + i32.gt_u if i32.const 0 - i32.const 1392 - i32.const 182 - i32.const 42 + i32.const 1440 + i32.const 37 + i32.const 41 call $~lib/env/abort unreachable end - local.get $3 - local.get $5 - i32.const 2 - i32.shl - call $~lib/internal/arraybuffer/reallocateUnsafe - local.set $3 - local.get $0 - local.get $3 - i32.store - end - local.get $0 - local.get $5 - i32.store offset=4 - block $~lib/internal/arraybuffer/STORE|inlined.1 - local.get $3 - local.set $6 - local.get $2 - local.set $7 local.get $1 - local.set $8 - i32.const 0 - local.set $9 - local.get $6 - local.get $7 i32.const 2 i32.shl - i32.add - local.get $9 - i32.add - local.get $8 - i32.store offset=8 + local.set $4 + block $~lib/runtime/REALLOCATE|inlined.0 (result i32) + local.get $2 + local.set $5 + local.get $4 + local.set $6 + local.get $5 + local.get $6 + call $~lib/runtime/doReallocate + end + local.set $6 + local.get $6 + local.get $2 + i32.ne + if + local.get $0 + local.get $6 + i32.store + local.get $0 + local.get $6 + i32.store offset=4 + local.get $0 + local.get $6 + local.get $4 + i32.add + i32.store offset=8 + end end - local.get $5 ) - (func $~lib/string/String#split (; 45 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#__set (; 42 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 1 + i32.add + call $~lib/array/Array#resize + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_s + if + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=12 + end + ) + (func $~lib/runtime/assertRegistered (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.ne + i32.eqz + if + i32.const 0 + i32.const 136 + i32.const 196 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $~lib/runtime/doLink (; 44 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + call $~lib/runtime/assertRegistered + local.get $1 + call $~lib/runtime/assertRegistered + ) + (func $~lib/runtime/LINK> (; 45 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/runtime/doLink + ) + (func $~lib/array/Array#push (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + i32.load offset=12 + i32.const 1 + i32.add + local.set $2 + local.get $0 + local.get $2 + call $~lib/array/Array#resize + local.get $0 + local.get $2 + i32.store offset=12 + local.get $0 + i32.load offset=4 + local.get $2 + i32.const 1 + i32.sub + i32.const 2 + i32.shl + i32.add + local.get $1 + i32.store + local.get $2 + ) + (func $~lib/string/String#split (; 47 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4232,9 +4160,6 @@ (local $12 i32) (local $13 i32) (local $14 i32) - (local $15 i32) - (local $16 i32) - (local $17 i32) local.get $0 i32.const 0 i32.ne @@ -4242,7 +4167,7 @@ if i32.const 0 i32.const 96 - i32.const 376 + i32.const 351 i32.const 4 call $~lib/env/abort unreachable @@ -4267,16 +4192,16 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/array/Array#__unchecked_set + call $~lib/array/Array#__set local.get $3 end return end local.get $0 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length local.set $4 local.get $1 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length local.set $5 local.get $2 i32.const 0 @@ -4310,7 +4235,7 @@ call $~lib/array/Array#constructor local.set $3 local.get $3 - i32.load + i32.load offset=4 local.set $6 block $break|0 i32.const 0 @@ -4322,8 +4247,12 @@ i32.eqz br_if $break|0 block - i32.const 2 - call $~lib/runtime/ALLOC + block $~lib/runtime/ALLOCATE|inlined.8 (result i32) + i32.const 2 + local.set $8 + local.get $8 + call $~lib/runtime/doAllocate + end local.set $8 local.get $8 local.get $0 @@ -4333,25 +4262,22 @@ i32.add i32.load16_u i32.store16 - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $6 - local.set $9 - local.get $7 - local.set $10 + local.get $6 + local.get $7 + i32.const 2 + i32.shl + i32.add + block $~lib/runtime/REGISTER|inlined.7 (result i32) local.get $8 - local.set $11 - i32.const 0 - local.set $12 + local.set $9 local.get $9 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $12 - i32.add - local.get $11 - i32.store offset=8 + i32.const 1 + call $~lib/runtime/doRegister end + i32.store + local.get $8 + local.get $3 + call $~lib/runtime/LINK> end local.get $7 i32.const 1 @@ -4372,18 +4298,10 @@ i32.const 1 call $~lib/array/Array#constructor local.set $6 - block (result i32) - local.get $6 - local.tee $3 - i32.const 0 - local.tee $7 - i32.const 312 - call $~lib/array/Array#__unchecked_set - local.get $3 - local.get $7 - call $~lib/array/Array#__unchecked_get - end - drop + local.get $6 + i32.load offset=4 + i32.const 312 + i32.store local.get $6 return end @@ -4391,93 +4309,87 @@ i32.const 0 i32.const 0 call $~lib/array/Array#constructor + local.set $10 + i32.const 0 + local.set $11 + i32.const 0 + local.set $12 + i32.const 0 local.set $13 - i32.const 0 - local.set $14 - i32.const 0 - local.set $15 - i32.const 0 - local.set $16 block $break|1 loop $continue|1 local.get $0 local.get $1 - local.get $15 + local.get $12 call $~lib/string/String#indexOf - local.tee $14 + local.tee $11 i32.const -1 i32.ne if block - local.get $14 - local.get $15 + local.get $11 + local.get $12 i32.sub local.set $6 local.get $6 i32.const 0 i32.gt_s if - local.get $6 - i32.const 1 - i32.shl - call $~lib/runtime/ALLOC - local.set $3 - block $~lib/runtime/memory.copy|inlined.10 - local.get $3 - local.set $7 - local.get $0 - local.get $15 - i32.const 1 - i32.shl - i32.add - local.set $8 + block $~lib/runtime/ALLOCATE|inlined.9 (result i32) local.get $6 i32.const 1 i32.shl - local.set $12 - local.get $7 - local.get $8 - local.get $12 - call $~lib/internal/memory/memmove - end - local.get $13 - block $~lib/runtime/REGISTER|inlined.7 (result i32) + local.set $3 local.get $3 - local.set $12 - local.get $12 - call $~lib/runtime/unref + call $~lib/runtime/doAllocate + end + local.set $3 + local.get $3 + local.get $0 + local.get $12 + i32.const 1 + i32.shl + i32.add + local.get $6 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $10 + block $~lib/runtime/REGISTER|inlined.8 (result i32) + local.get $3 + local.set $7 + local.get $7 i32.const 1 - i32.store - local.get $12 + call $~lib/runtime/doRegister end call $~lib/array/Array#push drop else - local.get $13 + local.get $10 i32.const 312 call $~lib/array/Array#push drop end - local.get $16 + local.get $13 i32.const 1 i32.add - local.tee $16 + local.tee $13 local.get $2 i32.eq if - local.get $13 + local.get $10 return end - local.get $14 + local.get $11 local.get $5 i32.add - local.set $15 + local.set $12 end br $continue|1 end end end - local.get $15 + local.get $12 i32.eqz if i32.const 0 @@ -4487,124 +4399,73 @@ block (result i32) local.get $6 local.tee $3 - i32.const 0 - local.tee $12 - local.get $0 - call $~lib/array/Array#__unchecked_set + i32.load offset=4 + block $~lib/runtime/LINK>|inlined.0 (result i32) + local.get $0 + local.set $7 + local.get $7 + local.get $3 + call $~lib/runtime/doLink + local.get $7 + end + local.tee $3 + i32.store local.get $3 - local.get $12 - call $~lib/array/Array#__unchecked_get end drop local.get $6 return end local.get $4 - local.get $15 + local.get $12 i32.sub - local.set $17 - local.get $17 + local.set $14 + local.get $14 i32.const 0 i32.gt_s if - local.get $17 + block $~lib/runtime/ALLOCATE|inlined.10 (result i32) + local.get $14 + i32.const 1 + i32.shl + local.set $6 + local.get $6 + call $~lib/runtime/doAllocate + end + local.set $6 + local.get $6 + local.get $0 + local.get $12 i32.const 1 i32.shl - call $~lib/runtime/ALLOC - local.set $6 - block $~lib/runtime/memory.copy|inlined.12 + i32.add + local.get $14 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $10 + block $~lib/runtime/REGISTER|inlined.9 (result i32) local.get $6 local.set $3 - local.get $0 - local.get $15 - i32.const 1 - i32.shl - i32.add - local.set $12 - local.get $17 - i32.const 1 - i32.shl - local.set $8 local.get $3 - local.get $12 - local.get $8 - call $~lib/internal/memory/memmove - end - local.get $13 - block $~lib/runtime/REGISTER|inlined.8 (result i32) - local.get $6 - local.set $8 - local.get $8 - call $~lib/runtime/unref i32.const 1 - i32.store - local.get $8 + call $~lib/runtime/doRegister end call $~lib/array/Array#push drop else - local.get $13 + local.get $10 i32.const 312 call $~lib/array/Array#push drop end - local.get $13 + local.get $10 ) - (func $~lib/string/String#split|trampoline (; 46 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - block $2of2 - block $1of2 - block $0of2 - block $outOfRange - global.get $~lib/argc - br_table $0of2 $1of2 $2of2 $outOfRange - end - unreachable - end - i32.const 0 - local.set $1 - end - global.get $~lib/builtins/i32.MAX_VALUE - local.set $2 - end + (func $~lib/array/Array#get:length (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - local.get $1 - local.get $2 - call $~lib/string/String#split + i32.load offset=12 ) - (func $~lib/array/Array#__get (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.set $2 - local.get $1 - local.get $2 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end - ) - (func $~lib/internal/number/decimalCount32 (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 49 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 100000 @@ -4673,19 +4534,16 @@ unreachable unreachable ) - (func $~lib/internal/number/utoa32_lut (; 49 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 50 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i64) - (local $12 i64) - i32.const 2168 - i32.load + (local $8 i64) + (local $9 i64) + i32.const 2056 + i32.load offset=4 local.set $3 block $break|0 loop $continue|0 @@ -4712,40 +4570,20 @@ i32.const 100 i32.rem_u local.set $7 - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i64) - local.get $3 - local.set $8 - local.get $6 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i64.load32_u offset=8 - end - local.set $11 - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i64) - local.get $3 - local.set $10 - local.get $7 - local.set $9 - i32.const 0 - local.set $8 - local.get $10 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i64.load32_u offset=8 - end - local.set $12 + local.get $3 + local.get $6 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $8 + local.get $3 + local.get $7 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $9 local.get $2 i32.const 4 i32.sub @@ -4755,8 +4593,8 @@ i32.const 1 i32.shl i32.add - local.get $11 - local.get $12 + local.get $8 + local.get $9 i64.const 32 i64.shl i64.or @@ -4784,29 +4622,19 @@ i32.const 2 i32.sub local.set $2 - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i32) - local.get $3 - local.set $5 - local.get $6 - local.set $4 - i32.const 0 - local.set $8 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i32.load offset=8 - end - local.set $8 + local.get $3 + local.get $6 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $5 local.get $0 local.get $2 i32.const 1 i32.shl i32.add - local.get $8 + local.get $5 i32.store end local.get $1 @@ -4817,29 +4645,19 @@ i32.const 2 i32.sub local.set $2 - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i32) - local.get $3 - local.set $8 - local.get $1 - local.set $6 - i32.const 0 - local.set $7 - local.get $8 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $7 + local.get $3 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $5 local.get $0 local.get $2 i32.const 1 i32.shl i32.add - local.get $7 + local.get $5 i32.store else local.get $2 @@ -4849,17 +4667,17 @@ i32.const 48 local.get $1 i32.add - local.set $7 + local.set $5 local.get $0 local.get $2 i32.const 1 i32.shl i32.add - local.get $7 + local.get $5 i32.store16 end ) - (func $~lib/internal/number/itoa32 (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4884,44 +4702,46 @@ local.set $0 end local.get $0 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.get $1 i32.add local.set $2 - local.get $2 - i32.const 1 - i32.shl - call $~lib/runtime/ALLOC - local.set $3 - block $~lib/internal/number/utoa32_core|inlined.0 + block $~lib/runtime/ALLOCATE|inlined.11 (result i32) + local.get $2 + i32.const 1 + i32.shl + local.set $3 local.get $3 - local.set $4 + call $~lib/runtime/doAllocate + end + local.set $4 + block $~lib/util/number/utoa32_core|inlined.0 + local.get $4 + local.set $3 local.get $0 local.set $5 local.get $2 local.set $6 - local.get $4 + local.get $3 local.get $5 local.get $6 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut end local.get $1 if - local.get $3 + local.get $4 i32.const 45 i32.store16 end - block $~lib/runtime/REGISTER|inlined.9 (result i32) - local.get $3 + block $~lib/runtime/REGISTER|inlined.10 (result i32) + local.get $4 local.set $6 local.get $6 - call $~lib/runtime/unref i32.const 1 - i32.store - local.get $6 + call $~lib/runtime/doRegister end ) - (func $~lib/internal/number/utoa32 (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 52 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4934,36 +4754,38 @@ return end local.get $0 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $1 - local.get $1 - i32.const 1 - i32.shl - call $~lib/runtime/ALLOC - local.set $2 - block $~lib/internal/number/utoa32_core|inlined.1 + block $~lib/runtime/ALLOCATE|inlined.12 (result i32) + local.get $1 + i32.const 1 + i32.shl + local.set $2 local.get $2 - local.set $3 + call $~lib/runtime/doAllocate + end + local.set $3 + block $~lib/util/number/utoa32_core|inlined.1 + local.get $3 + local.set $2 local.get $0 local.set $4 local.get $1 local.set $5 - local.get $3 + local.get $2 local.get $4 local.get $5 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut end - block $~lib/runtime/REGISTER|inlined.10 (result i32) - local.get $2 + block $~lib/runtime/REGISTER|inlined.11 (result i32) + local.get $3 local.set $5 local.get $5 - call $~lib/runtime/unref i32.const 1 - i32.store - local.get $5 + call $~lib/runtime/doRegister end ) - (func $~lib/internal/number/decimalCount64 (; 52 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 53 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i64.const 1000000000000000 @@ -5032,7 +4854,7 @@ unreachable unreachable ) - (func $~lib/internal/number/utoa64_lut (; 53 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 54 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i64) (local $5 i32) @@ -5042,13 +4864,10 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i64) - (local $16 i64) - i32.const 2168 - i32.load + (local $12 i64) + (local $13 i64) + i32.const 2056 + i32.load offset=4 local.set $3 block $break|0 loop $continue|0 @@ -5094,40 +4913,20 @@ i32.const 100 i32.rem_u local.set $11 - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i64) - local.get $3 - local.set $12 - local.get $10 - local.set $13 - i32.const 0 - local.set $14 - local.get $12 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $14 - i32.add - i64.load32_u offset=8 - end - local.set $15 - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result i64) - local.get $3 - local.set $14 - local.get $11 - local.set $13 - i32.const 0 - local.set $12 - local.get $14 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $12 - i32.add - i64.load32_u offset=8 - end - local.set $16 + local.get $3 + local.get $10 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $12 + local.get $3 + local.get $11 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $13 local.get $2 i32.const 4 i32.sub @@ -5137,46 +4936,26 @@ i32.const 1 i32.shl i32.add - local.get $15 - local.get $16 + local.get $12 + local.get $13 i64.const 32 i64.shl i64.or i64.store - block $~lib/internal/arraybuffer/LOAD|inlined.4 (result i64) - local.get $3 - local.set $12 - local.get $8 - local.set $13 - i32.const 0 - local.set $14 - local.get $12 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $14 - i32.add - i64.load32_u offset=8 - end - local.set $15 - block $~lib/internal/arraybuffer/LOAD|inlined.5 (result i64) - local.get $3 - local.set $14 - local.get $9 - local.set $13 - i32.const 0 - local.set $12 - local.get $14 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $12 - i32.add - i64.load32_u offset=8 - end - local.set $16 + local.get $3 + local.get $8 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $12 + local.get $3 + local.get $9 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $13 local.get $2 i32.const 4 i32.sub @@ -5186,8 +4965,8 @@ i32.const 1 i32.shl i32.add - local.get $15 - local.get $16 + local.get $12 + local.get $13 i64.const 32 i64.shl i64.or @@ -5201,9 +4980,9 @@ local.get $1 i32.wrap_i64 local.get $2 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut ) - (func $~lib/internal/number/utoa64 (; 54 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 55 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5226,14 +5005,18 @@ i32.wrap_i64 local.set $2 local.get $2 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $3 - local.get $3 - i32.const 1 - i32.shl - call $~lib/runtime/ALLOC + block $~lib/runtime/ALLOCATE|inlined.13 (result i32) + local.get $3 + i32.const 1 + i32.shl + local.set $4 + local.get $4 + call $~lib/runtime/doAllocate + end local.set $1 - block $~lib/internal/number/utoa32_core|inlined.2 + block $~lib/util/number/utoa32_core|inlined.2 local.get $1 local.set $4 local.get $2 @@ -5243,18 +5026,22 @@ local.get $4 local.get $5 local.get $6 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut end else local.get $0 - call $~lib/internal/number/decimalCount64 + call $~lib/util/number/decimalCount64 local.set $3 - local.get $3 - i32.const 1 - i32.shl - call $~lib/runtime/ALLOC + block $~lib/runtime/ALLOCATE|inlined.14 (result i32) + local.get $3 + i32.const 1 + i32.shl + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end local.set $1 - block $~lib/internal/number/utoa64_core|inlined.0 + block $~lib/util/number/utoa64_core|inlined.0 local.get $1 local.set $2 local.get $0 @@ -5264,20 +5051,18 @@ local.get $2 local.get $7 local.get $6 - call $~lib/internal/number/utoa64_lut + call $~lib/util/number/utoa64_lut end end - block $~lib/runtime/REGISTER|inlined.11 (result i32) + block $~lib/runtime/REGISTER|inlined.12 (result i32) local.get $1 local.set $3 local.get $3 - call $~lib/runtime/unref i32.const 1 - i32.store - local.get $3 + call $~lib/runtime/doRegister end ) - (func $~lib/internal/number/itoa64 (; 55 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 56 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5312,16 +5097,20 @@ i32.wrap_i64 local.set $3 local.get $3 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.get $1 i32.add local.set $4 - local.get $4 - i32.const 1 - i32.shl - call $~lib/runtime/ALLOC + block $~lib/runtime/ALLOCATE|inlined.15 (result i32) + local.get $4 + i32.const 1 + i32.shl + local.set $5 + local.get $5 + call $~lib/runtime/doAllocate + end local.set $2 - block $~lib/internal/number/utoa32_core|inlined.3 + block $~lib/util/number/utoa32_core|inlined.3 local.get $2 local.set $5 local.get $3 @@ -5331,20 +5120,24 @@ local.get $5 local.get $6 local.get $7 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut end else local.get $0 - call $~lib/internal/number/decimalCount64 + call $~lib/util/number/decimalCount64 local.get $1 i32.add local.set $4 - local.get $4 - i32.const 1 - i32.shl - call $~lib/runtime/ALLOC + block $~lib/runtime/ALLOCATE|inlined.16 (result i32) + local.get $4 + i32.const 1 + i32.shl + local.set $3 + local.get $3 + call $~lib/runtime/doAllocate + end local.set $2 - block $~lib/internal/number/utoa64_core|inlined.1 + block $~lib/util/number/utoa64_core|inlined.1 local.get $2 local.set $3 local.get $0 @@ -5354,7 +5147,7 @@ local.get $3 local.get $8 local.get $7 - call $~lib/internal/number/utoa64_lut + call $~lib/util/number/utoa64_lut end end local.get $1 @@ -5363,29 +5156,27 @@ i32.const 45 i32.store16 end - block $~lib/runtime/REGISTER|inlined.12 (result i32) + block $~lib/runtime/REGISTER|inlined.13 (result i32) local.get $2 local.set $4 local.get $4 - call $~lib/runtime/unref i32.const 1 - i32.store - local.get $4 + call $~lib/runtime/doRegister end ) - (func $~lib/builtins/isFinite (; 56 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isFinite (; 57 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.sub f64.const 0 f64.eq ) - (func $~lib/builtins/isNaN (; 57 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 58 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.ne ) - (func $~lib/internal/number/genDigits (; 58 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/util/number/genDigits (; 59 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) (local $9 i64) @@ -5402,11 +5193,11 @@ (local $20 i32) (local $21 i64) (local $22 i64) - (local $23 i32) - (local $24 i32) + (local $23 i64) + (local $24 i64) (local $25 i32) - (local $26 i64) - (local $27 i64) + (local $26 i32) + (local $27 i32) i32.const 0 local.get $4 i32.sub @@ -5437,12 +5228,12 @@ i64.and local.set $13 local.get $12 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $14 local.get $6 local.set $15 - i32.const 4576 - i32.load + i32.const 4104 + i32.load offset=4 local.set $16 block $break|0 loop $continue|0 @@ -5690,11 +5481,11 @@ local.get $5 i64.le_u if - global.get $~lib/internal/number/_K + global.get $~lib/util/number/_K local.get $14 i32.add - global.set $~lib/internal/number/_K - block $~lib/internal/number/grisuRound|inlined.0 + global.set $~lib/util/number/_K + block $~lib/util/number/grisuRound|inlined.0 local.get $0 local.set $18 local.get $15 @@ -5703,28 +5494,18 @@ local.set $21 local.get $19 local.set $22 - block $~lib/internal/arraybuffer/LOAD|inlined.6 (result i64) - local.get $16 - local.set $23 - local.get $14 - local.set $24 - i32.const 0 - local.set $25 - local.get $23 - local.get $24 - i32.const 2 - i32.shl - i32.add - local.get $25 - i32.add - i64.load32_u offset=8 - end + local.get $16 + local.get $14 + i32.const 2 + i32.shl + i32.add + i64.load32_u local.get $7 i64.extend_i32_s i64.shl - local.set $26 + local.set $23 local.get $10 - local.set $27 + local.set $24 local.get $18 local.get $20 i32.const 1 @@ -5735,54 +5516,54 @@ local.set $25 local.get $25 i32.load16_u - local.set $24 + local.set $26 block $break|2 loop $continue|2 local.get $22 - local.get $27 + local.get $24 i64.lt_u - local.tee $23 + local.tee $27 if (result i32) local.get $21 local.get $22 i64.sub - local.get $26 + local.get $23 i64.ge_u else - local.get $23 + local.get $27 end - local.tee $23 + local.tee $27 if (result i32) local.get $22 - local.get $26 + local.get $23 i64.add - local.get $27 + local.get $24 i64.lt_u - local.tee $23 + local.tee $27 if (result i32) - local.get $23 - else local.get $27 + else + local.get $24 local.get $22 i64.sub local.get $22 - local.get $26 + local.get $23 i64.add - local.get $27 + local.get $24 i64.sub i64.gt_u end else - local.get $23 + local.get $27 end if block - local.get $24 + local.get $26 i32.const 1 i32.sub - local.set $24 + local.set $26 local.get $22 - local.get $26 + local.get $23 i64.add local.set $22 end @@ -5791,7 +5572,7 @@ end end local.get $25 - local.get $24 + local.get $26 i32.store16 end local.get $15 @@ -5859,64 +5640,54 @@ local.get $5 i64.lt_u if - global.get $~lib/internal/number/_K + global.get $~lib/util/number/_K local.get $14 i32.add - global.set $~lib/internal/number/_K + global.set $~lib/util/number/_K local.get $10 - block $~lib/internal/arraybuffer/LOAD|inlined.7 (result i64) - local.get $16 - local.set $17 - i32.const 0 - local.get $14 - i32.sub - local.set $24 - i32.const 0 - local.set $25 - local.get $17 - local.get $24 - i32.const 2 - i32.shl - i32.add - local.get $25 - i32.add - i64.load32_u offset=8 - end + local.get $16 + i32.const 0 + local.get $14 + i32.sub + i32.const 2 + i32.shl + i32.add + i64.load32_u i64.mul local.set $10 - block $~lib/internal/number/grisuRound|inlined.1 + block $~lib/util/number/grisuRound|inlined.1 local.get $0 - local.set $25 + local.set $17 local.get $15 - local.set $24 - local.get $5 - local.set $27 - local.get $13 local.set $26 + local.get $5 + local.set $24 + local.get $13 + local.set $23 local.get $8 local.set $22 local.get $10 local.set $21 - local.get $25 - local.get $24 + local.get $17 + local.get $26 i32.const 1 i32.sub i32.const 1 i32.shl i32.add - local.set $17 - local.get $17 + local.set $25 + local.get $25 i32.load16_u local.set $20 block $break|4 loop $continue|4 - local.get $26 + local.get $23 local.get $21 i64.lt_u local.tee $18 if (result i32) - local.get $27 - local.get $26 + local.get $24 + local.get $23 i64.sub local.get $22 i64.ge_u @@ -5925,7 +5696,7 @@ end local.tee $18 if (result i32) - local.get $26 + local.get $23 local.get $22 i64.add local.get $21 @@ -5935,9 +5706,9 @@ local.get $18 else local.get $21 - local.get $26 + local.get $23 i64.sub - local.get $26 + local.get $23 local.get $22 i64.add local.get $21 @@ -5953,16 +5724,16 @@ i32.const 1 i32.sub local.set $20 - local.get $26 + local.get $23 local.get $22 i64.add - local.set $26 + local.set $23 end br $continue|4 end end end - local.get $17 + local.get $25 local.get $20 i32.store16 end @@ -5976,7 +5747,7 @@ end local.get $15 ) - (func $~lib/internal/number/prettify (; 59 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6080,24 +5851,16 @@ i32.shl i32.add local.set $4 - block $~lib/runtime/memory.copy|inlined.13 - local.get $4 - i32.const 2 - i32.add - local.set $5 - local.get $4 - local.set $6 - i32.const 0 - local.get $2 - i32.sub - i32.const 1 - i32.shl - local.set $7 - local.get $5 - local.get $6 - local.get $7 - call $~lib/internal/memory/memmove - end + local.get $4 + i32.const 2 + i32.add + local.get $4 + i32.const 0 + local.get $2 + i32.sub + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $0 local.get $3 i32.const 1 @@ -6126,24 +5889,16 @@ local.get $3 i32.sub local.set $4 - block $~lib/runtime/memory.copy|inlined.14 - local.get $0 - local.get $4 - i32.const 1 - i32.shl - i32.add - local.set $7 - local.get $0 - local.set $6 - local.get $1 - i32.const 1 - i32.shl - local.set $5 - local.get $7 - local.get $6 - local.get $5 - call $~lib/internal/memory/memmove - end + local.get $0 + local.get $4 + i32.const 1 + i32.shl + i32.add + local.get $0 + local.get $1 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $0 i32.const 48 i32.const 46 @@ -6188,7 +5943,7 @@ local.get $0 i32.const 101 i32.store16 offset=2 - block $~lib/internal/number/genExponent|inlined.0 (result i32) + block $~lib/util/number/genExponent|inlined.0 (result i32) local.get $0 i32.const 4 i32.add @@ -6209,11 +5964,11 @@ local.set $5 end local.get $5 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 i32.const 1 i32.add local.set $7 - block $~lib/internal/number/utoa32_core|inlined.4 + block $~lib/util/number/utoa32_core|inlined.4 local.get $4 local.set $8 local.get $5 @@ -6223,7 +5978,7 @@ local.get $8 local.get $9 local.get $10 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut end local.get $4 i32.const 45 @@ -6243,24 +5998,16 @@ i32.const 1 i32.shl local.set $7 - block $~lib/runtime/memory.copy|inlined.15 - local.get $0 - i32.const 4 - i32.add - local.set $6 - local.get $0 - i32.const 2 - i32.add - local.set $5 - local.get $7 - i32.const 2 - i32.sub - local.set $4 - local.get $6 - local.get $5 - local.get $4 - call $~lib/internal/memory/memmove - end + local.get $0 + i32.const 4 + i32.add + local.get $0 + i32.const 2 + i32.add + local.get $7 + i32.const 2 + i32.sub + call $~lib/memory/memory.copy local.get $0 i32.const 46 i32.store16 offset=2 @@ -6270,13 +6017,13 @@ i32.const 101 i32.store16 offset=2 local.get $1 - block $~lib/internal/number/genExponent|inlined.1 (result i32) + block $~lib/util/number/genExponent|inlined.1 (result i32) local.get $0 local.get $7 i32.add i32.const 4 i32.add - local.set $4 + local.set $6 local.get $3 i32.const 1 i32.sub @@ -6284,8 +6031,8 @@ local.get $5 i32.const 0 i32.lt_s - local.set $6 - local.get $6 + local.set $4 + local.get $4 if i32.const 0 local.get $5 @@ -6293,12 +6040,12 @@ local.set $5 end local.get $5 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 i32.const 1 i32.add local.set $10 - block $~lib/internal/number/utoa32_core|inlined.5 - local.get $4 + block $~lib/util/number/utoa32_core|inlined.5 + local.get $6 local.set $9 local.get $5 local.set $8 @@ -6307,12 +6054,12 @@ local.get $9 local.get $8 local.get $11 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut end - local.get $4 + local.get $6 i32.const 45 i32.const 43 - local.get $6 + local.get $4 select i32.store16 local.get $10 @@ -6333,7 +6080,7 @@ unreachable unreachable ) - (func $~lib/internal/number/dtoa_core (; 60 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 61 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -6349,21 +6096,18 @@ (local $14 i32) (local $15 i32) (local $16 f64) - (local $17 i32) - (local $18 i32) - (local $19 i32) - (local $20 i32) + (local $17 i64) + (local $18 i64) + (local $19 i64) + (local $20 i64) (local $21 i64) (local $22 i64) (local $23 i64) (local $24 i64) (local $25 i64) - (local $26 i64) + (local $26 i32) (local $27 i64) - (local $28 i64) - (local $29 i64) - (local $30 i64) - (local $31 i32) + (local $28 i32) local.get $1 f64.const 0 f64.lt @@ -6377,7 +6121,7 @@ i32.const 45 i32.store16 end - block $~lib/internal/number/grisu2|inlined.0 (result i32) + block $~lib/util/number/grisu2|inlined.0 (result i32) local.get $1 local.set $3 local.get $0 @@ -6418,7 +6162,7 @@ i32.add i32.sub local.set $7 - block $~lib/internal/number/normalizedBoundaries|inlined.0 + block $~lib/util/number/normalizedBoundaries|inlined.0 local.get $9 local.set $10 local.get $7 @@ -6453,7 +6197,7 @@ i32.add local.set $15 local.get $12 - global.set $~lib/internal/number/_frc_plus + global.set $~lib/util/number/_frc_plus local.get $10 local.get $15 i64.extend_i32_s @@ -6467,12 +6211,12 @@ i32.sub i64.extend_i32_s i64.shl - global.set $~lib/internal/number/_frc_minus + global.set $~lib/util/number/_frc_minus local.get $13 - global.set $~lib/internal/number/_exp + global.set $~lib/util/number/_exp end - block $~lib/internal/number/getCachedPower|inlined.0 - global.get $~lib/internal/number/_exp + block $~lib/util/number/getCachedPower|inlined.0 + global.get $~lib/util/number/_exp local.set $15 i32.const -61 local.get $15 @@ -6504,309 +6248,285 @@ i32.const 3 i32.shl i32.sub - global.set $~lib/internal/number/_K - i32.const 4240 - i32.load - local.set $11 - i32.const 4504 - i32.load - local.set $17 - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i64) - local.get $11 - local.set $18 - local.get $13 - local.set $19 - i32.const 0 - local.set $20 - local.get $18 - local.get $19 - i32.const 3 - i32.shl - i32.add - local.get $20 - i32.add - i64.load offset=8 - end - global.set $~lib/internal/number/_frc_pow - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i32) - local.get $17 - local.set $20 - local.get $13 - local.set $19 - i32.const 0 - local.set $18 - local.get $20 - local.get $19 - i32.const 1 - i32.shl - i32.add - local.get $18 - i32.add - i32.load16_s offset=8 - end - global.set $~lib/internal/number/_exp_pow + global.set $~lib/util/number/_K + i32.const 3824 + i32.load offset=4 + local.get $13 + i32.const 3 + i32.shl + i32.add + i64.load + global.set $~lib/util/number/_frc_pow + i32.const 4032 + i32.load offset=4 + local.get $13 + i32.const 1 + i32.shl + i32.add + i32.load16_s + global.set $~lib/util/number/_exp_pow end local.get $9 i64.clz i32.wrap_i64 - local.set $17 + local.set $13 local.get $9 - local.get $17 + local.get $13 i64.extend_i32_s i64.shl local.set $9 local.get $7 - local.get $17 + local.get $13 i32.sub local.set $7 - global.get $~lib/internal/number/_frc_pow + global.get $~lib/util/number/_frc_pow local.set $12 - global.get $~lib/internal/number/_exp_pow - local.set $11 - block $~lib/internal/number/umul64f|inlined.0 (result i64) + global.get $~lib/util/number/_exp_pow + local.set $14 + block $~lib/util/number/umul64f|inlined.0 (result i64) local.get $9 local.set $10 local.get $12 + local.set $17 + local.get $10 + i64.const 4294967295 + i64.and + local.set $18 + local.get $17 + i64.const 4294967295 + i64.and + local.set $19 + local.get $10 + i64.const 32 + i64.shr_u + local.set $20 + local.get $17 + i64.const 32 + i64.shr_u local.set $21 - local.get $10 - i64.const 4294967295 - i64.and + local.get $18 + local.get $19 + i64.mul local.set $22 + local.get $20 + local.get $19 + i64.mul + local.get $22 + i64.const 32 + i64.shr_u + i64.add + local.set $23 + local.get $18 local.get $21 + i64.mul + local.get $23 i64.const 4294967295 i64.and + i64.add + local.set $24 + local.get $24 + i64.const 2147483647 + i64.add + local.set $24 + local.get $23 + i64.const 32 + i64.shr_u local.set $23 - local.get $10 + local.get $24 i64.const 32 i64.shr_u local.set $24 + local.get $20 local.get $21 - i64.const 32 - i64.shr_u - local.set $25 - local.get $22 + i64.mul local.get $23 - i64.mul - local.set $26 + i64.add local.get $24 - local.get $23 - i64.mul - local.get $26 - i64.const 32 - i64.shr_u - i64.add - local.set $27 - local.get $22 - local.get $25 - i64.mul - local.get $27 - i64.const 4294967295 - i64.and - i64.add - local.set $28 - local.get $28 - i64.const 2147483647 - i64.add - local.set $28 - local.get $27 - i64.const 32 - i64.shr_u - local.set $27 - local.get $28 - i64.const 32 - i64.shr_u - local.set $28 - local.get $24 - local.get $25 - i64.mul - local.get $27 - i64.add - local.get $28 i64.add end - local.set $28 - block $~lib/internal/number/umul64e|inlined.0 (result i32) + local.set $24 + block $~lib/util/number/umul64e|inlined.0 (result i32) local.get $7 - local.set $13 - local.get $11 - local.set $14 - local.get $13 + local.set $15 local.get $14 + local.set $11 + local.get $15 + local.get $11 i32.add i32.const 64 i32.add end - local.set $14 - block $~lib/internal/number/umul64f|inlined.1 (result i64) - global.get $~lib/internal/number/_frc_plus - local.set $27 - local.get $12 - local.set $26 - local.get $27 - i64.const 4294967295 - i64.and - local.set $25 - local.get $26 - i64.const 4294967295 - i64.and - local.set $24 - local.get $27 - i64.const 32 - i64.shr_u + local.set $11 + block $~lib/util/number/umul64f|inlined.1 (result i64) + global.get $~lib/util/number/_frc_plus local.set $23 - local.get $26 + local.get $12 + local.set $22 + local.get $23 + i64.const 4294967295 + i64.and + local.set $21 + local.get $22 + i64.const 4294967295 + i64.and + local.set $20 + local.get $23 i64.const 32 i64.shr_u - local.set $22 - local.get $25 - local.get $24 - i64.mul - local.set $21 - local.get $23 - local.get $24 - i64.mul + local.set $19 + local.get $22 + i64.const 32 + i64.shr_u + local.set $18 local.get $21 + local.get $20 + i64.mul + local.set $17 + local.get $19 + local.get $20 + i64.mul + local.get $17 i64.const 32 i64.shr_u i64.add local.set $10 - local.get $25 - local.get $22 + local.get $21 + local.get $18 i64.mul local.get $10 i64.const 4294967295 i64.and i64.add - local.set $29 - local.get $29 + local.set $25 + local.get $25 i64.const 2147483647 i64.add - local.set $29 + local.set $25 local.get $10 i64.const 32 i64.shr_u local.set $10 - local.get $29 + local.get $25 i64.const 32 i64.shr_u - local.set $29 - local.get $23 - local.get $22 + local.set $25 + local.get $19 + local.get $18 i64.mul local.get $10 i64.add - local.get $29 + local.get $25 i64.add end i64.const 1 i64.sub - local.set $29 - block $~lib/internal/number/umul64e|inlined.1 (result i32) - global.get $~lib/internal/number/_exp - local.set $13 - local.get $11 + local.set $25 + block $~lib/util/number/umul64e|inlined.1 (result i32) + global.get $~lib/util/number/_exp local.set $15 - local.get $13 + local.get $14 + local.set $26 local.get $15 + local.get $26 i32.add i32.const 64 i32.add end - local.set $15 - block $~lib/internal/number/umul64f|inlined.2 (result i64) - global.get $~lib/internal/number/_frc_minus + local.set $26 + block $~lib/util/number/umul64f|inlined.2 (result i64) + global.get $~lib/util/number/_frc_minus local.set $10 local.get $12 + local.set $17 + local.get $10 + i64.const 4294967295 + i64.and + local.set $18 + local.get $17 + i64.const 4294967295 + i64.and + local.set $19 + local.get $10 + i64.const 32 + i64.shr_u + local.set $20 + local.get $17 + i64.const 32 + i64.shr_u local.set $21 - local.get $10 - i64.const 4294967295 - i64.and + local.get $18 + local.get $19 + i64.mul local.set $22 + local.get $20 + local.get $19 + i64.mul + local.get $22 + i64.const 32 + i64.shr_u + i64.add + local.set $23 + local.get $18 local.get $21 + i64.mul + local.get $23 i64.const 4294967295 i64.and - local.set $23 - local.get $10 - i64.const 32 - i64.shr_u - local.set $24 - local.get $21 - i64.const 32 - i64.shr_u - local.set $25 - local.get $22 - local.get $23 - i64.mul - local.set $26 - local.get $24 - local.get $23 - i64.mul - local.get $26 - i64.const 32 - i64.shr_u i64.add local.set $27 - local.get $22 - local.get $25 - i64.mul local.get $27 - i64.const 4294967295 - i64.and - i64.add - local.set $30 - local.get $30 i64.const 2147483647 i64.add - local.set $30 + local.set $27 + local.get $23 + i64.const 32 + i64.shr_u + local.set $23 local.get $27 i64.const 32 i64.shr_u local.set $27 - local.get $30 - i64.const 32 - i64.shr_u - local.set $30 - local.get $24 - local.get $25 + local.get $20 + local.get $21 i64.mul - local.get $27 + local.get $23 i64.add - local.get $30 + local.get $27 i64.add end i64.const 1 i64.add - local.set $30 - local.get $29 - local.get $30 - i64.sub local.set $27 - local.get $4 - local.get $28 - local.get $14 - local.get $29 - local.get $15 + local.get $25 local.get $27 + i64.sub + local.set $23 + local.get $4 + local.get $24 + local.get $11 + local.get $25 + local.get $26 + local.get $23 local.get $5 - call $~lib/internal/number/genDigits + call $~lib/util/number/genDigits end - local.set $31 + local.set $28 local.get $0 local.get $2 i32.const 1 i32.shl i32.add - local.get $31 + local.get $28 local.get $2 i32.sub - global.get $~lib/internal/number/_K - call $~lib/internal/number/prettify - local.set $31 - local.get $31 + global.get $~lib/util/number/_K + call $~lib/util/number/prettify + local.set $28 + local.get $28 local.get $2 i32.add ) - (func $~lib/string/String#substring (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substring (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6815,7 +6535,6 @@ (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 i32) local.get $0 i32.const 0 i32.ne @@ -6823,13 +6542,13 @@ if i32.const 0 i32.const 96 - i32.const 215 + i32.const 190 i32.const 4 call $~lib/env/abort unreachable end local.get $0 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length local.set $3 local.get $1 local.tee $4 @@ -6901,7 +6620,7 @@ if (result i32) local.get $9 local.get $0 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length i32.const 1 i32.shl i32.eq @@ -6912,47 +6631,45 @@ local.get $0 return end - local.get $3 - call $~lib/runtime/ALLOC + block $~lib/runtime/ALLOCATE|inlined.18 (result i32) + local.get $3 + local.set $4 + local.get $4 + call $~lib/runtime/doAllocate + end local.set $10 - block $~lib/runtime/memory.copy|inlined.16 + local.get $10 + local.get $0 + local.get $8 + i32.add + local.get $3 + call $~lib/memory/memory.copy + block $~lib/runtime/REGISTER|inlined.14 (result i32) local.get $10 local.set $4 - local.get $0 - local.get $8 - i32.add - local.set $5 - local.get $3 - local.set $11 local.get $4 - local.get $5 - local.get $11 - call $~lib/internal/memory/memmove - end - block $~lib/runtime/REGISTER|inlined.13 (result i32) - local.get $10 - local.set $11 - local.get $11 - call $~lib/runtime/unref i32.const 1 - i32.store - local.get $11 + call $~lib/runtime/doRegister end ) - (func $~lib/runtime/FREE (; 62 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/doDiscard (; 63 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - call $~lib/runtime/unref - call $~lib/allocator/arena/memory.free + call $~lib/runtime/assertUnregistered + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + call $~lib/memory/memory.free ) - (func $~lib/internal/number/dtoa (; 63 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 64 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) local.get $0 f64.const 0 f64.eq if - i32.const 3136 + i32.const 3032 return end local.get $0 @@ -6962,40 +6679,47 @@ local.get $0 call $~lib/builtins/isNaN if - i32.const 3152 + i32.const 3048 return end - i32.const 3168 - i32.const 3200 + i32.const 3064 + i32.const 3096 local.get $0 f64.const 0 f64.lt select return end - i32.const 28 - i32.const 1 - i32.shl - call $~lib/runtime/ALLOC - local.set $1 - local.get $1 - local.get $0 - call $~lib/internal/number/dtoa_core + block $~lib/runtime/ALLOCATE|inlined.17 (result i32) + i32.const 28 + i32.const 1 + i32.shl + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $2 - local.get $1 - i32.const 0 local.get $2 - call $~lib/string/String#substring + local.get $0 + call $~lib/util/number/dtoa_core local.set $3 - local.get $1 - call $~lib/runtime/FREE + local.get $2 + i32.const 0 local.get $3 + call $~lib/string/String#substring + local.set $4 + block $~lib/runtime/DISCARD|inlined.0 + local.get $2 + local.set $1 + local.get $1 + call $~lib/runtime/doDiscard + end + local.get $4 ) - (func $start:std/string (; 64 ;) (type $FUNCSIG$v) + (func $start:std/string (; 65 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) - call $start:~lib/allocator/arena global.get $std/string/str i32.const 16 i32.eq @@ -7009,7 +6733,7 @@ unreachable end global.get $std/string/str - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length i32.const 16 i32.eq i32.eqz @@ -7035,6 +6759,16 @@ call $~lib/env/abort unreachable end + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset i32.const 0 call $~lib/string/String.fromCharCode i32.const 176 @@ -7126,14 +6860,10 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/string/str - i32.const 256 - i32.const 0 - call $~lib/string/String#endsWith|trampoline - end + global.get $std/string/str + i32.const 256 + global.get $~lib/string/String.MAX_LENGTH + call $~lib/string/String#endsWith i32.eqz if i32.const 0 @@ -7558,14 +7288,10 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - i32.const 312 - i32.const 312 - i32.const 0 - call $~lib/string/String#lastIndexOf|trampoline - end + i32.const 312 + i32.const 312 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#lastIndexOf i32.const 0 i32.eq i32.eqz @@ -7577,14 +7303,10 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - i32.const 312 - i32.const 224 - i32.const 0 - call $~lib/string/String#lastIndexOf|trampoline - end + i32.const 312 + i32.const 224 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#lastIndexOf i32.const -1 i32.eq i32.eqz @@ -7596,16 +7318,12 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/string/str - i32.const 312 - i32.const 0 - call $~lib/string/String#lastIndexOf|trampoline - end global.get $std/string/str - call $~lib/runtime/StringBase#get:length + i32.const 312 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#lastIndexOf + global.get $std/string/str + call $~lib/string/String#get:length i32.eq i32.eqz if @@ -7616,14 +7334,10 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/string/str - i32.const 528 - i32.const 0 - call $~lib/string/String#lastIndexOf|trampoline - end + global.get $std/string/str + i32.const 528 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#lastIndexOf i32.const 2 i32.eq i32.eqz @@ -7635,14 +7349,10 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/string/str - i32.const 544 - i32.const 0 - call $~lib/string/String#lastIndexOf|trampoline - end + global.get $std/string/str + i32.const 544 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#lastIndexOf i32.const -1 i32.eq i32.eqz @@ -7654,14 +7364,10 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/string/str - i32.const 576 - i32.const 0 - call $~lib/string/String#lastIndexOf|trampoline - end + global.get $std/string/str + i32.const 576 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#lastIndexOf i32.const 15 i32.eq i32.eqz @@ -8330,7 +8036,7 @@ unreachable end i32.const 392 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length i32.const 3 i32.eq i32.eqz @@ -8470,14 +8176,10 @@ end i32.const 1224 global.set $std/string/str - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/string/str - i32.const 0 - i32.const 0 - call $~lib/string/String#slice|trampoline - end + global.get $std/string/str + i32.const 0 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#slice i32.const 1224 call $~lib/string/String.eq i32.eqz @@ -8489,14 +8191,10 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/string/str - i32.const -1 - i32.const 0 - call $~lib/string/String#slice|trampoline - end + global.get $std/string/str + i32.const -1 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#slice i32.const 1264 call $~lib/string/String.eq i32.eqz @@ -8508,14 +8206,10 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/string/str - i32.const -5 - i32.const 0 - call $~lib/string/String#slice|trampoline - end + global.get $std/string/str + i32.const -5 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#slice i32.const 1280 call $~lib/string/String.eq i32.eqz @@ -8587,28 +8281,20 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 0 - global.set $~lib/argc - i32.const 312 - i32.const 0 - i32.const 0 - call $~lib/string/String#split|trampoline - end + i32.const 312 + i32.const 0 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array#get:length|inlined.0 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array#get:length i32.const 1 i32.eq local.tee $2 if (result i32) global.get $std/string/sa - i32.const 0 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load i32.const 312 call $~lib/string/String.eq else @@ -8623,21 +8309,13 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - i32.const 312 - i32.const 312 - i32.const 0 - call $~lib/string/String#split|trampoline - end + i32.const 312 + i32.const 312 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array#get:length|inlined.1 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array#get:length i32.const 0 i32.eq i32.eqz @@ -8649,28 +8327,20 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - i32.const 312 - i32.const 528 - i32.const 0 - call $~lib/string/String#split|trampoline - end + i32.const 312 + i32.const 528 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array#get:length|inlined.2 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array#get:length i32.const 1 i32.eq local.tee $2 if (result i32) global.get $std/string/sa - i32.const 0 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load i32.const 312 call $~lib/string/String.eq else @@ -8685,29 +8355,21 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - i32.const 1496 - i32.const 1520 - i32.const 0 - call $~lib/string/String#split|trampoline - end + i32.const 1480 + i32.const 1504 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array#get:length|inlined.3 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array#get:length i32.const 1 i32.eq local.tee $2 if (result i32) global.get $std/string/sa - i32.const 0 - call $~lib/array/Array#__get - i32.const 1496 + i32.load offset=4 + i32.load + i32.const 1480 call $~lib/string/String.eq else local.get $2 @@ -8721,28 +8383,20 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - i32.const 1496 - i32.const 528 - i32.const 0 - call $~lib/string/String#split|trampoline - end + i32.const 1480 + i32.const 528 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array#get:length|inlined.4 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array#get:length i32.const 3 i32.eq local.tee $2 if (result i32) global.get $std/string/sa - i32.const 0 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load i32.const 336 call $~lib/string/String.eq else @@ -8751,8 +8405,8 @@ local.tee $2 if (result i32) global.get $std/string/sa - i32.const 1 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load offset=4 i32.const 824 call $~lib/string/String.eq else @@ -8761,9 +8415,9 @@ local.tee $2 if (result i32) global.get $std/string/sa - i32.const 2 - call $~lib/array/Array#__get - i32.const 1536 + i32.load offset=4 + i32.load offset=8 + i32.const 1520 call $~lib/string/String.eq else local.get $2 @@ -8777,28 +8431,20 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - i32.const 1552 - i32.const 1576 - i32.const 0 - call $~lib/string/String#split|trampoline - end + i32.const 1536 + i32.const 1560 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array#get:length|inlined.5 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array#get:length i32.const 3 i32.eq local.tee $2 if (result i32) global.get $std/string/sa - i32.const 0 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load i32.const 336 call $~lib/string/String.eq else @@ -8807,8 +8453,8 @@ local.tee $2 if (result i32) global.get $std/string/sa - i32.const 1 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load offset=4 i32.const 824 call $~lib/string/String.eq else @@ -8817,9 +8463,9 @@ local.tee $2 if (result i32) global.get $std/string/sa - i32.const 2 - call $~lib/array/Array#__get - i32.const 1536 + i32.load offset=4 + i32.load offset=8 + i32.const 1520 call $~lib/string/String.eq else local.get $2 @@ -8833,28 +8479,20 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - i32.const 1592 - i32.const 528 - i32.const 0 - call $~lib/string/String#split|trampoline - end + i32.const 1576 + i32.const 528 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array#get:length|inlined.6 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array#get:length i32.const 4 i32.eq local.tee $2 if (result i32) global.get $std/string/sa - i32.const 0 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load i32.const 336 call $~lib/string/String.eq else @@ -8863,8 +8501,8 @@ local.tee $2 if (result i32) global.get $std/string/sa - i32.const 1 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load offset=4 i32.const 824 call $~lib/string/String.eq else @@ -8873,8 +8511,8 @@ local.tee $2 if (result i32) global.get $std/string/sa - i32.const 2 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load offset=8 i32.const 312 call $~lib/string/String.eq else @@ -8883,9 +8521,9 @@ local.tee $2 if (result i32) global.get $std/string/sa - i32.const 3 - call $~lib/array/Array#__get - i32.const 1536 + i32.load offset=4 + i32.load offset=12 + i32.const 1520 call $~lib/string/String.eq else local.get $2 @@ -8899,28 +8537,20 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - i32.const 1616 - i32.const 528 - i32.const 0 - call $~lib/string/String#split|trampoline - end + i32.const 1600 + i32.const 528 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array#get:length|inlined.7 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array#get:length i32.const 4 i32.eq local.tee $2 if (result i32) global.get $std/string/sa - i32.const 0 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load i32.const 312 call $~lib/string/String.eq else @@ -8929,8 +8559,8 @@ local.tee $2 if (result i32) global.get $std/string/sa - i32.const 1 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load offset=4 i32.const 336 call $~lib/string/String.eq else @@ -8939,8 +8569,8 @@ local.tee $2 if (result i32) global.get $std/string/sa - i32.const 2 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load offset=8 i32.const 824 call $~lib/string/String.eq else @@ -8949,9 +8579,9 @@ local.tee $2 if (result i32) global.get $std/string/sa - i32.const 3 - call $~lib/array/Array#__get - i32.const 1536 + i32.load offset=4 + i32.load offset=12 + i32.const 1520 call $~lib/string/String.eq else local.get $2 @@ -8965,28 +8595,20 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - i32.const 1640 - i32.const 528 - i32.const 0 - call $~lib/string/String#split|trampoline - end + i32.const 1624 + i32.const 528 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array#get:length|inlined.8 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array#get:length i32.const 4 i32.eq local.tee $2 if (result i32) global.get $std/string/sa - i32.const 0 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load i32.const 336 call $~lib/string/String.eq else @@ -8995,8 +8617,8 @@ local.tee $2 if (result i32) global.get $std/string/sa - i32.const 1 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load offset=4 i32.const 824 call $~lib/string/String.eq else @@ -9005,9 +8627,9 @@ local.tee $2 if (result i32) global.get $std/string/sa - i32.const 2 - call $~lib/array/Array#__get - i32.const 1536 + i32.load offset=4 + i32.load offset=8 + i32.const 1520 call $~lib/string/String.eq else local.get $2 @@ -9015,8 +8637,8 @@ local.tee $2 if (result i32) global.get $std/string/sa - i32.const 3 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load offset=12 i32.const 312 call $~lib/string/String.eq else @@ -9031,28 +8653,20 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - i32.const 352 - i32.const 312 - i32.const 0 - call $~lib/string/String#split|trampoline - end + i32.const 352 + i32.const 312 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array#get:length|inlined.9 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array#get:length i32.const 3 i32.eq local.tee $2 if (result i32) global.get $std/string/sa - i32.const 0 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load i32.const 336 call $~lib/string/String.eq else @@ -9061,8 +8675,8 @@ local.tee $2 if (result i32) global.get $std/string/sa - i32.const 1 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load offset=4 i32.const 824 call $~lib/string/String.eq else @@ -9071,9 +8685,9 @@ local.tee $2 if (result i32) global.get $std/string/sa - i32.const 2 - call $~lib/array/Array#__get - i32.const 1536 + i32.load offset=4 + i32.load offset=8 + i32.const 1520 call $~lib/string/String.eq else local.get $2 @@ -9092,12 +8706,8 @@ i32.const 0 call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array#get:length|inlined.10 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array#get:length i32.const 0 i32.eq i32.eqz @@ -9114,19 +8724,15 @@ i32.const 1 call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array#get:length|inlined.11 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array#get:length i32.const 1 i32.eq local.tee $2 if (result i32) global.get $std/string/sa - i32.const 0 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load i32.const 336 call $~lib/string/String.eq else @@ -9141,24 +8747,20 @@ call $~lib/env/abort unreachable end - i32.const 1496 + i32.const 1480 i32.const 528 i32.const 1 call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array#get:length|inlined.12 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array#get:length i32.const 1 i32.eq local.tee $2 if (result i32) global.get $std/string/sa - i32.const 0 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load i32.const 336 call $~lib/string/String.eq else @@ -9178,19 +8780,15 @@ i32.const 4 call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array#get:length|inlined.13 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array#get:length i32.const 3 i32.eq local.tee $2 if (result i32) global.get $std/string/sa - i32.const 0 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load i32.const 336 call $~lib/string/String.eq else @@ -9199,8 +8797,8 @@ local.tee $2 if (result i32) global.get $std/string/sa - i32.const 1 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load offset=4 i32.const 824 call $~lib/string/String.eq else @@ -9209,9 +8807,9 @@ local.tee $2 if (result i32) global.get $std/string/sa - i32.const 2 - call $~lib/array/Array#__get - i32.const 1536 + i32.load offset=4 + i32.load offset=8 + i32.const 1520 call $~lib/string/String.eq else local.get $2 @@ -9230,19 +8828,15 @@ i32.const -1 call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array#get:length|inlined.14 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array#get:length i32.const 3 i32.eq local.tee $2 if (result i32) global.get $std/string/sa - i32.const 0 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load i32.const 336 call $~lib/string/String.eq else @@ -9251,8 +8845,8 @@ local.tee $2 if (result i32) global.get $std/string/sa - i32.const 1 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load offset=4 i32.const 824 call $~lib/string/String.eq else @@ -9261,9 +8855,9 @@ local.tee $2 if (result i32) global.get $std/string/sa - i32.const 2 - call $~lib/array/Array#__get - i32.const 1536 + i32.load offset=4 + i32.load offset=8 + i32.const 1520 call $~lib/string/String.eq else local.get $2 @@ -9277,24 +8871,20 @@ call $~lib/env/abort unreachable end - i32.const 1496 + i32.const 1480 i32.const 528 i32.const -1 call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array#get:length|inlined.15 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array#get:length i32.const 3 i32.eq local.tee $2 if (result i32) global.get $std/string/sa - i32.const 0 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load i32.const 336 call $~lib/string/String.eq else @@ -9303,8 +8893,8 @@ local.tee $2 if (result i32) global.get $std/string/sa - i32.const 1 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load offset=4 i32.const 824 call $~lib/string/String.eq else @@ -9313,9 +8903,9 @@ local.tee $2 if (result i32) global.get $std/string/sa - i32.const 2 - call $~lib/array/Array#__get - i32.const 1536 + i32.load offset=4 + i32.load offset=8 + i32.const 1520 call $~lib/string/String.eq else local.get $2 @@ -9330,7 +8920,7 @@ unreachable end i32.const 0 - call $~lib/internal/number/itoa32 + call $~lib/util/number/itoa32 i32.const 608 call $~lib/string/String.eq i32.eqz @@ -9343,7 +8933,7 @@ unreachable end i32.const 1 - call $~lib/internal/number/itoa32 + call $~lib/util/number/itoa32 i32.const 624 call $~lib/string/String.eq i32.eqz @@ -9356,8 +8946,8 @@ unreachable end i32.const 8 - call $~lib/internal/number/itoa32 - i32.const 2184 + call $~lib/util/number/itoa32 + i32.const 2080 call $~lib/string/String.eq i32.eqz if @@ -9369,7 +8959,7 @@ unreachable end i32.const 123 - call $~lib/internal/number/itoa32 + call $~lib/util/number/itoa32 i32.const 392 call $~lib/string/String.eq i32.eqz @@ -9382,8 +8972,8 @@ unreachable end i32.const -1000 - call $~lib/internal/number/itoa32 - i32.const 2200 + call $~lib/util/number/itoa32 + i32.const 2096 call $~lib/string/String.eq i32.eqz if @@ -9395,8 +8985,8 @@ unreachable end i32.const 1234 - call $~lib/internal/number/itoa32 - i32.const 2224 + call $~lib/util/number/itoa32 + i32.const 2120 call $~lib/string/String.eq i32.eqz if @@ -9408,8 +8998,8 @@ unreachable end i32.const 12345 - call $~lib/internal/number/itoa32 - i32.const 2240 + call $~lib/util/number/itoa32 + i32.const 2136 call $~lib/string/String.eq i32.eqz if @@ -9421,8 +9011,8 @@ unreachable end i32.const 123456 - call $~lib/internal/number/itoa32 - i32.const 2264 + call $~lib/util/number/itoa32 + i32.const 2160 call $~lib/string/String.eq i32.eqz if @@ -9434,8 +9024,8 @@ unreachable end i32.const 1111111 - call $~lib/internal/number/itoa32 - i32.const 2288 + call $~lib/util/number/itoa32 + i32.const 2184 call $~lib/string/String.eq i32.eqz if @@ -9447,8 +9037,8 @@ unreachable end i32.const 1234567 - call $~lib/internal/number/itoa32 - i32.const 2312 + call $~lib/util/number/itoa32 + i32.const 2208 call $~lib/string/String.eq i32.eqz if @@ -9460,8 +9050,8 @@ unreachable end i32.const 2147483646 - call $~lib/internal/number/itoa32 - i32.const 2336 + call $~lib/util/number/itoa32 + i32.const 2232 call $~lib/string/String.eq i32.eqz if @@ -9473,8 +9063,8 @@ unreachable end i32.const 2147483647 - call $~lib/internal/number/itoa32 - i32.const 2368 + call $~lib/util/number/itoa32 + i32.const 2264 call $~lib/string/String.eq i32.eqz if @@ -9486,8 +9076,8 @@ unreachable end i32.const -2147483648 - call $~lib/internal/number/itoa32 - i32.const 2400 + call $~lib/util/number/itoa32 + i32.const 2296 call $~lib/string/String.eq i32.eqz if @@ -9499,8 +9089,8 @@ unreachable end i32.const -1 - call $~lib/internal/number/itoa32 - i32.const 2432 + call $~lib/util/number/itoa32 + i32.const 2328 call $~lib/string/String.eq i32.eqz if @@ -9512,7 +9102,7 @@ unreachable end i32.const 0 - call $~lib/internal/number/utoa32 + call $~lib/util/number/utoa32 i32.const 608 call $~lib/string/String.eq i32.eqz @@ -9525,8 +9115,8 @@ unreachable end i32.const 1000 - call $~lib/internal/number/utoa32 - i32.const 2448 + call $~lib/util/number/utoa32 + i32.const 2344 call $~lib/string/String.eq i32.eqz if @@ -9538,8 +9128,8 @@ unreachable end i32.const 2147483647 - call $~lib/internal/number/utoa32 - i32.const 2368 + call $~lib/util/number/utoa32 + i32.const 2264 call $~lib/string/String.eq i32.eqz if @@ -9551,8 +9141,8 @@ unreachable end i32.const -2147483648 - call $~lib/internal/number/utoa32 - i32.const 2464 + call $~lib/util/number/utoa32 + i32.const 2360 call $~lib/string/String.eq i32.eqz if @@ -9564,8 +9154,8 @@ unreachable end global.get $~lib/builtins/u32.MAX_VALUE - call $~lib/internal/number/utoa32 - i32.const 2496 + call $~lib/util/number/utoa32 + i32.const 2392 call $~lib/string/String.eq i32.eqz if @@ -9577,7 +9167,7 @@ unreachable end i64.const 0 - call $~lib/internal/number/utoa64 + call $~lib/util/number/utoa64 i32.const 608 call $~lib/string/String.eq i32.eqz @@ -9590,8 +9180,8 @@ unreachable end i64.const 1234 - call $~lib/internal/number/utoa64 - i32.const 2224 + call $~lib/util/number/utoa64 + i32.const 2120 call $~lib/string/String.eq i32.eqz if @@ -9603,8 +9193,8 @@ unreachable end i64.const 99999999 - call $~lib/internal/number/utoa64 - i32.const 2528 + call $~lib/util/number/utoa64 + i32.const 2424 call $~lib/string/String.eq i32.eqz if @@ -9616,8 +9206,8 @@ unreachable end i64.const 100000000 - call $~lib/internal/number/utoa64 - i32.const 2552 + call $~lib/util/number/utoa64 + i32.const 2448 call $~lib/string/String.eq i32.eqz if @@ -9629,8 +9219,8 @@ unreachable end i64.const 4294967295 - call $~lib/internal/number/utoa64 - i32.const 2496 + call $~lib/util/number/utoa64 + i32.const 2392 call $~lib/string/String.eq i32.eqz if @@ -9642,8 +9232,8 @@ unreachable end i64.const 68719476735 - call $~lib/internal/number/utoa64 - i32.const 2584 + call $~lib/util/number/utoa64 + i32.const 2480 call $~lib/string/String.eq i32.eqz if @@ -9655,8 +9245,8 @@ unreachable end i64.const 868719476735 - call $~lib/internal/number/utoa64 - i32.const 2616 + call $~lib/util/number/utoa64 + i32.const 2512 call $~lib/string/String.eq i32.eqz if @@ -9668,8 +9258,8 @@ unreachable end i64.const 999868719476735 - call $~lib/internal/number/utoa64 - i32.const 2648 + call $~lib/util/number/utoa64 + i32.const 2544 call $~lib/string/String.eq i32.eqz if @@ -9681,8 +9271,8 @@ unreachable end i64.const 9999868719476735 - call $~lib/internal/number/utoa64 - i32.const 2688 + call $~lib/util/number/utoa64 + i32.const 2584 call $~lib/string/String.eq i32.eqz if @@ -9694,8 +9284,8 @@ unreachable end i64.const 19999868719476735 - call $~lib/internal/number/utoa64 - i32.const 2728 + call $~lib/util/number/utoa64 + i32.const 2624 call $~lib/string/String.eq i32.eqz if @@ -9707,8 +9297,8 @@ unreachable end global.get $~lib/builtins/u64.MAX_VALUE - call $~lib/internal/number/utoa64 - i32.const 2776 + call $~lib/util/number/utoa64 + i32.const 2672 call $~lib/string/String.eq i32.eqz if @@ -9720,7 +9310,7 @@ unreachable end i64.const 0 - call $~lib/internal/number/itoa64 + call $~lib/util/number/itoa64 i32.const 608 call $~lib/string/String.eq i32.eqz @@ -9733,8 +9323,8 @@ unreachable end i64.const -1234 - call $~lib/internal/number/itoa64 - i32.const 2824 + call $~lib/util/number/itoa64 + i32.const 2720 call $~lib/string/String.eq i32.eqz if @@ -9746,8 +9336,8 @@ unreachable end i64.const 4294967295 - call $~lib/internal/number/itoa64 - i32.const 2496 + call $~lib/util/number/itoa64 + i32.const 2392 call $~lib/string/String.eq i32.eqz if @@ -9759,8 +9349,8 @@ unreachable end i64.const -4294967295 - call $~lib/internal/number/itoa64 - i32.const 2848 + call $~lib/util/number/itoa64 + i32.const 2744 call $~lib/string/String.eq i32.eqz if @@ -9772,8 +9362,8 @@ unreachable end i64.const 68719476735 - call $~lib/internal/number/itoa64 - i32.const 2584 + call $~lib/util/number/itoa64 + i32.const 2480 call $~lib/string/String.eq i32.eqz if @@ -9785,8 +9375,8 @@ unreachable end i64.const -68719476735 - call $~lib/internal/number/itoa64 - i32.const 2880 + call $~lib/util/number/itoa64 + i32.const 2776 call $~lib/string/String.eq i32.eqz if @@ -9798,8 +9388,8 @@ unreachable end i64.const -868719476735 - call $~lib/internal/number/itoa64 - i32.const 2912 + call $~lib/util/number/itoa64 + i32.const 2808 call $~lib/string/String.eq i32.eqz if @@ -9811,8 +9401,8 @@ unreachable end i64.const -999868719476735 - call $~lib/internal/number/itoa64 - i32.const 2952 + call $~lib/util/number/itoa64 + i32.const 2848 call $~lib/string/String.eq i32.eqz if @@ -9824,8 +9414,8 @@ unreachable end i64.const -19999868719476735 - call $~lib/internal/number/itoa64 - i32.const 2992 + call $~lib/util/number/itoa64 + i32.const 2888 call $~lib/string/String.eq i32.eqz if @@ -9837,8 +9427,8 @@ unreachable end global.get $~lib/builtins/i64.MAX_VALUE - call $~lib/internal/number/itoa64 - i32.const 3040 + call $~lib/util/number/itoa64 + i32.const 2936 call $~lib/string/String.eq i32.eqz if @@ -9850,8 +9440,8 @@ unreachable end global.get $~lib/builtins/i64.MIN_VALUE - call $~lib/internal/number/itoa64 - i32.const 3088 + call $~lib/util/number/itoa64 + i32.const 2984 call $~lib/string/String.eq i32.eqz if @@ -9863,8 +9453,8 @@ unreachable end f64.const 0 - call $~lib/internal/number/dtoa - i32.const 3136 + call $~lib/util/number/dtoa + i32.const 3032 call $~lib/string/String.eq i32.eqz if @@ -9876,8 +9466,8 @@ unreachable end f64.const -0 - call $~lib/internal/number/dtoa - i32.const 3136 + call $~lib/util/number/dtoa + i32.const 3032 call $~lib/string/String.eq i32.eqz if @@ -9889,8 +9479,8 @@ unreachable end f64.const nan:0x8000000000000 - call $~lib/internal/number/dtoa - i32.const 3152 + call $~lib/util/number/dtoa + i32.const 3048 call $~lib/string/String.eq i32.eqz if @@ -9902,8 +9492,8 @@ unreachable end f64.const inf - call $~lib/internal/number/dtoa - i32.const 3200 + call $~lib/util/number/dtoa + i32.const 3096 call $~lib/string/String.eq i32.eqz if @@ -9916,8 +9506,8 @@ end f64.const inf f64.neg - call $~lib/internal/number/dtoa - i32.const 3168 + call $~lib/util/number/dtoa + i32.const 3064 call $~lib/string/String.eq i32.eqz if @@ -9929,8 +9519,8 @@ unreachable end global.get $~lib/builtins/f64.EPSILON - call $~lib/internal/number/dtoa - i32.const 4592 + call $~lib/util/number/dtoa + i32.const 4128 call $~lib/string/String.eq i32.eqz if @@ -9943,8 +9533,8 @@ end global.get $~lib/builtins/f64.EPSILON f64.neg - call $~lib/internal/number/dtoa - i32.const 4648 + call $~lib/util/number/dtoa + i32.const 4184 call $~lib/string/String.eq i32.eqz if @@ -9956,8 +9546,8 @@ unreachable end global.get $~lib/builtins/f64.MAX_VALUE - call $~lib/internal/number/dtoa - i32.const 4704 + call $~lib/util/number/dtoa + i32.const 4240 call $~lib/string/String.eq i32.eqz if @@ -9970,8 +9560,8 @@ end global.get $~lib/builtins/f64.MAX_VALUE f64.neg - call $~lib/internal/number/dtoa - i32.const 4760 + call $~lib/util/number/dtoa + i32.const 4296 call $~lib/string/String.eq i32.eqz if @@ -9983,8 +9573,8 @@ unreachable end f64.const 4185580496821356722454785e274 - call $~lib/internal/number/dtoa - i32.const 4816 + call $~lib/util/number/dtoa + i32.const 4352 call $~lib/string/String.eq i32.eqz if @@ -9996,8 +9586,8 @@ unreachable end f64.const 2.2250738585072014e-308 - call $~lib/internal/number/dtoa - i32.const 4872 + call $~lib/util/number/dtoa + i32.const 4408 call $~lib/string/String.eq i32.eqz if @@ -10009,8 +9599,8 @@ unreachable end f64.const 4.940656e-318 - call $~lib/internal/number/dtoa - i32.const 4928 + call $~lib/util/number/dtoa + i32.const 4464 call $~lib/string/String.eq i32.eqz if @@ -10022,8 +9612,8 @@ unreachable end f64.const 9060801153433600 - call $~lib/internal/number/dtoa - i32.const 4968 + call $~lib/util/number/dtoa + i32.const 4504 call $~lib/string/String.eq i32.eqz if @@ -10035,8 +9625,8 @@ unreachable end f64.const 4708356024711512064 - call $~lib/internal/number/dtoa - i32.const 5016 + call $~lib/util/number/dtoa + i32.const 4552 call $~lib/string/String.eq i32.eqz if @@ -10048,8 +9638,8 @@ unreachable end f64.const 9409340012568248320 - call $~lib/internal/number/dtoa - i32.const 5072 + call $~lib/util/number/dtoa + i32.const 4608 call $~lib/string/String.eq i32.eqz if @@ -10061,8 +9651,8 @@ unreachable end f64.const 5e-324 - call $~lib/internal/number/dtoa - i32.const 5128 + call $~lib/util/number/dtoa + i32.const 4664 call $~lib/string/String.eq i32.eqz if @@ -10074,8 +9664,8 @@ unreachable end f64.const 1 - call $~lib/internal/number/dtoa - i32.const 5152 + call $~lib/util/number/dtoa + i32.const 4688 call $~lib/string/String.eq i32.eqz if @@ -10087,7 +9677,7 @@ unreachable end f64.const 0.1 - call $~lib/internal/number/dtoa + call $~lib/util/number/dtoa i32.const 768 call $~lib/string/String.eq i32.eqz @@ -10100,8 +9690,8 @@ unreachable end f64.const -1 - call $~lib/internal/number/dtoa - i32.const 5168 + call $~lib/util/number/dtoa + i32.const 4704 call $~lib/string/String.eq i32.eqz if @@ -10113,8 +9703,8 @@ unreachable end f64.const -0.1 - call $~lib/internal/number/dtoa - i32.const 5184 + call $~lib/util/number/dtoa + i32.const 4720 call $~lib/string/String.eq i32.eqz if @@ -10126,8 +9716,8 @@ unreachable end f64.const 1e6 - call $~lib/internal/number/dtoa - i32.const 5200 + call $~lib/util/number/dtoa + i32.const 4736 call $~lib/string/String.eq i32.eqz if @@ -10139,8 +9729,8 @@ unreachable end f64.const 1e-06 - call $~lib/internal/number/dtoa - i32.const 5232 + call $~lib/util/number/dtoa + i32.const 4768 call $~lib/string/String.eq i32.eqz if @@ -10152,8 +9742,8 @@ unreachable end f64.const -1e6 - call $~lib/internal/number/dtoa - i32.const 5256 + call $~lib/util/number/dtoa + i32.const 4792 call $~lib/string/String.eq i32.eqz if @@ -10165,8 +9755,8 @@ unreachable end f64.const -1e-06 - call $~lib/internal/number/dtoa - i32.const 5288 + call $~lib/util/number/dtoa + i32.const 4824 call $~lib/string/String.eq i32.eqz if @@ -10178,8 +9768,8 @@ unreachable end f64.const 1e7 - call $~lib/internal/number/dtoa - i32.const 5320 + call $~lib/util/number/dtoa + i32.const 4856 call $~lib/string/String.eq i32.eqz if @@ -10191,8 +9781,8 @@ unreachable end f64.const 1e-07 - call $~lib/internal/number/dtoa - i32.const 5352 + call $~lib/util/number/dtoa + i32.const 4888 call $~lib/string/String.eq i32.eqz if @@ -10204,8 +9794,8 @@ unreachable end f64.const 1.e+308 - call $~lib/internal/number/dtoa - i32.const 5368 + call $~lib/util/number/dtoa + i32.const 4904 call $~lib/string/String.eq i32.eqz if @@ -10217,8 +9807,8 @@ unreachable end f64.const -1.e+308 - call $~lib/internal/number/dtoa - i32.const 5392 + call $~lib/util/number/dtoa + i32.const 4928 call $~lib/string/String.eq i32.eqz if @@ -10230,8 +9820,8 @@ unreachable end f64.const inf - call $~lib/internal/number/dtoa - i32.const 3200 + call $~lib/util/number/dtoa + i32.const 3096 call $~lib/string/String.eq i32.eqz if @@ -10243,8 +9833,8 @@ unreachable end f64.const -inf - call $~lib/internal/number/dtoa - i32.const 3168 + call $~lib/util/number/dtoa + i32.const 3064 call $~lib/string/String.eq i32.eqz if @@ -10256,8 +9846,8 @@ unreachable end f64.const 1e-308 - call $~lib/internal/number/dtoa - i32.const 5416 + call $~lib/util/number/dtoa + i32.const 4952 call $~lib/string/String.eq i32.eqz if @@ -10269,8 +9859,8 @@ unreachable end f64.const -1e-308 - call $~lib/internal/number/dtoa - i32.const 5440 + call $~lib/util/number/dtoa + i32.const 4976 call $~lib/string/String.eq i32.eqz if @@ -10282,8 +9872,8 @@ unreachable end f64.const 1e-323 - call $~lib/internal/number/dtoa - i32.const 5464 + call $~lib/util/number/dtoa + i32.const 5000 call $~lib/string/String.eq i32.eqz if @@ -10295,8 +9885,8 @@ unreachable end f64.const -1e-323 - call $~lib/internal/number/dtoa - i32.const 5488 + call $~lib/util/number/dtoa + i32.const 5024 call $~lib/string/String.eq i32.eqz if @@ -10308,8 +9898,8 @@ unreachable end f64.const 0 - call $~lib/internal/number/dtoa - i32.const 3136 + call $~lib/util/number/dtoa + i32.const 3032 call $~lib/string/String.eq i32.eqz if @@ -10321,8 +9911,8 @@ unreachable end f64.const 4294967272 - call $~lib/internal/number/dtoa - i32.const 5512 + call $~lib/util/number/dtoa + i32.const 5048 call $~lib/string/String.eq i32.eqz if @@ -10334,8 +9924,8 @@ unreachable end f64.const 1.2312145673456234e-08 - call $~lib/internal/number/dtoa - i32.const 5544 + call $~lib/util/number/dtoa + i32.const 5080 call $~lib/string/String.eq i32.eqz if @@ -10347,8 +9937,8 @@ unreachable end f64.const 555555555.5555556 - call $~lib/internal/number/dtoa - i32.const 5600 + call $~lib/util/number/dtoa + i32.const 5136 call $~lib/string/String.eq i32.eqz if @@ -10360,8 +9950,8 @@ unreachable end f64.const 0.9999999999999999 - call $~lib/internal/number/dtoa - i32.const 5648 + call $~lib/util/number/dtoa + i32.const 5184 call $~lib/string/String.eq i32.eqz if @@ -10373,8 +9963,8 @@ unreachable end f64.const 1 - call $~lib/internal/number/dtoa - i32.const 5152 + call $~lib/util/number/dtoa + i32.const 4688 call $~lib/string/String.eq i32.eqz if @@ -10386,8 +9976,8 @@ unreachable end f64.const 12.34 - call $~lib/internal/number/dtoa - i32.const 5696 + call $~lib/util/number/dtoa + i32.const 5232 call $~lib/string/String.eq i32.eqz if @@ -10401,8 +9991,8 @@ f64.const 1 f64.const 3 f64.div - call $~lib/internal/number/dtoa - i32.const 5720 + call $~lib/util/number/dtoa + i32.const 5256 call $~lib/string/String.eq i32.eqz if @@ -10414,8 +10004,8 @@ unreachable end f64.const 1234e17 - call $~lib/internal/number/dtoa - i32.const 5768 + call $~lib/util/number/dtoa + i32.const 5304 call $~lib/string/String.eq i32.eqz if @@ -10427,8 +10017,8 @@ unreachable end f64.const 1234e18 - call $~lib/internal/number/dtoa - i32.const 5824 + call $~lib/util/number/dtoa + i32.const 5360 call $~lib/string/String.eq i32.eqz if @@ -10440,8 +10030,8 @@ unreachable end f64.const 2.71828 - call $~lib/internal/number/dtoa - i32.const 5856 + call $~lib/util/number/dtoa + i32.const 5392 call $~lib/string/String.eq i32.eqz if @@ -10453,8 +10043,8 @@ unreachable end f64.const 0.0271828 - call $~lib/internal/number/dtoa - i32.const 5880 + call $~lib/util/number/dtoa + i32.const 5416 call $~lib/string/String.eq i32.eqz if @@ -10466,8 +10056,8 @@ unreachable end f64.const 271.828 - call $~lib/internal/number/dtoa - i32.const 5912 + call $~lib/util/number/dtoa + i32.const 5448 call $~lib/string/String.eq i32.eqz if @@ -10479,8 +10069,8 @@ unreachable end f64.const 1.1e+128 - call $~lib/internal/number/dtoa - i32.const 5936 + call $~lib/util/number/dtoa + i32.const 5472 call $~lib/string/String.eq i32.eqz if @@ -10492,8 +10082,8 @@ unreachable end f64.const 1.1e-64 - call $~lib/internal/number/dtoa - i32.const 5960 + call $~lib/util/number/dtoa + i32.const 5496 call $~lib/string/String.eq i32.eqz if @@ -10505,8 +10095,8 @@ unreachable end f64.const 0.000035689 - call $~lib/internal/number/dtoa - i32.const 5984 + call $~lib/util/number/dtoa + i32.const 5520 call $~lib/string/String.eq i32.eqz if @@ -10518,12 +10108,12 @@ unreachable end ) - (func $std/string/getString (; 65 ;) (type $FUNCSIG$i) (result i32) + (func $std/string/getString (; 66 ;) (type $FUNCSIG$i) (result i32) global.get $std/string/str ) - (func $start (; 66 ;) (type $FUNCSIG$v) + (func $start (; 67 ;) (type $FUNCSIG$v) call $start:std/string ) - (func $null (; 67 ;) (type $FUNCSIG$v) + (func $null (; 68 ;) (type $FUNCSIG$v) ) )