mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-04-25 15:12:12 +00:00
Initial static arrays of basic element types; Fixed member names in generic contexts
This commit is contained in:
parent
2c0ddf4f80
commit
be66abbd78
2
dist/asc.js
vendored
2
dist/asc.js
vendored
File diff suppressed because one or more lines are too long
2
dist/asc.js.map
vendored
2
dist/asc.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/assemblyscript.js
vendored
2
dist/assemblyscript.js
vendored
File diff suppressed because one or more lines are too long
2
dist/assemblyscript.js.map
vendored
2
dist/assemblyscript.js.map
vendored
File diff suppressed because one or more lines are too long
116
src/compiler.ts
116
src/compiler.ts
@ -119,6 +119,13 @@ import {
|
||||
typesToNativeTypes
|
||||
} from "./types";
|
||||
|
||||
import {
|
||||
writeI32,
|
||||
writeI64,
|
||||
writeF32,
|
||||
writeF64
|
||||
} from "./util";
|
||||
|
||||
/** Compilation target. */
|
||||
export enum Target {
|
||||
/** WebAssembly with 32-bit pointers. */
|
||||
@ -4564,11 +4571,10 @@ export class Compiler extends DiagnosticEmitter {
|
||||
let classType = contextualType.classType;
|
||||
if (
|
||||
classType &&
|
||||
classType == this.program.elementsLookup.get("Array") &&
|
||||
classType.typeArguments && classType.typeArguments.length == 1
|
||||
classType.prototype == this.program.elementsLookup.get("Array")
|
||||
) {
|
||||
return this.compileStaticArray(
|
||||
classType.typeArguments[0],
|
||||
assert(classType.typeArguments)[0],
|
||||
(<ArrayLiteralExpression>expression).elementExpressions,
|
||||
expression
|
||||
);
|
||||
@ -4725,29 +4731,38 @@ export class Compiler extends DiagnosticEmitter {
|
||||
}
|
||||
|
||||
compileStaticArray(elementType: Type, expressions: (Expression | null)[], reportNode: Node): ExpressionRef {
|
||||
// compile as static if all element expressions are precomputable, otherwise
|
||||
// initialize in place.
|
||||
var isStatic = true;
|
||||
var size = expressions.length;
|
||||
|
||||
var module = this.module;
|
||||
|
||||
// obtain the array type
|
||||
var arrayPrototype = assert(this.program.elementsLookup.get("Array"));
|
||||
if (!arrayPrototype || arrayPrototype.kind != ElementKind.CLASS_PROTOTYPE) return module.createUnreachable();
|
||||
var arrayType = (<ClassPrototype>arrayPrototype).resolve([ elementType ]);
|
||||
if (!arrayType) return module.createUnreachable();
|
||||
|
||||
var elementSize = expressions.length;
|
||||
var nativeType = elementType.toNativeType();
|
||||
var values: usize;
|
||||
var memorySize: usize;
|
||||
switch (nativeType) {
|
||||
case NativeType.I32: {
|
||||
values = changetype<usize>(new Int32Array(size));
|
||||
values = changetype<usize>(new Int32Array(elementSize));
|
||||
memorySize = elementSize * 4;
|
||||
break;
|
||||
}
|
||||
case NativeType.I64: {
|
||||
values = changetype<usize>(new Array<I64>(size));
|
||||
values = changetype<usize>(new Array<I64>(elementSize));
|
||||
memorySize = elementSize * 8;
|
||||
break;
|
||||
}
|
||||
case NativeType.F32: {
|
||||
values = changetype<usize>(new Float32Array(size));
|
||||
values = changetype<usize>(new Float32Array(elementSize));
|
||||
memorySize = elementSize * 4;
|
||||
break;
|
||||
}
|
||||
case NativeType.F64: {
|
||||
values = changetype<usize>(new Float64Array(size));
|
||||
values = changetype<usize>(new Float64Array(elementSize));
|
||||
memorySize = elementSize * 8;
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
@ -4760,9 +4775,10 @@ export class Compiler extends DiagnosticEmitter {
|
||||
}
|
||||
}
|
||||
|
||||
var exprs = new Array<ExpressionRef>(size);
|
||||
// precompute value expressions
|
||||
var exprs = new Array<ExpressionRef>(elementSize);
|
||||
var expr: BinaryenExpressionRef;
|
||||
for (let i = 0; i < size; ++i) {
|
||||
for (let i = 0; i < elementSize; ++i) {
|
||||
exprs[i] = expressions[i]
|
||||
? this.compileExpression(<Expression>expressions[i], elementType)
|
||||
: elementType.toNativeZero(module);
|
||||
@ -4801,14 +4817,78 @@ export class Compiler extends DiagnosticEmitter {
|
||||
}
|
||||
}
|
||||
|
||||
var usizeTypeSize = this.options.usizeType.byteSize;
|
||||
var headerSize = usizeTypeSize + 4 + 4; // memory + capacity + length
|
||||
|
||||
if (isStatic) {
|
||||
// TODO: convert to Uint8Array and create the segment
|
||||
let buffer = new Uint8Array(headerSize + memorySize);
|
||||
let segment = this.addMemorySegment(buffer);
|
||||
|
||||
// make header
|
||||
let offset = 0;
|
||||
if (usizeTypeSize == 8) {
|
||||
writeI64(i64_add(segment.offset, i64_new(headerSize)), buffer, 0); // memory
|
||||
} else {
|
||||
assert(i64_high(segment.offset) == 0);
|
||||
writeI32(i64_low(segment.offset) + headerSize, buffer, 0); // memory
|
||||
}
|
||||
offset += usizeTypeSize;
|
||||
writeI32(elementSize, buffer, offset); // capacity
|
||||
offset += 4;
|
||||
writeI32(elementSize, buffer, offset); // length
|
||||
offset += 4;
|
||||
assert(offset == headerSize);
|
||||
|
||||
// make memory
|
||||
switch (nativeType) {
|
||||
case NativeType.I32: {
|
||||
for (let i = 0; i < elementSize; ++i) {
|
||||
writeI32(changetype<i32[]>(values)[i], buffer, offset); offset += 4;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case NativeType.I64: {
|
||||
for (let i = 0; i < elementSize; ++i) {
|
||||
writeI64(changetype<I64[]>(values)[i], buffer, offset); offset += 8;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case NativeType.F32: {
|
||||
for (let i = 0; i < elementSize; ++i) {
|
||||
writeF32(changetype<f32[]>(values)[i], buffer, offset); offset += 4;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case NativeType.F64: {
|
||||
for (let i = 0; i < elementSize; ++i) {
|
||||
writeF64(changetype<f64[]>(values)[i], buffer, offset); offset += 8;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
assert(false);
|
||||
this.error(
|
||||
DiagnosticCode.Operation_not_supported,
|
||||
reportNode.range
|
||||
);
|
||||
return module.createUnreachable();
|
||||
}
|
||||
}
|
||||
assert(offset == headerSize + memorySize);
|
||||
this.currentType = arrayType.type;
|
||||
return usizeTypeSize == 8
|
||||
? module.createI64(
|
||||
i64_low(segment.offset),
|
||||
i64_high(segment.offset)
|
||||
)
|
||||
: module.createI32(
|
||||
i64_low(segment.offset)
|
||||
);
|
||||
} else {
|
||||
// TODO: initialize in place
|
||||
// TODO: static elements *could* go into data segments while dynamic ones are initialized
|
||||
// on top? any benefits?
|
||||
throw new Error("not implemented");
|
||||
}
|
||||
// TODO: alternatively, static elements could go into data segments while
|
||||
// dynamic ones are initialized on top? any benefits? (doesn't seem so)
|
||||
throw new Error("not implemented");
|
||||
}
|
||||
|
||||
compileNewExpression(expression: NewExpression, contextualType: Type): ExpressionRef {
|
||||
|
6
src/glue/js/float.d.ts
vendored
Normal file
6
src/glue/js/float.d.ts
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
/** @module glue/js *//***/
|
||||
|
||||
declare function f32_as_i32(value: f32): i32;
|
||||
declare function i32_as_f32(value: i32): f32;
|
||||
declare function f64_as_i64(value: f64): I64;
|
||||
declare function i64_as_f64(value: I64): f64;
|
24
src/glue/js/float.js
Normal file
24
src/glue/js/float.js
Normal file
@ -0,0 +1,24 @@
|
||||
const F64 = new Float64Array(1);
|
||||
const F32 = new Float32Array(F64.buffer);
|
||||
const I32 = new Int32Array(F64.buffer);
|
||||
|
||||
global.f32_as_i32 = function(value) {
|
||||
F32[0] = value;
|
||||
return I32[0];
|
||||
};
|
||||
|
||||
global.i32_as_f32 = function(value) {
|
||||
I32[0] = value;
|
||||
return F32[0];
|
||||
};
|
||||
|
||||
global.f64_as_i64 = function(value) {
|
||||
F64[0] = value;
|
||||
return i64_new(I32[0], I32[1]);
|
||||
};
|
||||
|
||||
global.i64_as_f64 = function(value) {
|
||||
I32[0] = i64_low(value);
|
||||
I32[1] = i64_high(value);
|
||||
return F64[0];
|
||||
};
|
@ -7,3 +7,4 @@
|
||||
import "../../../std/portable";
|
||||
import "./binaryen";
|
||||
import "./i64";
|
||||
import "./float";
|
||||
|
19
src/glue/wasm/float.ts
Normal file
19
src/glue/wasm/float.ts
Normal file
@ -0,0 +1,19 @@
|
||||
@global
|
||||
function f32_as_i32(value: f32): i32 {
|
||||
return reinterpret<i32>(value);
|
||||
}
|
||||
|
||||
@global
|
||||
function i32_as_f32(value: i32): f32 {
|
||||
return reinterpret<f32>(value);
|
||||
}
|
||||
|
||||
@global
|
||||
function f64_as_i64(value: f64): i64 {
|
||||
return reinterpret<i64>(value);
|
||||
}
|
||||
|
||||
@global
|
||||
function i64_as_f64(value: i64): f64 {
|
||||
return reinterpret<f64>(value);
|
||||
}
|
@ -5,3 +5,4 @@
|
||||
*//***/
|
||||
|
||||
import "./i64";
|
||||
import "./float";
|
||||
|
@ -517,7 +517,11 @@ export class Program extends DiagnosticEmitter {
|
||||
classPrototype.members = new Map();
|
||||
}
|
||||
let staticField = new Global(
|
||||
this, name, internalName, declaration, Type.void
|
||||
this,
|
||||
name,
|
||||
internalName,
|
||||
declaration,
|
||||
Type.void
|
||||
);
|
||||
classPrototype.members.set(name, staticField);
|
||||
this.elementsLookup.set(internalName, staticField);
|
||||
@ -537,7 +541,8 @@ export class Program extends DiagnosticEmitter {
|
||||
}
|
||||
let instanceField = new FieldPrototype(
|
||||
classPrototype,
|
||||
name, internalName,
|
||||
name,
|
||||
internalName,
|
||||
declaration
|
||||
);
|
||||
classPrototype.instanceMembers.set(name, instanceField);
|
||||
@ -2927,7 +2932,11 @@ export class ClassPrototype extends Element {
|
||||
instance.contextualTypeArguments
|
||||
);
|
||||
if (fieldType) {
|
||||
let fieldInstance = new Field(<FieldPrototype>member, (<FieldPrototype>member).internalName, fieldType);
|
||||
let fieldInstance = new Field(
|
||||
<FieldPrototype>member,
|
||||
internalName + INSTANCE_DELIMITER + (<FieldPrototype>member).simpleName,
|
||||
fieldType
|
||||
);
|
||||
switch (fieldType.byteSize) { // align
|
||||
case 1: break;
|
||||
case 2: {
|
||||
@ -2954,30 +2963,50 @@ export class ClassPrototype extends Element {
|
||||
if (!instance.members) instance.members = new Map();
|
||||
let methodPrototype = (<FunctionPrototype>member).resolvePartial(typeArguments); // reports
|
||||
if (methodPrototype) {
|
||||
methodPrototype.internalName = internalName + INSTANCE_DELIMITER + methodPrototype.simpleName;
|
||||
instance.members.set(member.simpleName, methodPrototype);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ElementKind.PROPERTY: { // instance properties are cloned with partially resolved getters and setters
|
||||
if (!instance.members) instance.members = new Map();
|
||||
assert((<Property>member).getterPrototype);
|
||||
let instanceProperty = new Property(this.program, member.simpleName, member.internalName, this);
|
||||
instanceProperty.getterPrototype = (
|
||||
let getterPrototype = assert((<Property>member).getterPrototype);
|
||||
let setterPrototype = (<Property>member).setterPrototype;
|
||||
let instanceProperty = new Property(
|
||||
this.program,
|
||||
member.simpleName,
|
||||
internalName + INSTANCE_DELIMITER + member.simpleName,
|
||||
this
|
||||
);
|
||||
let partialGetterPrototype = (
|
||||
(<FunctionPrototype>(<Property>member).getterPrototype).resolvePartial(
|
||||
typeArguments
|
||||
)
|
||||
);
|
||||
if ((<Property>member).setterPrototype) {
|
||||
instanceProperty.setterPrototype = (
|
||||
if (!partialGetterPrototype) return null;
|
||||
partialGetterPrototype.internalName = (
|
||||
internalName + INSTANCE_DELIMITER + partialGetterPrototype.simpleName
|
||||
);
|
||||
instanceProperty.getterPrototype = partialGetterPrototype;
|
||||
if (setterPrototype) {
|
||||
let partialSetterPrototype = (
|
||||
(<FunctionPrototype>(<Property>member).setterPrototype).resolvePartial(
|
||||
typeArguments
|
||||
)
|
||||
);
|
||||
if (!partialSetterPrototype) return null;
|
||||
partialSetterPrototype.internalName = (
|
||||
internalName + INSTANCE_DELIMITER + partialSetterPrototype.simpleName
|
||||
);
|
||||
instanceProperty.setterPrototype = partialSetterPrototype;
|
||||
}
|
||||
instance.members.set(member.simpleName, instanceProperty);
|
||||
break;
|
||||
}
|
||||
default: throw new Error("instance member expected");
|
||||
default: {
|
||||
assert(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
23
src/util/binary.ts
Normal file
23
src/util/binary.ts
Normal file
@ -0,0 +1,23 @@
|
||||
/** @module util *//***/
|
||||
|
||||
export function writeI32(value: i32, buffer: Uint8Array, offset: i32): void {
|
||||
buffer[offset ] = value;
|
||||
buffer[offset + 1] = value >>> 8;
|
||||
buffer[offset + 2] = value >>> 16;
|
||||
buffer[offset + 3] = value >>> 24;
|
||||
}
|
||||
|
||||
export function writeI64(value: I64, buffer: Uint8Array, offset: i32): void {
|
||||
writeI32(i64_low(value), buffer, offset);
|
||||
writeI32(i64_high(value), buffer, offset + 4);
|
||||
}
|
||||
|
||||
export function writeF32(value: f32, buffer: Uint8Array, offset: i32): void {
|
||||
writeI32(f32_as_i32(value), buffer, offset);
|
||||
}
|
||||
|
||||
export function writeF64(value: f64, buffer: Uint8Array, offset: i32): void {
|
||||
var valueI64 = f64_as_i64(value);
|
||||
writeI32(i64_low(valueI64), buffer, offset);
|
||||
writeI32(i64_high(valueI64), buffer, offset + 4);
|
||||
}
|
@ -7,3 +7,4 @@
|
||||
export * from "./charcode";
|
||||
export * from "./path";
|
||||
export * from "./text";
|
||||
export * from "./binary";
|
||||
|
9
std/portable.d.ts
vendored
9
std/portable.d.ts
vendored
@ -274,3 +274,12 @@ declare namespace console {
|
||||
/** @deprecated */
|
||||
function log(message: string): void;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
declare namespace Math {
|
||||
const LN2: number;
|
||||
function round(value: number): number;
|
||||
function floor(value: number): number;
|
||||
function log(value: number): number;
|
||||
function pow(value: number, exp: number): number;
|
||||
}
|
||||
|
@ -31,7 +31,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $class/Animal#instanceAdd (; 2 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(func $class/Animal<f64>#instanceAdd (; 2 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(i32.add
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
@ -40,7 +40,7 @@
|
||||
(get_global $class/Animal.ONE)
|
||||
)
|
||||
)
|
||||
(func $class/Animal#instanceSub<f32> (; 3 ;) (type $ifff) (param $0 i32) (param $1 f32) (param $2 f32) (result f32)
|
||||
(func $class/Animal<f64>#instanceSub<f32> (; 3 ;) (type $ifff) (param $0 i32) (param $1 f32) (param $2 f32) (result f32)
|
||||
(f32.add
|
||||
(f32.sub
|
||||
(get_local $1)
|
||||
@ -53,14 +53,14 @@
|
||||
)
|
||||
(func $class/test (; 4 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(drop
|
||||
(call $class/Animal#instanceAdd
|
||||
(call $class/Animal<f64>#instanceAdd
|
||||
(get_local $0)
|
||||
(i32.const 1)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
(drop
|
||||
(call $class/Animal#instanceSub<f32>
|
||||
(call $class/Animal<f64>#instanceSub<f32>
|
||||
(get_local $0)
|
||||
(f32.const 1)
|
||||
(f32.const 2)
|
||||
|
@ -38,7 +38,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $class/Animal#instanceAdd (; 3 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(func $class/Animal<f64>#instanceAdd (; 3 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(return
|
||||
(i32.add
|
||||
(i32.add
|
||||
@ -49,7 +49,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $class/Animal#instanceSub<f32> (; 4 ;) (type $ifff) (param $0 i32) (param $1 f32) (param $2 f32) (result f32)
|
||||
(func $class/Animal<f64>#instanceSub<f32> (; 4 ;) (type $ifff) (param $0 i32) (param $1 f32) (param $2 f32) (result f32)
|
||||
(return
|
||||
(f32.add
|
||||
(f32.sub
|
||||
@ -66,14 +66,14 @@
|
||||
(local $1 i32)
|
||||
(local $2 i32)
|
||||
(drop
|
||||
(call $class/Animal#instanceAdd
|
||||
(call $class/Animal<f64>#instanceAdd
|
||||
(get_local $0)
|
||||
(i32.const 1)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
(drop
|
||||
(call $class/Animal#instanceSub<f32>
|
||||
(call $class/Animal<f64>#instanceSub<f32>
|
||||
(get_local $0)
|
||||
(f32.const 1)
|
||||
(f32.const 2)
|
||||
|
@ -102,7 +102,7 @@
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
(func "$(lib)/array/Array#get:length" (; 2 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(func "$(lib)/array/Array<i32>#get:length" (; 2 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(i32.load offset=8
|
||||
(get_local $0)
|
||||
)
|
||||
@ -1976,7 +1976,7 @@
|
||||
(func "$(lib)/allocator/arena/free_memory" (; 5 ;) (type $iv) (param $0 i32)
|
||||
(nop)
|
||||
)
|
||||
(func "$(lib)/array/Array#__grow" (; 6 ;) (type $iiv) (param $0 i32) (param $1 i32)
|
||||
(func "$(lib)/array/Array<i32>#__grow" (; 6 ;) (type $iiv) (param $0 i32) (param $1 i32)
|
||||
(local $2 i32)
|
||||
(if
|
||||
(i32.le_s
|
||||
@ -2036,7 +2036,7 @@
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func "$(lib)/array/Array#push" (; 7 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func "$(lib)/array/Array<i32>#push" (; 7 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
(if
|
||||
(i32.eq
|
||||
@ -2047,7 +2047,7 @@
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(call "$(lib)/array/Array#__grow"
|
||||
(call "$(lib)/array/Array<i32>#__grow"
|
||||
(get_local $0)
|
||||
(if (result i32)
|
||||
(i32.load offset=4
|
||||
@ -2090,7 +2090,7 @@
|
||||
)
|
||||
(get_local $2)
|
||||
)
|
||||
(func "$(lib)/array/Array#__get" (; 8 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func "$(lib)/array/Array<i32>#__get" (; 8 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(if
|
||||
(i32.ge_u
|
||||
(get_local $1)
|
||||
@ -2112,7 +2112,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(func "$(lib)/array/Array#pop" (; 9 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(func "$(lib)/array/Array<i32>#pop" (; 9 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
(if
|
||||
(i32.lt_s
|
||||
@ -2148,7 +2148,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(func "$(lib)/array/Array#unshift" (; 10 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func "$(lib)/array/Array<i32>#unshift" (; 10 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
@ -2600,7 +2600,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(func "$(lib)/array/Array#shift" (; 12 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(func "$(lib)/array/Array<i32>#shift" (; 12 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
(if
|
||||
(i32.lt_s
|
||||
@ -2667,7 +2667,7 @@
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
(func "$(lib)/array/Array#reverse" (; 13 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(func "$(lib)/array/Array<i32>#reverse" (; 13 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
@ -2751,7 +2751,7 @@
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
(func "$(lib)/array/Array#indexOf" (; 14 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(func "$(lib)/array/Array<i32>#indexOf" (; 14 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(local $3 i32)
|
||||
(if
|
||||
(i32.and
|
||||
@ -2839,7 +2839,7 @@
|
||||
)
|
||||
(i32.const -1)
|
||||
)
|
||||
(func "$(lib)/array/Array#indexOf|trampoline" (; 15 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
|
||||
(func "$(lib)/array/Array<i32>#indexOf|trampoline" (; 15 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
|
||||
(block $N=1
|
||||
(block $N=0
|
||||
(block $N=invalid
|
||||
@ -2853,13 +2853,13 @@
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(call "$(lib)/array/Array#indexOf"
|
||||
(call "$(lib)/array/Array<i32>#indexOf"
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(func "$(lib)/array/Array#includes" (; 16 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(func "$(lib)/array/Array<i32>#includes" (; 16 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(local $3 i32)
|
||||
(if
|
||||
(i32.and
|
||||
@ -2947,7 +2947,7 @@
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(func "$(lib)/array/Array#includes|trampoline" (; 17 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
|
||||
(func "$(lib)/array/Array<i32>#includes|trampoline" (; 17 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
|
||||
(block $N=1
|
||||
(block $N=0
|
||||
(block $N=invalid
|
||||
@ -2961,13 +2961,13 @@
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(call "$(lib)/array/Array#includes"
|
||||
(call "$(lib)/array/Array<i32>#includes"
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(func "$(lib)/array/Array#splice" (; 18 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
|
||||
(func "$(lib)/array/Array<i32>#splice" (; 18 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
|
||||
(if
|
||||
(i32.lt_s
|
||||
(get_local $2)
|
||||
@ -3087,7 +3087,7 @@
|
||||
)
|
||||
)
|
||||
(if
|
||||
(call "$(lib)/array/Array#get:length"
|
||||
(call "$(lib)/array/Array<i32>#get:length"
|
||||
(get_global $std/array/arr)
|
||||
)
|
||||
(block
|
||||
@ -3115,14 +3115,14 @@
|
||||
)
|
||||
)
|
||||
(drop
|
||||
(call "$(lib)/array/Array#push"
|
||||
(call "$(lib)/array/Array<i32>#push"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 42)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 0)
|
||||
)
|
||||
@ -3140,7 +3140,7 @@
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call "$(lib)/array/Array#get:length"
|
||||
(call "$(lib)/array/Array<i32>#get:length"
|
||||
(get_global $std/array/arr)
|
||||
)
|
||||
(i32.const 1)
|
||||
@ -3173,7 +3173,7 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/array/i
|
||||
(call "$(lib)/array/Array#pop"
|
||||
(call "$(lib)/array/Array<i32>#pop"
|
||||
(get_global $std/array/arr)
|
||||
)
|
||||
)
|
||||
@ -3193,7 +3193,7 @@
|
||||
)
|
||||
)
|
||||
(if
|
||||
(call "$(lib)/array/Array#get:length"
|
||||
(call "$(lib)/array/Array<i32>#get:length"
|
||||
(get_global $std/array/arr)
|
||||
)
|
||||
(block
|
||||
@ -3224,14 +3224,14 @@
|
||||
)
|
||||
)
|
||||
(drop
|
||||
(call "$(lib)/array/Array#push"
|
||||
(call "$(lib)/array/Array<i32>#push"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 43)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call "$(lib)/array/Array#get:length"
|
||||
(call "$(lib)/array/Array<i32>#get:length"
|
||||
(get_global $std/array/arr)
|
||||
)
|
||||
(i32.const 1)
|
||||
@ -3265,7 +3265,7 @@
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 0)
|
||||
)
|
||||
@ -3282,14 +3282,14 @@
|
||||
)
|
||||
)
|
||||
(drop
|
||||
(call "$(lib)/array/Array#push"
|
||||
(call "$(lib)/array/Array<i32>#push"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 44)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call "$(lib)/array/Array#get:length"
|
||||
(call "$(lib)/array/Array<i32>#get:length"
|
||||
(get_global $std/array/arr)
|
||||
)
|
||||
(i32.const 2)
|
||||
@ -3323,7 +3323,7 @@
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 0)
|
||||
)
|
||||
@ -3341,7 +3341,7 @@
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 1)
|
||||
)
|
||||
@ -3358,14 +3358,14 @@
|
||||
)
|
||||
)
|
||||
(drop
|
||||
(call "$(lib)/array/Array#push"
|
||||
(call "$(lib)/array/Array<i32>#push"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 45)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call "$(lib)/array/Array#get:length"
|
||||
(call "$(lib)/array/Array<i32>#get:length"
|
||||
(get_global $std/array/arr)
|
||||
)
|
||||
(i32.const 3)
|
||||
@ -3399,7 +3399,7 @@
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 0)
|
||||
)
|
||||
@ -3417,7 +3417,7 @@
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 1)
|
||||
)
|
||||
@ -3435,7 +3435,7 @@
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 2)
|
||||
)
|
||||
@ -3452,14 +3452,14 @@
|
||||
)
|
||||
)
|
||||
(drop
|
||||
(call "$(lib)/array/Array#unshift"
|
||||
(call "$(lib)/array/Array<i32>#unshift"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 42)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call "$(lib)/array/Array#get:length"
|
||||
(call "$(lib)/array/Array<i32>#get:length"
|
||||
(get_global $std/array/arr)
|
||||
)
|
||||
(i32.const 4)
|
||||
@ -3493,7 +3493,7 @@
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 0)
|
||||
)
|
||||
@ -3511,7 +3511,7 @@
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 1)
|
||||
)
|
||||
@ -3529,7 +3529,7 @@
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 2)
|
||||
)
|
||||
@ -3547,7 +3547,7 @@
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 3)
|
||||
)
|
||||
@ -3564,14 +3564,14 @@
|
||||
)
|
||||
)
|
||||
(drop
|
||||
(call "$(lib)/array/Array#unshift"
|
||||
(call "$(lib)/array/Array<i32>#unshift"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 41)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call "$(lib)/array/Array#get:length"
|
||||
(call "$(lib)/array/Array<i32>#get:length"
|
||||
(get_global $std/array/arr)
|
||||
)
|
||||
(i32.const 5)
|
||||
@ -3605,7 +3605,7 @@
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 0)
|
||||
)
|
||||
@ -3623,7 +3623,7 @@
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 1)
|
||||
)
|
||||
@ -3641,7 +3641,7 @@
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 2)
|
||||
)
|
||||
@ -3659,7 +3659,7 @@
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 3)
|
||||
)
|
||||
@ -3677,7 +3677,7 @@
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 4)
|
||||
)
|
||||
@ -3694,7 +3694,7 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/array/i
|
||||
(call "$(lib)/array/Array#shift"
|
||||
(call "$(lib)/array/Array<i32>#shift"
|
||||
(get_global $std/array/arr)
|
||||
)
|
||||
)
|
||||
@ -3715,7 +3715,7 @@
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call "$(lib)/array/Array#get:length"
|
||||
(call "$(lib)/array/Array<i32>#get:length"
|
||||
(get_global $std/array/arr)
|
||||
)
|
||||
(i32.const 4)
|
||||
@ -3749,7 +3749,7 @@
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 0)
|
||||
)
|
||||
@ -3767,7 +3767,7 @@
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 1)
|
||||
)
|
||||
@ -3785,7 +3785,7 @@
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 2)
|
||||
)
|
||||
@ -3803,7 +3803,7 @@
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 3)
|
||||
)
|
||||
@ -3820,7 +3820,7 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/array/i
|
||||
(call "$(lib)/array/Array#pop"
|
||||
(call "$(lib)/array/Array<i32>#pop"
|
||||
(get_global $std/array/arr)
|
||||
)
|
||||
)
|
||||
@ -3841,7 +3841,7 @@
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call "$(lib)/array/Array#get:length"
|
||||
(call "$(lib)/array/Array<i32>#get:length"
|
||||
(get_global $std/array/arr)
|
||||
)
|
||||
(i32.const 3)
|
||||
@ -3875,7 +3875,7 @@
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 0)
|
||||
)
|
||||
@ -3893,7 +3893,7 @@
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 1)
|
||||
)
|
||||
@ -3911,7 +3911,7 @@
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 2)
|
||||
)
|
||||
@ -3928,13 +3928,13 @@
|
||||
)
|
||||
)
|
||||
(drop
|
||||
(call "$(lib)/array/Array#reverse"
|
||||
(call "$(lib)/array/Array<i32>#reverse"
|
||||
(get_global $std/array/arr)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call "$(lib)/array/Array#get:length"
|
||||
(call "$(lib)/array/Array<i32>#get:length"
|
||||
(get_global $std/array/arr)
|
||||
)
|
||||
(i32.const 3)
|
||||
@ -3968,7 +3968,7 @@
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 0)
|
||||
)
|
||||
@ -3986,7 +3986,7 @@
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 1)
|
||||
)
|
||||
@ -4004,7 +4004,7 @@
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 2)
|
||||
)
|
||||
@ -4021,19 +4021,19 @@
|
||||
)
|
||||
)
|
||||
(drop
|
||||
(call "$(lib)/array/Array#push"
|
||||
(call "$(lib)/array/Array<i32>#push"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 43)
|
||||
)
|
||||
)
|
||||
(drop
|
||||
(call "$(lib)/array/Array#push"
|
||||
(call "$(lib)/array/Array<i32>#push"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 44)
|
||||
)
|
||||
)
|
||||
(set_global $std/array/i
|
||||
(call "$(lib)/array/Array#indexOf|trampoline"
|
||||
(call "$(lib)/array/Array<i32>#indexOf|trampoline"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 44)
|
||||
(i32.const 0)
|
||||
@ -4053,7 +4053,7 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/array/i
|
||||
(call "$(lib)/array/Array#indexOf|trampoline"
|
||||
(call "$(lib)/array/Array<i32>#indexOf|trampoline"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 42)
|
||||
(i32.const 0)
|
||||
@ -4076,7 +4076,7 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/array/i
|
||||
(call "$(lib)/array/Array#indexOf|trampoline"
|
||||
(call "$(lib)/array/Array<i32>#indexOf|trampoline"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 45)
|
||||
(i32.const 0)
|
||||
@ -4099,7 +4099,7 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/array/i
|
||||
(call "$(lib)/array/Array#indexOf"
|
||||
(call "$(lib)/array/Array<i32>#indexOf"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 43)
|
||||
(i32.const 100)
|
||||
@ -4121,7 +4121,7 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/array/i
|
||||
(call "$(lib)/array/Array#indexOf"
|
||||
(call "$(lib)/array/Array<i32>#indexOf"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 43)
|
||||
(i32.const -100)
|
||||
@ -4143,7 +4143,7 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/array/i
|
||||
(call "$(lib)/array/Array#indexOf"
|
||||
(call "$(lib)/array/Array<i32>#indexOf"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 43)
|
||||
(i32.const -2)
|
||||
@ -4165,7 +4165,7 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/array/i
|
||||
(call "$(lib)/array/Array#indexOf"
|
||||
(call "$(lib)/array/Array<i32>#indexOf"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 43)
|
||||
(i32.const -4)
|
||||
@ -4187,7 +4187,7 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/array/i
|
||||
(call "$(lib)/array/Array#indexOf"
|
||||
(call "$(lib)/array/Array<i32>#indexOf"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 43)
|
||||
(i32.const 0)
|
||||
@ -4209,7 +4209,7 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/array/i
|
||||
(call "$(lib)/array/Array#indexOf"
|
||||
(call "$(lib)/array/Array<i32>#indexOf"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 43)
|
||||
(i32.const 1)
|
||||
@ -4231,7 +4231,7 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/array/i
|
||||
(call "$(lib)/array/Array#indexOf"
|
||||
(call "$(lib)/array/Array<i32>#indexOf"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 43)
|
||||
(i32.const 2)
|
||||
@ -4253,7 +4253,7 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/array/includes
|
||||
(call "$(lib)/array/Array#includes|trampoline"
|
||||
(call "$(lib)/array/Array<i32>#includes|trampoline"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 44)
|
||||
(i32.const 0)
|
||||
@ -4276,7 +4276,7 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/array/includes
|
||||
(call "$(lib)/array/Array#includes|trampoline"
|
||||
(call "$(lib)/array/Array<i32>#includes|trampoline"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 42)
|
||||
(i32.const 0)
|
||||
@ -4299,7 +4299,7 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/array/includes
|
||||
(call "$(lib)/array/Array#includes|trampoline"
|
||||
(call "$(lib)/array/Array<i32>#includes|trampoline"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 45)
|
||||
(i32.const 0)
|
||||
@ -4319,7 +4319,7 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/array/includes
|
||||
(call "$(lib)/array/Array#includes"
|
||||
(call "$(lib)/array/Array<i32>#includes"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 43)
|
||||
(i32.const 100)
|
||||
@ -4338,7 +4338,7 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/array/includes
|
||||
(call "$(lib)/array/Array#includes"
|
||||
(call "$(lib)/array/Array<i32>#includes"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 43)
|
||||
(i32.const -100)
|
||||
@ -4360,7 +4360,7 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/array/includes
|
||||
(call "$(lib)/array/Array#includes"
|
||||
(call "$(lib)/array/Array<i32>#includes"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 43)
|
||||
(i32.const -2)
|
||||
@ -4382,7 +4382,7 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/array/includes
|
||||
(call "$(lib)/array/Array#includes"
|
||||
(call "$(lib)/array/Array<i32>#includes"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 43)
|
||||
(i32.const -4)
|
||||
@ -4404,7 +4404,7 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/array/includes
|
||||
(call "$(lib)/array/Array#includes"
|
||||
(call "$(lib)/array/Array<i32>#includes"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 43)
|
||||
(i32.const 0)
|
||||
@ -4426,7 +4426,7 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/array/includes
|
||||
(call "$(lib)/array/Array#includes"
|
||||
(call "$(lib)/array/Array<i32>#includes"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 43)
|
||||
(i32.const 1)
|
||||
@ -4448,7 +4448,7 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/array/includes
|
||||
(call "$(lib)/array/Array#includes"
|
||||
(call "$(lib)/array/Array<i32>#includes"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 43)
|
||||
(i32.const 2)
|
||||
@ -4469,14 +4469,14 @@
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(call "$(lib)/array/Array#splice"
|
||||
(call "$(lib)/array/Array<i32>#splice"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 1)
|
||||
(i32.const 1)
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call "$(lib)/array/Array#get:length"
|
||||
(call "$(lib)/array/Array<i32>#get:length"
|
||||
(get_global $std/array/arr)
|
||||
)
|
||||
(i32.const 4)
|
||||
@ -4510,7 +4510,7 @@
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 0)
|
||||
)
|
||||
@ -4528,7 +4528,7 @@
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 1)
|
||||
)
|
||||
|
@ -127,7 +127,7 @@
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func "$(lib)/array/Array#get:length" (; 2 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(func "$(lib)/array/Array<i32>#get:length" (; 2 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(return
|
||||
(i32.load offset=8
|
||||
(get_local $0)
|
||||
@ -2262,7 +2262,7 @@
|
||||
)
|
||||
(func "$(lib)/allocator/arena/free_memory" (; 5 ;) (type $iv) (param $0 i32)
|
||||
)
|
||||
(func "$(lib)/array/Array#__grow" (; 6 ;) (type $iiv) (param $0 i32) (param $1 i32)
|
||||
(func "$(lib)/array/Array<i32>#__grow" (; 6 ;) (type $iiv) (param $0 i32) (param $1 i32)
|
||||
(local $2 i32)
|
||||
(if
|
||||
(i32.eqz
|
||||
@ -2324,7 +2324,7 @@
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func "$(lib)/array/Array#push" (; 7 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func "$(lib)/array/Array<i32>#push" (; 7 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
(if
|
||||
(i32.eq
|
||||
@ -2335,7 +2335,7 @@
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(call "$(lib)/array/Array#__grow"
|
||||
(call "$(lib)/array/Array<i32>#__grow"
|
||||
(get_local $0)
|
||||
(if (result i32)
|
||||
(i32.load offset=4
|
||||
@ -2383,7 +2383,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(func "$(lib)/array/Array#__get" (; 8 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func "$(lib)/array/Array<i32>#__get" (; 8 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(if
|
||||
(i32.ge_u
|
||||
(get_local $1)
|
||||
@ -2407,7 +2407,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(func "$(lib)/array/Array#pop" (; 9 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(func "$(lib)/array/Array<i32>#pop" (; 9 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
(if
|
||||
(i32.lt_s
|
||||
@ -2446,7 +2446,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(func "$(lib)/array/Array#unshift" (; 10 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func "$(lib)/array/Array<i32>#unshift" (; 10 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
@ -2923,7 +2923,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(func "$(lib)/array/Array#shift" (; 12 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(func "$(lib)/array/Array<i32>#shift" (; 12 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
(if
|
||||
(i32.lt_s
|
||||
@ -2992,7 +2992,7 @@
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func "$(lib)/array/Array#reverse" (; 13 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(func "$(lib)/array/Array<i32>#reverse" (; 13 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
@ -3089,7 +3089,7 @@
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func "$(lib)/array/Array#indexOf" (; 14 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(func "$(lib)/array/Array<i32>#indexOf" (; 14 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(local $3 i32)
|
||||
(if
|
||||
(i32.and
|
||||
@ -3187,7 +3187,7 @@
|
||||
(i32.const -1)
|
||||
)
|
||||
)
|
||||
(func "$(lib)/array/Array#indexOf|trampoline" (; 15 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
|
||||
(func "$(lib)/array/Array<i32>#indexOf|trampoline" (; 15 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
|
||||
(block $N=1
|
||||
(block $N=0
|
||||
(block $N=invalid
|
||||
@ -3201,13 +3201,13 @@
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(call "$(lib)/array/Array#indexOf"
|
||||
(call "$(lib)/array/Array<i32>#indexOf"
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(func "$(lib)/array/Array#includes" (; 16 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(func "$(lib)/array/Array<i32>#includes" (; 16 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(local $3 i32)
|
||||
(if
|
||||
(i32.and
|
||||
@ -3305,7 +3305,7 @@
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(func "$(lib)/array/Array#includes|trampoline" (; 17 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
|
||||
(func "$(lib)/array/Array<i32>#includes|trampoline" (; 17 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
|
||||
(block $N=1
|
||||
(block $N=0
|
||||
(block $N=invalid
|
||||
@ -3319,13 +3319,13 @@
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(call "$(lib)/array/Array#includes"
|
||||
(call "$(lib)/array/Array<i32>#includes"
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(func "$(lib)/array/Array#splice" (; 18 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
|
||||
(func "$(lib)/array/Array<i32>#splice" (; 18 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
(if
|
||||
@ -3464,7 +3464,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/Array#get:length"
|
||||
(call "$(lib)/array/Array<i32>#get:length"
|
||||
(get_global $std/array/arr)
|
||||
)
|
||||
(i32.const 0)
|
||||
@ -3500,7 +3500,7 @@
|
||||
)
|
||||
)
|
||||
(drop
|
||||
(call "$(lib)/array/Array#push"
|
||||
(call "$(lib)/array/Array<i32>#push"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 42)
|
||||
)
|
||||
@ -3508,7 +3508,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 0)
|
||||
)
|
||||
@ -3528,7 +3528,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/Array#get:length"
|
||||
(call "$(lib)/array/Array<i32>#get:length"
|
||||
(get_global $std/array/arr)
|
||||
)
|
||||
(i32.const 1)
|
||||
@ -3564,7 +3564,7 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/array/i
|
||||
(call "$(lib)/array/Array#pop"
|
||||
(call "$(lib)/array/Array<i32>#pop"
|
||||
(get_global $std/array/arr)
|
||||
)
|
||||
)
|
||||
@ -3588,7 +3588,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/Array#get:length"
|
||||
(call "$(lib)/array/Array<i32>#get:length"
|
||||
(get_global $std/array/arr)
|
||||
)
|
||||
(i32.const 0)
|
||||
@ -3624,7 +3624,7 @@
|
||||
)
|
||||
)
|
||||
(drop
|
||||
(call "$(lib)/array/Array#push"
|
||||
(call "$(lib)/array/Array<i32>#push"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 43)
|
||||
)
|
||||
@ -3632,7 +3632,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/Array#get:length"
|
||||
(call "$(lib)/array/Array<i32>#get:length"
|
||||
(get_global $std/array/arr)
|
||||
)
|
||||
(i32.const 1)
|
||||
@ -3670,7 +3670,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 0)
|
||||
)
|
||||
@ -3688,7 +3688,7 @@
|
||||
)
|
||||
)
|
||||
(drop
|
||||
(call "$(lib)/array/Array#push"
|
||||
(call "$(lib)/array/Array<i32>#push"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 44)
|
||||
)
|
||||
@ -3696,7 +3696,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/Array#get:length"
|
||||
(call "$(lib)/array/Array<i32>#get:length"
|
||||
(get_global $std/array/arr)
|
||||
)
|
||||
(i32.const 2)
|
||||
@ -3734,7 +3734,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 0)
|
||||
)
|
||||
@ -3754,7 +3754,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 1)
|
||||
)
|
||||
@ -3772,7 +3772,7 @@
|
||||
)
|
||||
)
|
||||
(drop
|
||||
(call "$(lib)/array/Array#push"
|
||||
(call "$(lib)/array/Array<i32>#push"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 45)
|
||||
)
|
||||
@ -3780,7 +3780,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/Array#get:length"
|
||||
(call "$(lib)/array/Array<i32>#get:length"
|
||||
(get_global $std/array/arr)
|
||||
)
|
||||
(i32.const 3)
|
||||
@ -3818,7 +3818,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 0)
|
||||
)
|
||||
@ -3838,7 +3838,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 1)
|
||||
)
|
||||
@ -3858,7 +3858,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 2)
|
||||
)
|
||||
@ -3876,7 +3876,7 @@
|
||||
)
|
||||
)
|
||||
(drop
|
||||
(call "$(lib)/array/Array#unshift"
|
||||
(call "$(lib)/array/Array<i32>#unshift"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 42)
|
||||
)
|
||||
@ -3884,7 +3884,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/Array#get:length"
|
||||
(call "$(lib)/array/Array<i32>#get:length"
|
||||
(get_global $std/array/arr)
|
||||
)
|
||||
(i32.const 4)
|
||||
@ -3922,7 +3922,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 0)
|
||||
)
|
||||
@ -3942,7 +3942,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 1)
|
||||
)
|
||||
@ -3962,7 +3962,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 2)
|
||||
)
|
||||
@ -3982,7 +3982,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 3)
|
||||
)
|
||||
@ -4000,7 +4000,7 @@
|
||||
)
|
||||
)
|
||||
(drop
|
||||
(call "$(lib)/array/Array#unshift"
|
||||
(call "$(lib)/array/Array<i32>#unshift"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 41)
|
||||
)
|
||||
@ -4008,7 +4008,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/Array#get:length"
|
||||
(call "$(lib)/array/Array<i32>#get:length"
|
||||
(get_global $std/array/arr)
|
||||
)
|
||||
(i32.const 5)
|
||||
@ -4046,7 +4046,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 0)
|
||||
)
|
||||
@ -4066,7 +4066,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 1)
|
||||
)
|
||||
@ -4086,7 +4086,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 2)
|
||||
)
|
||||
@ -4106,7 +4106,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 3)
|
||||
)
|
||||
@ -4126,7 +4126,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 4)
|
||||
)
|
||||
@ -4144,7 +4144,7 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/array/i
|
||||
(call "$(lib)/array/Array#shift"
|
||||
(call "$(lib)/array/Array<i32>#shift"
|
||||
(get_global $std/array/arr)
|
||||
)
|
||||
)
|
||||
@ -4168,7 +4168,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/Array#get:length"
|
||||
(call "$(lib)/array/Array<i32>#get:length"
|
||||
(get_global $std/array/arr)
|
||||
)
|
||||
(i32.const 4)
|
||||
@ -4206,7 +4206,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 0)
|
||||
)
|
||||
@ -4226,7 +4226,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 1)
|
||||
)
|
||||
@ -4246,7 +4246,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 2)
|
||||
)
|
||||
@ -4266,7 +4266,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 3)
|
||||
)
|
||||
@ -4284,7 +4284,7 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/array/i
|
||||
(call "$(lib)/array/Array#pop"
|
||||
(call "$(lib)/array/Array<i32>#pop"
|
||||
(get_global $std/array/arr)
|
||||
)
|
||||
)
|
||||
@ -4308,7 +4308,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/Array#get:length"
|
||||
(call "$(lib)/array/Array<i32>#get:length"
|
||||
(get_global $std/array/arr)
|
||||
)
|
||||
(i32.const 3)
|
||||
@ -4346,7 +4346,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 0)
|
||||
)
|
||||
@ -4366,7 +4366,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 1)
|
||||
)
|
||||
@ -4386,7 +4386,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 2)
|
||||
)
|
||||
@ -4404,14 +4404,14 @@
|
||||
)
|
||||
)
|
||||
(drop
|
||||
(call "$(lib)/array/Array#reverse"
|
||||
(call "$(lib)/array/Array<i32>#reverse"
|
||||
(get_global $std/array/arr)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/Array#get:length"
|
||||
(call "$(lib)/array/Array<i32>#get:length"
|
||||
(get_global $std/array/arr)
|
||||
)
|
||||
(i32.const 3)
|
||||
@ -4449,7 +4449,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 0)
|
||||
)
|
||||
@ -4469,7 +4469,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 1)
|
||||
)
|
||||
@ -4489,7 +4489,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 2)
|
||||
)
|
||||
@ -4507,19 +4507,19 @@
|
||||
)
|
||||
)
|
||||
(drop
|
||||
(call "$(lib)/array/Array#push"
|
||||
(call "$(lib)/array/Array<i32>#push"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 43)
|
||||
)
|
||||
)
|
||||
(drop
|
||||
(call "$(lib)/array/Array#push"
|
||||
(call "$(lib)/array/Array<i32>#push"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 44)
|
||||
)
|
||||
)
|
||||
(set_global $std/array/i
|
||||
(call "$(lib)/array/Array#indexOf|trampoline"
|
||||
(call "$(lib)/array/Array<i32>#indexOf|trampoline"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 44)
|
||||
(i32.const 0)
|
||||
@ -4544,7 +4544,7 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/array/i
|
||||
(call "$(lib)/array/Array#indexOf|trampoline"
|
||||
(call "$(lib)/array/Array<i32>#indexOf|trampoline"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 42)
|
||||
(i32.const 0)
|
||||
@ -4569,7 +4569,7 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/array/i
|
||||
(call "$(lib)/array/Array#indexOf|trampoline"
|
||||
(call "$(lib)/array/Array<i32>#indexOf|trampoline"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 45)
|
||||
(i32.const 0)
|
||||
@ -4594,7 +4594,7 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/array/i
|
||||
(call "$(lib)/array/Array#indexOf"
|
||||
(call "$(lib)/array/Array<i32>#indexOf"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 43)
|
||||
(i32.const 100)
|
||||
@ -4618,7 +4618,7 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/array/i
|
||||
(call "$(lib)/array/Array#indexOf"
|
||||
(call "$(lib)/array/Array<i32>#indexOf"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 43)
|
||||
(i32.const -100)
|
||||
@ -4642,7 +4642,7 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/array/i
|
||||
(call "$(lib)/array/Array#indexOf"
|
||||
(call "$(lib)/array/Array<i32>#indexOf"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 43)
|
||||
(i32.const -2)
|
||||
@ -4666,7 +4666,7 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/array/i
|
||||
(call "$(lib)/array/Array#indexOf"
|
||||
(call "$(lib)/array/Array<i32>#indexOf"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 43)
|
||||
(i32.const -4)
|
||||
@ -4690,7 +4690,7 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/array/i
|
||||
(call "$(lib)/array/Array#indexOf"
|
||||
(call "$(lib)/array/Array<i32>#indexOf"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 43)
|
||||
(i32.const 0)
|
||||
@ -4714,7 +4714,7 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/array/i
|
||||
(call "$(lib)/array/Array#indexOf"
|
||||
(call "$(lib)/array/Array<i32>#indexOf"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 43)
|
||||
(i32.const 1)
|
||||
@ -4738,7 +4738,7 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/array/i
|
||||
(call "$(lib)/array/Array#indexOf"
|
||||
(call "$(lib)/array/Array<i32>#indexOf"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 43)
|
||||
(i32.const 2)
|
||||
@ -4762,7 +4762,7 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/array/includes
|
||||
(call "$(lib)/array/Array#includes|trampoline"
|
||||
(call "$(lib)/array/Array<i32>#includes|trampoline"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 44)
|
||||
(i32.const 0)
|
||||
@ -4787,7 +4787,7 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/array/includes
|
||||
(call "$(lib)/array/Array#includes|trampoline"
|
||||
(call "$(lib)/array/Array<i32>#includes|trampoline"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 42)
|
||||
(i32.const 0)
|
||||
@ -4812,7 +4812,7 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/array/includes
|
||||
(call "$(lib)/array/Array#includes|trampoline"
|
||||
(call "$(lib)/array/Array<i32>#includes|trampoline"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 45)
|
||||
(i32.const 0)
|
||||
@ -4837,7 +4837,7 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/array/includes
|
||||
(call "$(lib)/array/Array#includes"
|
||||
(call "$(lib)/array/Array<i32>#includes"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 43)
|
||||
(i32.const 100)
|
||||
@ -4861,7 +4861,7 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/array/includes
|
||||
(call "$(lib)/array/Array#includes"
|
||||
(call "$(lib)/array/Array<i32>#includes"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 43)
|
||||
(i32.const -100)
|
||||
@ -4885,7 +4885,7 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/array/includes
|
||||
(call "$(lib)/array/Array#includes"
|
||||
(call "$(lib)/array/Array<i32>#includes"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 43)
|
||||
(i32.const -2)
|
||||
@ -4909,7 +4909,7 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/array/includes
|
||||
(call "$(lib)/array/Array#includes"
|
||||
(call "$(lib)/array/Array<i32>#includes"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 43)
|
||||
(i32.const -4)
|
||||
@ -4933,7 +4933,7 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/array/includes
|
||||
(call "$(lib)/array/Array#includes"
|
||||
(call "$(lib)/array/Array<i32>#includes"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 43)
|
||||
(i32.const 0)
|
||||
@ -4957,7 +4957,7 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/array/includes
|
||||
(call "$(lib)/array/Array#includes"
|
||||
(call "$(lib)/array/Array<i32>#includes"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 43)
|
||||
(i32.const 1)
|
||||
@ -4981,7 +4981,7 @@
|
||||
)
|
||||
)
|
||||
(set_global $std/array/includes
|
||||
(call "$(lib)/array/Array#includes"
|
||||
(call "$(lib)/array/Array<i32>#includes"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 43)
|
||||
(i32.const 2)
|
||||
@ -5004,7 +5004,7 @@
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(call "$(lib)/array/Array#splice"
|
||||
(call "$(lib)/array/Array<i32>#splice"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 1)
|
||||
(i32.const 1)
|
||||
@ -5012,7 +5012,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/Array#get:length"
|
||||
(call "$(lib)/array/Array<i32>#get:length"
|
||||
(get_global $std/array/arr)
|
||||
)
|
||||
(i32.const 4)
|
||||
@ -5050,7 +5050,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 0)
|
||||
)
|
||||
@ -5070,7 +5070,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/Array#__get"
|
||||
(call "$(lib)/array/Array<i32>#__get"
|
||||
(get_global $std/array/arr)
|
||||
(i32.const 1)
|
||||
)
|
||||
|
@ -10,7 +10,7 @@
|
||||
(data (i32.const 4) "\0d\00\00\00s\00t\00d\00/\00c\00a\00r\00r\00a\00y\00.\00t\00s")
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func "$(lib)/array/CArray#__get" (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func "$(lib)/array/CArray<i32>#__get" (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(if
|
||||
(i32.lt_s
|
||||
(get_local $1)
|
||||
@ -28,7 +28,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(func "$(lib)/array/CArray#__set" (; 2 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
|
||||
(func "$(lib)/array/CArray<i32>#__set" (; 2 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
|
||||
(if
|
||||
(i32.lt_s
|
||||
(get_local $1)
|
||||
@ -85,7 +85,7 @@
|
||||
)
|
||||
)
|
||||
(if
|
||||
(call "$(lib)/array/CArray#__get"
|
||||
(call "$(lib)/array/CArray<i32>#__get"
|
||||
(get_global $std/carray/arr)
|
||||
(i32.const 0)
|
||||
)
|
||||
@ -100,7 +100,7 @@
|
||||
)
|
||||
)
|
||||
(if
|
||||
(call "$(lib)/array/CArray#__get"
|
||||
(call "$(lib)/array/CArray<i32>#__get"
|
||||
(get_global $std/carray/arr)
|
||||
(i32.const 1)
|
||||
)
|
||||
@ -114,12 +114,12 @@
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(call "$(lib)/array/CArray#__set"
|
||||
(call "$(lib)/array/CArray<i32>#__set"
|
||||
(get_global $std/carray/arr)
|
||||
(i32.const 0)
|
||||
(i32.const 42)
|
||||
)
|
||||
(call "$(lib)/array/CArray#__set"
|
||||
(call "$(lib)/array/CArray<i32>#__set"
|
||||
(get_global $std/carray/arr)
|
||||
(i32.const 1)
|
||||
(i32.const 24)
|
||||
@ -163,7 +163,7 @@
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call "$(lib)/array/CArray#__get"
|
||||
(call "$(lib)/array/CArray<i32>#__get"
|
||||
(get_global $std/carray/arr)
|
||||
(i32.const 0)
|
||||
)
|
||||
@ -181,7 +181,7 @@
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call "$(lib)/array/CArray#__get"
|
||||
(call "$(lib)/array/CArray<i32>#__get"
|
||||
(get_global $std/carray/arr)
|
||||
(i32.const 1)
|
||||
)
|
||||
@ -199,7 +199,7 @@
|
||||
)
|
||||
(if
|
||||
(block (result i32)
|
||||
(call "$(lib)/array/CArray#__set"
|
||||
(call "$(lib)/array/CArray<i32>#__set"
|
||||
(tee_local $0
|
||||
(get_global $std/carray/arr)
|
||||
)
|
||||
@ -209,7 +209,7 @@
|
||||
(i32.const 9000)
|
||||
)
|
||||
(i32.ne
|
||||
(call "$(lib)/array/CArray#__get"
|
||||
(call "$(lib)/array/CArray<i32>#__get"
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
@ -248,7 +248,7 @@
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call "$(lib)/array/CArray#__get"
|
||||
(call "$(lib)/array/CArray<i32>#__get"
|
||||
(get_global $std/carray/arr)
|
||||
(i32.const 3)
|
||||
)
|
||||
|
@ -11,7 +11,7 @@
|
||||
(data (i32.const 4) "\0d\00\00\00s\00t\00d\00/\00c\00a\00r\00r\00a\00y\00.\00t\00s\00")
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func "$(lib)/array/CArray#__get" (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func "$(lib)/array/CArray<i32>#__get" (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(if
|
||||
(i32.lt_s
|
||||
(get_local $1)
|
||||
@ -31,7 +31,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(func "$(lib)/array/CArray#__set" (; 2 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
|
||||
(func "$(lib)/array/CArray<i32>#__set" (; 2 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
|
||||
(if
|
||||
(i32.lt_s
|
||||
(get_local $1)
|
||||
@ -100,7 +100,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/CArray#__get"
|
||||
(call "$(lib)/array/CArray<i32>#__get"
|
||||
(get_global $std/carray/arr)
|
||||
(i32.const 0)
|
||||
)
|
||||
@ -120,7 +120,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/CArray#__get"
|
||||
(call "$(lib)/array/CArray<i32>#__get"
|
||||
(get_global $std/carray/arr)
|
||||
(i32.const 1)
|
||||
)
|
||||
@ -137,12 +137,12 @@
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(call "$(lib)/array/CArray#__set"
|
||||
(call "$(lib)/array/CArray<i32>#__set"
|
||||
(get_global $std/carray/arr)
|
||||
(i32.const 0)
|
||||
(i32.const 42)
|
||||
)
|
||||
(call "$(lib)/array/CArray#__set"
|
||||
(call "$(lib)/array/CArray<i32>#__set"
|
||||
(get_global $std/carray/arr)
|
||||
(i32.const 1)
|
||||
(i32.const 24)
|
||||
@ -191,7 +191,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/CArray#__get"
|
||||
(call "$(lib)/array/CArray<i32>#__get"
|
||||
(get_global $std/carray/arr)
|
||||
(i32.const 0)
|
||||
)
|
||||
@ -211,7 +211,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/CArray#__get"
|
||||
(call "$(lib)/array/CArray<i32>#__get"
|
||||
(get_global $std/carray/arr)
|
||||
(i32.const 1)
|
||||
)
|
||||
@ -232,7 +232,7 @@
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(block (result i32)
|
||||
(call "$(lib)/array/CArray#__set"
|
||||
(call "$(lib)/array/CArray<i32>#__set"
|
||||
(tee_local $0
|
||||
(get_global $std/carray/arr)
|
||||
)
|
||||
@ -241,7 +241,7 @@
|
||||
)
|
||||
(i32.const 9000)
|
||||
)
|
||||
(call "$(lib)/array/CArray#__get"
|
||||
(call "$(lib)/array/CArray<i32>#__get"
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
@ -284,7 +284,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/array/CArray#__get"
|
||||
(call "$(lib)/array/CArray<i32>#__get"
|
||||
(get_global $std/carray/arr)
|
||||
(i32.const 3)
|
||||
)
|
||||
|
@ -97,7 +97,7 @@
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
(func "$(lib)/set/Set#get:size" (; 2 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(func "$(lib)/set/Set<i32>#get:size" (; 2 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(i32.load offset=8
|
||||
(get_local $0)
|
||||
)
|
||||
@ -1971,7 +1971,7 @@
|
||||
(func "$(lib)/allocator/arena/free_memory" (; 5 ;) (type $iv) (param $0 i32)
|
||||
(nop)
|
||||
)
|
||||
(func "$(lib)/set/Set#add" (; 6 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func "$(lib)/set/Set<i32>#add" (; 6 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
(if
|
||||
@ -2083,7 +2083,7 @@
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
(func "$(lib)/set/Set#has" (; 7 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func "$(lib)/set/Set<i32>#has" (; 7 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
(if
|
||||
@ -2143,7 +2143,7 @@
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(func "$(lib)/set/Set#delete" (; 8 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func "$(lib)/set/Set<i32>#delete" (; 8 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
(if
|
||||
@ -2253,7 +2253,7 @@
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(func "$(lib)/set/Set#clear" (; 9 ;) (type $iv) (param $0 i32)
|
||||
(func "$(lib)/set/Set<i32>#clear" (; 9 ;) (type $iv) (param $0 i32)
|
||||
(if
|
||||
(i32.eqz
|
||||
(get_local $0)
|
||||
@ -2292,7 +2292,7 @@
|
||||
)
|
||||
)
|
||||
(if
|
||||
(call "$(lib)/set/Set#get:size"
|
||||
(call "$(lib)/set/Set<i32>#get:size"
|
||||
(get_global $std/set/set)
|
||||
)
|
||||
(block
|
||||
@ -2306,26 +2306,26 @@
|
||||
)
|
||||
)
|
||||
(drop
|
||||
(call "$(lib)/set/Set#add"
|
||||
(call "$(lib)/set/Set<i32>#add"
|
||||
(get_global $std/set/set)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(drop
|
||||
(call "$(lib)/set/Set#add"
|
||||
(call "$(lib)/set/Set<i32>#add"
|
||||
(get_global $std/set/set)
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(drop
|
||||
(call "$(lib)/set/Set#add"
|
||||
(call "$(lib)/set/Set<i32>#add"
|
||||
(get_global $std/set/set)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call "$(lib)/set/Set#get:size"
|
||||
(call "$(lib)/set/Set<i32>#get:size"
|
||||
(get_global $std/set/set)
|
||||
)
|
||||
(i32.const 3)
|
||||
@ -2342,7 +2342,7 @@
|
||||
)
|
||||
(if
|
||||
(i32.eqz
|
||||
(call "$(lib)/set/Set#has"
|
||||
(call "$(lib)/set/Set<i32>#has"
|
||||
(get_global $std/set/set)
|
||||
(i32.const 1)
|
||||
)
|
||||
@ -2359,7 +2359,7 @@
|
||||
)
|
||||
(if
|
||||
(i32.eqz
|
||||
(call "$(lib)/set/Set#has"
|
||||
(call "$(lib)/set/Set<i32>#has"
|
||||
(get_global $std/set/set)
|
||||
(i32.const 0)
|
||||
)
|
||||
@ -2376,7 +2376,7 @@
|
||||
)
|
||||
(if
|
||||
(i32.eqz
|
||||
(call "$(lib)/set/Set#has"
|
||||
(call "$(lib)/set/Set<i32>#has"
|
||||
(get_global $std/set/set)
|
||||
(i32.const 2)
|
||||
)
|
||||
@ -2392,7 +2392,7 @@
|
||||
)
|
||||
)
|
||||
(if
|
||||
(call "$(lib)/set/Set#has"
|
||||
(call "$(lib)/set/Set<i32>#has"
|
||||
(get_global $std/set/set)
|
||||
(i32.const 3)
|
||||
)
|
||||
@ -2407,14 +2407,14 @@
|
||||
)
|
||||
)
|
||||
(drop
|
||||
(call "$(lib)/set/Set#delete"
|
||||
(call "$(lib)/set/Set<i32>#delete"
|
||||
(get_global $std/set/set)
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call "$(lib)/set/Set#get:size"
|
||||
(call "$(lib)/set/Set<i32>#get:size"
|
||||
(get_global $std/set/set)
|
||||
)
|
||||
(i32.const 2)
|
||||
@ -2431,7 +2431,7 @@
|
||||
)
|
||||
(if
|
||||
(i32.eqz
|
||||
(call "$(lib)/set/Set#has"
|
||||
(call "$(lib)/set/Set<i32>#has"
|
||||
(get_global $std/set/set)
|
||||
(i32.const 1)
|
||||
)
|
||||
@ -2447,7 +2447,7 @@
|
||||
)
|
||||
)
|
||||
(if
|
||||
(call "$(lib)/set/Set#has"
|
||||
(call "$(lib)/set/Set<i32>#has"
|
||||
(get_global $std/set/set)
|
||||
(i32.const 0)
|
||||
)
|
||||
@ -2463,7 +2463,7 @@
|
||||
)
|
||||
(if
|
||||
(i32.eqz
|
||||
(call "$(lib)/set/Set#has"
|
||||
(call "$(lib)/set/Set<i32>#has"
|
||||
(get_global $std/set/set)
|
||||
(i32.const 2)
|
||||
)
|
||||
@ -2478,11 +2478,11 @@
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(call "$(lib)/set/Set#clear"
|
||||
(call "$(lib)/set/Set<i32>#clear"
|
||||
(get_global $std/set/set)
|
||||
)
|
||||
(if
|
||||
(call "$(lib)/set/Set#get:size"
|
||||
(call "$(lib)/set/Set<i32>#get:size"
|
||||
(get_global $std/set/set)
|
||||
)
|
||||
(block
|
||||
@ -2496,7 +2496,7 @@
|
||||
)
|
||||
)
|
||||
(if
|
||||
(call "$(lib)/set/Set#has"
|
||||
(call "$(lib)/set/Set<i32>#has"
|
||||
(get_global $std/set/set)
|
||||
(i32.const 1)
|
||||
)
|
||||
|
@ -122,7 +122,7 @@
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func "$(lib)/set/Set#get:size" (; 2 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(func "$(lib)/set/Set<i32>#get:size" (; 2 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(return
|
||||
(i32.load offset=8
|
||||
(get_local $0)
|
||||
@ -2257,7 +2257,7 @@
|
||||
)
|
||||
(func "$(lib)/allocator/arena/free_memory" (; 5 ;) (type $iv) (param $0 i32)
|
||||
)
|
||||
(func "$(lib)/set/Set#add" (; 6 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func "$(lib)/set/Set<i32>#add" (; 6 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
(if
|
||||
@ -2375,7 +2375,7 @@
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func "$(lib)/set/Set#has" (; 7 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func "$(lib)/set/Set<i32>#has" (; 7 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
(if
|
||||
@ -2449,7 +2449,7 @@
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(func "$(lib)/set/Set#delete" (; 8 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func "$(lib)/set/Set<i32>#delete" (; 8 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
(if
|
||||
@ -2573,7 +2573,7 @@
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(func "$(lib)/set/Set#clear" (; 9 ;) (type $iv) (param $0 i32)
|
||||
(func "$(lib)/set/Set<i32>#clear" (; 9 ;) (type $iv) (param $0 i32)
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.ne
|
||||
@ -2626,7 +2626,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/set/Set#get:size"
|
||||
(call "$(lib)/set/Set<i32>#get:size"
|
||||
(get_global $std/set/set)
|
||||
)
|
||||
(i32.const 0)
|
||||
@ -2643,19 +2643,19 @@
|
||||
)
|
||||
)
|
||||
(drop
|
||||
(call "$(lib)/set/Set#add"
|
||||
(call "$(lib)/set/Set<i32>#add"
|
||||
(get_global $std/set/set)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(drop
|
||||
(call "$(lib)/set/Set#add"
|
||||
(call "$(lib)/set/Set<i32>#add"
|
||||
(get_global $std/set/set)
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(drop
|
||||
(call "$(lib)/set/Set#add"
|
||||
(call "$(lib)/set/Set<i32>#add"
|
||||
(get_global $std/set/set)
|
||||
(i32.const 2)
|
||||
)
|
||||
@ -2663,7 +2663,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/set/Set#get:size"
|
||||
(call "$(lib)/set/Set<i32>#get:size"
|
||||
(get_global $std/set/set)
|
||||
)
|
||||
(i32.const 3)
|
||||
@ -2681,7 +2681,7 @@
|
||||
)
|
||||
(if
|
||||
(i32.eqz
|
||||
(call "$(lib)/set/Set#has"
|
||||
(call "$(lib)/set/Set<i32>#has"
|
||||
(get_global $std/set/set)
|
||||
(i32.const 1)
|
||||
)
|
||||
@ -2698,7 +2698,7 @@
|
||||
)
|
||||
(if
|
||||
(i32.eqz
|
||||
(call "$(lib)/set/Set#has"
|
||||
(call "$(lib)/set/Set<i32>#has"
|
||||
(get_global $std/set/set)
|
||||
(i32.const 0)
|
||||
)
|
||||
@ -2715,7 +2715,7 @@
|
||||
)
|
||||
(if
|
||||
(i32.eqz
|
||||
(call "$(lib)/set/Set#has"
|
||||
(call "$(lib)/set/Set<i32>#has"
|
||||
(get_global $std/set/set)
|
||||
(i32.const 2)
|
||||
)
|
||||
@ -2733,7 +2733,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eqz
|
||||
(call "$(lib)/set/Set#has"
|
||||
(call "$(lib)/set/Set<i32>#has"
|
||||
(get_global $std/set/set)
|
||||
(i32.const 3)
|
||||
)
|
||||
@ -2750,7 +2750,7 @@
|
||||
)
|
||||
)
|
||||
(drop
|
||||
(call "$(lib)/set/Set#delete"
|
||||
(call "$(lib)/set/Set<i32>#delete"
|
||||
(get_global $std/set/set)
|
||||
(i32.const 0)
|
||||
)
|
||||
@ -2758,7 +2758,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/set/Set#get:size"
|
||||
(call "$(lib)/set/Set<i32>#get:size"
|
||||
(get_global $std/set/set)
|
||||
)
|
||||
(i32.const 2)
|
||||
@ -2776,7 +2776,7 @@
|
||||
)
|
||||
(if
|
||||
(i32.eqz
|
||||
(call "$(lib)/set/Set#has"
|
||||
(call "$(lib)/set/Set<i32>#has"
|
||||
(get_global $std/set/set)
|
||||
(i32.const 1)
|
||||
)
|
||||
@ -2794,7 +2794,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eqz
|
||||
(call "$(lib)/set/Set#has"
|
||||
(call "$(lib)/set/Set<i32>#has"
|
||||
(get_global $std/set/set)
|
||||
(i32.const 0)
|
||||
)
|
||||
@ -2812,7 +2812,7 @@
|
||||
)
|
||||
(if
|
||||
(i32.eqz
|
||||
(call "$(lib)/set/Set#has"
|
||||
(call "$(lib)/set/Set<i32>#has"
|
||||
(get_global $std/set/set)
|
||||
(i32.const 2)
|
||||
)
|
||||
@ -2827,13 +2827,13 @@
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(call "$(lib)/set/Set#clear"
|
||||
(call "$(lib)/set/Set<i32>#clear"
|
||||
(get_global $std/set/set)
|
||||
)
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eq
|
||||
(call "$(lib)/set/Set#get:size"
|
||||
(call "$(lib)/set/Set<i32>#get:size"
|
||||
(get_global $std/set/set)
|
||||
)
|
||||
(i32.const 0)
|
||||
@ -2852,7 +2852,7 @@
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.eqz
|
||||
(call "$(lib)/set/Set#has"
|
||||
(call "$(lib)/set/Set<i32>#has"
|
||||
(get_global $std/set/set)
|
||||
(i32.const 1)
|
||||
)
|
||||
|
2727
tests/compiler/std/static-array.optimized.wat
Normal file
2727
tests/compiler/std/static-array.optimized.wat
Normal file
File diff suppressed because it is too large
Load Diff
30
tests/compiler/std/static-array.ts
Normal file
30
tests/compiler/std/static-array.ts
Normal file
@ -0,0 +1,30 @@
|
||||
import "allocator/arena"; // needed just because std/Array#[]= calls __grow conditionally
|
||||
|
||||
const i: i32[] = [1, 2];
|
||||
const I: i64[] = [3, 4];
|
||||
const f: f32[] = [1.5, 2.5];
|
||||
const F: f64[] = [1.25, 2.25];
|
||||
|
||||
assert(i.length == 2);
|
||||
assert(i[0] == 1);
|
||||
assert(i[1] == 2);
|
||||
i[0] = 2;
|
||||
assert(i[0] == 2);
|
||||
|
||||
assert(I.length == 2);
|
||||
assert(I[0] == 3);
|
||||
assert(I[1] == 4);
|
||||
I[0] = 4;
|
||||
assert(I[0] == 4);
|
||||
|
||||
assert(f.length == 2);
|
||||
assert(f[0] == 1.5);
|
||||
assert(f[1] == 2.5);
|
||||
f[0] = 2.5;
|
||||
assert(f[0] == 2.5);
|
||||
|
||||
assert(F.length == 2);
|
||||
assert(F[0] == 1.25);
|
||||
assert(F[1] == 2.25);
|
||||
F[0] = 2.25;
|
||||
assert(F[0] == 2.25);
|
3211
tests/compiler/std/static-array.untouched.wat
Normal file
3211
tests/compiler/std/static-array.untouched.wat
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user