From 6a7ca5ffc0f7ab2af39ff379b6dc1f5eb553e080 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Mon, 14 Dec 2020 23:02:13 +0200 Subject: [PATCH 01/10] xxhash 64-bit --- std/assembly/map.ts | 14 +- std/assembly/set.ts | 10 +- std/assembly/util/hash.ts | 147 +- tests/compiler/std/hash.optimized.wat | 291 ++- tests/compiler/std/hash.ts | 8 +- tests/compiler/std/hash.untouched.wat | 742 ++++-- tests/compiler/std/map.optimized.wat | 2010 +++++++-------- tests/compiler/std/map.untouched.wat | 3020 +++++++++++------------ tests/compiler/std/set.optimized.wat | 1586 ++++++------ tests/compiler/std/set.untouched.wat | 2126 ++++++++-------- tests/compiler/std/symbol.optimized.wat | 669 +++-- tests/compiler/std/symbol.untouched.wat | 726 ++++-- 12 files changed, 6166 insertions(+), 5183 deletions(-) diff --git a/std/assembly/map.ts b/std/assembly/map.ts index c888cbc27f..118409f8fe 100644 --- a/std/assembly/map.ts +++ b/std/assembly/map.ts @@ -58,7 +58,7 @@ export class Map { // buckets referencing their respective first entry, usize[bucketsMask + 1] private buckets: ArrayBuffer = new ArrayBuffer(INITIAL_CAPACITY * BUCKET_SIZE); - private bucketsMask: u32 = INITIAL_CAPACITY - 1; + private bucketsMask: u64 = INITIAL_CAPACITY - 1; // entries in insertion order, MapEntry[entriesCapacity] private entries: ArrayBuffer = new ArrayBuffer(INITIAL_CAPACITY * ENTRY_SIZE()); @@ -83,7 +83,7 @@ export class Map { this.entriesCount = 0; } - private find(key: K, hashCode: u32): MapEntry | null { + private find(key: K, hashCode: u64): MapEntry | null { var entry = load>( // unmanaged! changetype(this.buckets) + (hashCode & this.bucketsMask) * BUCKET_SIZE ); @@ -123,11 +123,11 @@ export class Map { } else { // check if rehashing is necessary if (this.entriesOffset == this.entriesCapacity) { - this.rehash( + this.rehash(u32( this.entriesCount < this.entriesCapacity * FREE_FACTOR_N / FREE_FACTOR_D ? this.bucketsMask // just rehash if 1/4+ entries are empty : (this.bucketsMask << 1) | 1 // grow capacity to next 2^N - ); + )); } // append new entry let entries = this.entries; @@ -156,7 +156,7 @@ export class Map { entry.taggedNext |= EMPTY; --this.entriesCount; // check if rehashing is appropriate - var halfBucketsMask = this.bucketsMask >> 1; + var halfBucketsMask = (this.bucketsMask >> 1); if ( halfBucketsMask + 1 >= max(INITIAL_CAPACITY, this.entriesCount) && this.entriesCount < this.entriesCapacity * FREE_FACTOR_N / FREE_FACTOR_D @@ -181,8 +181,8 @@ export class Map { let oldEntryKey = oldEntry.key; newEntry.key = oldEntryKey; newEntry.value = oldEntry.value; - let newBucketIndex = HASH(oldEntryKey) & newBucketsMask; - let newBucketPtrBase = changetype(newBuckets) + newBucketIndex * BUCKET_SIZE; + let newBucketIndex = (HASH(oldEntryKey) & newBucketsMask); + let newBucketPtrBase = changetype(newBuckets) + newBucketIndex * BUCKET_SIZE; newEntry.taggedNext = load(newBucketPtrBase); store(newBucketPtrBase, newPtr); newPtr += ENTRY_SIZE(); diff --git a/std/assembly/set.ts b/std/assembly/set.ts index 2fe540a551..b5a4452bf5 100644 --- a/std/assembly/set.ts +++ b/std/assembly/set.ts @@ -55,7 +55,7 @@ export class Set { // buckets referencing their respective first entry, usize[bucketsMask + 1] private buckets: ArrayBuffer = new ArrayBuffer(INITIAL_CAPACITY * BUCKET_SIZE); - private bucketsMask: u32 = INITIAL_CAPACITY - 1; + private bucketsMask: u64 = INITIAL_CAPACITY - 1; // entries in insertion order, SetEntry[entriesCapacity] private entries: ArrayBuffer = new ArrayBuffer(INITIAL_CAPACITY * ENTRY_SIZE()); @@ -80,7 +80,7 @@ export class Set { this.entriesCount = 0; } - private find(key: T, hashCode: u32): SetEntry | null { + private find(key: T, hashCode: u64): SetEntry | null { var entry = load>( // unmanaged! changetype(this.buckets) + (hashCode & this.bucketsMask) * BUCKET_SIZE ); @@ -103,11 +103,11 @@ export class Set { if (!entry) { // check if rehashing is necessary if (this.entriesOffset == this.entriesCapacity) { - this.rehash( + this.rehash(u32( this.entriesCount < this.entriesCapacity * FREE_FACTOR_N / FREE_FACTOR_D ? this.bucketsMask // just rehash if 1/4+ entries are empty : (this.bucketsMask << 1) | 1 // grow capacity to next 2^N - ); + )); } // append new entry entry = changetype>(changetype(this.entries) + (this.entriesOffset++) * ENTRY_SIZE()); @@ -136,7 +136,7 @@ export class Set { entry.taggedNext |= EMPTY; --this.entriesCount; // check if rehashing is appropriate - var halfBucketsMask = this.bucketsMask >> 1; + var halfBucketsMask = (this.bucketsMask >> 1); if ( halfBucketsMask + 1 >= max(INITIAL_CAPACITY, this.entriesCount) && this.entriesCount < this.entriesCapacity * FREE_FACTOR_N / FREE_FACTOR_D diff --git a/std/assembly/util/hash.ts b/std/assembly/util/hash.ts index c168fa4903..2ab7ff84eb 100644 --- a/std/assembly/util/hash.ts +++ b/std/assembly/util/hash.ts @@ -1,6 +1,6 @@ // @ts-ignore: decorator @inline -export function HASH(key: T): u32 { +export function HASH(key: T): u64 { if (isString()) { return hashStr(changetype(key)); } else if (isReference()) { @@ -10,63 +10,128 @@ export function HASH(key: T): u32 { if (sizeof() == 4) return hash32(reinterpret(f32(key))); if (sizeof() == 8) return hash64(reinterpret(f64(key))); } else { - if (sizeof() == 1) return hash8 (u32(key)); - if (sizeof() == 2) return hash16(u32(key)); - if (sizeof() == 4) return hash32(u32(key)); + if (sizeof() <= 4) return hash32(u32(key)); if (sizeof() == 8) return hash64(u64(key)); } return unreachable(); } -// FNV-1a 32-bit as a starting point, see: http://isthe.com/chongo/tech/comp/fnv/ +// XXHash 32-bit as a starting point, see: https://cyan4973.github.io/xxHash +// primes // @ts-ignore: decorator -@inline const FNV_OFFSET: u32 = 2166136261; - +@inline const XXH64_P1: u64 = 11400714785074694791; +// @ts-ignore: decorator +@inline const XXH64_P2: u64 = 14029467366897019727; +// @ts-ignore: decorator +@inline const XXH64_P3: u64 = 1609587929392839161; // @ts-ignore: decorator -@inline const FNV_PRIME: u32 = 16777619; +@inline const XXH64_P4: u64 = 9650029242287828579; +// @ts-ignore: decorator +@inline const XXH64_P5: u64 = 2870177450012600261; +// @ts-ignore: decorator +@inline const XXH64_SEED: u64 = 0; -function hash8(key: u32): u32 { - return (FNV_OFFSET ^ key) * FNV_PRIME; +function hash32(key: u32): u64 { + var h: u64 = XXH64_SEED + XXH64_P5 + 4; + h ^= u64(key) * XXH64_P1; + h = rotl(h, 23) * XXH64_P2 + XXH64_P3; + h ^= h >> 33; + h *= XXH64_P2; + h ^= h >> 29; + h *= XXH64_P3; + h ^= h >> 32; + return h; } -function hash16(key: u32): u32 { - var v = FNV_OFFSET; - v = (v ^ ( key & 0xff)) * FNV_PRIME; - v = (v ^ ( key >> 8 )) * FNV_PRIME; - return v; +function hash64(key: u64): u64 { + var h: u64 = XXH64_SEED + XXH64_P5 + 8; + h ^= rotl(key * XXH64_P2, 31) * XXH64_P1; + h = rotl(h, 27) * XXH64_P1 + XXH64_P4; + h ^= h >> 33; + h *= XXH64_P2; + h ^= h >> 29; + h *= XXH64_P3; + h ^= h >> 32; + return h; } -function hash32(key: u32): u32 { - var v = FNV_OFFSET; - v = (v ^ ( key & 0xff)) * FNV_PRIME; - v = (v ^ ((key >> 8) & 0xff)) * FNV_PRIME; - v = (v ^ ((key >> 16) & 0xff)) * FNV_PRIME; - v = (v ^ ( key >> 24 )) * FNV_PRIME; - return v; +// @ts-ignore: decorator +@inline +function mix1(h: u64, key: u64): u64 { + return rotl(h + key * XXH64_P2, 31) * XXH64_P1; } -function hash64(key: u64): u32 { - var l = key; - var h = (key >>> 32); - var v = FNV_OFFSET; - v = (v ^ ( l & 0xff)) * FNV_PRIME; - v = (v ^ ((l >> 8) & 0xff)) * FNV_PRIME; - v = (v ^ ((l >> 16) & 0xff)) * FNV_PRIME; - v = (v ^ ( l >> 24 )) * FNV_PRIME; - v = (v ^ ( h & 0xff)) * FNV_PRIME; - v = (v ^ ((h >> 8) & 0xff)) * FNV_PRIME; - v = (v ^ ((h >> 16) & 0xff)) * FNV_PRIME; - v = (v ^ ( h >> 24 )) * FNV_PRIME; - return v; +// @ts-ignore: decorator +@inline +function mix2(h: u64, s: u64): u64 { + return (h ^ (rotl(s, 31) * XXH64_P1)) * XXH64_P1 + XXH64_P4; } -function hashStr(key: string): u32 { - var v = FNV_OFFSET; - if (key !== null) { - for (let i: usize = 0, k: usize = key.length << 1; i < k; ++i) { - v = (v ^ load(changetype(key) + i)) * FNV_PRIME; +function hashStr(key: string): u64 { + if (key === null) { + return XXH64_SEED; + } + var len = key.length << 1; + var h: u64 = XXH64_SEED + XXH64_P5 + u64(len); + + if (len >= 32) { + let s1 = XXH64_SEED + XXH64_P1 + XXH64_P2; + let s2 = XXH64_SEED + XXH64_P2; + let s3 = XXH64_SEED; + let s4 = XXH64_SEED - XXH64_P1; + + let i = 0; + len -= 32; + + while (i <= len) { + s1 = mix1(s1, load(changetype(key) + i )); + s2 = mix1(s2, load(changetype(key) + i, 8)); + s3 = mix1(s3, load(changetype(key) + i, 16)); + s4 = mix1(s4, load(changetype(key) + i, 24)); + i += 32; } + h = rotl(s1, 1) + rotl(s2, 7) + rotl(s3, 12) + rotl(s4, 18); + + s1 *= XXH64_P2; + s2 *= XXH64_P2; + s3 *= XXH64_P2; + s4 *= XXH64_P2; + + h = mix2(h, s1); + h = mix2(h, s2); + h = mix2(h, s3); + h = mix2(h, s4); + + h += u64(len); + len -= i; + } + + var i = 0; + len -= 8; + + while (i <= len) { + h ^= rotl(load(changetype(key) + i) * XXH64_P2, 31) * XXH64_P1; + h = rotl(h, 27) * XXH64_P1 + XXH64_P4; + i += 8; + } + + if (i + 4 <= len) { + h ^= load(changetype(key) + i) * XXH64_P1; + h = rotl(h, 23) * XXH64_P2 + XXH64_P3; + i += 4; } - return v; + + while (i < len) { + h += load(changetype(key) + i) * XXH64_P5; + h = rotl(h, 11) * XXH64_P1; + i++; + } + + h ^= h >> 33; + h *= XXH64_P2; + h ^= h >> 29; + h *= XXH64_P3; + h ^= h >> 32; + return h; } diff --git a/tests/compiler/std/hash.optimized.wat b/tests/compiler/std/hash.optimized.wat index e0f7a02167..77c1ba967f 100644 --- a/tests/compiler/std/hash.optimized.wat +++ b/tests/compiler/std/hash.optimized.wat @@ -6,49 +6,276 @@ (data (i32.const 1068) "\02\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00a") (data (i32.const 1100) "\04\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00a\00b") (data (i32.const 1132) "\06\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00a\00b\00c") + (data (i32.const 1164) "\08\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00a\00b\00c\00d") + (data (i32.const 1196) "\n\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00a\00b\00c\00d\00e") + (data (i32.const 1228) "\0c\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00a\00b\00c\00d\00e\00f") + (data (i32.const 1260) "\0e\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00a\00b\00c\00d\00e\00f\00g") + (data (i32.const 1308) "\10\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00a\00b\00c\00d\00e\00f\00g\00h") + (data (i32.const 1356) "\12\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00a\00b\00c\00d\00e\00f\00g\00h\00i") (export "memory" (memory $0)) (start $~start) (func $~lib/util/hash/hashStr (param $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) - i32.const -2128831035 - local.set $2 + (local $3 i64) + (local $4 i32) + (local $5 i32) + (local $6 i64) + (local $7 i64) + (local $8 i64) local.get $0 + i32.eqz if - local.get $0 - i32.const 20 + return + end + local.get $0 + i32.const 20 + i32.sub + i32.load offset=16 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl + local.tee $2 + i64.extend_i32_s + i64.const 2870177450012600261 + i64.add + local.set $8 + local.get $2 + i32.const 32 + i32.ge_s + if (result i32) + i64.const 6983438078262162902 + local.set $8 + i64.const -4417276706812531889 + local.set $7 + i64.const 7046029288634856825 + local.set $6 + local.get $2 + i32.const 32 i32.sub - i32.load offset=16 - i32.const 1 - i32.shr_u - i32.const 1 - i32.shl - local.set $3 - loop $for-loop|0 - local.get $1 - local.get $3 - i32.lt_u + local.set $2 + loop $while-continue|0 + local.get $2 + local.get $5 + i32.ge_s if - local.get $2 + local.get $8 local.get $0 - local.get $1 + local.get $5 i32.add - i32.load8_u - i32.xor - i32.const 16777619 - i32.mul - local.set $2 - local.get $1 - i32.const 1 + local.tee $4 + i64.load + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $8 + local.get $7 + local.get $4 + i64.load offset=8 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $7 + local.get $3 + local.get $4 + i64.load offset=16 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $3 + local.get $6 + local.get $4 + i64.load offset=24 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $6 + local.get $5 + i32.const 32 i32.add - local.set $1 - br $for-loop|0 + local.set $5 + br $while-continue|0 end end + local.get $2 + i64.extend_i32_s + local.get $8 + i64.const 1 + i64.rotl + local.get $7 + i64.const 7 + i64.rotl + i64.add + local.get $3 + i64.const 12 + i64.rotl + i64.add + local.get $6 + i64.const 18 + i64.rotl + i64.add + local.get $8 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.get $7 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.get $3 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.get $6 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + i64.add + local.set $8 + local.get $2 + local.get $5 + i32.sub + else + local.get $2 + end + i32.const 8 + i32.sub + local.set $2 + loop $while-continue|1 + local.get $1 + local.get $2 + i32.le_s + if + local.get $8 + local.get $0 + local.get $1 + i32.add + i64.load + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const 27 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $8 + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $while-continue|1 + end + end + local.get $2 + local.get $1 + i32.const 4 + i32.add + i32.ge_s + if + local.get $8 + local.get $0 + local.get $1 + i32.add + i64.load32_u + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $8 + local.get $1 + i32.const 4 + i32.add + local.set $1 + end + loop $while-continue|2 + local.get $1 + local.get $2 + i32.lt_s + if + local.get $8 + local.get $0 + local.get $1 + i32.add + i64.load8_u + i64.const 2870177450012600261 + i64.mul + i64.add + i64.const 11 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $8 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $while-continue|2 + end end ) (func $~start + (local $0 i32) + (local $1 i64) i32.const 0 call $~lib/util/hash/hashStr i32.const 1056 @@ -59,5 +286,17 @@ call $~lib/util/hash/hashStr i32.const 1152 call $~lib/util/hash/hashStr + i32.const 1184 + call $~lib/util/hash/hashStr + i32.const 1216 + call $~lib/util/hash/hashStr + i32.const 1248 + call $~lib/util/hash/hashStr + i32.const 1280 + call $~lib/util/hash/hashStr + i32.const 1328 + call $~lib/util/hash/hashStr + i32.const 1376 + call $~lib/util/hash/hashStr ) ) diff --git a/tests/compiler/std/hash.ts b/tests/compiler/std/hash.ts index b46889ba88..714866475e 100644 --- a/tests/compiler/std/hash.ts +++ b/tests/compiler/std/hash.ts @@ -1,6 +1,6 @@ import { HASH } from "util/hash"; -function check(hash: u32): bool { +function check(hash: u64): bool { return true; } @@ -9,6 +9,12 @@ check(HASH("")); check(HASH("a")); check(HASH("ab")); check(HASH("abc")); +check(HASH("abcd")); +check(HASH("abcde")); +check(HASH("abcdef")); +check(HASH("abcdefg")); +check(HASH("abcdefgh")); +check(HASH("abcdefghi")); check(HASH(0.0)); check(HASH(1.0)); diff --git a/tests/compiler/std/hash.untouched.wat b/tests/compiler/std/hash.untouched.wat index c1e7d41192..8bdd3461c0 100644 --- a/tests/compiler/std/hash.untouched.wat +++ b/tests/compiler/std/hash.untouched.wat @@ -1,19 +1,30 @@ (module - (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_=>_i64 (func (param i32) (result i64))) (type $i32_=>_none (func (param i32))) (type $i64_=>_i32 (func (param i64) (result i32))) + (type $i64_=>_i64 (func (param i64) (result i64))) (memory $0 1) (data (i32.const 12) "\00\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00") (data (i32.const 44) "\02\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00a\00") (data (i32.const 76) "\04\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00a\00b\00") (data (i32.const 108) "\06\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00a\00b\00c\00") + (data (i32.const 140) "\08\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00a\00b\00c\00d\00") + (data (i32.const 172) "\n\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00a\00b\00c\00d\00e\00") + (data (i32.const 204) "\0c\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00a\00b\00c\00d\00e\00f\00") + (data (i32.const 236) "\0e\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00a\00b\00c\00d\00e\00f\00g\00") + (data (i32.const 284) "\10\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00a\00b\00c\00d\00e\00f\00g\00h\00") + (data (i32.const 332) "\12\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00a\00b\00c\00d\00e\00f\00g\00h\00i\00") (table $0 1 funcref) (export "memory" (memory $0)) (start $~start) (func $~lib/rt/stub/__retain (param $0 i32) (result i32) local.get $0 ) + (func $~lib/rt/stub/__release (param $0 i32) + nop + ) (func $~lib/string/String#get:length (param $0 i32) (result i32) local.get $0 i32.const 20 @@ -22,199 +33,502 @@ i32.const 1 i32.shr_u ) - (func $~lib/rt/stub/__release (param $0 i32) - nop - ) - (func $~lib/util/hash/hashStr (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/util/hash/hashStr (param $0 i32) (result i64) + (local $1 i64) (local $2 i32) - (local $3 i32) - (local $4 i32) + (local $3 i64) + (local $4 i64) + (local $5 i64) + (local $6 i64) + (local $7 i32) + (local $8 i32) + (local $9 i64) + (local $10 i64) + (local $11 i32) local.get $0 call $~lib/rt/stub/__retain local.set $0 - i32.const -2128831035 - local.set $1 local.get $0 i32.const 0 - i32.ne + i32.eq + if + i64.const 0 + local.set $1 + local.get $0 + call $~lib/rt/stub/__release + local.get $1 + return + end + local.get $0 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + local.set $2 + i64.const 0 + i64.const 2870177450012600261 + i64.add + local.get $2 + i64.extend_i32_s + i64.add + local.set $3 + local.get $2 + i32.const 32 + i32.ge_s if + i64.const 0 + i64.const -7046029288634856825 + i64.add + i64.const -4417276706812531889 + i64.add + local.set $1 + i64.const 0 + i64.const -4417276706812531889 + i64.add + local.set $4 + i64.const 0 + local.set $5 + i64.const 0 + i64.const -7046029288634856825 + i64.sub + local.set $6 i32.const 0 + local.set $7 + local.get $2 + i32.const 32 + i32.sub local.set $2 - local.get $0 - call $~lib/string/String#get:length - i32.const 1 - i32.shl - local.set $3 - loop $for-loop|0 + loop $while-continue|0 + local.get $7 local.get $2 - local.get $3 - i32.lt_u - local.set $4 - local.get $4 + i32.le_s + local.set $8 + local.get $8 if local.get $1 + local.set $10 local.get $0 - local.get $2 + local.get $7 i32.add - i32.load8_u - i32.xor - i32.const 16777619 - i32.mul + i64.load + local.set $9 + local.get $10 + local.get $9 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul local.set $1 - local.get $2 - i32.const 1 + local.get $4 + local.set $10 + local.get $0 + local.get $7 + i32.add + i64.load offset=8 + local.set $9 + local.get $10 + local.get $9 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $4 + local.get $5 + local.set $10 + local.get $0 + local.get $7 + i32.add + i64.load offset=16 + local.set $9 + local.get $10 + local.get $9 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $5 + local.get $6 + local.set $10 + local.get $0 + local.get $7 + i32.add + i64.load offset=24 + local.set $9 + local.get $10 + local.get $9 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $6 + local.get $7 + i32.const 32 i32.add - local.set $2 - br $for-loop|0 + local.set $7 + br $while-continue|0 end end + local.get $1 + i64.const 1 + i64.rotl + local.get $4 + i64.const 7 + i64.rotl + i64.add + local.get $5 + i64.const 12 + i64.rotl + i64.add + local.get $6 + i64.const 18 + i64.rotl + i64.add + local.set $3 + local.get $1 + i64.const -4417276706812531889 + i64.mul + local.set $1 + local.get $4 + i64.const -4417276706812531889 + i64.mul + local.set $4 + local.get $5 + i64.const -4417276706812531889 + i64.mul + local.set $5 + local.get $6 + i64.const -4417276706812531889 + i64.mul + local.set $6 + local.get $3 + local.set $10 + local.get $1 + local.set $9 + local.get $10 + local.get $9 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $3 + local.get $3 + local.set $10 + local.get $4 + local.set $9 + local.get $10 + local.get $9 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $3 + local.get $3 + local.set $10 + local.get $5 + local.set $9 + local.get $10 + local.get $9 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $3 + local.get $3 + local.set $10 + local.get $6 + local.set $9 + local.get $10 + local.get $9 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $3 + local.get $3 + local.get $2 + i64.extend_i32_s + i64.add + local.set $3 + local.get $2 + local.get $7 + i32.sub + local.set $2 + end + i32.const 0 + local.set $11 + local.get $2 + i32.const 8 + i32.sub + local.set $2 + loop $while-continue|1 + local.get $11 + local.get $2 + i32.le_s + local.set $7 + local.get $7 + if + local.get $3 + local.get $0 + local.get $11 + i32.add + i64.load + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $3 + local.get $3 + i64.const 27 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $3 + local.get $11 + i32.const 8 + i32.add + local.set $11 + br $while-continue|1 + end end - local.get $1 + local.get $11 + i32.const 4 + i32.add + local.get $2 + i32.le_s + if + local.get $3 + local.get $0 + local.get $11 + i32.add + i64.load32_u + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $3 + local.get $3 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $3 + local.get $11 + i32.const 4 + i32.add + local.set $11 + end + loop $while-continue|2 + local.get $11 + local.get $2 + i32.lt_s + local.set $7 + local.get $7 + if + local.get $3 + local.get $0 + local.get $11 + i32.add + i64.load8_u + i64.const 2870177450012600261 + i64.mul + i64.add + local.set $3 + local.get $3 + i64.const 11 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $3 + local.get $11 + i32.const 1 + i32.add + local.set $11 + br $while-continue|2 + end + end + local.get $3 + local.get $3 + i64.const 33 + i64.shr_u + i64.xor local.set $3 + local.get $3 + i64.const -4417276706812531889 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 29 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const 1609587929392839161 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 32 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + local.set $6 local.get $0 call $~lib/rt/stub/__release - local.get $3 + local.get $6 ) - (func $std/hash/check (param $0 i32) (result i32) + (func $std/hash/check (param $0 i64) (result i32) i32.const 1 ) - (func $~lib/util/hash/hash32 (param $0 i32) (result i32) - (local $1 i32) - i32.const -2128831035 + (func $~lib/util/hash/hash32 (param $0 i32) (result i64) + (local $1 i64) + i64.const 0 + i64.const 2870177450012600261 + i64.add + i64.const 4 + i64.add local.set $1 local.get $1 local.get $0 - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.xor local.set $1 local.get $1 - local.get $0 - i32.const 8 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add local.set $1 local.get $1 - local.get $0 - i32.const 16 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul + local.get $1 + i64.const 33 + i64.shr_u + i64.xor local.set $1 local.get $1 - local.get $0 - i32.const 24 - i32.shr_u - i32.xor - i32.const 16777619 - i32.mul + i64.const -4417276706812531889 + i64.mul + local.set $1 + local.get $1 + local.get $1 + i64.const 29 + i64.shr_u + i64.xor + local.set $1 + local.get $1 + i64.const 1609587929392839161 + i64.mul + local.set $1 + local.get $1 + local.get $1 + i64.const 32 + i64.shr_u + i64.xor local.set $1 local.get $1 ) - (func $~lib/util/hash/hash64 (param $0 i64) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.wrap_i64 + (func $~lib/util/hash/hash64 (param $0 i64) (result i64) + (local $1 i64) + i64.const 0 + i64.const 2870177450012600261 + i64.add + i64.const 8 + i64.add local.set $1 + local.get $1 local.get $0 - i64.const 32 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $1 + local.get $1 + i64.const 27 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $1 + local.get $1 + local.get $1 + i64.const 33 i64.shr_u - i32.wrap_i64 - local.set $2 - i32.const -2128831035 - local.set $3 - local.get $3 + i64.xor + local.set $1 local.get $1 - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 + i64.const -4417276706812531889 + i64.mul + local.set $1 local.get $1 - i32.const 8 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 local.get $1 - i32.const 16 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 + i64.const 29 + i64.shr_u + i64.xor + local.set $1 + local.get $1 + i64.const 1609587929392839161 + i64.mul + local.set $1 + local.get $1 + local.get $1 + i64.const 32 + i64.shr_u + i64.xor + local.set $1 local.get $1 - i32.const 24 - i32.shr_u - i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 - local.get $2 - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 - local.get $2 - i32.const 8 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 - local.get $2 - i32.const 16 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 - local.get $2 - i32.const 24 - i32.shr_u - i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 ) (func $start:std/hash (local $0 i32) - (local $1 i32) + (local $1 i64) (local $2 f32) (local $3 f64) - block $~lib/util/hash/HASH<~lib/string/String|null>|inlined.0 (result i32) + block $~lib/util/hash/HASH<~lib/string/String|null>|inlined.0 (result i64) i32.const 0 call $~lib/rt/stub/__retain local.set $0 @@ -230,22 +544,22 @@ end call $std/hash/check drop - block $~lib/util/hash/HASH<~lib/string/String>|inlined.0 (result i32) + block $~lib/util/hash/HASH<~lib/string/String>|inlined.0 (result i64) i32.const 32 - local.set $1 + local.set $0 i32.const 1 drop - local.get $1 + local.get $0 call $~lib/util/hash/hashStr - local.set $0 - local.get $1 - call $~lib/rt/stub/__release + local.set $1 local.get $0 + call $~lib/rt/stub/__release + local.get $1 br $~lib/util/hash/HASH<~lib/string/String>|inlined.0 end call $std/hash/check drop - block $~lib/util/hash/HASH<~lib/string/String>|inlined.1 (result i32) + block $~lib/util/hash/HASH<~lib/string/String>|inlined.1 (result i64) i32.const 64 local.set $0 i32.const 1 @@ -260,23 +574,98 @@ end call $std/hash/check drop - block $~lib/util/hash/HASH<~lib/string/String>|inlined.2 (result i32) + block $~lib/util/hash/HASH<~lib/string/String>|inlined.2 (result i64) i32.const 96 + local.set $0 + i32.const 1 + drop + local.get $0 + call $~lib/util/hash/hashStr local.set $1 + local.get $0 + call $~lib/rt/stub/__release + local.get $1 + br $~lib/util/hash/HASH<~lib/string/String>|inlined.2 + end + call $std/hash/check + drop + block $~lib/util/hash/HASH<~lib/string/String>|inlined.3 (result i64) + i32.const 128 + local.set $0 i32.const 1 drop + local.get $0 + call $~lib/util/hash/hashStr + local.set $1 + local.get $0 + call $~lib/rt/stub/__release local.get $1 + br $~lib/util/hash/HASH<~lib/string/String>|inlined.3 + end + call $std/hash/check + drop + block $~lib/util/hash/HASH<~lib/string/String>|inlined.4 (result i64) + i32.const 160 + local.set $0 + i32.const 1 + drop + local.get $0 call $~lib/util/hash/hashStr + local.set $1 + local.get $0 + call $~lib/rt/stub/__release + local.get $1 + br $~lib/util/hash/HASH<~lib/string/String>|inlined.4 + end + call $std/hash/check + drop + block $~lib/util/hash/HASH<~lib/string/String>|inlined.5 (result i64) + i32.const 192 local.set $0 + i32.const 1 + drop + local.get $0 + call $~lib/util/hash/hashStr + local.set $1 + local.get $0 + call $~lib/rt/stub/__release local.get $1 + br $~lib/util/hash/HASH<~lib/string/String>|inlined.5 + end + call $std/hash/check + drop + block $~lib/util/hash/HASH<~lib/string/String>|inlined.6 (result i64) + i32.const 224 + local.set $0 + i32.const 1 + drop + local.get $0 + call $~lib/util/hash/hashStr + local.set $1 + local.get $0 call $~lib/rt/stub/__release + local.get $1 + br $~lib/util/hash/HASH<~lib/string/String>|inlined.6 + end + call $std/hash/check + drop + block $~lib/util/hash/HASH<~lib/string/String>|inlined.7 (result i64) + i32.const 256 + local.set $0 + i32.const 1 + drop local.get $0 - br $~lib/util/hash/HASH<~lib/string/String>|inlined.2 + call $~lib/util/hash/hashStr + local.set $1 + local.get $0 + call $~lib/rt/stub/__release + local.get $1 + br $~lib/util/hash/HASH<~lib/string/String>|inlined.7 end call $std/hash/check drop - block $~lib/util/hash/HASH<~lib/string/String>|inlined.3 (result i32) - i32.const 128 + block $~lib/util/hash/HASH<~lib/string/String>|inlined.8 (result i64) + i32.const 304 local.set $0 i32.const 1 drop @@ -286,11 +675,26 @@ local.get $0 call $~lib/rt/stub/__release local.get $1 - br $~lib/util/hash/HASH<~lib/string/String>|inlined.3 + br $~lib/util/hash/HASH<~lib/string/String>|inlined.8 + end + call $std/hash/check + drop + block $~lib/util/hash/HASH<~lib/string/String>|inlined.9 (result i64) + i32.const 352 + local.set $0 + i32.const 1 + drop + local.get $0 + call $~lib/util/hash/hashStr + local.set $1 + local.get $0 + call $~lib/rt/stub/__release + local.get $1 + br $~lib/util/hash/HASH<~lib/string/String>|inlined.9 end call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i64) f32.const 0 local.set $2 i32.const 0 @@ -310,7 +714,7 @@ end call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i64) f32.const 1 local.set $2 i32.const 0 @@ -330,7 +734,7 @@ end call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i64) f32.const 1.100000023841858 local.set $2 i32.const 0 @@ -350,7 +754,7 @@ end call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i64) f32.const 0 local.set $2 i32.const 0 @@ -370,7 +774,7 @@ end call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.4 (result i32) + block $~lib/util/hash/HASH|inlined.4 (result i64) f32.const inf local.set $2 i32.const 0 @@ -390,7 +794,7 @@ end call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.5 (result i32) + block $~lib/util/hash/HASH|inlined.5 (result i64) f32.const nan:0x400000 local.set $2 i32.const 0 @@ -410,7 +814,7 @@ end call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i64) f64.const 0 local.set $3 i32.const 0 @@ -434,7 +838,7 @@ end call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i64) f64.const 1 local.set $3 i32.const 0 @@ -458,7 +862,7 @@ end call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i64) f64.const 1.1 local.set $3 i32.const 0 @@ -482,7 +886,7 @@ end call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i64) f64.const 0 local.set $3 i32.const 0 @@ -506,7 +910,7 @@ end call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.4 (result i32) + block $~lib/util/hash/HASH|inlined.4 (result i64) f64.const inf local.set $3 i32.const 0 @@ -530,7 +934,7 @@ end call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.5 (result i32) + block $~lib/util/hash/HASH|inlined.5 (result i64) f64.const nan:0x8000000000000 local.set $3 i32.const 0 diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index d65655a3d4..b7bf6d4862 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -2,27 +2,31 @@ (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $none_=>_none (func)) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_none (func (param i32))) + (type $i32_i32_i64_=>_i32 (func (param i32 i32 i64) (result i32))) (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) - (type $i32_i64_i32_=>_i32 (func (param i32 i64 i32) (result i32))) + (type $i32_i64_i64_=>_i32 (func (param i32 i64 i64) (result i32))) (type $i32_f32_=>_i32 (func (param i32 f32) (result i32))) - (type $i32_f32_i32_=>_i32 (func (param i32 f32 i32) (result i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) - (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) (type $i32_i64_=>_none (func (param i32 i64))) (type $i32_f32_=>_none (func (param i32 f32))) (type $i32_f64_=>_none (func (param i32 f64))) (type $none_=>_i32 (func (result i32))) - (type $i32_i64_i64_=>_i32 (func (param i32 i64 i64) (result i32))) + (type $i32_i64_i32_=>_i32 (func (param i32 i64 i32) (result i32))) + (type $i32_f32_i32_=>_i32 (func (param i32 f32 i32) (result i32))) + (type $i32_f32_i64_=>_i32 (func (param i32 f32 i64) (result i32))) (type $i32_f32_f32_=>_i32 (func (param i32 f32 f32) (result i32))) + (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) + (type $i32_f64_i64_=>_i32 (func (param i32 f64 i64) (result i32))) (type $i32_f64_f64_=>_i32 (func (param i32 f64 f64) (result i32))) - (type $i64_=>_i32 (func (param i64) (result i32))) + (type $i32_=>_i64 (func (param i32) (result i64))) (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) + (type $i64_=>_i64 (func (param i64) (result i64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 1036) "(\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00(\00\00\00a\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") @@ -1290,13 +1294,49 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/hash/hash32 (param $0 i32) (result i64) + (local $1 i64) + local.get $0 + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.const 2870177450012600265 + i64.xor + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.tee $1 + local.get $1 + i64.const 33 + i64.shr_u + i64.xor + i64.const -4417276706812531889 + i64.mul + local.tee $1 + local.get $1 + i64.const 29 + i64.shr_u + i64.xor + i64.const 1609587929392839161 + i64.mul + local.tee $1 + local.get $1 + i64.const 32 + i64.shr_u + i64.xor + ) + (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (local $3 i32) local.get $0 i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -1307,7 +1347,7 @@ if local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 i32.const 1 i32.and if (result i32) @@ -1324,7 +1364,7 @@ local.get $0 return end - local.get $2 + local.get $3 i32.const -2 i32.and local.set $0 @@ -1341,10 +1381,7 @@ i32.shl i32.const 24 i32.shr_s - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/hash32 call $~lib/map/Map#find i32.const 0 i32.ne @@ -1376,10 +1413,10 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $4 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 12 i32.mul i32.add @@ -1408,13 +1445,12 @@ i32.store offset=4 local.get $2 local.get $5 - local.get $1 local.get $6 - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - i32.and + call $~lib/util/hash/hash32 + local.get $1 + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -1454,11 +1490,12 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $3 local.tee $1 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $4 i32.ne if @@ -1470,14 +1507,14 @@ end local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $7 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $5 call $~lib/rt/pure/__release local.get $3 @@ -1486,21 +1523,16 @@ (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) + (local $5 i64) + local.get $0 + local.get $1 local.get $1 i32.const 24 i32.shl i32.const 24 i32.shr_s - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - local.tee $3 - local.set $5 - local.get $0 - local.get $1 - local.get $3 + call $~lib/util/hash/hash32 + local.tee $5 call $~lib/map/Map#find local.tee $3 if @@ -1509,45 +1541,46 @@ i32.store offset=4 else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__retain local.set $4 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $3 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $4 local.get $3 i32.const 12 @@ -1561,17 +1594,18 @@ i32.store offset=4 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $3 local.get $0 i32.load local.get $5 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -1595,10 +1629,7 @@ i32.shl i32.const 24 i32.shr_s - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/hash32 call $~lib/map/Map#find local.tee $0 i32.eqz @@ -2092,10 +2123,10 @@ (local $7 i32) (local $8 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $7 local.set $4 i32.const 16 @@ -2322,10 +2353,10 @@ (local $4 i32) (local $5 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $3 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $4 call $~lib/array/Array#constructor local.set $0 @@ -2369,7 +2400,7 @@ ) (func $~lib/map/Map#constructor (result i32) (local $0 i32) - i32.const 24 + i32.const 32 i32.const 7 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -2378,21 +2409,21 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $0 i32.const 48 call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 local.get $0 ) (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) @@ -2443,10 +2474,10 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $4 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 3 i32.shl i32.add @@ -2475,13 +2506,12 @@ i32.store8 offset=1 local.get $2 local.get $5 - local.get $1 local.get $6 - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - i32.and + call $~lib/util/hash/hash32 + local.get $1 + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -2521,11 +2551,12 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $3 local.tee $1 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $4 i32.ne if @@ -2537,14 +2568,14 @@ end local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $7 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $5 call $~lib/rt/pure/__release local.get $3 @@ -2553,23 +2584,22 @@ (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) - local.get $0 - i32.load + (local $5 i64) local.get $1 local.tee $3 i32.const 24 i32.shl i32.const 24 i32.shr_s - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - local.tee $5 + call $~lib/util/hash/hash32 + local.set $5 local.get $0 - i32.load offset=4 - i32.and + i32.load + local.get $5 + local.get $0 + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -2612,45 +2642,46 @@ i32.store8 offset=1 else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__retain local.set $4 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $1 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $4 local.get $1 i32.const 3 @@ -2664,17 +2695,18 @@ i32.store8 offset=1 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $1 local.get $0 i32.load local.get $5 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -2690,44 +2722,15 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/util/hash/hash32 (param $0 i32) (result i32) - local.get $0 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - local.get $0 - i32.const 8 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.get $0 - i32.const 16 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.get $0 - i32.const 24 - i32.shr_u - i32.xor - i32.const 16777619 - i32.mul - ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (local $3 i32) local.get $0 i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -2738,7 +2741,7 @@ if local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 i32.const 1 i32.and if (result i32) @@ -2753,7 +2756,7 @@ local.get $0 return end - local.get $2 + local.get $3 i32.const -2 i32.and local.set $0 @@ -2789,10 +2792,10 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $4 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 12 i32.mul i32.add @@ -2824,7 +2827,9 @@ local.get $6 call $~lib/util/hash/hash32 local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -2864,11 +2869,12 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $3 local.tee $1 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $4 i32.ne if @@ -2880,14 +2886,14 @@ end local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $7 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $5 call $~lib/rt/pure/__release local.get $3 @@ -2896,7 +2902,7 @@ (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) + (local $5 i64) local.get $0 local.get $1 local.get $1 @@ -2910,45 +2916,46 @@ i32.store offset=4 else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__retain local.set $4 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $3 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $4 local.get $3 i32.const 12 @@ -2962,17 +2969,18 @@ i32.store offset=4 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $3 local.get $0 i32.load local.get $5 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -2997,10 +3005,7 @@ i32.shl i32.const 24 i32.shr_s - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/hash32 call $~lib/map/Map#find local.tee $1 i32.eqz @@ -3015,20 +3020,21 @@ i32.store offset=8 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.sub - i32.store offset=20 + i32.store offset=28 local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 local.tee $2 i32.const 1 i32.add i32.const 4 local.get $0 - i32.load offset=20 + i32.load offset=28 local.tee $1 local.get $1 i32.const 4 @@ -3037,9 +3043,9 @@ i32.ge_u if (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 @@ -3066,26 +3072,26 @@ local.get $1 i32.store local.get $0 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 i32.const 48 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $1 local.get $0 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__release local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 ) (func $std/map/testNumeric (local $0 i32) @@ -3096,7 +3102,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) - i32.const 24 + i32.const 32 i32.const 3 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -3105,21 +3111,21 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $0 i32.const 48 call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 loop $for-loop|1 local.get $1 i32.const 24 @@ -3190,7 +3196,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -3293,7 +3299,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -3310,7 +3316,7 @@ local.get $0 call $~lib/map/Map#values local.set $6 - i32.const 24 + i32.const 32 i32.const 6 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -3319,21 +3325,21 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $1 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $1 i32.const 32 call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $1 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $1 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $1 i32.const 0 - i32.store offset=20 + i32.store offset=28 call $~lib/map/Map#constructor local.set $5 loop $for-loop|4 @@ -3411,7 +3417,7 @@ end end local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -3423,7 +3429,7 @@ unreachable end local.get $5 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -3498,7 +3504,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -3576,7 +3582,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -3590,7 +3596,7 @@ local.get $0 call $~lib/map/Map#clear local.get $0 - i32.load offset=20 + i32.load offset=28 if i32.const 0 i32.const 1360 @@ -3616,10 +3622,7 @@ local.get $1 i32.const 255 i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/hash32 call $~lib/map/Map#find i32.const 0 i32.ne @@ -3651,10 +3654,10 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $4 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 12 i32.mul i32.add @@ -3683,13 +3686,12 @@ i32.store offset=4 local.get $2 local.get $5 - local.get $1 local.get $6 - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - i32.and + call $~lib/util/hash/hash32 + local.get $1 + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -3729,11 +3731,12 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $3 local.tee $1 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $4 i32.ne if @@ -3745,14 +3748,14 @@ end local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $7 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $5 call $~lib/rt/pure/__release local.get $3 @@ -3761,19 +3764,14 @@ (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) + (local $5 i64) + local.get $0 + local.get $1 local.get $1 i32.const 255 i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - local.tee $3 - local.set $5 - local.get $0 - local.get $1 - local.get $3 + call $~lib/util/hash/hash32 + local.tee $5 call $~lib/map/Map#find local.tee $3 if @@ -3782,45 +3780,46 @@ i32.store offset=4 else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__retain local.set $4 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $3 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $4 local.get $3 i32.const 12 @@ -3834,17 +3833,18 @@ i32.store offset=4 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $3 local.get $0 i32.load local.get $5 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -3866,10 +3866,7 @@ local.get $1 i32.const 255 i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/hash32 call $~lib/map/Map#find local.tee $0 i32.eqz @@ -3894,10 +3891,10 @@ (local $7 i32) (local $8 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $7 local.set $4 i32.const 16 @@ -4024,10 +4021,10 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $4 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 3 i32.shl i32.add @@ -4056,13 +4053,12 @@ i32.store8 offset=1 local.get $2 local.get $5 - local.get $1 local.get $6 - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - i32.and + call $~lib/util/hash/hash32 + local.get $1 + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -4102,11 +4098,12 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $3 local.tee $1 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $4 i32.ne if @@ -4118,14 +4115,14 @@ end local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $7 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $5 call $~lib/rt/pure/__release local.get $3 @@ -4134,21 +4131,20 @@ (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) - local.get $0 - i32.load + (local $5 i64) local.get $1 local.tee $3 i32.const 255 i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - local.tee $5 + call $~lib/util/hash/hash32 + local.set $5 local.get $0 - i32.load offset=4 - i32.and + i32.load + local.get $5 + local.get $0 + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -4191,45 +4187,46 @@ i32.store8 offset=1 else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__retain local.set $4 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $1 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $4 local.get $1 i32.const 3 @@ -4243,17 +4240,18 @@ i32.store8 offset=1 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $1 local.get $0 i32.load local.get $5 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -4276,10 +4274,7 @@ local.get $1 i32.const 255 i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/hash32 call $~lib/map/Map#find local.tee $1 i32.eqz @@ -4294,20 +4289,21 @@ i32.store offset=8 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.sub - i32.store offset=20 + i32.store offset=28 local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 local.tee $2 i32.const 1 i32.add i32.const 4 local.get $0 - i32.load offset=20 + i32.load offset=28 local.tee $1 local.get $1 i32.const 4 @@ -4316,9 +4312,9 @@ i32.ge_u if (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 @@ -4342,7 +4338,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) - i32.const 24 + i32.const 32 i32.const 8 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -4351,21 +4347,21 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $0 i32.const 48 call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 loop $for-loop|1 local.get $1 i32.const 255 @@ -4430,7 +4426,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -4525,7 +4521,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -4542,7 +4538,7 @@ local.get $0 call $~lib/map/Map#values local.set $6 - i32.const 24 + i32.const 32 i32.const 10 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -4551,21 +4547,21 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $1 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $1 i32.const 32 call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $1 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $1 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $1 i32.const 0 - i32.store offset=20 + i32.store offset=28 call $~lib/map/Map#constructor local.set $5 loop $for-loop|4 @@ -4643,7 +4639,7 @@ end end local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -4655,7 +4651,7 @@ unreachable end local.get $5 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -4726,7 +4722,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -4800,7 +4796,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -4814,7 +4810,7 @@ local.get $0 call $~lib/map/Map#clear local.get $0 - i32.load offset=20 + i32.load offset=28 if i32.const 0 i32.const 1360 @@ -4834,28 +4830,15 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/util/hash/hash16 (param $0 i32) (result i32) - local.get $0 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - local.get $0 - i32.const 8 - i32.shr_u - i32.xor - i32.const 16777619 - i32.mul - ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (local $3 i32) local.get $0 i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -4866,7 +4849,7 @@ if local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 i32.const 1 i32.and if (result i32) @@ -4883,7 +4866,7 @@ local.get $0 return end - local.get $2 + local.get $3 i32.const -2 i32.and local.set $0 @@ -4900,7 +4883,7 @@ i32.shl i32.const 16 i32.shr_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/hash32 call $~lib/map/Map#find i32.const 0 i32.ne @@ -4932,10 +4915,10 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $4 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 12 i32.mul i32.add @@ -4965,9 +4948,11 @@ local.get $2 local.get $5 local.get $6 - call $~lib/util/hash/hash16 + call $~lib/util/hash/hash32 local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -5007,11 +4992,12 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $3 local.tee $1 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $4 i32.ne if @@ -5023,14 +5009,14 @@ end local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $7 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $5 call $~lib/rt/pure/__release local.get $3 @@ -5039,7 +5025,7 @@ (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) + (local $5 i64) local.get $0 local.get $1 local.get $1 @@ -5047,7 +5033,7 @@ i32.shl i32.const 16 i32.shr_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/hash32 local.tee $5 call $~lib/map/Map#find local.tee $3 @@ -5057,45 +5043,46 @@ i32.store offset=4 else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__retain local.set $4 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $3 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $4 local.get $3 i32.const 12 @@ -5109,17 +5096,18 @@ i32.store offset=4 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $3 local.get $0 i32.load local.get $5 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -5143,7 +5131,7 @@ i32.shl i32.const 16 i32.shr_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/hash32 call $~lib/map/Map#find local.tee $0 i32.eqz @@ -5219,10 +5207,10 @@ (local $8 i32) (local $9 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $5 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $8 local.set $7 i32.const 16 @@ -5352,10 +5340,10 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $4 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 3 i32.shl i32.add @@ -5385,9 +5373,11 @@ local.get $2 local.get $5 local.get $6 - call $~lib/util/hash/hash16 + call $~lib/util/hash/hash32 local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -5427,11 +5417,12 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $3 local.tee $1 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $4 i32.ne if @@ -5443,14 +5434,14 @@ end local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $7 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $5 call $~lib/rt/pure/__release local.get $3 @@ -5459,21 +5450,22 @@ (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) + (local $5 i64) local.get $1 local.tee $3 i32.const 16 i32.shl i32.const 16 i32.shr_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/hash32 local.set $5 local.get $0 i32.load local.get $5 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -5516,45 +5508,46 @@ i32.store16 offset=2 else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__retain local.set $4 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $1 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $4 local.get $1 i32.const 3 @@ -5568,17 +5561,18 @@ i32.store16 offset=2 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $1 local.get $0 i32.load local.get $5 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -5603,7 +5597,7 @@ i32.shl i32.const 16 i32.shr_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/hash32 call $~lib/map/Map#find local.tee $1 i32.eqz @@ -5618,20 +5612,21 @@ i32.store offset=8 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.sub - i32.store offset=20 + i32.store offset=28 local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 local.tee $2 i32.const 1 i32.add i32.const 4 local.get $0 - i32.load offset=20 + i32.load offset=28 local.tee $1 local.get $1 i32.const 4 @@ -5640,9 +5635,9 @@ i32.ge_u if (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 @@ -5666,7 +5661,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) - i32.const 24 + i32.const 32 i32.const 11 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -5675,21 +5670,21 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $0 i32.const 48 call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 loop $for-loop|1 local.get $1 i32.const 16 @@ -5760,7 +5755,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -5863,7 +5858,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -5880,7 +5875,7 @@ local.get $0 call $~lib/map/Map#values local.set $6 - i32.const 24 + i32.const 32 i32.const 13 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -5889,21 +5884,21 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $1 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $1 i32.const 32 call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $1 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $1 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $1 i32.const 0 - i32.store offset=20 + i32.store offset=28 call $~lib/map/Map#constructor local.set $5 loop $for-loop|4 @@ -5983,7 +5978,7 @@ end end local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -5995,7 +5990,7 @@ unreachable end local.get $5 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -6070,7 +6065,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -6148,7 +6143,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -6162,7 +6157,7 @@ local.get $0 call $~lib/map/Map#clear local.get $0 - i32.load offset=20 + i32.load offset=28 if i32.const 0 i32.const 1360 @@ -6188,7 +6183,7 @@ local.get $1 i32.const 65535 i32.and - call $~lib/util/hash/hash16 + call $~lib/util/hash/hash32 call $~lib/map/Map#find i32.const 0 i32.ne @@ -6220,10 +6215,10 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $4 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 12 i32.mul i32.add @@ -6253,9 +6248,11 @@ local.get $2 local.get $5 local.get $6 - call $~lib/util/hash/hash16 + call $~lib/util/hash/hash32 local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -6295,11 +6292,12 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $3 local.tee $1 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $4 i32.ne if @@ -6311,14 +6309,14 @@ end local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $7 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $5 call $~lib/rt/pure/__release local.get $3 @@ -6327,13 +6325,13 @@ (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) + (local $5 i64) local.get $0 local.get $1 local.get $1 i32.const 65535 i32.and - call $~lib/util/hash/hash16 + call $~lib/util/hash/hash32 local.tee $5 call $~lib/map/Map#find local.tee $3 @@ -6343,45 +6341,46 @@ i32.store offset=4 else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__retain local.set $4 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $3 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $4 local.get $3 i32.const 12 @@ -6395,17 +6394,18 @@ i32.store offset=4 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $3 local.get $0 i32.load local.get $5 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -6427,7 +6427,7 @@ local.get $1 i32.const 65535 i32.and - call $~lib/util/hash/hash16 + call $~lib/util/hash/hash32 call $~lib/map/Map#find local.tee $0 i32.eqz @@ -6453,10 +6453,10 @@ (local $8 i32) (local $9 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $5 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $8 local.set $7 i32.const 16 @@ -6586,10 +6586,10 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $4 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 3 i32.shl i32.add @@ -6619,9 +6619,11 @@ local.get $2 local.get $5 local.get $6 - call $~lib/util/hash/hash16 + call $~lib/util/hash/hash32 local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -6661,11 +6663,12 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $3 local.tee $1 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $4 i32.ne if @@ -6677,14 +6680,14 @@ end local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $7 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $5 call $~lib/rt/pure/__release local.get $3 @@ -6693,19 +6696,20 @@ (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) + (local $5 i64) local.get $1 local.tee $3 i32.const 65535 i32.and - call $~lib/util/hash/hash16 + call $~lib/util/hash/hash32 local.set $5 local.get $0 i32.load local.get $5 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -6748,45 +6752,46 @@ i32.store16 offset=2 else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__retain local.set $4 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $1 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $4 local.get $1 i32.const 3 @@ -6800,17 +6805,18 @@ i32.store16 offset=2 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $1 local.get $0 i32.load local.get $5 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -6833,7 +6839,7 @@ local.get $1 i32.const 65535 i32.and - call $~lib/util/hash/hash16 + call $~lib/util/hash/hash32 call $~lib/map/Map#find local.tee $1 i32.eqz @@ -6848,20 +6854,21 @@ i32.store offset=8 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.sub - i32.store offset=20 + i32.store offset=28 local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 local.tee $2 i32.const 1 i32.add i32.const 4 local.get $0 - i32.load offset=20 + i32.load offset=28 local.tee $1 local.get $1 i32.const 4 @@ -6870,9 +6877,9 @@ i32.ge_u if (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 @@ -6896,7 +6903,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) - i32.const 24 + i32.const 32 i32.const 14 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -6905,21 +6912,21 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $0 i32.const 48 call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 loop $for-loop|1 local.get $1 i32.const 65535 @@ -6984,7 +6991,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -7079,7 +7086,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -7096,7 +7103,7 @@ local.get $0 call $~lib/map/Map#values local.set $6 - i32.const 24 + i32.const 32 i32.const 16 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -7105,21 +7112,21 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $1 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $1 i32.const 32 call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $1 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $1 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $1 i32.const 0 - i32.store offset=20 + i32.store offset=28 call $~lib/map/Map#constructor local.set $5 loop $for-loop|4 @@ -7199,7 +7206,7 @@ end end local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -7211,7 +7218,7 @@ unreachable end local.get $5 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -7282,7 +7289,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -7356,7 +7363,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -7370,7 +7377,7 @@ local.get $0 call $~lib/map/Map#clear local.get $0 - i32.load offset=20 + i32.load offset=28 if i32.const 0 i32.const 1360 @@ -7438,20 +7445,21 @@ i32.store offset=8 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.sub - i32.store offset=20 + i32.store offset=28 local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 local.tee $2 i32.const 1 i32.add i32.const 4 local.get $0 - i32.load offset=20 + i32.load offset=28 local.tee $1 local.get $1 i32.const 4 @@ -7460,9 +7468,9 @@ i32.ge_u if (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 @@ -7546,7 +7554,7 @@ end end local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -7633,7 +7641,7 @@ end end local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -7645,10 +7653,10 @@ unreachable end local.get $1 - i32.load offset=8 + i32.load offset=16 local.set $5 local.get $1 - i32.load offset=16 + i32.load offset=24 local.tee $6 call $~lib/array/Array#constructor local.set $2 @@ -7756,7 +7764,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -7768,7 +7776,7 @@ unreachable end local.get $4 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -7835,7 +7843,7 @@ end end local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -7905,7 +7913,7 @@ end end local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -7919,7 +7927,7 @@ local.get $1 call $~lib/map/Map#clear local.get $1 - i32.load offset=20 + i32.load offset=28 if i32.const 0 i32.const 1360 @@ -7950,10 +7958,10 @@ (local $8 i32) (local $9 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $5 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $8 local.set $7 i32.const 16 @@ -8065,7 +8073,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) - i32.const 24 + i32.const 32 i32.const 17 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -8074,21 +8082,21 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $0 i32.const 48 call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 loop $for-loop|0 local.get $1 i32.const 100 @@ -8147,7 +8155,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -8234,7 +8242,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -8251,7 +8259,7 @@ local.get $0 call $~lib/map/Map#values local.set $6 - i32.const 24 + i32.const 32 i32.const 19 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -8260,21 +8268,21 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $1 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $1 i32.const 48 call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $1 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $1 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $1 i32.const 0 - i32.store offset=20 + i32.store offset=28 call $~lib/map/Map#constructor local.set $5 loop $for-loop|2 @@ -8338,7 +8346,7 @@ end end local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -8350,7 +8358,7 @@ unreachable end local.get $5 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -8417,7 +8425,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -8487,7 +8495,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -8501,7 +8509,7 @@ local.get $0 call $~lib/map/Map#clear local.get $0 - i32.load offset=20 + i32.load offset=28 if i32.const 0 i32.const 1360 @@ -8521,79 +8529,51 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/util/hash/hash64 (param $0 i64) (result i32) - (local $1 i32) + (func $~lib/util/hash/hash64 (param $0 i64) (result i64) + local.get $0 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const 2870177450012600269 + i64.xor + i64.const 27 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.tee $0 local.get $0 - i32.wrap_i64 - local.tee $1 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - local.get $1 - i32.const 8 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.get $1 - i32.const 16 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.get $1 - i32.const 24 - i32.shr_u - i32.xor - i32.const 16777619 - i32.mul + i64.const 33 + i64.shr_u + i64.xor + i64.const -4417276706812531889 + i64.mul + local.tee $0 + local.get $0 + i64.const 29 + i64.shr_u + i64.xor + i64.const 1609587929392839161 + i64.mul + local.tee $0 local.get $0 i64.const 32 i64.shr_u - i32.wrap_i64 - local.tee $1 - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.get $1 - i32.const 8 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.get $1 - i32.const 16 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.get $1 - i32.const 24 - i32.shr_u - i32.xor - i32.const 16777619 - i32.mul + i64.xor ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 i64) (param $2 i64) (result i32) + (local $3 i32) local.get $0 i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -8604,7 +8584,7 @@ if local.get $0 i32.load offset=12 - local.tee $2 + local.tee $3 i32.const 1 i32.and if (result i32) @@ -8619,7 +8599,7 @@ local.get $0 return end - local.get $2 + local.get $3 i32.const -2 i32.and local.set $0 @@ -8665,10 +8645,10 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $4 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 4 i32.shl i32.add @@ -8700,7 +8680,9 @@ local.get $8 call $~lib/util/hash/hash64 local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -8740,11 +8722,12 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $3 local.tee $1 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $4 i32.ne if @@ -8756,14 +8739,14 @@ end local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $6 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $5 call $~lib/rt/pure/__release local.get $3 @@ -8772,7 +8755,7 @@ (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) + (local $5 i64) local.get $0 local.get $1 local.get $1 @@ -8786,45 +8769,46 @@ i32.store offset=8 else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__retain local.set $4 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $3 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $4 local.get $3 i32.const 4 @@ -8838,17 +8822,18 @@ i32.store offset=8 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $3 local.get $0 i32.load local.get $5 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -8944,10 +8929,10 @@ (local $8 i32) (local $9 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $5 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $8 local.set $7 i32.const 16 @@ -9057,10 +9042,10 @@ (local $4 i32) (local $5 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $3 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $4 call $~lib/array/Array#constructor local.set $0 @@ -9151,10 +9136,10 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $4 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 24 i32.mul i32.add @@ -9186,7 +9171,9 @@ local.get $8 call $~lib/util/hash/hash64 local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -9226,11 +9213,12 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $3 local.tee $1 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $4 i32.ne if @@ -9242,14 +9230,14 @@ end local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $6 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $5 call $~lib/rt/pure/__release local.get $3 @@ -9258,16 +9246,18 @@ (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) + (local $5 i64) + (local $6 i32) local.get $1 call $~lib/util/hash/hash64 - local.set $4 + local.set $5 local.get $0 i32.load - local.get $4 + local.get $5 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -9279,7 +9269,7 @@ if local.get $3 i32.load offset=16 - local.tee $5 + local.tee $4 i32.const 1 i32.and if (result i32) @@ -9291,7 +9281,7 @@ i64.eq end br_if $__inlined_func$~lib/map/Map#find - local.get $5 + local.get $4 i32.const -2 i32.and local.set $3 @@ -9308,46 +9298,47 @@ i64.store offset=8 else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__retain - local.set $5 + local.set $6 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $3 i32.const 1 i32.add - i32.store offset=16 - local.get $5 + i32.store offset=24 + local.get $6 local.get $3 i32.const 24 i32.mul @@ -9360,17 +9351,18 @@ i64.store offset=8 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $3 local.get $0 i32.load - local.get $4 + local.get $5 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -9380,7 +9372,7 @@ local.get $4 local.get $3 i32.store - local.get $5 + local.get $6 call $~lib/rt/pure/__release end local.get $0 @@ -9407,20 +9399,21 @@ i32.store offset=12 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.sub - i32.store offset=20 + i32.store offset=28 local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 local.tee $3 i32.const 1 i32.add i32.const 4 local.get $0 - i32.load offset=20 + i32.load offset=28 local.tee $2 local.get $2 i32.const 4 @@ -9429,9 +9422,9 @@ i32.ge_u if (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 @@ -9458,26 +9451,26 @@ local.get $1 i32.store local.get $0 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 i32.const 64 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $1 local.get $0 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__release local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 ) (func $std/map/testNumeric (local $0 i64) @@ -9488,7 +9481,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) - i32.const 24 + i32.const 32 i32.const 20 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -9497,21 +9490,21 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $1 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $1 i32.const 64 call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $1 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $1 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $1 i32.const 0 - i32.store offset=20 + i32.store offset=28 loop $for-loop|0 local.get $0 i64.const 100 @@ -9572,7 +9565,7 @@ end end local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -9662,7 +9655,7 @@ end end local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -9679,7 +9672,7 @@ local.get $1 call $~lib/map/Map#values local.set $7 - i32.const 24 + i32.const 32 i32.const 22 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -9688,21 +9681,21 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $2 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $2 i32.const 96 call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $2 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $2 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $2 i32.const 0 - i32.store offset=20 + i32.store offset=28 call $~lib/map/Map#constructor local.set $6 loop $for-loop|2 @@ -9767,7 +9760,7 @@ end end local.get $2 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -9779,7 +9772,7 @@ unreachable end local.get $6 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -9847,7 +9840,7 @@ end end local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -9918,7 +9911,7 @@ end end local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -9932,7 +9925,7 @@ local.get $1 call $~lib/map/Map#clear local.get $1 - i32.load offset=20 + i32.load offset=28 if i32.const 0 i32.const 1360 @@ -9963,10 +9956,10 @@ (local $8 i32) (local $9 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $5 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $8 local.set $7 i32.const 16 @@ -10078,7 +10071,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) - i32.const 24 + i32.const 32 i32.const 23 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -10087,21 +10080,21 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $1 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $1 i32.const 64 call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $1 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $1 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $1 i32.const 0 - i32.store offset=20 + i32.store offset=28 loop $for-loop|0 local.get $0 i64.const 100 @@ -10162,7 +10155,7 @@ end end local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -10252,7 +10245,7 @@ end end local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -10269,7 +10262,7 @@ local.get $1 call $~lib/map/Map#values local.set $7 - i32.const 24 + i32.const 32 i32.const 25 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -10278,21 +10271,21 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $2 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $2 i32.const 96 call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $2 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $2 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $2 i32.const 0 - i32.store offset=20 + i32.store offset=28 call $~lib/map/Map#constructor local.set $6 loop $for-loop|2 @@ -10357,7 +10350,7 @@ end end local.get $2 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -10369,7 +10362,7 @@ unreachable end local.get $6 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -10437,7 +10430,7 @@ end end local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -10508,7 +10501,7 @@ end end local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -10522,7 +10515,7 @@ local.get $1 call $~lib/map/Map#clear local.get $1 - i32.load offset=20 + i32.load offset=28 if i32.const 0 i32.const 1360 @@ -10542,13 +10535,15 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#find (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 f32) (param $2 i64) (result i32) + (local $3 i32) local.get $0 i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -10559,7 +10554,7 @@ if local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 i32.const 1 i32.and if (result i32) @@ -10574,7 +10569,7 @@ local.get $0 return end - local.get $2 + local.get $3 i32.const -2 i32.and local.set $0 @@ -10621,10 +10616,10 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $4 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 12 i32.mul i32.add @@ -10657,7 +10652,9 @@ i32.reinterpret_f32 call $~lib/util/hash/hash32 local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -10697,11 +10694,12 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $3 local.tee $1 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $4 i32.ne if @@ -10713,14 +10711,14 @@ end local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $6 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $5 call $~lib/rt/pure/__release local.get $3 @@ -10729,7 +10727,7 @@ (func $~lib/map/Map#set (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) + (local $5 i64) local.get $0 local.get $1 local.get $1 @@ -10744,45 +10742,46 @@ i32.store offset=4 else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__retain local.set $4 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $3 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $4 local.get $3 i32.const 12 @@ -10796,17 +10795,18 @@ i32.store offset=4 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $3 local.get $0 i32.load local.get $5 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -10854,10 +10854,10 @@ (local $9 i32) (local $10 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $9 local.set $8 i32.const 16 @@ -11021,10 +11021,10 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $4 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 12 i32.mul i32.add @@ -11057,7 +11057,9 @@ i32.reinterpret_f32 call $~lib/util/hash/hash32 local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -11097,11 +11099,12 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $3 local.tee $1 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $4 i32.ne if @@ -11113,14 +11116,14 @@ end local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $6 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $5 call $~lib/rt/pure/__release local.get $3 @@ -11129,13 +11132,14 @@ (func $~lib/map/Map#set (param $0 i32) (param $1 f32) (param $2 f32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) + (local $5 i64) + (local $6 i32) local.get $0 local.get $1 local.get $1 i32.reinterpret_f32 call $~lib/util/hash/hash32 - local.tee $4 + local.tee $5 call $~lib/map/Map#find local.tee $3 if @@ -11144,46 +11148,47 @@ f32.store offset=4 else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__retain - local.set $5 + local.set $4 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $3 i32.const 1 i32.add - i32.store offset=16 - local.get $5 + i32.store offset=24 + local.get $4 local.get $3 i32.const 12 i32.mul @@ -11196,27 +11201,28 @@ f32.store offset=4 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $3 local.get $0 i32.load - local.get $4 + local.get $5 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add - local.tee $4 + local.tee $6 i32.load i32.store offset=8 - local.get $4 + local.get $6 local.get $3 i32.store - local.get $5 + local.get $4 call $~lib/rt/pure/__release end local.get $0 @@ -11244,20 +11250,21 @@ i32.store offset=8 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.sub - i32.store offset=20 + i32.store offset=28 local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 local.tee $3 i32.const 1 i32.add i32.const 4 local.get $0 - i32.load offset=20 + i32.load offset=28 local.tee $2 local.get $2 i32.const 4 @@ -11266,9 +11273,9 @@ i32.ge_u if (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 @@ -11292,7 +11299,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) - i32.const 24 + i32.const 32 i32.const 26 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -11301,21 +11308,21 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $1 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $1 i32.const 48 call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $1 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $1 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $1 i32.const 0 - i32.store offset=20 + i32.store offset=28 loop $for-loop|0 local.get $0 f32.const 100 @@ -11376,7 +11383,7 @@ end end local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -11466,7 +11473,7 @@ end end local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -11483,7 +11490,7 @@ local.get $1 call $~lib/map/Map#values local.set $7 - i32.const 24 + i32.const 32 i32.const 28 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -11492,21 +11499,21 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $2 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $2 i32.const 48 call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $2 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $2 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $2 i32.const 0 - i32.store offset=20 + i32.store offset=28 call $~lib/map/Map#constructor local.set $6 loop $for-loop|2 @@ -11587,7 +11594,7 @@ end end local.get $2 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -11599,7 +11606,7 @@ unreachable end local.get $6 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -11667,7 +11674,7 @@ end end local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -11738,7 +11745,7 @@ end end local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -11752,7 +11759,7 @@ local.get $1 call $~lib/map/Map#clear local.get $1 - i32.load offset=20 + i32.load offset=28 if i32.const 0 i32.const 1360 @@ -11772,13 +11779,15 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#find (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 f64) (param $2 i64) (result i32) + (local $3 i32) local.get $0 i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -11789,7 +11798,7 @@ if local.get $0 i32.load offset=12 - local.tee $2 + local.tee $3 i32.const 1 i32.and if (result i32) @@ -11804,7 +11813,7 @@ local.get $0 return end - local.get $2 + local.get $3 i32.const -2 i32.and local.set $0 @@ -11851,10 +11860,10 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $4 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 4 i32.shl i32.add @@ -11887,7 +11896,9 @@ i64.reinterpret_f64 call $~lib/util/hash/hash64 local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -11927,11 +11938,12 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $3 local.tee $1 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $4 i32.ne if @@ -11943,14 +11955,14 @@ end local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $6 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $5 call $~lib/rt/pure/__release local.get $3 @@ -11959,7 +11971,7 @@ (func $~lib/map/Map#set (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) + (local $5 i64) local.get $0 local.get $1 local.get $1 @@ -11974,45 +11986,46 @@ i32.store offset=8 else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__retain local.set $4 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $3 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $4 local.get $3 i32.const 4 @@ -12026,17 +12039,18 @@ i32.store offset=8 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $3 local.get $0 i32.load local.get $5 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -12084,10 +12098,10 @@ (local $9 i32) (local $10 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $9 local.set $8 i32.const 16 @@ -12251,10 +12265,10 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $4 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 24 i32.mul i32.add @@ -12287,7 +12301,9 @@ i64.reinterpret_f64 call $~lib/util/hash/hash64 local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -12327,11 +12343,12 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $3 local.tee $1 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $4 i32.ne if @@ -12343,14 +12360,14 @@ end local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $6 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $5 call $~lib/rt/pure/__release local.get $3 @@ -12359,17 +12376,19 @@ (func $~lib/map/Map#set (param $0 i32) (param $1 f64) (param $2 f64) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) + (local $5 i64) + (local $6 i32) local.get $1 i64.reinterpret_f64 call $~lib/util/hash/hash64 - local.set $4 + local.set $5 local.get $0 i32.load - local.get $4 + local.get $5 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -12381,7 +12400,7 @@ if local.get $3 i32.load offset=16 - local.tee $5 + local.tee $4 i32.const 1 i32.and if (result i32) @@ -12393,7 +12412,7 @@ f64.eq end br_if $__inlined_func$~lib/map/Map#find - local.get $5 + local.get $4 i32.const -2 i32.and local.set $3 @@ -12410,46 +12429,47 @@ f64.store offset=8 else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__retain - local.set $5 + local.set $6 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $3 i32.const 1 i32.add - i32.store offset=16 - local.get $5 + i32.store offset=24 + local.get $6 local.get $3 i32.const 24 i32.mul @@ -12462,17 +12482,18 @@ f64.store offset=8 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $3 local.get $0 i32.load - local.get $4 + local.get $5 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -12482,7 +12503,7 @@ local.get $4 local.get $3 i32.store - local.get $5 + local.get $6 call $~lib/rt/pure/__release end local.get $0 @@ -12510,20 +12531,21 @@ i32.store offset=12 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.sub - i32.store offset=20 + i32.store offset=28 local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 local.tee $3 i32.const 1 i32.add i32.const 4 local.get $0 - i32.load offset=20 + i32.load offset=28 local.tee $2 local.get $2 i32.const 4 @@ -12532,9 +12554,9 @@ i32.ge_u if (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 @@ -12558,7 +12580,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) - i32.const 24 + i32.const 32 i32.const 29 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -12567,21 +12589,21 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $1 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $1 i32.const 64 call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $1 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $1 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $1 i32.const 0 - i32.store offset=20 + i32.store offset=28 loop $for-loop|0 local.get $0 f64.const 100 @@ -12642,7 +12664,7 @@ end end local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -12732,7 +12754,7 @@ end end local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -12749,7 +12771,7 @@ local.get $1 call $~lib/map/Map#values local.set $7 - i32.const 24 + i32.const 32 i32.const 31 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -12758,21 +12780,21 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $2 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $2 i32.const 96 call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $2 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $2 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $2 i32.const 0 - i32.store offset=20 + i32.store offset=28 call $~lib/map/Map#constructor local.set $6 loop $for-loop|2 @@ -12853,7 +12875,7 @@ end end local.get $2 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -12865,7 +12887,7 @@ unreachable end local.get $6 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -12933,7 +12955,7 @@ end end local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -13004,7 +13026,7 @@ end end local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -13018,7 +13040,7 @@ local.get $1 call $~lib/map/Map#clear local.get $1 - i32.load offset=20 + i32.load offset=28 if i32.const 0 i32.const 1360 @@ -13101,7 +13123,7 @@ i32.load offset=20 call $~lib/rt/pure/__visit local.get $0 - i32.load offset=28 + i32.load offset=36 call $~lib/rt/pure/__visit br $__inlined_func$~lib/rt/__visit_members end diff --git a/tests/compiler/std/map.untouched.wat b/tests/compiler/std/map.untouched.wat index 19ba13b674..3a58527b5a 100644 --- a/tests/compiler/std/map.untouched.wat +++ b/tests/compiler/std/map.untouched.wat @@ -2,27 +2,31 @@ (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_none (func (param i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $none_=>_none (func)) + (type $i32_i32_i64_=>_i32 (func (param i32 i32 i64) (result i32))) (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) - (type $i32_i64_i32_=>_i32 (func (param i32 i64 i32) (result i32))) + (type $i32_i64_i64_=>_i32 (func (param i32 i64 i64) (result i32))) (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) (type $i32_f32_=>_i32 (func (param i32 f32) (result i32))) - (type $i32_f32_i32_=>_i32 (func (param i32 f32 i32) (result i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) - (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) (type $i32_i32_f64_=>_none (func (param i32 i32 f64))) - (type $i32_i64_i64_=>_i32 (func (param i32 i64 i64) (result i32))) + (type $i32_i64_i32_=>_i32 (func (param i32 i64 i32) (result i32))) + (type $i32_f32_i64_=>_i32 (func (param i32 f32 i64) (result i32))) + (type $i32_f64_i64_=>_i32 (func (param i32 f64 i64) (result i32))) (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $i32_f32_i32_=>_i32 (func (param i32 f32 i32) (result i32))) (type $i32_f32_f32_=>_i32 (func (param i32 f32 f32) (result i32))) + (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) (type $i32_f64_f64_=>_i32 (func (param i32 f64 f64) (result i32))) - (type $i64_=>_i32 (func (param i64) (result i32))) + (type $i32_=>_i64 (func (param i32) (result i64))) + (type $i64_=>_i64 (func (param i64) (result i64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 12) "(\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00(\00\00\00a\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e\00") @@ -1767,7 +1771,7 @@ local.get $0 i32.eqz if - i32.const 24 + i32.const 32 i32.const 3 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -1781,36 +1785,80 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 i32.const 0 i32.const 4 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/hash8 (param $0 i32) (result i32) - i32.const -2128831035 + (func $~lib/util/hash/hash32 (param $0 i32) (result i64) + (local $1 i64) + i64.const 0 + i64.const 2870177450012600261 + i64.add + i64.const 4 + i64.add + local.set $1 + local.get $1 local.get $0 - i32.xor - i32.const 16777619 - i32.mul + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $1 + local.get $1 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $1 + local.get $1 + local.get $1 + i64.const 33 + i64.shr_u + i64.xor + local.set $1 + local.get $1 + i64.const -4417276706812531889 + i64.mul + local.set $1 + local.get $1 + local.get $1 + i64.const 29 + i64.shr_u + i64.xor + local.set $1 + local.get $1 + i64.const 1609587929392839161 + i64.mul + local.set $1 + local.get $1 + local.get $1 + i64.const 32 + i64.shr_u + i64.xor + local.set $1 + local.get $1 ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1818,8 +1866,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -1868,7 +1917,7 @@ (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i64) local.get $1 local.set $2 i32.const 0 @@ -1878,15 +1927,15 @@ i32.const 0 drop i32.const 1 - i32.const 1 - i32.eq + i32.const 4 + i32.le_u drop local.get $2 i32.const 24 i32.shl i32.const 24 i32.shr_s - call $~lib/util/hash/hash8 + call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.0 end call $~lib/map/Map#find @@ -1930,11 +1979,11 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 12 i32.mul i32.add @@ -1968,7 +2017,7 @@ local.get $10 i32.load offset=4 i32.store offset=4 - block $~lib/util/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i64) local.get $12 local.set $13 i32.const 0 @@ -1978,15 +2027,17 @@ i32.const 0 drop i32.const 1 - i32.const 1 - i32.eq + i32.const 4 + i32.le_u drop local.get $13 - call $~lib/util/hash/hash8 + call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.2 end local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 local.set $13 local.get $3 local.get $13 @@ -2032,13 +2083,14 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.tee $13 local.get $5 local.tee $14 local.get $13 - i32.load offset=8 + i32.load offset=16 local.tee $11 i32.ne if @@ -2049,14 +2101,14 @@ call $~lib/rt/pure/__release end local.get $14 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $4 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $3 call $~lib/rt/pure/__release local.get $5 @@ -2064,10 +2116,10 @@ ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) + (local $4 i64) (local $5 i32) (local $6 i32) - block $~lib/util/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i64) local.get $1 local.set $3 i32.const 0 @@ -2077,15 +2129,15 @@ i32.const 0 drop i32.const 1 - i32.const 1 - i32.eq + i32.const 4 + i32.le_u drop local.get $3 i32.const 24 i32.shl i32.const 24 i32.shr_s - call $~lib/util/hash/hash8 + call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.1 end local.set $4 @@ -2103,46 +2155,47 @@ i32.store offset=4 else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__retain local.set $3 local.get $3 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $6 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $6 i32.const 12 i32.mul @@ -2156,16 +2209,17 @@ i32.store offset=4 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $0 i32.load local.get $4 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -2188,7 +2242,7 @@ (local $3 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i64) local.get $1 local.set $2 i32.const 0 @@ -2198,15 +2252,15 @@ i32.const 0 drop i32.const 1 - i32.const 1 - i32.eq + i32.const 4 + i32.le_u drop local.get $2 i32.const 24 i32.shl i32.const 24 i32.shr_s - call $~lib/util/hash/hash8 + call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.3 end call $~lib/map/Map#find @@ -2226,7 +2280,7 @@ ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/array/Array#constructor (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -3921,10 +3975,10 @@ (local $7 i32) (local $8 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $1 local.get $0 - i32.load offset=16 + i32.load offset=24 local.set $2 i32.const 0 local.get $2 @@ -4127,10 +4181,10 @@ (local $7 i32) (local $8 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $1 local.get $0 - i32.load offset=16 + i32.load offset=24 local.set $2 i32.const 0 local.get $2 @@ -4186,7 +4240,7 @@ local.get $0 i32.eqz if - i32.const 24 + i32.const 32 i32.const 6 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -4200,33 +4254,33 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 i32.const 0 i32.const 4 i32.const 8 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 local.get $0 ) (func $~lib/map/Map#constructor (param $0 i32) (result i32) local.get $0 i32.eqz if - i32.const 24 + i32.const 32 i32.const 7 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -4240,26 +4294,26 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 i32.const 0 i32.const 4 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 local.get $0 ) (func $~lib/array/Array#get:length (param $0 i32) (result i32) @@ -4328,7 +4382,7 @@ drop local.get $2 ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4336,8 +4390,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -4419,11 +4474,11 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 8 i32.mul i32.add @@ -4457,7 +4512,7 @@ local.get $10 i32.load8_s offset=1 i32.store8 offset=1 - block $~lib/util/hash/HASH|inlined.5 (result i32) + block $~lib/util/hash/HASH|inlined.5 (result i64) local.get $12 local.set $13 i32.const 0 @@ -4467,15 +4522,17 @@ i32.const 0 drop i32.const 1 - i32.const 1 - i32.eq + i32.const 4 + i32.le_u drop local.get $13 - call $~lib/util/hash/hash8 + call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.5 end local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 local.set $13 local.get $3 local.get $13 @@ -4521,13 +4578,14 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.tee $13 local.get $5 local.tee $14 local.get $13 - i32.load offset=8 + i32.load offset=16 local.tee $11 i32.ne if @@ -4538,14 +4596,14 @@ call $~lib/rt/pure/__release end local.get $14 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $4 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $3 call $~lib/rt/pure/__release local.get $5 @@ -4553,10 +4611,10 @@ ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) + (local $4 i64) (local $5 i32) (local $6 i32) - block $~lib/util/hash/HASH|inlined.4 (result i32) + block $~lib/util/hash/HASH|inlined.4 (result i64) local.get $1 local.set $3 i32.const 0 @@ -4566,15 +4624,15 @@ i32.const 0 drop i32.const 1 - i32.const 1 - i32.eq + i32.const 4 + i32.le_u drop local.get $3 i32.const 24 i32.shl i32.const 24 i32.shr_s - call $~lib/util/hash/hash8 + call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.4 end local.set $4 @@ -4592,46 +4650,47 @@ i32.store8 offset=1 else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__retain local.set $3 local.get $3 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $6 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $6 i32.const 8 i32.mul @@ -4645,16 +4704,17 @@ i32.store8 offset=1 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $0 i32.load local.get $4 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -4672,49 +4732,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/util/hash/hash32 (param $0 i32) (result i32) - (local $1 i32) - i32.const -2128831035 - local.set $1 - local.get $1 - local.get $0 - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $1 - local.get $1 - local.get $0 - i32.const 8 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $1 - local.get $1 - local.get $0 - i32.const 16 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $1 - local.get $1 - local.get $0 - i32.const 24 - i32.shr_u - i32.xor - i32.const 16777619 - i32.mul - local.set $1 - local.get $1 - ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4722,8 +4740,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -4801,11 +4820,11 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 12 i32.mul i32.add @@ -4839,7 +4858,7 @@ local.get $10 i32.load offset=4 i32.store offset=4 - block $~lib/util/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i64) local.get $12 local.set $13 i32.const 0 @@ -4849,23 +4868,17 @@ i32.const 0 drop i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 i32.const 4 - i32.eq + i32.le_u drop local.get $13 call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.1 end local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 local.set $13 local.get $3 local.get $13 @@ -4911,13 +4924,14 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.tee $13 local.get $5 local.tee $14 local.get $13 - i32.load offset=8 + i32.load offset=16 local.tee $11 i32.ne if @@ -4928,14 +4942,14 @@ call $~lib/rt/pure/__release end local.get $14 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $4 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $3 call $~lib/rt/pure/__release local.get $5 @@ -4943,10 +4957,10 @@ ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) + (local $4 i64) (local $5 i32) (local $6 i32) - block $~lib/util/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i64) local.get $1 local.set $3 i32.const 0 @@ -4956,16 +4970,8 @@ i32.const 0 drop i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 i32.const 4 - i32.eq + i32.le_u drop local.get $3 call $~lib/util/hash/hash32 @@ -4986,46 +4992,47 @@ i32.store offset=4 else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__retain local.set $3 local.get $3 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $6 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $6 i32.const 12 i32.mul @@ -5039,16 +5046,17 @@ i32.store offset=4 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $0 i32.load local.get $4 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -5068,11 +5076,11 @@ ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/map/Map#delete (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -5081,7 +5089,7 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i32) + block $~lib/util/hash/HASH|inlined.6 (result i64) local.get $1 local.set $2 i32.const 0 @@ -5091,15 +5099,15 @@ i32.const 0 drop i32.const 1 - i32.const 1 - i32.eq + i32.const 4 + i32.le_u drop local.get $2 i32.const 24 i32.shl i32.const 24 i32.shr_s - call $~lib/util/hash/hash8 + call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.6 end call $~lib/map/Map#find @@ -5122,14 +5130,15 @@ i32.store offset=8 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.sub - i32.store offset=20 + i32.store offset=28 local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 local.set $4 local.get $4 i32.const 1 @@ -5137,7 +5146,7 @@ i32.const 4 local.tee $2 local.get $0 - i32.load offset=20 + i32.load offset=28 local.tee $5 local.get $2 local.get $5 @@ -5146,9 +5155,9 @@ i32.ge_u if (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 @@ -5181,10 +5190,10 @@ local.get $2 i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 local.tee $2 i32.const 0 @@ -5194,19 +5203,19 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $1 local.get $2 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__release local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 ) (func $std/map/testNumeric (local $0 i32) @@ -5721,7 +5730,7 @@ local.get $0 i32.eqz if - i32.const 24 + i32.const 32 i32.const 8 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -5735,29 +5744,29 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 i32.const 0 i32.const 4 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 local.get $0 ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5765,8 +5774,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -5813,7 +5823,7 @@ (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i64) local.get $1 local.set $2 i32.const 0 @@ -5823,13 +5833,13 @@ i32.const 0 drop i32.const 1 - i32.const 1 - i32.eq + i32.const 4 + i32.le_u drop local.get $2 i32.const 255 i32.and - call $~lib/util/hash/hash8 + call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.0 end call $~lib/map/Map#find @@ -5873,11 +5883,11 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 12 i32.mul i32.add @@ -5911,7 +5921,7 @@ local.get $10 i32.load offset=4 i32.store offset=4 - block $~lib/util/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i64) local.get $12 local.set $13 i32.const 0 @@ -5921,15 +5931,17 @@ i32.const 0 drop i32.const 1 - i32.const 1 - i32.eq + i32.const 4 + i32.le_u drop local.get $13 - call $~lib/util/hash/hash8 + call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.2 end local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 local.set $13 local.get $3 local.get $13 @@ -5975,13 +5987,14 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.tee $13 local.get $5 local.tee $14 local.get $13 - i32.load offset=8 + i32.load offset=16 local.tee $11 i32.ne if @@ -5992,14 +6005,14 @@ call $~lib/rt/pure/__release end local.get $14 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $4 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $3 call $~lib/rt/pure/__release local.get $5 @@ -6007,10 +6020,10 @@ ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) + (local $4 i64) (local $5 i32) (local $6 i32) - block $~lib/util/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i64) local.get $1 local.set $3 i32.const 0 @@ -6020,13 +6033,13 @@ i32.const 0 drop i32.const 1 - i32.const 1 - i32.eq + i32.const 4 + i32.le_u drop local.get $3 i32.const 255 i32.and - call $~lib/util/hash/hash8 + call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.1 end local.set $4 @@ -6044,46 +6057,47 @@ i32.store offset=4 else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__retain local.set $3 local.get $3 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $6 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $6 i32.const 12 i32.mul @@ -6097,16 +6111,17 @@ i32.store offset=4 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $0 i32.load local.get $4 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -6129,7 +6144,7 @@ (local $3 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i64) local.get $1 local.set $2 i32.const 0 @@ -6139,13 +6154,13 @@ i32.const 0 drop i32.const 1 - i32.const 1 - i32.eq + i32.const 4 + i32.le_u drop local.get $2 i32.const 255 i32.and - call $~lib/util/hash/hash8 + call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.3 end call $~lib/map/Map#find @@ -6165,7 +6180,7 @@ ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/array/Array#constructor (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -6318,10 +6333,10 @@ (local $7 i32) (local $8 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $1 local.get $0 - i32.load offset=16 + i32.load offset=24 local.set $2 i32.const 0 local.get $2 @@ -6383,10 +6398,10 @@ (local $7 i32) (local $8 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $1 local.get $0 - i32.load offset=16 + i32.load offset=24 local.set $2 i32.const 0 local.get $2 @@ -6442,7 +6457,7 @@ local.get $0 i32.eqz if - i32.const 24 + i32.const 32 i32.const 10 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -6456,26 +6471,26 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 i32.const 0 i32.const 4 i32.const 8 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 local.get $0 ) (func $~lib/array/Array#get:length (param $0 i32) (result i32) @@ -6513,7 +6528,7 @@ drop local.get $2 ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6521,8 +6536,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -6602,11 +6618,11 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 8 i32.mul i32.add @@ -6640,7 +6656,7 @@ local.get $10 i32.load8_u offset=1 i32.store8 offset=1 - block $~lib/util/hash/HASH|inlined.5 (result i32) + block $~lib/util/hash/HASH|inlined.5 (result i64) local.get $12 local.set $13 i32.const 0 @@ -6650,15 +6666,17 @@ i32.const 0 drop i32.const 1 - i32.const 1 - i32.eq + i32.const 4 + i32.le_u drop local.get $13 - call $~lib/util/hash/hash8 + call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.5 end local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 local.set $13 local.get $3 local.get $13 @@ -6704,13 +6722,14 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.tee $13 local.get $5 local.tee $14 local.get $13 - i32.load offset=8 + i32.load offset=16 local.tee $11 i32.ne if @@ -6721,14 +6740,14 @@ call $~lib/rt/pure/__release end local.get $14 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $4 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $3 call $~lib/rt/pure/__release local.get $5 @@ -6736,10 +6755,10 @@ ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) + (local $4 i64) (local $5 i32) (local $6 i32) - block $~lib/util/hash/HASH|inlined.4 (result i32) + block $~lib/util/hash/HASH|inlined.4 (result i64) local.get $1 local.set $3 i32.const 0 @@ -6749,13 +6768,13 @@ i32.const 0 drop i32.const 1 - i32.const 1 - i32.eq + i32.const 4 + i32.le_u drop local.get $3 i32.const 255 i32.and - call $~lib/util/hash/hash8 + call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.4 end local.set $4 @@ -6773,46 +6792,47 @@ i32.store8 offset=1 else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__retain local.set $3 local.get $3 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $6 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $6 i32.const 8 i32.mul @@ -6826,16 +6846,17 @@ i32.store8 offset=1 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $0 i32.load local.get $4 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -6855,7 +6876,7 @@ ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/map/Map#delete (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -6864,7 +6885,7 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i32) + block $~lib/util/hash/HASH|inlined.6 (result i64) local.get $1 local.set $2 i32.const 0 @@ -6874,13 +6895,13 @@ i32.const 0 drop i32.const 1 - i32.const 1 - i32.eq + i32.const 4 + i32.le_u drop local.get $2 i32.const 255 i32.and - call $~lib/util/hash/hash8 + call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.6 end call $~lib/map/Map#find @@ -6903,14 +6924,15 @@ i32.store offset=8 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.sub - i32.store offset=20 + i32.store offset=28 local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 local.set $4 local.get $4 i32.const 1 @@ -6918,7 +6940,7 @@ i32.const 4 local.tee $2 local.get $0 - i32.load offset=20 + i32.load offset=28 local.tee $5 local.get $2 local.get $5 @@ -6927,9 +6949,9 @@ i32.ge_u if (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 @@ -6962,10 +6984,10 @@ local.get $2 i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 local.tee $2 i32.const 0 @@ -6975,19 +6997,19 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $1 local.get $2 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__release local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 ) (func $std/map/testNumeric (local $0 i32) @@ -7480,7 +7502,7 @@ local.get $0 i32.eqz if - i32.const 24 + i32.const 32 i32.const 11 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -7494,51 +7516,29 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 i32.const 0 i32.const 4 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/hash16 (param $0 i32) (result i32) - (local $1 i32) - i32.const -2128831035 - local.set $1 - local.get $1 - local.get $0 - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $1 - local.get $1 - local.get $0 - i32.const 8 - i32.shr_u - i32.xor - i32.const 16777619 - i32.mul - local.set $1 - local.get $1 - ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7546,8 +7546,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -7596,7 +7597,7 @@ (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i64) local.get $1 local.set $2 i32.const 0 @@ -7606,19 +7607,15 @@ i32.const 0 drop i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq + i32.const 4 + i32.le_u drop local.get $2 i32.const 16 i32.shl i32.const 16 i32.shr_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.0 end call $~lib/map/Map#find @@ -7662,11 +7659,11 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 12 i32.mul i32.add @@ -7700,7 +7697,7 @@ local.get $10 i32.load offset=4 i32.store offset=4 - block $~lib/util/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i64) local.get $12 local.set $13 i32.const 0 @@ -7710,19 +7707,17 @@ i32.const 0 drop i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq + i32.const 4 + i32.le_u drop local.get $13 - call $~lib/util/hash/hash16 + call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.2 end local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 local.set $13 local.get $3 local.get $13 @@ -7768,13 +7763,14 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.tee $13 local.get $5 local.tee $14 local.get $13 - i32.load offset=8 + i32.load offset=16 local.tee $11 i32.ne if @@ -7785,14 +7781,14 @@ call $~lib/rt/pure/__release end local.get $14 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $4 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $3 call $~lib/rt/pure/__release local.get $5 @@ -7800,10 +7796,10 @@ ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) + (local $4 i64) (local $5 i32) (local $6 i32) - block $~lib/util/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i64) local.get $1 local.set $3 i32.const 0 @@ -7813,19 +7809,15 @@ i32.const 0 drop i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq + i32.const 4 + i32.le_u drop local.get $3 i32.const 16 i32.shl i32.const 16 i32.shr_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.1 end local.set $4 @@ -7843,46 +7835,47 @@ i32.store offset=4 else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__retain local.set $3 local.get $3 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $6 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $6 i32.const 12 i32.mul @@ -7896,16 +7889,17 @@ i32.store offset=4 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $0 i32.load local.get $4 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -7928,7 +7922,7 @@ (local $3 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i64) local.get $1 local.set $2 i32.const 0 @@ -7938,19 +7932,15 @@ i32.const 0 drop i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq + i32.const 4 + i32.le_u drop local.get $2 i32.const 16 i32.shl i32.const 16 i32.shr_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.3 end call $~lib/map/Map#find @@ -7970,7 +7960,7 @@ ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/array/Array#constructor (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -8123,10 +8113,10 @@ (local $7 i32) (local $8 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $1 local.get $0 - i32.load offset=16 + i32.load offset=24 local.set $2 i32.const 0 local.get $2 @@ -8188,10 +8178,10 @@ (local $7 i32) (local $8 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $1 local.get $0 - i32.load offset=16 + i32.load offset=24 local.set $2 i32.const 0 local.get $2 @@ -8247,7 +8237,7 @@ local.get $0 i32.eqz if - i32.const 24 + i32.const 32 i32.const 13 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -8261,26 +8251,26 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 i32.const 0 i32.const 4 i32.const 8 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 local.get $0 ) (func $~lib/array/Array#get:length (param $0 i32) (result i32) @@ -8318,7 +8308,7 @@ drop local.get $2 ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -8326,8 +8316,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -8409,11 +8400,11 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 8 i32.mul i32.add @@ -8447,7 +8438,7 @@ local.get $10 i32.load16_s offset=2 i32.store16 offset=2 - block $~lib/util/hash/HASH|inlined.5 (result i32) + block $~lib/util/hash/HASH|inlined.5 (result i64) local.get $12 local.set $13 i32.const 0 @@ -8457,19 +8448,17 @@ i32.const 0 drop i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq + i32.const 4 + i32.le_u drop local.get $13 - call $~lib/util/hash/hash16 + call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.5 end local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 local.set $13 local.get $3 local.get $13 @@ -8515,13 +8504,14 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.tee $13 local.get $5 local.tee $14 local.get $13 - i32.load offset=8 + i32.load offset=16 local.tee $11 i32.ne if @@ -8532,14 +8522,14 @@ call $~lib/rt/pure/__release end local.get $14 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $4 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $3 call $~lib/rt/pure/__release local.get $5 @@ -8547,10 +8537,10 @@ ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) + (local $4 i64) (local $5 i32) (local $6 i32) - block $~lib/util/hash/HASH|inlined.4 (result i32) + block $~lib/util/hash/HASH|inlined.4 (result i64) local.get $1 local.set $3 i32.const 0 @@ -8560,19 +8550,15 @@ i32.const 0 drop i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq + i32.const 4 + i32.le_u drop local.get $3 i32.const 16 i32.shl i32.const 16 i32.shr_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.4 end local.set $4 @@ -8590,46 +8576,47 @@ i32.store16 offset=2 else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__retain local.set $3 local.get $3 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $6 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $6 i32.const 8 i32.mul @@ -8643,16 +8630,17 @@ i32.store16 offset=2 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $0 i32.load local.get $4 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -8672,7 +8660,7 @@ ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/map/Map#delete (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -8681,7 +8669,7 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i32) + block $~lib/util/hash/HASH|inlined.6 (result i64) local.get $1 local.set $2 i32.const 0 @@ -8691,19 +8679,15 @@ i32.const 0 drop i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq + i32.const 4 + i32.le_u drop local.get $2 i32.const 16 i32.shl i32.const 16 i32.shr_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.6 end call $~lib/map/Map#find @@ -8726,14 +8710,15 @@ i32.store offset=8 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.sub - i32.store offset=20 + i32.store offset=28 local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 local.set $4 local.get $4 i32.const 1 @@ -8741,7 +8726,7 @@ i32.const 4 local.tee $2 local.get $0 - i32.load offset=20 + i32.load offset=28 local.tee $5 local.get $2 local.get $5 @@ -8750,9 +8735,9 @@ i32.ge_u if (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 @@ -8785,10 +8770,10 @@ local.get $2 i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 local.tee $2 i32.const 0 @@ -8798,19 +8783,19 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $1 local.get $2 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__release local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 ) (func $std/map/testNumeric (local $0 i32) @@ -9325,7 +9310,7 @@ local.get $0 i32.eqz if - i32.const 24 + i32.const 32 i32.const 14 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -9339,29 +9324,29 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 i32.const 0 i32.const 4 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 local.get $0 ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -9369,8 +9354,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -9417,7 +9403,7 @@ (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i64) local.get $1 local.set $2 i32.const 0 @@ -9427,17 +9413,13 @@ i32.const 0 drop i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq + i32.const 4 + i32.le_u drop local.get $2 i32.const 65535 i32.and - call $~lib/util/hash/hash16 + call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.0 end call $~lib/map/Map#find @@ -9481,11 +9463,11 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 12 i32.mul i32.add @@ -9519,7 +9501,7 @@ local.get $10 i32.load offset=4 i32.store offset=4 - block $~lib/util/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i64) local.get $12 local.set $13 i32.const 0 @@ -9529,19 +9511,17 @@ i32.const 0 drop i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq + i32.const 4 + i32.le_u drop local.get $13 - call $~lib/util/hash/hash16 + call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.2 end local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 local.set $13 local.get $3 local.get $13 @@ -9587,13 +9567,14 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.tee $13 local.get $5 local.tee $14 local.get $13 - i32.load offset=8 + i32.load offset=16 local.tee $11 i32.ne if @@ -9604,14 +9585,14 @@ call $~lib/rt/pure/__release end local.get $14 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $4 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $3 call $~lib/rt/pure/__release local.get $5 @@ -9619,10 +9600,10 @@ ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) + (local $4 i64) (local $5 i32) (local $6 i32) - block $~lib/util/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i64) local.get $1 local.set $3 i32.const 0 @@ -9632,17 +9613,13 @@ i32.const 0 drop i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq + i32.const 4 + i32.le_u drop local.get $3 i32.const 65535 i32.and - call $~lib/util/hash/hash16 + call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.1 end local.set $4 @@ -9660,46 +9637,47 @@ i32.store offset=4 else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__retain local.set $3 local.get $3 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $6 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $6 i32.const 12 i32.mul @@ -9713,16 +9691,17 @@ i32.store offset=4 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $0 i32.load local.get $4 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -9745,7 +9724,7 @@ (local $3 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i64) local.get $1 local.set $2 i32.const 0 @@ -9755,17 +9734,13 @@ i32.const 0 drop i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq + i32.const 4 + i32.le_u drop local.get $2 i32.const 65535 i32.and - call $~lib/util/hash/hash16 + call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.3 end call $~lib/map/Map#find @@ -9785,7 +9760,7 @@ ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/array/Array#constructor (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -9938,10 +9913,10 @@ (local $7 i32) (local $8 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $1 local.get $0 - i32.load offset=16 + i32.load offset=24 local.set $2 i32.const 0 local.get $2 @@ -10003,10 +9978,10 @@ (local $7 i32) (local $8 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $1 local.get $0 - i32.load offset=16 + i32.load offset=24 local.set $2 i32.const 0 local.get $2 @@ -10062,7 +10037,7 @@ local.get $0 i32.eqz if - i32.const 24 + i32.const 32 i32.const 16 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -10076,26 +10051,26 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 i32.const 0 i32.const 4 i32.const 8 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 local.get $0 ) (func $~lib/array/Array#get:length (param $0 i32) (result i32) @@ -10133,7 +10108,7 @@ drop local.get $2 ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -10141,8 +10116,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -10222,11 +10198,11 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 8 i32.mul i32.add @@ -10260,7 +10236,7 @@ local.get $10 i32.load16_u offset=2 i32.store16 offset=2 - block $~lib/util/hash/HASH|inlined.5 (result i32) + block $~lib/util/hash/HASH|inlined.5 (result i64) local.get $12 local.set $13 i32.const 0 @@ -10270,19 +10246,17 @@ i32.const 0 drop i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq + i32.const 4 + i32.le_u drop local.get $13 - call $~lib/util/hash/hash16 + call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.5 end local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 local.set $13 local.get $3 local.get $13 @@ -10328,13 +10302,14 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.tee $13 local.get $5 local.tee $14 local.get $13 - i32.load offset=8 + i32.load offset=16 local.tee $11 i32.ne if @@ -10345,14 +10320,14 @@ call $~lib/rt/pure/__release end local.get $14 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $4 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $3 call $~lib/rt/pure/__release local.get $5 @@ -10360,10 +10335,10 @@ ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) + (local $4 i64) (local $5 i32) (local $6 i32) - block $~lib/util/hash/HASH|inlined.4 (result i32) + block $~lib/util/hash/HASH|inlined.4 (result i64) local.get $1 local.set $3 i32.const 0 @@ -10373,17 +10348,13 @@ i32.const 0 drop i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq + i32.const 4 + i32.le_u drop local.get $3 i32.const 65535 i32.and - call $~lib/util/hash/hash16 + call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.4 end local.set $4 @@ -10401,46 +10372,47 @@ i32.store16 offset=2 else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__retain local.set $3 local.get $3 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $6 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $6 i32.const 8 i32.mul @@ -10454,16 +10426,17 @@ i32.store16 offset=2 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $0 i32.load local.get $4 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -10483,7 +10456,7 @@ ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/map/Map#delete (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -10492,7 +10465,7 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i32) + block $~lib/util/hash/HASH|inlined.6 (result i64) local.get $1 local.set $2 i32.const 0 @@ -10502,17 +10475,13 @@ i32.const 0 drop i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq + i32.const 4 + i32.le_u drop local.get $2 i32.const 65535 i32.and - call $~lib/util/hash/hash16 + call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.6 end call $~lib/map/Map#find @@ -10535,14 +10504,15 @@ i32.store offset=8 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.sub - i32.store offset=20 + i32.store offset=28 local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 local.set $4 local.get $4 i32.const 1 @@ -10550,7 +10520,7 @@ i32.const 4 local.tee $2 local.get $0 - i32.load offset=20 + i32.load offset=28 local.tee $5 local.get $2 local.get $5 @@ -10559,9 +10529,9 @@ i32.ge_u if (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 @@ -10594,10 +10564,10 @@ local.get $2 i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 local.tee $2 i32.const 0 @@ -10607,19 +10577,19 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $1 local.get $2 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__release local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 ) (func $std/map/testNumeric (local $0 i32) @@ -11112,7 +11082,7 @@ (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i64) local.get $1 local.set $2 i32.const 0 @@ -11122,16 +11092,8 @@ i32.const 0 drop i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 i32.const 4 - i32.eq + i32.le_u drop local.get $2 call $~lib/util/hash/hash32 @@ -11146,7 +11108,7 @@ (local $3 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i64) local.get $1 local.set $2 i32.const 0 @@ -11156,16 +11118,8 @@ i32.const 0 drop i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 i32.const 4 - i32.eq + i32.le_u drop local.get $2 call $~lib/util/hash/hash32 @@ -11196,10 +11150,10 @@ (local $7 i32) (local $8 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $1 local.get $0 - i32.load offset=16 + i32.load offset=24 local.set $2 i32.const 0 local.get $2 @@ -11261,10 +11215,10 @@ (local $7 i32) (local $8 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $1 local.get $0 - i32.load offset=16 + i32.load offset=24 local.set $2 i32.const 0 local.get $2 @@ -11327,7 +11281,7 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.4 (result i32) + block $~lib/util/hash/HASH|inlined.4 (result i64) local.get $1 local.set $2 i32.const 0 @@ -11337,16 +11291,8 @@ i32.const 0 drop i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 i32.const 4 - i32.eq + i32.le_u drop local.get $2 call $~lib/util/hash/hash32 @@ -11372,14 +11318,15 @@ i32.store offset=8 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.sub - i32.store offset=20 + i32.store offset=28 local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 local.set $4 local.get $4 i32.const 1 @@ -11387,7 +11334,7 @@ i32.const 4 local.tee $2 local.get $0 - i32.load offset=20 + i32.load offset=28 local.tee $5 local.get $2 local.get $5 @@ -11396,9 +11343,9 @@ i32.ge_u if (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 @@ -11431,10 +11378,10 @@ local.get $2 i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 local.tee $2 i32.const 0 @@ -11444,19 +11391,19 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $1 local.get $2 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__release local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 ) (func $std/map/testNumeric (local $0 i32) @@ -11925,7 +11872,7 @@ local.get $0 i32.eqz if - i32.const 24 + i32.const 32 i32.const 17 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -11939,29 +11886,29 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 i32.const 0 i32.const 4 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 local.get $0 ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -11969,8 +11916,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -12015,7 +11963,7 @@ (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i64) local.get $1 local.set $2 i32.const 0 @@ -12025,16 +11973,8 @@ i32.const 0 drop i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 i32.const 4 - i32.eq + i32.le_u drop local.get $2 call $~lib/util/hash/hash32 @@ -12081,11 +12021,11 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 12 i32.mul i32.add @@ -12119,7 +12059,7 @@ local.get $10 i32.load offset=4 i32.store offset=4 - block $~lib/util/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i64) local.get $12 local.set $13 i32.const 0 @@ -12129,23 +12069,17 @@ i32.const 0 drop i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 i32.const 4 - i32.eq + i32.le_u drop local.get $13 call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.2 end local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 local.set $13 local.get $3 local.get $13 @@ -12191,13 +12125,14 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.tee $13 local.get $5 local.tee $14 local.get $13 - i32.load offset=8 + i32.load offset=16 local.tee $11 i32.ne if @@ -12208,14 +12143,14 @@ call $~lib/rt/pure/__release end local.get $14 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $4 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $3 call $~lib/rt/pure/__release local.get $5 @@ -12223,10 +12158,10 @@ ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) + (local $4 i64) (local $5 i32) (local $6 i32) - block $~lib/util/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i64) local.get $1 local.set $3 i32.const 0 @@ -12236,16 +12171,8 @@ i32.const 0 drop i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 i32.const 4 - i32.eq + i32.le_u drop local.get $3 call $~lib/util/hash/hash32 @@ -12266,46 +12193,47 @@ i32.store offset=4 else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__retain local.set $3 local.get $3 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $6 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $6 i32.const 12 i32.mul @@ -12319,16 +12247,17 @@ i32.store offset=4 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $0 i32.load local.get $4 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -12351,7 +12280,7 @@ (local $3 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i64) local.get $1 local.set $2 i32.const 0 @@ -12361,16 +12290,8 @@ i32.const 0 drop i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 i32.const 4 - i32.eq + i32.le_u drop local.get $2 call $~lib/util/hash/hash32 @@ -12393,7 +12314,7 @@ ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/array/Array#constructor (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -12546,10 +12467,10 @@ (local $7 i32) (local $8 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $1 local.get $0 - i32.load offset=16 + i32.load offset=24 local.set $2 i32.const 0 local.get $2 @@ -12611,10 +12532,10 @@ (local $7 i32) (local $8 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $1 local.get $0 - i32.load offset=16 + i32.load offset=24 local.set $2 i32.const 0 local.get $2 @@ -12670,7 +12591,7 @@ local.get $0 i32.eqz if - i32.const 24 + i32.const 32 i32.const 19 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -12684,26 +12605,26 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 i32.const 0 i32.const 4 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 local.get $0 ) (func $~lib/array/Array#get:length (param $0 i32) (result i32) @@ -12741,7 +12662,7 @@ drop local.get $2 ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -12749,8 +12670,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -12828,11 +12750,11 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 12 i32.mul i32.add @@ -12866,7 +12788,7 @@ local.get $10 i32.load offset=4 i32.store offset=4 - block $~lib/util/hash/HASH|inlined.5 (result i32) + block $~lib/util/hash/HASH|inlined.5 (result i64) local.get $12 local.set $13 i32.const 0 @@ -12876,23 +12798,17 @@ i32.const 0 drop i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 i32.const 4 - i32.eq + i32.le_u drop local.get $13 call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.5 end local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 local.set $13 local.get $3 local.get $13 @@ -12938,13 +12854,14 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.tee $13 local.get $5 local.tee $14 local.get $13 - i32.load offset=8 + i32.load offset=16 local.tee $11 i32.ne if @@ -12955,14 +12872,14 @@ call $~lib/rt/pure/__release end local.get $14 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $4 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $3 call $~lib/rt/pure/__release local.get $5 @@ -12970,10 +12887,10 @@ ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) + (local $4 i64) (local $5 i32) (local $6 i32) - block $~lib/util/hash/HASH|inlined.4 (result i32) + block $~lib/util/hash/HASH|inlined.4 (result i64) local.get $1 local.set $3 i32.const 0 @@ -12983,16 +12900,8 @@ i32.const 0 drop i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 i32.const 4 - i32.eq + i32.le_u drop local.get $3 call $~lib/util/hash/hash32 @@ -13013,46 +12922,47 @@ i32.store offset=4 else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__retain local.set $3 local.get $3 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $6 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $6 i32.const 12 i32.mul @@ -13066,16 +12976,17 @@ i32.store offset=4 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $0 i32.load local.get $4 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -13095,7 +13006,7 @@ ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/map/Map#delete (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -13104,7 +13015,7 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i32) + block $~lib/util/hash/HASH|inlined.6 (result i64) local.get $1 local.set $2 i32.const 0 @@ -13114,16 +13025,8 @@ i32.const 0 drop i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 i32.const 4 - i32.eq + i32.le_u drop local.get $2 call $~lib/util/hash/hash32 @@ -13149,14 +13052,15 @@ i32.store offset=8 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.sub - i32.store offset=20 + i32.store offset=28 local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 local.set $4 local.get $4 i32.const 1 @@ -13164,7 +13068,7 @@ i32.const 4 local.tee $2 local.get $0 - i32.load offset=20 + i32.load offset=28 local.tee $5 local.get $2 local.get $5 @@ -13173,9 +13077,9 @@ i32.ge_u if (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 @@ -13208,10 +13112,10 @@ local.get $2 i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 local.tee $2 i32.const 0 @@ -13221,19 +13125,19 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $1 local.get $2 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__release local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 ) (func $std/map/testNumeric (local $0 i32) @@ -13702,7 +13606,7 @@ local.get $0 i32.eqz if - i32.const 24 + i32.const 32 i32.const 20 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -13716,117 +13620,83 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 i32.const 0 i32.const 4 i32.const 16 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/hash64 (param $0 i64) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.wrap_i64 + (func $~lib/util/hash/hash64 (param $0 i64) (result i64) + (local $1 i64) + i64.const 0 + i64.const 2870177450012600261 + i64.add + i64.const 8 + i64.add local.set $1 + local.get $1 local.get $0 - i64.const 32 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $1 + local.get $1 + i64.const 27 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $1 + local.get $1 + local.get $1 + i64.const 33 i64.shr_u - i32.wrap_i64 - local.set $2 - i32.const -2128831035 - local.set $3 - local.get $3 + i64.xor + local.set $1 local.get $1 - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 + i64.const -4417276706812531889 + i64.mul + local.set $1 local.get $1 - i32.const 8 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 local.get $1 - i32.const 16 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 + i64.const 29 + i64.shr_u + i64.xor + local.set $1 + local.get $1 + i64.const 1609587929392839161 + i64.mul + local.set $1 + local.get $1 + local.get $1 + i64.const 32 + i64.shr_u + i64.xor + local.set $1 local.get $1 - i32.const 24 - i32.shr_u - i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 - local.get $2 - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 - local.get $2 - i32.const 8 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 - local.get $2 - i32.const 16 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 - local.get $2 - i32.const 24 - i32.shr_u - i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 i64) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -13834,8 +13704,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -13880,7 +13751,7 @@ (local $2 i64) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i64) local.get $1 local.set $2 i32.const 0 @@ -13890,16 +13761,8 @@ i32.const 0 drop i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 i32.const 4 - i32.eq + i32.le_u drop i32.const 8 i32.const 8 @@ -13951,11 +13814,11 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 16 i32.mul i32.add @@ -13989,7 +13852,7 @@ local.get $10 i32.load offset=8 i32.store offset=8 - block $~lib/util/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i64) local.get $12 local.set $13 i32.const 0 @@ -13999,16 +13862,8 @@ i32.const 0 drop i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 i32.const 4 - i32.eq + i32.le_u drop i32.const 8 i32.const 8 @@ -14019,7 +13874,9 @@ br $~lib/util/hash/HASH|inlined.2 end local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 local.set $14 local.get $3 local.get $14 @@ -14065,13 +13922,14 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.tee $15 local.get $5 local.tee $9 local.get $15 - i32.load offset=8 + i32.load offset=16 local.tee $11 i32.ne if @@ -14082,14 +13940,14 @@ call $~lib/rt/pure/__release end local.get $9 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $4 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $3 call $~lib/rt/pure/__release local.get $5 @@ -14097,11 +13955,11 @@ ) (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i64) - (local $4 i32) + (local $4 i64) (local $5 i32) (local $6 i32) (local $7 i32) - block $~lib/util/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i64) local.get $1 local.set $3 i32.const 0 @@ -14111,16 +13969,8 @@ i32.const 0 drop i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 i32.const 4 - i32.eq + i32.le_u drop i32.const 8 i32.const 8 @@ -14145,46 +13995,47 @@ i32.store offset=8 else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__retain local.set $6 local.get $6 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $7 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $7 i32.const 16 i32.mul @@ -14198,16 +14049,17 @@ i32.store offset=8 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $0 i32.load local.get $4 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -14230,7 +14082,7 @@ (local $3 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i64) local.get $1 local.set $2 i32.const 0 @@ -14240,16 +14092,8 @@ i32.const 0 drop i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 i32.const 4 - i32.eq + i32.le_u drop i32.const 8 i32.const 8 @@ -14276,7 +14120,7 @@ ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/array/Array#constructor (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -14429,10 +14273,10 @@ (local $7 i32) (local $8 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $1 local.get $0 - i32.load offset=16 + i32.load offset=24 local.set $2 i32.const 0 local.get $2 @@ -14494,10 +14338,10 @@ (local $7 i32) (local $8 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $1 local.get $0 - i32.load offset=16 + i32.load offset=24 local.set $2 i32.const 0 local.get $2 @@ -14553,7 +14397,7 @@ local.get $0 i32.eqz if - i32.const 24 + i32.const 32 i32.const 22 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -14567,26 +14411,26 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 i32.const 0 i32.const 4 i32.const 24 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 local.get $0 ) (func $~lib/array/Array#get:length (param $0 i32) (result i32) @@ -14624,7 +14468,7 @@ drop local.get $2 ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 i64) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -14632,8 +14476,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -14712,11 +14557,11 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 24 i32.mul i32.add @@ -14750,7 +14595,7 @@ local.get $10 i64.load offset=8 i64.store offset=8 - block $~lib/util/hash/HASH|inlined.5 (result i32) + block $~lib/util/hash/HASH|inlined.5 (result i64) local.get $12 local.set $13 i32.const 0 @@ -14760,16 +14605,8 @@ i32.const 0 drop i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 i32.const 4 - i32.eq + i32.le_u drop i32.const 8 i32.const 8 @@ -14780,7 +14617,9 @@ br $~lib/util/hash/HASH|inlined.5 end local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 local.set $14 local.get $3 local.get $14 @@ -14826,13 +14665,14 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.tee $15 local.get $5 local.tee $9 local.get $15 - i32.load offset=8 + i32.load offset=16 local.tee $11 i32.ne if @@ -14843,14 +14683,14 @@ call $~lib/rt/pure/__release end local.get $9 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $4 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $3 call $~lib/rt/pure/__release local.get $5 @@ -14858,11 +14698,11 @@ ) (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i64) (result i32) (local $3 i64) - (local $4 i32) + (local $4 i64) (local $5 i32) (local $6 i32) (local $7 i32) - block $~lib/util/hash/HASH|inlined.4 (result i32) + block $~lib/util/hash/HASH|inlined.4 (result i64) local.get $1 local.set $3 i32.const 0 @@ -14872,16 +14712,8 @@ i32.const 0 drop i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 i32.const 4 - i32.eq + i32.le_u drop i32.const 8 i32.const 8 @@ -14906,46 +14738,47 @@ i64.store offset=8 else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__retain local.set $6 local.get $6 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $7 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $7 i32.const 24 i32.mul @@ -14959,16 +14792,17 @@ i64.store offset=8 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $0 i32.load local.get $4 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -14988,7 +14822,7 @@ ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/map/Map#delete (param $0 i32) (param $1 i64) (result i32) (local $2 i64) @@ -14998,7 +14832,7 @@ (local $6 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i32) + block $~lib/util/hash/HASH|inlined.6 (result i64) local.get $1 local.set $2 i32.const 0 @@ -15008,16 +14842,8 @@ i32.const 0 drop i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 i32.const 4 - i32.eq + i32.le_u drop i32.const 8 i32.const 8 @@ -15047,14 +14873,15 @@ i32.store offset=12 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.sub - i32.store offset=20 + i32.store offset=28 local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 local.set $4 local.get $4 i32.const 1 @@ -15062,7 +14889,7 @@ i32.const 4 local.tee $5 local.get $0 - i32.load offset=20 + i32.load offset=28 local.tee $6 local.get $5 local.get $6 @@ -15071,9 +14898,9 @@ i32.ge_u if (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 @@ -15106,10 +14933,10 @@ local.get $2 i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 local.tee $2 i32.const 0 @@ -15119,19 +14946,19 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $1 local.get $2 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__release local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 ) (func $std/map/testNumeric (local $0 i32) @@ -15608,7 +15435,7 @@ local.get $0 i32.eqz if - i32.const 24 + i32.const 32 i32.const 23 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -15622,29 +15449,29 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 i32.const 0 i32.const 4 i32.const 16 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 local.get $0 ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 i64) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -15652,8 +15479,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -15698,7 +15526,7 @@ (local $2 i64) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i64) local.get $1 local.set $2 i32.const 0 @@ -15708,16 +15536,8 @@ i32.const 0 drop i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 i32.const 4 - i32.eq + i32.le_u drop i32.const 8 i32.const 8 @@ -15769,11 +15589,11 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 16 i32.mul i32.add @@ -15807,7 +15627,7 @@ local.get $10 i32.load offset=8 i32.store offset=8 - block $~lib/util/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i64) local.get $12 local.set $13 i32.const 0 @@ -15817,16 +15637,8 @@ i32.const 0 drop i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 i32.const 4 - i32.eq + i32.le_u drop i32.const 8 i32.const 8 @@ -15837,7 +15649,9 @@ br $~lib/util/hash/HASH|inlined.2 end local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 local.set $14 local.get $3 local.get $14 @@ -15883,13 +15697,14 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.tee $15 local.get $5 local.tee $9 local.get $15 - i32.load offset=8 + i32.load offset=16 local.tee $11 i32.ne if @@ -15900,14 +15715,14 @@ call $~lib/rt/pure/__release end local.get $9 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $4 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $3 call $~lib/rt/pure/__release local.get $5 @@ -15915,11 +15730,11 @@ ) (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i64) - (local $4 i32) + (local $4 i64) (local $5 i32) (local $6 i32) (local $7 i32) - block $~lib/util/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i64) local.get $1 local.set $3 i32.const 0 @@ -15929,16 +15744,8 @@ i32.const 0 drop i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 i32.const 4 - i32.eq + i32.le_u drop i32.const 8 i32.const 8 @@ -15963,46 +15770,47 @@ i32.store offset=8 else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__retain local.set $6 local.get $6 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $7 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $7 i32.const 16 i32.mul @@ -16016,16 +15824,17 @@ i32.store offset=8 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $0 i32.load local.get $4 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -16048,7 +15857,7 @@ (local $3 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i64) local.get $1 local.set $2 i32.const 0 @@ -16058,16 +15867,8 @@ i32.const 0 drop i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 i32.const 4 - i32.eq + i32.le_u drop i32.const 8 i32.const 8 @@ -16094,7 +15895,7 @@ ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/array/Array#constructor (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -16247,10 +16048,10 @@ (local $7 i32) (local $8 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $1 local.get $0 - i32.load offset=16 + i32.load offset=24 local.set $2 i32.const 0 local.get $2 @@ -16312,10 +16113,10 @@ (local $7 i32) (local $8 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $1 local.get $0 - i32.load offset=16 + i32.load offset=24 local.set $2 i32.const 0 local.get $2 @@ -16371,7 +16172,7 @@ local.get $0 i32.eqz if - i32.const 24 + i32.const 32 i32.const 25 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -16385,26 +16186,26 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 i32.const 0 i32.const 4 i32.const 24 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 local.get $0 ) (func $~lib/array/Array#get:length (param $0 i32) (result i32) @@ -16442,7 +16243,7 @@ drop local.get $2 ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 i64) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -16450,8 +16251,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -16530,11 +16332,11 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 24 i32.mul i32.add @@ -16568,7 +16370,7 @@ local.get $10 i64.load offset=8 i64.store offset=8 - block $~lib/util/hash/HASH|inlined.5 (result i32) + block $~lib/util/hash/HASH|inlined.5 (result i64) local.get $12 local.set $13 i32.const 0 @@ -16578,16 +16380,8 @@ i32.const 0 drop i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 i32.const 4 - i32.eq + i32.le_u drop i32.const 8 i32.const 8 @@ -16598,7 +16392,9 @@ br $~lib/util/hash/HASH|inlined.5 end local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 local.set $14 local.get $3 local.get $14 @@ -16644,13 +16440,14 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.tee $15 local.get $5 local.tee $9 local.get $15 - i32.load offset=8 + i32.load offset=16 local.tee $11 i32.ne if @@ -16661,14 +16458,14 @@ call $~lib/rt/pure/__release end local.get $9 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $4 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $3 call $~lib/rt/pure/__release local.get $5 @@ -16676,11 +16473,11 @@ ) (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i64) (result i32) (local $3 i64) - (local $4 i32) + (local $4 i64) (local $5 i32) (local $6 i32) (local $7 i32) - block $~lib/util/hash/HASH|inlined.4 (result i32) + block $~lib/util/hash/HASH|inlined.4 (result i64) local.get $1 local.set $3 i32.const 0 @@ -16690,16 +16487,8 @@ i32.const 0 drop i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 i32.const 4 - i32.eq + i32.le_u drop i32.const 8 i32.const 8 @@ -16724,46 +16513,47 @@ i64.store offset=8 else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__retain local.set $6 local.get $6 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $7 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $7 i32.const 24 i32.mul @@ -16777,16 +16567,17 @@ i64.store offset=8 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $0 i32.load local.get $4 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -16806,7 +16597,7 @@ ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/map/Map#delete (param $0 i32) (param $1 i64) (result i32) (local $2 i64) @@ -16816,7 +16607,7 @@ (local $6 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i32) + block $~lib/util/hash/HASH|inlined.6 (result i64) local.get $1 local.set $2 i32.const 0 @@ -16826,16 +16617,8 @@ i32.const 0 drop i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 i32.const 4 - i32.eq + i32.le_u drop i32.const 8 i32.const 8 @@ -16865,14 +16648,15 @@ i32.store offset=12 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.sub - i32.store offset=20 + i32.store offset=28 local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 local.set $4 local.get $4 i32.const 1 @@ -16880,7 +16664,7 @@ i32.const 4 local.tee $5 local.get $0 - i32.load offset=20 + i32.load offset=28 local.tee $6 local.get $5 local.get $6 @@ -16889,9 +16673,9 @@ i32.ge_u if (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 @@ -16924,10 +16708,10 @@ local.get $2 i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 local.tee $2 i32.const 0 @@ -16937,19 +16721,19 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $1 local.get $2 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__release local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 ) (func $std/map/testNumeric (local $0 i32) @@ -17426,7 +17210,7 @@ local.get $0 i32.eqz if - i32.const 24 + i32.const 32 i32.const 26 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -17440,29 +17224,29 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 i32.const 0 i32.const 4 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 local.get $0 ) - (func $~lib/map/Map#find (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 f32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -17470,8 +17254,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -17516,7 +17301,7 @@ (local $2 f32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i64) local.get $1 local.set $2 i32.const 0 @@ -17576,11 +17361,11 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 12 i32.mul i32.add @@ -17614,7 +17399,7 @@ local.get $10 i32.load offset=4 i32.store offset=4 - block $~lib/util/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i64) local.get $12 local.set $13 i32.const 0 @@ -17633,7 +17418,9 @@ br $~lib/util/hash/HASH|inlined.2 end local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 local.set $14 local.get $3 local.get $14 @@ -17679,13 +17466,14 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.tee $15 local.get $5 local.tee $9 local.get $15 - i32.load offset=8 + i32.load offset=16 local.tee $11 i32.ne if @@ -17696,14 +17484,14 @@ call $~lib/rt/pure/__release end local.get $9 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $4 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $3 call $~lib/rt/pure/__release local.get $5 @@ -17711,11 +17499,11 @@ ) (func $~lib/map/Map#set (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 f32) - (local $4 i32) + (local $4 i64) (local $5 i32) (local $6 i32) (local $7 i32) - block $~lib/util/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i64) local.get $1 local.set $3 i32.const 0 @@ -17748,46 +17536,47 @@ i32.store offset=4 else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__retain local.set $6 local.get $6 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $7 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $7 i32.const 12 i32.mul @@ -17801,16 +17590,17 @@ i32.store offset=4 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $0 i32.load local.get $4 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -17833,7 +17623,7 @@ (local $3 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i64) local.get $1 local.set $2 i32.const 0 @@ -17868,7 +17658,7 @@ ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/array/Array#constructor (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -18021,10 +17811,10 @@ (local $7 i32) (local $8 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $1 local.get $0 - i32.load offset=16 + i32.load offset=24 local.set $2 i32.const 0 local.get $2 @@ -18086,10 +17876,10 @@ (local $7 i32) (local $8 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $1 local.get $0 - i32.load offset=16 + i32.load offset=24 local.set $2 i32.const 0 local.get $2 @@ -18145,7 +17935,7 @@ local.get $0 i32.eqz if - i32.const 24 + i32.const 32 i32.const 28 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -18159,26 +17949,26 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 i32.const 0 i32.const 4 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 local.get $0 ) (func $~lib/array/Array#get:length (param $0 i32) (result i32) @@ -18216,7 +18006,7 @@ drop local.get $2 ) - (func $~lib/map/Map#find (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 f32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -18224,8 +18014,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -18304,11 +18095,11 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 12 i32.mul i32.add @@ -18342,7 +18133,7 @@ local.get $10 f32.load offset=4 f32.store offset=4 - block $~lib/util/hash/HASH|inlined.5 (result i32) + block $~lib/util/hash/HASH|inlined.5 (result i64) local.get $12 local.set $13 i32.const 0 @@ -18361,7 +18152,9 @@ br $~lib/util/hash/HASH|inlined.5 end local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 local.set $14 local.get $3 local.get $14 @@ -18407,13 +18200,14 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.tee $15 local.get $5 local.tee $9 local.get $15 - i32.load offset=8 + i32.load offset=16 local.tee $11 i32.ne if @@ -18424,14 +18218,14 @@ call $~lib/rt/pure/__release end local.get $9 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $4 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $3 call $~lib/rt/pure/__release local.get $5 @@ -18439,11 +18233,11 @@ ) (func $~lib/map/Map#set (param $0 i32) (param $1 f32) (param $2 f32) (result i32) (local $3 f32) - (local $4 i32) + (local $4 i64) (local $5 i32) (local $6 i32) (local $7 i32) - block $~lib/util/hash/HASH|inlined.4 (result i32) + block $~lib/util/hash/HASH|inlined.4 (result i64) local.get $1 local.set $3 i32.const 0 @@ -18476,46 +18270,47 @@ f32.store offset=4 else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__retain local.set $6 local.get $6 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $7 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $7 i32.const 12 i32.mul @@ -18529,16 +18324,17 @@ f32.store offset=4 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $0 i32.load local.get $4 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -18558,7 +18354,7 @@ ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/map/Map#delete (param $0 i32) (param $1 f32) (result i32) (local $2 f32) @@ -18568,7 +18364,7 @@ (local $6 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i32) + block $~lib/util/hash/HASH|inlined.6 (result i64) local.get $1 local.set $2 i32.const 0 @@ -18606,14 +18402,15 @@ i32.store offset=8 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.sub - i32.store offset=20 + i32.store offset=28 local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 local.set $4 local.get $4 i32.const 1 @@ -18621,7 +18418,7 @@ i32.const 4 local.tee $5 local.get $0 - i32.load offset=20 + i32.load offset=28 local.tee $6 local.get $5 local.get $6 @@ -18630,9 +18427,9 @@ i32.ge_u if (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 @@ -18665,10 +18462,10 @@ local.get $2 i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 local.tee $2 i32.const 0 @@ -18678,19 +18475,19 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $1 local.get $2 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__release local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 ) (func $std/map/testNumeric (local $0 i32) @@ -19167,7 +18964,7 @@ local.get $0 i32.eqz if - i32.const 24 + i32.const 32 i32.const 29 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -19181,29 +18978,29 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 i32.const 0 i32.const 4 i32.const 16 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 local.get $0 ) - (func $~lib/map/Map#find (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 f64) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -19211,8 +19008,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -19257,7 +19055,7 @@ (local $2 f64) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i64) local.get $1 local.set $2 i32.const 0 @@ -19321,11 +19119,11 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 16 i32.mul i32.add @@ -19359,7 +19157,7 @@ local.get $10 i32.load offset=8 i32.store offset=8 - block $~lib/util/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i64) local.get $12 local.set $13 i32.const 0 @@ -19382,7 +19180,9 @@ br $~lib/util/hash/HASH|inlined.2 end local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 local.set $14 local.get $3 local.get $14 @@ -19428,13 +19228,14 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.tee $15 local.get $5 local.tee $9 local.get $15 - i32.load offset=8 + i32.load offset=16 local.tee $11 i32.ne if @@ -19445,14 +19246,14 @@ call $~lib/rt/pure/__release end local.get $9 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $4 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $3 call $~lib/rt/pure/__release local.get $5 @@ -19460,11 +19261,11 @@ ) (func $~lib/map/Map#set (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 f64) - (local $4 i32) + (local $4 i64) (local $5 i32) (local $6 i32) (local $7 i32) - block $~lib/util/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i64) local.get $1 local.set $3 i32.const 0 @@ -19501,46 +19302,47 @@ i32.store offset=8 else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__retain local.set $6 local.get $6 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $7 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $7 i32.const 16 i32.mul @@ -19554,16 +19356,17 @@ i32.store offset=8 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $0 i32.load local.get $4 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -19586,7 +19389,7 @@ (local $3 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i64) local.get $1 local.set $2 i32.const 0 @@ -19625,7 +19428,7 @@ ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/array/Array#constructor (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -19778,10 +19581,10 @@ (local $7 i32) (local $8 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $1 local.get $0 - i32.load offset=16 + i32.load offset=24 local.set $2 i32.const 0 local.get $2 @@ -19843,10 +19646,10 @@ (local $7 i32) (local $8 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $1 local.get $0 - i32.load offset=16 + i32.load offset=24 local.set $2 i32.const 0 local.get $2 @@ -19902,7 +19705,7 @@ local.get $0 i32.eqz if - i32.const 24 + i32.const 32 i32.const 31 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -19916,26 +19719,26 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 i32.const 0 i32.const 4 i32.const 24 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 local.get $0 ) (func $~lib/array/Array#get:length (param $0 i32) (result i32) @@ -19973,7 +19776,7 @@ drop local.get $2 ) - (func $~lib/map/Map#find (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 f64) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -19981,8 +19784,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -20061,11 +19865,11 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 24 i32.mul i32.add @@ -20099,7 +19903,7 @@ local.get $10 f64.load offset=8 f64.store offset=8 - block $~lib/util/hash/HASH|inlined.5 (result i32) + block $~lib/util/hash/HASH|inlined.5 (result i64) local.get $12 local.set $13 i32.const 0 @@ -20122,7 +19926,9 @@ br $~lib/util/hash/HASH|inlined.5 end local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 local.set $14 local.get $3 local.get $14 @@ -20168,13 +19974,14 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.tee $15 local.get $5 local.tee $9 local.get $15 - i32.load offset=8 + i32.load offset=16 local.tee $11 i32.ne if @@ -20185,14 +19992,14 @@ call $~lib/rt/pure/__release end local.get $9 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $4 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $3 call $~lib/rt/pure/__release local.get $5 @@ -20200,11 +20007,11 @@ ) (func $~lib/map/Map#set (param $0 i32) (param $1 f64) (param $2 f64) (result i32) (local $3 f64) - (local $4 i32) + (local $4 i64) (local $5 i32) (local $6 i32) (local $7 i32) - block $~lib/util/hash/HASH|inlined.4 (result i32) + block $~lib/util/hash/HASH|inlined.4 (result i64) local.get $1 local.set $3 i32.const 0 @@ -20241,46 +20048,47 @@ f64.store offset=8 else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__retain local.set $6 local.get $6 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $7 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $7 i32.const 24 i32.mul @@ -20294,16 +20102,17 @@ f64.store offset=8 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $0 i32.load local.get $4 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -20323,7 +20132,7 @@ ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/map/Map#delete (param $0 i32) (param $1 f64) (result i32) (local $2 f64) @@ -20333,7 +20142,7 @@ (local $6 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i32) + block $~lib/util/hash/HASH|inlined.6 (result i64) local.get $1 local.set $2 i32.const 0 @@ -20375,14 +20184,15 @@ i32.store offset=12 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.sub - i32.store offset=20 + i32.store offset=28 local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 local.set $4 local.get $4 i32.const 1 @@ -20390,7 +20200,7 @@ i32.const 4 local.tee $5 local.get $0 - i32.load offset=20 + i32.load offset=28 local.tee $6 local.get $5 local.get $6 @@ -20399,9 +20209,9 @@ i32.ge_u if (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 @@ -20434,10 +20244,10 @@ local.get $2 i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 local.tee $2 i32.const 0 @@ -20447,19 +20257,19 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $1 local.get $2 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__release local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 ) (func $std/map/testNumeric (local $0 i32) @@ -21092,7 +20902,7 @@ local.get $1 call $~lib/rt/pure/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 if (result i32) @@ -21143,7 +20953,7 @@ local.get $1 call $~lib/rt/pure/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 if (result i32) @@ -21168,7 +20978,7 @@ local.get $1 call $~lib/rt/pure/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 if (result i32) @@ -21193,7 +21003,7 @@ local.get $1 call $~lib/rt/pure/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 if (result i32) @@ -21231,7 +21041,7 @@ local.get $1 call $~lib/rt/pure/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 if (result i32) @@ -21256,7 +21066,7 @@ local.get $1 call $~lib/rt/pure/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 if (result i32) @@ -21294,7 +21104,7 @@ local.get $1 call $~lib/rt/pure/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 if (result i32) @@ -21319,7 +21129,7 @@ local.get $1 call $~lib/rt/pure/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 if (result i32) @@ -21357,7 +21167,7 @@ local.get $1 call $~lib/rt/pure/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 if (result i32) @@ -21382,7 +21192,7 @@ local.get $1 call $~lib/rt/pure/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 if (result i32) @@ -21420,7 +21230,7 @@ local.get $1 call $~lib/rt/pure/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 if (result i32) @@ -21445,7 +21255,7 @@ local.get $1 call $~lib/rt/pure/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 if (result i32) @@ -21483,7 +21293,7 @@ local.get $1 call $~lib/rt/pure/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 if (result i32) @@ -21508,7 +21318,7 @@ local.get $1 call $~lib/rt/pure/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 if (result i32) @@ -21546,7 +21356,7 @@ local.get $1 call $~lib/rt/pure/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 if (result i32) @@ -21571,7 +21381,7 @@ local.get $1 call $~lib/rt/pure/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 if (result i32) @@ -21609,7 +21419,7 @@ local.get $1 call $~lib/rt/pure/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 if (result i32) @@ -21634,7 +21444,7 @@ local.get $1 call $~lib/rt/pure/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 if (result i32) @@ -21672,7 +21482,7 @@ local.get $1 call $~lib/rt/pure/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 if (result i32) diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index c185d03e5f..a11d72a0c8 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -6,7 +6,7 @@ (type $none_=>_i32 (func (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_none (func (param i32))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_i32_i64_=>_i32 (func (param i32 i32 i64) (result i32))) (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) (type $i32_f32_=>_i32 (func (param i32 f32) (result i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) @@ -15,11 +15,13 @@ (type $i32_i64_=>_none (func (param i32 i64))) (type $i32_f32_=>_none (func (param i32 f32))) (type $i32_f64_=>_none (func (param i32 f64))) - (type $i32_i64_i32_=>_i32 (func (param i32 i64 i32) (result i32))) - (type $i32_f32_i32_=>_i32 (func (param i32 f32 i32) (result i32))) - (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) - (type $i64_=>_i32 (func (param i64) (result i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_i64_i64_=>_i32 (func (param i32 i64 i64) (result i32))) + (type $i32_f32_i64_=>_i32 (func (param i32 f32 i64) (result i32))) + (type $i32_f64_i64_=>_i32 (func (param i32 f64 i64) (result i32))) + (type $i32_=>_i64 (func (param i32) (result i64))) (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) + (type $i64_=>_i64 (func (param i64) (result i64))) (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -1289,7 +1291,7 @@ ) (func $~lib/set/Set#constructor (result i32) (local $0 i32) - i32.const 24 + i32.const 32 i32.const 3 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -1298,30 +1300,66 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $0 i32.const 32 call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 local.get $0 ) - (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/hash/hash32 (param $0 i32) (result i64) + (local $1 i64) + local.get $0 + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.const 2870177450012600265 + i64.xor + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.tee $1 + local.get $1 + i64.const 33 + i64.shr_u + i64.xor + i64.const -4417276706812531889 + i64.mul + local.tee $1 + local.get $1 + i64.const 29 + i64.shr_u + i64.xor + i64.const 1609587929392839161 + i64.mul + local.tee $1 + local.get $1 + i64.const 32 + i64.shr_u + i64.xor + ) + (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (local $3 i32) local.get $0 i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -1332,7 +1370,7 @@ if local.get $0 i32.load offset=4 - local.tee $2 + local.tee $3 i32.const 1 i32.and if (result i32) @@ -1349,7 +1387,7 @@ local.get $0 return end - local.get $2 + local.get $3 i32.const -2 i32.and local.set $0 @@ -1366,10 +1404,7 @@ i32.shl i32.const 24 i32.shr_s - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/hash32 call $~lib/set/Set#find i32.const 0 i32.ne @@ -1389,60 +1424,60 @@ i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $5 local.get $3 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $7 i32.const 3 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $0 - i32.load offset=8 - local.tee $8 - local.get $0 i32.load offset=16 + local.tee $4 + local.get $0 + i32.load offset=24 i32.const 3 i32.shl i32.add - local.set $5 + local.set $8 local.get $3 local.set $2 loop $while-continue|0 - local.get $5 + local.get $4 local.get $8 i32.ne if - local.get $8 + local.get $4 + local.tee $6 i32.load offset=4 i32.const 1 i32.and i32.eqz if local.get $2 - local.get $8 + local.get $6 i32.load8_s - local.tee $7 + local.tee $4 i32.store8 local.get $2 + local.get $5 local.get $4 + call $~lib/util/hash/hash32 local.get $1 - local.get $7 - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add - local.tee $7 + local.tee $4 i32.load i32.store offset=4 - local.get $7 + local.get $4 local.get $2 i32.store local.get $2 @@ -1450,24 +1485,24 @@ i32.add local.set $2 end - local.get $8 + local.get $6 i32.const 8 i32.add - local.set $8 + local.set $4 br $while-continue|0 end end - local.get $4 + local.get $5 local.tee $2 local.get $0 i32.load - local.tee $8 + local.tee $4 i32.ne if local.get $2 call $~lib/rt/pure/__retain local.set $2 - local.get $8 + local.get $4 call $~lib/rt/pure/__release end local.get $0 @@ -1475,11 +1510,12 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $3 local.tee $1 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $2 i32.ne if @@ -1491,78 +1527,74 @@ end local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 - local.get $6 - i32.store offset=12 + local.get $7 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 - local.get $4 + i32.load offset=28 + i32.store offset=24 + local.get $5 call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) + (local $3 i64) (local $4 i32) + local.get $0 + local.get $1 local.get $1 i32.const 24 i32.shl i32.const 24 i32.shr_s - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - local.tee $2 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + call $~lib/util/hash/hash32 + local.tee $3 call $~lib/set/Set#find i32.eqz if local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/set/Set#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $4 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $4 i32.const 3 i32.shl @@ -1572,17 +1604,18 @@ i32.store8 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $2 local.get $0 i32.load local.get $3 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -2075,10 +2108,10 @@ (local $7 i32) (local $8 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $7 local.set $4 i32.const 16 @@ -2206,10 +2239,7 @@ i32.shl i32.const 24 i32.shr_s - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/hash32 call $~lib/set/Set#find local.tee $1 i32.eqz @@ -2224,20 +2254,21 @@ i32.store offset=4 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.sub - i32.store offset=20 + i32.store offset=28 local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 local.tee $2 i32.const 1 i32.add i32.const 4 local.get $0 - i32.load offset=20 + i32.load offset=28 local.tee $1 local.get $1 i32.const 4 @@ -2246,9 +2277,9 @@ i32.ge_u if (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 @@ -2275,26 +2306,26 @@ local.get $1 i32.store local.get $0 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 i32.const 32 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $1 local.get $0 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__release local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 ) (func $std/set/testNumeric (local $0 i32) @@ -2347,7 +2378,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -2405,7 +2436,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -2455,9 +2486,9 @@ end end local.get $3 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.ne if i32.const 0 @@ -2512,7 +2543,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -2583,7 +2614,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -2597,7 +2628,7 @@ local.get $0 call $~lib/set/Set#clear local.get $0 - i32.load offset=20 + i32.load offset=28 if i32.const 0 i32.const 1360 @@ -2615,7 +2646,7 @@ ) (func $~lib/set/Set#constructor (result i32) (local $0 i32) - i32.const 24 + i32.const 32 i32.const 5 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -2624,21 +2655,21 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $0 i32.const 32 call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 local.get $0 ) (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) @@ -2647,10 +2678,7 @@ local.get $1 i32.const 255 i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/hash32 call $~lib/set/Set#find i32.const 0 i32.ne @@ -2670,60 +2698,60 @@ i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $5 local.get $3 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $7 i32.const 3 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $0 - i32.load offset=8 - local.tee $8 - local.get $0 i32.load offset=16 + local.tee $4 + local.get $0 + i32.load offset=24 i32.const 3 i32.shl i32.add - local.set $5 + local.set $8 local.get $3 local.set $2 loop $while-continue|0 - local.get $5 + local.get $4 local.get $8 i32.ne if - local.get $8 + local.get $4 + local.tee $6 i32.load offset=4 i32.const 1 i32.and i32.eqz if local.get $2 - local.get $8 + local.get $6 i32.load8_u - local.tee $7 + local.tee $4 i32.store8 local.get $2 + local.get $5 local.get $4 + call $~lib/util/hash/hash32 local.get $1 - local.get $7 - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add - local.tee $7 + local.tee $4 i32.load i32.store offset=4 - local.get $7 + local.get $4 local.get $2 i32.store local.get $2 @@ -2731,24 +2759,24 @@ i32.add local.set $2 end - local.get $8 + local.get $6 i32.const 8 i32.add - local.set $8 + local.set $4 br $while-continue|0 end end - local.get $4 + local.get $5 local.tee $2 local.get $0 i32.load - local.tee $8 + local.tee $4 i32.ne if local.get $2 call $~lib/rt/pure/__retain local.set $2 - local.get $8 + local.get $4 call $~lib/rt/pure/__release end local.get $0 @@ -2756,11 +2784,12 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $3 local.tee $1 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $2 i32.ne if @@ -2772,76 +2801,72 @@ end local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 - local.get $6 - i32.store offset=12 + local.get $7 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 - local.get $4 + i32.load offset=28 + i32.store offset=24 + local.get $5 call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) + (local $3 i64) (local $4 i32) + local.get $0 + local.get $1 local.get $1 i32.const 255 i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - local.tee $2 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + call $~lib/util/hash/hash32 + local.tee $3 call $~lib/set/Set#find i32.eqz if local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/set/Set#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $4 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $4 i32.const 3 i32.shl @@ -2851,17 +2876,18 @@ i32.store8 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $2 local.get $0 i32.load local.get $3 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -2885,10 +2911,10 @@ (local $7 i32) (local $8 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $7 local.set $4 i32.const 16 @@ -3014,10 +3040,7 @@ local.get $1 i32.const 255 i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/hash32 call $~lib/set/Set#find local.tee $1 i32.eqz @@ -3032,20 +3055,21 @@ i32.store offset=4 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.sub - i32.store offset=20 + i32.store offset=28 local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 local.tee $2 i32.const 1 i32.add i32.const 4 local.get $0 - i32.load offset=20 + i32.load offset=28 local.tee $1 local.get $1 i32.const 4 @@ -3054,9 +3078,9 @@ i32.ge_u if (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 @@ -3120,7 +3144,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -3176,7 +3200,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -3226,9 +3250,9 @@ end end local.get $3 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.ne if i32.const 0 @@ -3281,7 +3305,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -3350,7 +3374,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -3364,7 +3388,7 @@ local.get $0 call $~lib/set/Set#clear local.get $0 - i32.load offset=20 + i32.load offset=28 if i32.const 0 i32.const 1360 @@ -3382,7 +3406,7 @@ ) (func $~lib/set/Set#constructor (result i32) (local $0 i32) - i32.const 24 + i32.const 32 i32.const 7 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -3391,45 +3415,32 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $0 i32.const 32 call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 - local.get $0 - ) - (func $~lib/util/hash/hash16 (param $0 i32) (result i32) - local.get $0 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + i32.store offset=28 local.get $0 - i32.const 8 - i32.shr_u - i32.xor - i32.const 16777619 - i32.mul ) - (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (local $3 i32) local.get $0 i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -3440,7 +3451,7 @@ if local.get $0 i32.load offset=4 - local.tee $2 + local.tee $3 i32.const 1 i32.and if (result i32) @@ -3457,7 +3468,7 @@ local.get $0 return end - local.get $2 + local.get $3 i32.const -2 i32.and local.set $0 @@ -3474,7 +3485,7 @@ i32.shl i32.const 16 i32.shr_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/hash32 call $~lib/set/Set#find i32.const 0 i32.ne @@ -3506,10 +3517,10 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $4 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 3 i32.shl i32.add @@ -3536,9 +3547,11 @@ local.get $2 local.get $5 local.get $4 - call $~lib/util/hash/hash16 + call $~lib/util/hash/hash32 local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -3578,11 +3591,12 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $3 local.tee $1 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $2 i32.ne if @@ -3594,14 +3608,14 @@ end local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $7 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $5 call $~lib/rt/pure/__release local.get $3 @@ -3609,7 +3623,7 @@ ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) + (local $3 i64) (local $4 i32) local.get $0 local.get $1 @@ -3618,49 +3632,50 @@ i32.shl i32.const 16 i32.shr_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/hash32 local.tee $3 call $~lib/set/Set#find i32.eqz if local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/set/Set#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $4 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $4 i32.const 3 i32.shl @@ -3670,17 +3685,18 @@ i32.store16 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $2 local.get $0 i32.load local.get $3 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -3755,10 +3771,10 @@ (local $8 i32) (local $9 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $5 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $8 local.set $7 i32.const 16 @@ -3891,7 +3907,7 @@ i32.shl i32.const 16 i32.shr_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/hash32 call $~lib/set/Set#find local.tee $1 i32.eqz @@ -3906,20 +3922,21 @@ i32.store offset=4 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.sub - i32.store offset=20 + i32.store offset=28 local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 local.tee $2 i32.const 1 i32.add i32.const 4 local.get $0 - i32.load offset=20 + i32.load offset=28 local.tee $1 local.get $1 i32.const 4 @@ -3928,9 +3945,9 @@ i32.ge_u if (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 @@ -3996,7 +4013,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -4054,7 +4071,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -4104,9 +4121,9 @@ end end local.get $3 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.ne if i32.const 0 @@ -4161,7 +4178,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -4232,7 +4249,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -4246,7 +4263,7 @@ local.get $0 call $~lib/set/Set#clear local.get $0 - i32.load offset=20 + i32.load offset=28 if i32.const 0 i32.const 1360 @@ -4264,7 +4281,7 @@ ) (func $~lib/set/Set#constructor (result i32) (local $0 i32) - i32.const 24 + i32.const 32 i32.const 9 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -4273,21 +4290,21 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $0 i32.const 32 call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 local.get $0 ) (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) @@ -4296,7 +4313,7 @@ local.get $1 i32.const 65535 i32.and - call $~lib/util/hash/hash16 + call $~lib/util/hash/hash32 call $~lib/set/Set#find i32.const 0 i32.ne @@ -4328,10 +4345,10 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $4 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 3 i32.shl i32.add @@ -4358,9 +4375,11 @@ local.get $2 local.get $5 local.get $4 - call $~lib/util/hash/hash16 + call $~lib/util/hash/hash32 local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -4400,11 +4419,12 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $3 local.tee $1 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $2 i32.ne if @@ -4416,14 +4436,14 @@ end local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $7 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $5 call $~lib/rt/pure/__release local.get $3 @@ -4431,56 +4451,57 @@ ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) + (local $3 i64) (local $4 i32) local.get $0 local.get $1 local.get $1 i32.const 65535 i32.and - call $~lib/util/hash/hash16 + call $~lib/util/hash/hash32 local.tee $3 call $~lib/set/Set#find i32.eqz if local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/set/Set#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $4 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $4 i32.const 3 i32.shl @@ -4490,17 +4511,18 @@ i32.store16 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $2 local.get $0 i32.load local.get $3 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -4525,10 +4547,10 @@ (local $8 i32) (local $9 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $5 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $8 local.set $7 i32.const 16 @@ -4659,7 +4681,7 @@ local.get $1 i32.const 65535 i32.and - call $~lib/util/hash/hash16 + call $~lib/util/hash/hash32 call $~lib/set/Set#find local.tee $1 i32.eqz @@ -4674,20 +4696,21 @@ i32.store offset=4 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.sub - i32.store offset=20 + i32.store offset=28 local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 local.tee $2 i32.const 1 i32.add i32.const 4 local.get $0 - i32.load offset=20 + i32.load offset=28 local.tee $1 local.get $1 i32.const 4 @@ -4696,9 +4719,9 @@ i32.ge_u if (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 @@ -4762,7 +4785,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -4818,7 +4841,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -4868,9 +4891,9 @@ end end local.get $3 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.ne if i32.const 0 @@ -4923,7 +4946,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -4992,7 +5015,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -5006,7 +5029,7 @@ local.get $0 call $~lib/set/Set#clear local.get $0 - i32.load offset=20 + i32.load offset=28 if i32.const 0 i32.const 1360 @@ -5024,7 +5047,7 @@ ) (func $~lib/set/Set#constructor (result i32) (local $0 i32) - i32.const 24 + i32.const 32 i32.const 11 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -5033,61 +5056,32 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $0 i32.const 32 call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 - local.get $0 - ) - (func $~lib/util/hash/hash32 (param $0 i32) (result i32) - local.get $0 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - local.get $0 - i32.const 8 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.get $0 - i32.const 16 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul + i32.store offset=28 local.get $0 - i32.const 24 - i32.shr_u - i32.xor - i32.const 16777619 - i32.mul ) - (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (local $3 i32) local.get $0 i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -5098,7 +5092,7 @@ if local.get $0 i32.load offset=4 - local.tee $2 + local.tee $3 i32.const 1 i32.and if (result i32) @@ -5113,7 +5107,7 @@ local.get $0 return end - local.get $2 + local.get $3 i32.const -2 i32.and local.set $0 @@ -5158,10 +5152,10 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $4 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 3 i32.shl i32.add @@ -5190,7 +5184,9 @@ local.get $4 call $~lib/util/hash/hash32 local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -5230,11 +5226,12 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $3 local.tee $1 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $2 i32.ne if @@ -5246,14 +5243,14 @@ end local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $7 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $5 call $~lib/rt/pure/__release local.get $3 @@ -5261,7 +5258,7 @@ ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) + (local $3 i64) (local $4 i32) local.get $0 local.get $1 @@ -5272,43 +5269,44 @@ i32.eqz if local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/set/Set#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $4 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $4 i32.const 3 i32.shl @@ -5318,17 +5316,18 @@ i32.store local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $2 local.get $0 i32.load local.get $3 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -5403,10 +5402,10 @@ (local $8 i32) (local $9 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $5 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $8 local.set $7 i32.const 16 @@ -5550,20 +5549,21 @@ i32.store offset=4 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.sub - i32.store offset=20 + i32.store offset=28 local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 local.tee $2 i32.const 1 i32.add i32.const 4 local.get $0 - i32.load offset=20 + i32.load offset=28 local.tee $1 local.get $1 i32.const 4 @@ -5572,9 +5572,9 @@ i32.ge_u if (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 @@ -5636,7 +5636,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -5690,7 +5690,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -5740,9 +5740,9 @@ end end local.get $3 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.ne if i32.const 0 @@ -5793,7 +5793,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -5860,7 +5860,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -5874,7 +5874,7 @@ local.get $0 call $~lib/set/Set#clear local.get $0 - i32.load offset=20 + i32.load offset=28 if i32.const 0 i32.const 1360 @@ -5892,7 +5892,7 @@ ) (func $~lib/set/Set#constructor (result i32) (local $0 i32) - i32.const 24 + i32.const 32 i32.const 13 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -5901,21 +5901,21 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $0 i32.const 32 call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 local.get $0 ) (func $~lib/set/Set#values (param $0 i32) (result i32) @@ -5929,10 +5929,10 @@ (local $8 i32) (local $9 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $5 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $8 local.set $7 i32.const 16 @@ -6082,7 +6082,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -6136,7 +6136,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -6186,9 +6186,9 @@ end end local.get $3 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.ne if i32.const 0 @@ -6239,7 +6239,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -6306,7 +6306,7 @@ end end local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -6320,7 +6320,7 @@ local.get $0 call $~lib/set/Set#clear local.get $0 - i32.load offset=20 + i32.load offset=28 if i32.const 0 i32.const 1360 @@ -6338,7 +6338,7 @@ ) (func $~lib/set/Set#constructor (result i32) (local $0 i32) - i32.const 24 + i32.const 32 i32.const 15 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -6347,96 +6347,68 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $0 i32.const 64 call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/hash64 (param $0 i64) (result i32) - (local $1 i32) + (func $~lib/util/hash/hash64 (param $0 i64) (result i64) + local.get $0 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const 2870177450012600269 + i64.xor + i64.const 27 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.tee $0 local.get $0 - i32.wrap_i64 - local.tee $1 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - local.get $1 - i32.const 8 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.get $1 - i32.const 16 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.get $1 - i32.const 24 - i32.shr_u - i32.xor - i32.const 16777619 - i32.mul + i64.const 33 + i64.shr_u + i64.xor + i64.const -4417276706812531889 + i64.mul + local.tee $0 + local.get $0 + i64.const 29 + i64.shr_u + i64.xor + i64.const 1609587929392839161 + i64.mul + local.tee $0 local.get $0 i64.const 32 i64.shr_u - i32.wrap_i64 - local.tee $1 - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.get $1 - i32.const 8 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.get $1 - i32.const 16 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.get $1 - i32.const 24 - i32.shr_u - i32.xor - i32.const 16777619 - i32.mul + i64.xor ) - (func $~lib/set/Set#find (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (param $0 i32) (param $1 i64) (param $2 i64) (result i32) + (local $3 i32) local.get $0 i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -6447,7 +6419,7 @@ if local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 i32.const 1 i32.and if (result i32) @@ -6462,7 +6434,7 @@ local.get $0 return end - local.get $2 + local.get $3 i32.const -2 i32.and local.set $0 @@ -6492,12 +6464,12 @@ local.get $1 i32.const 1 i32.add - local.tee $3 + local.tee $4 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $3 + local.set $6 + local.get $4 i32.const 3 i32.shl i32.const 3 @@ -6506,48 +6478,50 @@ i32.const 4 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $3 - local.get $0 - i32.load offset=8 - local.tee $4 + local.set $4 local.get $0 i32.load offset=16 + local.tee $5 + local.get $0 + i32.load offset=24 i32.const 4 i32.shl i32.add local.set $8 - local.get $3 + local.get $4 local.set $2 loop $while-continue|0 - local.get $4 + local.get $5 local.get $8 i32.ne if - local.get $4 - local.tee $6 + local.get $5 + local.tee $3 i32.load offset=8 i32.const 1 i32.and i32.eqz if local.get $2 - local.get $6 + local.get $3 i64.load local.tee $9 i64.store local.get $2 - local.get $5 + local.get $6 local.get $9 call $~lib/util/hash/hash64 local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add - local.tee $4 + local.tee $5 i32.load i32.store offset=8 - local.get $4 + local.get $5 local.get $2 i32.store local.get $2 @@ -6555,111 +6529,113 @@ i32.add local.set $2 end - local.get $6 + local.get $3 i32.const 16 i32.add - local.set $4 + local.set $5 br $while-continue|0 end end - local.get $5 - local.tee $2 + local.get $6 + local.tee $3 local.get $0 i32.load - local.tee $4 + local.tee $5 i32.ne if - local.get $2 + local.get $3 call $~lib/rt/pure/__retain - local.set $2 - local.get $4 + local.set $3 + local.get $5 call $~lib/rt/pure/__release end local.get $0 - local.get $2 + local.get $3 i32.store local.get $0 local.get $1 - i32.store offset=4 - local.get $3 - local.tee $1 + i64.extend_i32_u + i64.store offset=8 + local.get $4 + local.tee $3 local.get $0 - i32.load offset=8 - local.tee $2 + i32.load offset=16 + local.tee $1 i32.ne if - local.get $1 + local.get $3 call $~lib/rt/pure/__retain - local.set $1 - local.get $2 + local.set $3 + local.get $1 call $~lib/rt/pure/__release end local.get $0 - local.get $1 - i32.store offset=8 + local.get $3 + i32.store offset=16 local.get $0 local.get $7 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 - local.get $5 + i32.load offset=28 + i32.store offset=24 + local.get $6 call $~lib/rt/pure/__release - local.get $3 + local.get $4 call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (param $0 i32) (param $1 i64) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 i64) local.get $0 local.get $1 local.get $1 call $~lib/util/hash/hash64 - local.tee $3 + local.tee $4 call $~lib/set/Set#find i32.eqz if local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/set/Set#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 local.get $0 local.get $0 - i32.load offset=16 - local.tee $4 + i32.load offset=24 + local.tee $3 i32.const 1 i32.add - i32.store offset=16 - local.get $4 + i32.store offset=24 + local.get $3 i32.const 4 i32.shl i32.add @@ -6668,17 +6644,18 @@ i64.store local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $2 local.get $0 i32.load - local.get $3 + local.get $4 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -6753,10 +6730,10 @@ (local $8 i32) (local $9 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $5 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $8 local.set $7 i32.const 16 @@ -6901,20 +6878,21 @@ i32.store offset=8 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.sub - i32.store offset=20 + i32.store offset=28 local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 local.tee $3 i32.const 1 i32.add i32.const 4 local.get $0 - i32.load offset=20 + i32.load offset=28 local.tee $2 local.get $2 i32.const 4 @@ -6923,9 +6901,9 @@ i32.ge_u if (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 @@ -6952,26 +6930,26 @@ local.get $1 i32.store local.get $0 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 i32.const 64 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $1 local.get $0 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__release local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 ) (func $std/set/testNumeric (local $0 i64) @@ -7021,7 +6999,7 @@ end end local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -7075,7 +7053,7 @@ end end local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -7125,9 +7103,9 @@ end end local.get $4 - i32.load offset=20 + i32.load offset=28 local.get $1 - i32.load offset=20 + i32.load offset=28 i32.ne if i32.const 0 @@ -7178,7 +7156,7 @@ end end local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -7245,7 +7223,7 @@ end end local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -7259,7 +7237,7 @@ local.get $1 call $~lib/set/Set#clear local.get $1 - i32.load offset=20 + i32.load offset=28 if i32.const 0 i32.const 1360 @@ -7277,7 +7255,7 @@ ) (func $~lib/set/Set#constructor (result i32) (local $0 i32) - i32.const 24 + i32.const 32 i32.const 17 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -7286,21 +7264,21 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $0 i32.const 64 call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 local.get $0 ) (func $~lib/set/Set#values (param $0 i32) (result i32) @@ -7314,10 +7292,10 @@ (local $8 i32) (local $9 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $5 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $8 local.set $7 i32.const 16 @@ -7468,7 +7446,7 @@ end end local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -7522,7 +7500,7 @@ end end local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -7572,9 +7550,9 @@ end end local.get $4 - i32.load offset=20 + i32.load offset=28 local.get $1 - i32.load offset=20 + i32.load offset=28 i32.ne if i32.const 0 @@ -7625,7 +7603,7 @@ end end local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -7692,7 +7670,7 @@ end end local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -7706,7 +7684,7 @@ local.get $1 call $~lib/set/Set#clear local.get $1 - i32.load offset=20 + i32.load offset=28 if i32.const 0 i32.const 1360 @@ -7724,7 +7702,7 @@ ) (func $~lib/set/Set#constructor (result i32) (local $0 i32) - i32.const 24 + i32.const 32 i32.const 19 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -7733,30 +7711,32 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $0 i32.const 32 call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 local.get $0 ) - (func $~lib/set/Set#find (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (param $0 i32) (param $1 f32) (param $2 i64) (result i32) + (local $3 i32) local.get $0 i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -7767,7 +7747,7 @@ if local.get $0 i32.load offset=4 - local.tee $2 + local.tee $3 i32.const 1 i32.and if (result i32) @@ -7782,7 +7762,7 @@ local.get $0 return end - local.get $2 + local.get $3 i32.const -2 i32.and local.set $0 @@ -7813,12 +7793,12 @@ local.get $1 i32.const 1 i32.add - local.tee $3 + local.tee $4 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $3 + local.set $6 + local.get $4 i32.const 3 i32.shl i32.const 3 @@ -7827,49 +7807,51 @@ i32.const 3 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $3 - local.get $0 - i32.load offset=8 - local.tee $4 + local.set $4 local.get $0 i32.load offset=16 + local.tee $5 + local.get $0 + i32.load offset=24 i32.const 3 i32.shl i32.add local.set $8 - local.get $3 + local.get $4 local.set $2 loop $while-continue|0 - local.get $4 + local.get $5 local.get $8 i32.ne if - local.get $4 - local.tee $6 + local.get $5 + local.tee $3 i32.load offset=4 i32.const 1 i32.and i32.eqz if local.get $2 - local.get $6 + local.get $3 f32.load local.tee $9 f32.store local.get $2 - local.get $5 + local.get $6 local.get $9 i32.reinterpret_f32 call $~lib/util/hash/hash32 local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add - local.tee $4 + local.tee $5 i32.load i32.store offset=4 - local.get $4 + local.get $5 local.get $2 i32.store local.get $2 @@ -7877,112 +7859,114 @@ i32.add local.set $2 end - local.get $6 + local.get $3 i32.const 8 i32.add - local.set $4 + local.set $5 br $while-continue|0 end end - local.get $5 - local.tee $2 + local.get $6 + local.tee $3 local.get $0 i32.load - local.tee $4 + local.tee $5 i32.ne if - local.get $2 + local.get $3 call $~lib/rt/pure/__retain - local.set $2 - local.get $4 + local.set $3 + local.get $5 call $~lib/rt/pure/__release end local.get $0 - local.get $2 + local.get $3 i32.store local.get $0 local.get $1 - i32.store offset=4 - local.get $3 - local.tee $1 + i64.extend_i32_u + i64.store offset=8 + local.get $4 + local.tee $3 local.get $0 - i32.load offset=8 - local.tee $2 + i32.load offset=16 + local.tee $1 i32.ne if - local.get $1 + local.get $3 call $~lib/rt/pure/__retain - local.set $1 - local.get $2 + local.set $3 + local.get $1 call $~lib/rt/pure/__release end local.get $0 - local.get $1 - i32.store offset=8 + local.get $3 + i32.store offset=16 local.get $0 local.get $7 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 - local.get $5 + i32.load offset=28 + i32.store offset=24 + local.get $6 call $~lib/rt/pure/__release - local.get $3 + local.get $4 call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (param $0 i32) (param $1 f32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 i64) local.get $0 local.get $1 local.get $1 i32.reinterpret_f32 call $~lib/util/hash/hash32 - local.tee $3 + local.tee $4 call $~lib/set/Set#find i32.eqz if local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/set/Set#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 local.get $0 local.get $0 - i32.load offset=16 - local.tee $4 + i32.load offset=24 + local.tee $3 i32.const 1 i32.add - i32.store offset=16 - local.get $4 + i32.store offset=24 + local.get $3 i32.const 3 i32.shl i32.add @@ -7991,17 +7975,18 @@ f32.store local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $2 local.get $0 i32.load - local.get $3 + local.get $4 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -8027,10 +8012,10 @@ (local $9 i32) (local $10 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $9 local.set $8 i32.const 16 @@ -8209,20 +8194,21 @@ i32.store offset=4 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.sub - i32.store offset=20 + i32.store offset=28 local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 local.tee $3 i32.const 1 i32.add i32.const 4 local.get $0 - i32.load offset=20 + i32.load offset=28 local.tee $2 local.get $2 i32.const 4 @@ -8231,9 +8217,9 @@ i32.ge_u if (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 @@ -8296,7 +8282,7 @@ end end local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -8350,7 +8336,7 @@ end end local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -8400,9 +8386,9 @@ end end local.get $4 - i32.load offset=20 + i32.load offset=28 local.get $1 - i32.load offset=20 + i32.load offset=28 i32.ne if i32.const 0 @@ -8453,7 +8439,7 @@ end end local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -8520,7 +8506,7 @@ end end local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -8534,7 +8520,7 @@ local.get $1 call $~lib/set/Set#clear local.get $1 - i32.load offset=20 + i32.load offset=28 if i32.const 0 i32.const 1360 @@ -8552,7 +8538,7 @@ ) (func $~lib/set/Set#constructor (result i32) (local $0 i32) - i32.const 24 + i32.const 32 i32.const 21 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -8561,30 +8547,32 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $0 i32.const 64 call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 local.get $0 ) - (func $~lib/set/Set#find (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (param $0 i32) (param $1 f64) (param $2 i64) (result i32) + (local $3 i32) local.get $0 i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -8595,7 +8583,7 @@ if local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 i32.const 1 i32.and if (result i32) @@ -8610,7 +8598,7 @@ local.get $0 return end - local.get $2 + local.get $3 i32.const -2 i32.and local.set $0 @@ -8641,12 +8629,12 @@ local.get $1 i32.const 1 i32.add - local.tee $3 + local.tee $4 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $3 + local.set $6 + local.get $4 i32.const 3 i32.shl i32.const 3 @@ -8655,49 +8643,51 @@ i32.const 4 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $3 - local.get $0 - i32.load offset=8 - local.tee $4 + local.set $4 local.get $0 i32.load offset=16 + local.tee $5 + local.get $0 + i32.load offset=24 i32.const 4 i32.shl i32.add local.set $8 - local.get $3 + local.get $4 local.set $2 loop $while-continue|0 - local.get $4 + local.get $5 local.get $8 i32.ne if - local.get $4 - local.tee $6 + local.get $5 + local.tee $3 i32.load offset=8 i32.const 1 i32.and i32.eqz if local.get $2 - local.get $6 + local.get $3 f64.load local.tee $9 f64.store local.get $2 - local.get $5 + local.get $6 local.get $9 i64.reinterpret_f64 call $~lib/util/hash/hash64 local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add - local.tee $4 + local.tee $5 i32.load i32.store offset=8 - local.get $4 + local.get $5 local.get $2 i32.store local.get $2 @@ -8705,112 +8695,114 @@ i32.add local.set $2 end - local.get $6 + local.get $3 i32.const 16 i32.add - local.set $4 + local.set $5 br $while-continue|0 end end - local.get $5 - local.tee $2 + local.get $6 + local.tee $3 local.get $0 i32.load - local.tee $4 + local.tee $5 i32.ne if - local.get $2 + local.get $3 call $~lib/rt/pure/__retain - local.set $2 - local.get $4 + local.set $3 + local.get $5 call $~lib/rt/pure/__release end local.get $0 - local.get $2 + local.get $3 i32.store local.get $0 local.get $1 - i32.store offset=4 - local.get $3 - local.tee $1 + i64.extend_i32_u + i64.store offset=8 + local.get $4 + local.tee $3 local.get $0 - i32.load offset=8 - local.tee $2 + i32.load offset=16 + local.tee $1 i32.ne if - local.get $1 + local.get $3 call $~lib/rt/pure/__retain - local.set $1 - local.get $2 + local.set $3 + local.get $1 call $~lib/rt/pure/__release end local.get $0 - local.get $1 - i32.store offset=8 + local.get $3 + i32.store offset=16 local.get $0 local.get $7 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 - local.get $5 + i32.load offset=28 + i32.store offset=24 + local.get $6 call $~lib/rt/pure/__release - local.get $3 + local.get $4 call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 i64) local.get $0 local.get $1 local.get $1 i64.reinterpret_f64 call $~lib/util/hash/hash64 - local.tee $3 + local.tee $4 call $~lib/set/Set#find i32.eqz if local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/set/Set#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 local.get $0 local.get $0 - i32.load offset=16 - local.tee $4 + i32.load offset=24 + local.tee $3 i32.const 1 i32.add - i32.store offset=16 - local.get $4 + i32.store offset=24 + local.get $3 i32.const 4 i32.shl i32.add @@ -8819,17 +8811,18 @@ f64.store local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $2 local.get $0 i32.load - local.get $3 + local.get $4 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -8855,10 +8848,10 @@ (local $9 i32) (local $10 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $9 local.set $8 i32.const 16 @@ -9037,20 +9030,21 @@ i32.store offset=8 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.sub - i32.store offset=20 + i32.store offset=28 local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 local.tee $3 i32.const 1 i32.add i32.const 4 local.get $0 - i32.load offset=20 + i32.load offset=28 local.tee $2 local.get $2 i32.const 4 @@ -9059,9 +9053,9 @@ i32.ge_u if (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 @@ -9124,7 +9118,7 @@ end end local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -9178,7 +9172,7 @@ end end local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -9228,9 +9222,9 @@ end end local.get $4 - i32.load offset=20 + i32.load offset=28 local.get $1 - i32.load offset=20 + i32.load offset=28 i32.ne if i32.const 0 @@ -9281,7 +9275,7 @@ end end local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -9348,7 +9342,7 @@ end end local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -9362,7 +9356,7 @@ local.get $1 call $~lib/set/Set#clear local.get $1 - i32.load offset=20 + i32.load offset=28 if i32.const 0 i32.const 1360 @@ -9441,7 +9435,7 @@ i32.load offset=20 call $~lib/rt/pure/__visit local.get $0 - i32.load offset=28 + i32.load offset=36 call $~lib/rt/pure/__visit br $__inlined_func$~lib/rt/__visit_members end diff --git a/tests/compiler/std/set.untouched.wat b/tests/compiler/std/set.untouched.wat index 271db743ff..b932743dab 100644 --- a/tests/compiler/std/set.untouched.wat +++ b/tests/compiler/std/set.untouched.wat @@ -1,25 +1,27 @@ (module (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_i32_i64_=>_i32 (func (param i32 i32 i64) (result i32))) (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_f32_=>_i32 (func (param i32 f32) (result i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) (type $i32_i32_f64_=>_none (func (param i32 i32 f64))) - (type $i32_i64_i32_=>_i32 (func (param i32 i64 i32) (result i32))) + (type $i32_i64_i64_=>_i32 (func (param i32 i64 i64) (result i32))) (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $i32_f32_i32_=>_i32 (func (param i32 f32 i32) (result i32))) - (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) - (type $i64_=>_i32 (func (param i64) (result i32))) + (type $i32_f32_i64_=>_i32 (func (param i32 f32 i64) (result i32))) + (type $i32_f64_i64_=>_i32 (func (param i32 f64 i64) (result i32))) + (type $i32_=>_i64 (func (param i32) (result i64))) + (type $i64_=>_i64 (func (param i64) (result i64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 12) "(\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00(\00\00\00a\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e\00") @@ -1762,7 +1764,7 @@ local.get $0 i32.eqz if - i32.const 24 + i32.const 32 i32.const 3 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -1776,36 +1778,80 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 i32.const 0 i32.const 4 i32.const 8 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/hash8 (param $0 i32) (result i32) - i32.const -2128831035 + (func $~lib/util/hash/hash32 (param $0 i32) (result i64) + (local $1 i64) + i64.const 0 + i64.const 2870177450012600261 + i64.add + i64.const 4 + i64.add + local.set $1 + local.get $1 local.get $0 - i32.xor - i32.const 16777619 - i32.mul + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $1 + local.get $1 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $1 + local.get $1 + local.get $1 + i64.const 33 + i64.shr_u + i64.xor + local.set $1 + local.get $1 + i64.const -4417276706812531889 + i64.mul + local.set $1 + local.get $1 + local.get $1 + i64.const 29 + i64.shr_u + i64.xor + local.set $1 + local.get $1 + i64.const 1609587929392839161 + i64.mul + local.set $1 + local.get $1 + local.get $1 + i64.const 32 + i64.shr_u + i64.xor + local.set $1 + local.get $1 ) - (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1813,8 +1859,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -1863,7 +1910,7 @@ (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i64) local.get $1 local.set $2 i32.const 0 @@ -1873,15 +1920,15 @@ i32.const 0 drop i32.const 1 - i32.const 1 - i32.eq + i32.const 4 + i32.le_u drop local.get $2 i32.const 24 i32.shl i32.const 24 i32.shr_s - call $~lib/util/hash/hash8 + call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.0 end call $~lib/set/Set#find @@ -1901,7 +1948,7 @@ (local $11 i32) (local $12 i32) (local $13 i32) - (local $14 i32) + (local $14 i64) local.get $1 i32.const 1 i32.add @@ -1925,11 +1972,11 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 8 i32.mul i32.add @@ -1959,7 +2006,7 @@ local.get $11 local.get $12 i32.store8 - block $~lib/util/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i64) local.get $12 local.set $13 i32.const 0 @@ -1969,27 +2016,29 @@ i32.const 0 drop i32.const 1 - i32.const 1 - i32.eq + i32.const 4 + i32.le_u drop local.get $13 - call $~lib/util/hash/hash8 + call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.2 end local.get $1 - i32.and - local.set $13 + i64.extend_i32_u + i64.and + local.set $14 local.get $3 - local.get $13 + local.get $14 + i32.wrap_i64 i32.const 4 i32.mul i32.add - local.set $14 + local.set $13 local.get $11 - local.get $14 + local.get $13 i32.load i32.store offset=4 - local.get $14 + local.get $13 local.get $8 i32.store local.get $8 @@ -2023,31 +2072,32 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.tee $13 local.get $5 - local.tee $14 + local.tee $9 local.get $13 - i32.load offset=8 + i32.load offset=16 local.tee $11 i32.ne if - local.get $14 + local.get $9 call $~lib/rt/pure/__retain - local.set $14 + local.set $9 local.get $11 call $~lib/rt/pure/__release end - local.get $14 - i32.store offset=8 + local.get $9 + i32.store offset=16 local.get $0 local.get $4 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $3 call $~lib/rt/pure/__release local.get $5 @@ -2055,9 +2105,9 @@ ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) + (local $3 i64) (local $4 i32) - block $~lib/util/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i64) local.get $1 local.set $2 i32.const 0 @@ -2067,15 +2117,15 @@ i32.const 0 drop i32.const 1 - i32.const 1 - i32.eq + i32.const 4 + i32.le_u drop local.get $2 i32.const 24 i32.shl i32.const 24 i32.shr_s - call $~lib/util/hash/hash8 + call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.1 end local.set $3 @@ -2088,43 +2138,44 @@ i32.eqz if local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/set/Set#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $2 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $2 i32.const 8 i32.mul @@ -2135,16 +2186,17 @@ i32.store8 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $0 i32.load local.get $3 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -2162,7 +2214,7 @@ ) (func $~lib/set/Set#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/array/Array#constructor (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -3857,10 +3909,10 @@ (local $7 i32) (local $8 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $1 local.get $0 - i32.load offset=16 + i32.load offset=24 local.set $2 i32.const 0 local.get $2 @@ -3954,7 +4006,7 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i64) local.get $1 local.set $2 i32.const 0 @@ -3964,15 +4016,15 @@ i32.const 0 drop i32.const 1 - i32.const 1 - i32.eq + i32.const 4 + i32.le_u drop local.get $2 i32.const 24 i32.shl i32.const 24 i32.shr_s - call $~lib/util/hash/hash8 + call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.3 end call $~lib/set/Set#find @@ -3993,14 +4045,15 @@ i32.store offset=4 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.sub - i32.store offset=20 + i32.store offset=28 local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 local.set $4 local.get $4 i32.const 1 @@ -4008,7 +4061,7 @@ i32.const 4 local.tee $2 local.get $0 - i32.load offset=20 + i32.load offset=28 local.tee $5 local.get $2 local.get $5 @@ -4017,9 +4070,9 @@ i32.ge_u if (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 @@ -4052,10 +4105,10 @@ local.get $2 i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 local.tee $2 i32.const 0 @@ -4065,19 +4118,19 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $1 local.get $2 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__release local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 ) (func $std/set/testNumeric (local $0 i32) @@ -4439,7 +4492,7 @@ local.get $0 i32.eqz if - i32.const 24 + i32.const 32 i32.const 5 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -4453,29 +4506,29 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 i32.const 0 i32.const 4 i32.const 8 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 local.get $0 ) - (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4483,8 +4536,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -4531,7 +4585,7 @@ (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i64) local.get $1 local.set $2 i32.const 0 @@ -4541,13 +4595,13 @@ i32.const 0 drop i32.const 1 - i32.const 1 - i32.eq + i32.const 4 + i32.le_u drop local.get $2 i32.const 255 i32.and - call $~lib/util/hash/hash8 + call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.0 end call $~lib/set/Set#find @@ -4567,7 +4621,7 @@ (local $11 i32) (local $12 i32) (local $13 i32) - (local $14 i32) + (local $14 i64) local.get $1 i32.const 1 i32.add @@ -4591,11 +4645,11 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 8 i32.mul i32.add @@ -4625,7 +4679,7 @@ local.get $11 local.get $12 i32.store8 - block $~lib/util/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i64) local.get $12 local.set $13 i32.const 0 @@ -4635,27 +4689,29 @@ i32.const 0 drop i32.const 1 - i32.const 1 - i32.eq + i32.const 4 + i32.le_u drop local.get $13 - call $~lib/util/hash/hash8 + call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.2 end local.get $1 - i32.and - local.set $13 + i64.extend_i32_u + i64.and + local.set $14 local.get $3 - local.get $13 + local.get $14 + i32.wrap_i64 i32.const 4 i32.mul i32.add - local.set $14 + local.set $13 local.get $11 - local.get $14 + local.get $13 i32.load i32.store offset=4 - local.get $14 + local.get $13 local.get $8 i32.store local.get $8 @@ -4689,31 +4745,32 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.tee $13 local.get $5 - local.tee $14 + local.tee $9 local.get $13 - i32.load offset=8 + i32.load offset=16 local.tee $11 i32.ne if - local.get $14 + local.get $9 call $~lib/rt/pure/__retain - local.set $14 + local.set $9 local.get $11 call $~lib/rt/pure/__release end - local.get $14 - i32.store offset=8 + local.get $9 + i32.store offset=16 local.get $0 local.get $4 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $3 call $~lib/rt/pure/__release local.get $5 @@ -4721,9 +4778,9 @@ ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) + (local $3 i64) (local $4 i32) - block $~lib/util/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i64) local.get $1 local.set $2 i32.const 0 @@ -4733,13 +4790,13 @@ i32.const 0 drop i32.const 1 - i32.const 1 - i32.eq + i32.const 4 + i32.le_u drop local.get $2 i32.const 255 i32.and - call $~lib/util/hash/hash8 + call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.1 end local.set $3 @@ -4752,43 +4809,44 @@ i32.eqz if local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/set/Set#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $2 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $2 i32.const 8 i32.mul @@ -4799,16 +4857,17 @@ i32.store8 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $0 i32.load local.get $3 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -4826,7 +4885,7 @@ ) (func $~lib/set/Set#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/array/Array#constructor (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -4979,10 +5038,10 @@ (local $7 i32) (local $8 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $1 local.get $0 - i32.load offset=16 + i32.load offset=24 local.set $2 i32.const 0 local.get $2 @@ -5076,7 +5135,7 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i64) local.get $1 local.set $2 i32.const 0 @@ -5086,13 +5145,13 @@ i32.const 0 drop i32.const 1 - i32.const 1 - i32.eq + i32.const 4 + i32.le_u drop local.get $2 i32.const 255 i32.and - call $~lib/util/hash/hash8 + call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.3 end call $~lib/set/Set#find @@ -5113,14 +5172,15 @@ i32.store offset=4 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.sub - i32.store offset=20 + i32.store offset=28 local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 local.set $4 local.get $4 i32.const 1 @@ -5128,7 +5188,7 @@ i32.const 4 local.tee $2 local.get $0 - i32.load offset=20 + i32.load offset=28 local.tee $5 local.get $2 local.get $5 @@ -5137,9 +5197,9 @@ i32.ge_u if (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 @@ -5172,10 +5232,10 @@ local.get $2 i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 local.tee $2 i32.const 0 @@ -5185,19 +5245,19 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $1 local.get $2 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__release local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 ) (func $std/set/testNumeric (local $0 i32) @@ -5551,7 +5611,7 @@ local.get $0 i32.eqz if - i32.const 24 + i32.const 32 i32.const 7 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -5565,51 +5625,29 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 i32.const 0 i32.const 4 i32.const 8 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/hash16 (param $0 i32) (result i32) - (local $1 i32) - i32.const -2128831035 - local.set $1 - local.get $1 - local.get $0 - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $1 - local.get $1 - local.get $0 - i32.const 8 - i32.shr_u - i32.xor - i32.const 16777619 - i32.mul - local.set $1 - local.get $1 - ) - (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5617,8 +5655,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -5667,7 +5706,7 @@ (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i64) local.get $1 local.set $2 i32.const 0 @@ -5677,19 +5716,15 @@ i32.const 0 drop i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq + i32.const 4 + i32.le_u drop local.get $2 i32.const 16 i32.shl i32.const 16 i32.shr_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.0 end call $~lib/set/Set#find @@ -5709,7 +5744,7 @@ (local $11 i32) (local $12 i32) (local $13 i32) - (local $14 i32) + (local $14 i64) local.get $1 i32.const 1 i32.add @@ -5733,11 +5768,11 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 8 i32.mul i32.add @@ -5767,7 +5802,7 @@ local.get $11 local.get $12 i32.store16 - block $~lib/util/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i64) local.get $12 local.set $13 i32.const 0 @@ -5777,31 +5812,29 @@ i32.const 0 drop i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq + i32.const 4 + i32.le_u drop local.get $13 - call $~lib/util/hash/hash16 + call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.2 end local.get $1 - i32.and - local.set $13 + i64.extend_i32_u + i64.and + local.set $14 local.get $3 - local.get $13 + local.get $14 + i32.wrap_i64 i32.const 4 i32.mul i32.add - local.set $14 + local.set $13 local.get $11 - local.get $14 + local.get $13 i32.load i32.store offset=4 - local.get $14 + local.get $13 local.get $8 i32.store local.get $8 @@ -5835,31 +5868,32 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.tee $13 local.get $5 - local.tee $14 + local.tee $9 local.get $13 - i32.load offset=8 + i32.load offset=16 local.tee $11 i32.ne if - local.get $14 + local.get $9 call $~lib/rt/pure/__retain - local.set $14 + local.set $9 local.get $11 call $~lib/rt/pure/__release end - local.get $14 - i32.store offset=8 + local.get $9 + i32.store offset=16 local.get $0 local.get $4 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $3 call $~lib/rt/pure/__release local.get $5 @@ -5867,9 +5901,9 @@ ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) + (local $3 i64) (local $4 i32) - block $~lib/util/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i64) local.get $1 local.set $2 i32.const 0 @@ -5879,19 +5913,15 @@ i32.const 0 drop i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq + i32.const 4 + i32.le_u drop local.get $2 i32.const 16 i32.shl i32.const 16 i32.shr_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.1 end local.set $3 @@ -5904,43 +5934,44 @@ i32.eqz if local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/set/Set#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $2 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $2 i32.const 8 i32.mul @@ -5951,16 +5982,17 @@ i32.store16 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $0 i32.load local.get $3 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -5978,7 +6010,7 @@ ) (func $~lib/set/Set#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/array/Array#constructor (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -6131,10 +6163,10 @@ (local $7 i32) (local $8 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $1 local.get $0 - i32.load offset=16 + i32.load offset=24 local.set $2 i32.const 0 local.get $2 @@ -6228,7 +6260,7 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i64) local.get $1 local.set $2 i32.const 0 @@ -6238,19 +6270,15 @@ i32.const 0 drop i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq + i32.const 4 + i32.le_u drop local.get $2 i32.const 16 i32.shl i32.const 16 i32.shr_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.3 end call $~lib/set/Set#find @@ -6271,14 +6299,15 @@ i32.store offset=4 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.sub - i32.store offset=20 + i32.store offset=28 local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 local.set $4 local.get $4 i32.const 1 @@ -6286,7 +6315,7 @@ i32.const 4 local.tee $2 local.get $0 - i32.load offset=20 + i32.load offset=28 local.tee $5 local.get $2 local.get $5 @@ -6295,9 +6324,9 @@ i32.ge_u if (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 @@ -6330,10 +6359,10 @@ local.get $2 i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 local.tee $2 i32.const 0 @@ -6343,19 +6372,19 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $1 local.get $2 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__release local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 ) (func $std/set/testNumeric (local $0 i32) @@ -6717,7 +6746,7 @@ local.get $0 i32.eqz if - i32.const 24 + i32.const 32 i32.const 9 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -6731,29 +6760,29 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 i32.const 0 i32.const 4 i32.const 8 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 local.get $0 ) - (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6761,8 +6790,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -6809,7 +6839,7 @@ (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i64) local.get $1 local.set $2 i32.const 0 @@ -6819,17 +6849,13 @@ i32.const 0 drop i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq + i32.const 4 + i32.le_u drop local.get $2 i32.const 65535 i32.and - call $~lib/util/hash/hash16 + call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.0 end call $~lib/set/Set#find @@ -6849,7 +6875,7 @@ (local $11 i32) (local $12 i32) (local $13 i32) - (local $14 i32) + (local $14 i64) local.get $1 i32.const 1 i32.add @@ -6873,11 +6899,11 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 8 i32.mul i32.add @@ -6907,7 +6933,7 @@ local.get $11 local.get $12 i32.store16 - block $~lib/util/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i64) local.get $12 local.set $13 i32.const 0 @@ -6917,31 +6943,29 @@ i32.const 0 drop i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq + i32.const 4 + i32.le_u drop local.get $13 - call $~lib/util/hash/hash16 + call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.2 end local.get $1 - i32.and - local.set $13 + i64.extend_i32_u + i64.and + local.set $14 local.get $3 - local.get $13 + local.get $14 + i32.wrap_i64 i32.const 4 i32.mul i32.add - local.set $14 + local.set $13 local.get $11 - local.get $14 + local.get $13 i32.load i32.store offset=4 - local.get $14 + local.get $13 local.get $8 i32.store local.get $8 @@ -6975,31 +6999,32 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.tee $13 local.get $5 - local.tee $14 + local.tee $9 local.get $13 - i32.load offset=8 + i32.load offset=16 local.tee $11 i32.ne if - local.get $14 + local.get $9 call $~lib/rt/pure/__retain - local.set $14 + local.set $9 local.get $11 call $~lib/rt/pure/__release end - local.get $14 - i32.store offset=8 + local.get $9 + i32.store offset=16 local.get $0 local.get $4 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $3 call $~lib/rt/pure/__release local.get $5 @@ -7007,9 +7032,9 @@ ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) + (local $3 i64) (local $4 i32) - block $~lib/util/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i64) local.get $1 local.set $2 i32.const 0 @@ -7019,17 +7044,13 @@ i32.const 0 drop i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq + i32.const 4 + i32.le_u drop local.get $2 i32.const 65535 i32.and - call $~lib/util/hash/hash16 + call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.1 end local.set $3 @@ -7042,43 +7063,44 @@ i32.eqz if local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/set/Set#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $2 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $2 i32.const 8 i32.mul @@ -7089,16 +7111,17 @@ i32.store16 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $0 i32.load local.get $3 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -7116,7 +7139,7 @@ ) (func $~lib/set/Set#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/array/Array#constructor (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -7269,10 +7292,10 @@ (local $7 i32) (local $8 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $1 local.get $0 - i32.load offset=16 + i32.load offset=24 local.set $2 i32.const 0 local.get $2 @@ -7366,7 +7389,7 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i64) local.get $1 local.set $2 i32.const 0 @@ -7376,17 +7399,13 @@ i32.const 0 drop i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq + i32.const 4 + i32.le_u drop local.get $2 i32.const 65535 i32.and - call $~lib/util/hash/hash16 + call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.3 end call $~lib/set/Set#find @@ -7407,14 +7426,15 @@ i32.store offset=4 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.sub - i32.store offset=20 + i32.store offset=28 local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 local.set $4 local.get $4 i32.const 1 @@ -7422,7 +7442,7 @@ i32.const 4 local.tee $2 local.get $0 - i32.load offset=20 + i32.load offset=28 local.tee $5 local.get $2 local.get $5 @@ -7431,9 +7451,9 @@ i32.ge_u if (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 @@ -7466,10 +7486,10 @@ local.get $2 i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 local.tee $2 i32.const 0 @@ -7479,19 +7499,19 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $1 local.get $2 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__release local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 ) (func $std/set/testNumeric (local $0 i32) @@ -7845,7 +7865,7 @@ local.get $0 i32.eqz if - i32.const 24 + i32.const 32 i32.const 11 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -7859,71 +7879,29 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 i32.const 0 i32.const 4 i32.const 8 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/hash32 (param $0 i32) (result i32) - (local $1 i32) - i32.const -2128831035 - local.set $1 - local.get $1 - local.get $0 - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $1 - local.get $1 - local.get $0 - i32.const 8 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $1 - local.get $1 - local.get $0 - i32.const 16 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $1 - local.get $1 - local.get $0 - i32.const 24 - i32.shr_u - i32.xor - i32.const 16777619 - i32.mul - local.set $1 - local.get $1 - ) - (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7931,8 +7909,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -7977,7 +7956,7 @@ (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i64) local.get $1 local.set $2 i32.const 0 @@ -7987,16 +7966,8 @@ i32.const 0 drop i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 i32.const 4 - i32.eq + i32.le_u drop local.get $2 call $~lib/util/hash/hash32 @@ -8019,7 +7990,7 @@ (local $11 i32) (local $12 i32) (local $13 i32) - (local $14 i32) + (local $14 i64) local.get $1 i32.const 1 i32.add @@ -8043,11 +8014,11 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 8 i32.mul i32.add @@ -8077,7 +8048,7 @@ local.get $11 local.get $12 i32.store - block $~lib/util/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i64) local.get $12 local.set $13 i32.const 0 @@ -8087,35 +8058,29 @@ i32.const 0 drop i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 i32.const 4 - i32.eq + i32.le_u drop local.get $13 call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.2 end local.get $1 - i32.and - local.set $13 + i64.extend_i32_u + i64.and + local.set $14 local.get $3 - local.get $13 + local.get $14 + i32.wrap_i64 i32.const 4 i32.mul i32.add - local.set $14 + local.set $13 local.get $11 - local.get $14 + local.get $13 i32.load i32.store offset=4 - local.get $14 + local.get $13 local.get $8 i32.store local.get $8 @@ -8149,31 +8114,32 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.tee $13 local.get $5 - local.tee $14 + local.tee $9 local.get $13 - i32.load offset=8 + i32.load offset=16 local.tee $11 i32.ne if - local.get $14 + local.get $9 call $~lib/rt/pure/__retain - local.set $14 + local.set $9 local.get $11 call $~lib/rt/pure/__release end - local.get $14 - i32.store offset=8 + local.get $9 + i32.store offset=16 local.get $0 local.get $4 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $3 call $~lib/rt/pure/__release local.get $5 @@ -8181,9 +8147,9 @@ ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) + (local $3 i64) (local $4 i32) - block $~lib/util/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i64) local.get $1 local.set $2 i32.const 0 @@ -8193,16 +8159,8 @@ i32.const 0 drop i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 i32.const 4 - i32.eq + i32.le_u drop local.get $2 call $~lib/util/hash/hash32 @@ -8218,43 +8176,44 @@ i32.eqz if local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/set/Set#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $2 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $2 i32.const 8 i32.mul @@ -8265,16 +8224,17 @@ i32.store local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $0 i32.load local.get $3 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -8292,7 +8252,7 @@ ) (func $~lib/set/Set#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/array/Array#constructor (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -8445,10 +8405,10 @@ (local $7 i32) (local $8 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $1 local.get $0 - i32.load offset=16 + i32.load offset=24 local.set $2 i32.const 0 local.get $2 @@ -8542,7 +8502,7 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i64) local.get $1 local.set $2 i32.const 0 @@ -8552,16 +8512,8 @@ i32.const 0 drop i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 i32.const 4 - i32.eq + i32.le_u drop local.get $2 call $~lib/util/hash/hash32 @@ -8585,14 +8537,15 @@ i32.store offset=4 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.sub - i32.store offset=20 + i32.store offset=28 local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 local.set $4 local.get $4 i32.const 1 @@ -8600,7 +8553,7 @@ i32.const 4 local.tee $2 local.get $0 - i32.load offset=20 + i32.load offset=28 local.tee $5 local.get $2 local.get $5 @@ -8609,9 +8562,9 @@ i32.ge_u if (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 @@ -8644,10 +8597,10 @@ local.get $2 i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 local.tee $2 i32.const 0 @@ -8657,19 +8610,19 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $1 local.get $2 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__release local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 ) (func $std/set/testNumeric (local $0 i32) @@ -9011,7 +8964,7 @@ local.get $0 i32.eqz if - i32.const 24 + i32.const 32 i32.const 13 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -9025,29 +8978,29 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 i32.const 0 i32.const 4 i32.const 8 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 local.get $0 ) - (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -9055,8 +9008,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -9101,7 +9055,7 @@ (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i64) local.get $1 local.set $2 i32.const 0 @@ -9111,16 +9065,8 @@ i32.const 0 drop i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 i32.const 4 - i32.eq + i32.le_u drop local.get $2 call $~lib/util/hash/hash32 @@ -9143,7 +9089,7 @@ (local $11 i32) (local $12 i32) (local $13 i32) - (local $14 i32) + (local $14 i64) local.get $1 i32.const 1 i32.add @@ -9167,11 +9113,11 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 8 i32.mul i32.add @@ -9201,7 +9147,7 @@ local.get $11 local.get $12 i32.store - block $~lib/util/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i64) local.get $12 local.set $13 i32.const 0 @@ -9211,35 +9157,29 @@ i32.const 0 drop i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 i32.const 4 - i32.eq + i32.le_u drop local.get $13 call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.2 end local.get $1 - i32.and - local.set $13 + i64.extend_i32_u + i64.and + local.set $14 local.get $3 - local.get $13 + local.get $14 + i32.wrap_i64 i32.const 4 i32.mul i32.add - local.set $14 + local.set $13 local.get $11 - local.get $14 + local.get $13 i32.load i32.store offset=4 - local.get $14 + local.get $13 local.get $8 i32.store local.get $8 @@ -9273,31 +9213,32 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.tee $13 local.get $5 - local.tee $14 + local.tee $9 local.get $13 - i32.load offset=8 + i32.load offset=16 local.tee $11 i32.ne if - local.get $14 + local.get $9 call $~lib/rt/pure/__retain - local.set $14 + local.set $9 local.get $11 call $~lib/rt/pure/__release end - local.get $14 - i32.store offset=8 + local.get $9 + i32.store offset=16 local.get $0 local.get $4 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $3 call $~lib/rt/pure/__release local.get $5 @@ -9305,9 +9246,9 @@ ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) + (local $3 i64) (local $4 i32) - block $~lib/util/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i64) local.get $1 local.set $2 i32.const 0 @@ -9317,16 +9258,8 @@ i32.const 0 drop i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 i32.const 4 - i32.eq + i32.le_u drop local.get $2 call $~lib/util/hash/hash32 @@ -9342,43 +9275,44 @@ i32.eqz if local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/set/Set#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $2 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $2 i32.const 8 i32.mul @@ -9389,16 +9323,17 @@ i32.store local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $0 i32.load local.get $3 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -9416,7 +9351,7 @@ ) (func $~lib/set/Set#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/array/Array#constructor (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -9569,10 +9504,10 @@ (local $7 i32) (local $8 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $1 local.get $0 - i32.load offset=16 + i32.load offset=24 local.set $2 i32.const 0 local.get $2 @@ -9666,7 +9601,7 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i64) local.get $1 local.set $2 i32.const 0 @@ -9676,16 +9611,8 @@ i32.const 0 drop i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 i32.const 4 - i32.eq + i32.le_u drop local.get $2 call $~lib/util/hash/hash32 @@ -9709,14 +9636,15 @@ i32.store offset=4 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.sub - i32.store offset=20 + i32.store offset=28 local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 local.set $4 local.get $4 i32.const 1 @@ -9724,7 +9652,7 @@ i32.const 4 local.tee $2 local.get $0 - i32.load offset=20 + i32.load offset=28 local.tee $5 local.get $2 local.get $5 @@ -9733,9 +9661,9 @@ i32.ge_u if (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 @@ -9768,10 +9696,10 @@ local.get $2 i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 local.tee $2 i32.const 0 @@ -9781,19 +9709,19 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $1 local.get $2 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__release local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 ) (func $std/set/testNumeric (local $0 i32) @@ -10135,7 +10063,7 @@ local.get $0 i32.eqz if - i32.const 24 + i32.const 32 i32.const 15 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -10149,117 +10077,83 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 i32.const 0 i32.const 4 i32.const 16 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/hash64 (param $0 i64) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.wrap_i64 + (func $~lib/util/hash/hash64 (param $0 i64) (result i64) + (local $1 i64) + i64.const 0 + i64.const 2870177450012600261 + i64.add + i64.const 8 + i64.add local.set $1 + local.get $1 local.get $0 - i64.const 32 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $1 + local.get $1 + i64.const 27 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $1 + local.get $1 + local.get $1 + i64.const 33 i64.shr_u - i32.wrap_i64 - local.set $2 - i32.const -2128831035 - local.set $3 - local.get $3 + i64.xor + local.set $1 local.get $1 - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 + i64.const -4417276706812531889 + i64.mul + local.set $1 local.get $1 - i32.const 8 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 local.get $1 - i32.const 16 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 + i64.const 29 + i64.shr_u + i64.xor + local.set $1 + local.get $1 + i64.const 1609587929392839161 + i64.mul + local.set $1 + local.get $1 + local.get $1 + i64.const 32 + i64.shr_u + i64.xor + local.set $1 local.get $1 - i32.const 24 - i32.shr_u - i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 - local.get $2 - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 - local.get $2 - i32.const 8 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 - local.get $2 - i32.const 16 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 - local.get $2 - i32.const 24 - i32.shr_u - i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 ) - (func $~lib/set/Set#find (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (param $0 i32) (param $1 i64) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -10267,8 +10161,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -10313,7 +10208,7 @@ (local $2 i64) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i64) local.get $1 local.set $2 i32.const 0 @@ -10323,16 +10218,8 @@ i32.const 0 drop i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 i32.const 4 - i32.eq + i32.le_u drop i32.const 8 i32.const 8 @@ -10360,7 +10247,6 @@ (local $12 i64) (local $13 i64) (local $14 i32) - (local $15 i32) local.get $1 i32.const 1 i32.add @@ -10384,11 +10270,11 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 16 i32.mul i32.add @@ -10418,7 +10304,7 @@ local.get $11 local.get $12 i64.store - block $~lib/util/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i64) local.get $12 local.set $13 i32.const 0 @@ -10428,16 +10314,8 @@ i32.const 0 drop i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 i32.const 4 - i32.eq + i32.le_u drop i32.const 8 i32.const 8 @@ -10448,19 +10326,21 @@ br $~lib/util/hash/HASH|inlined.2 end local.get $1 - i32.and - local.set $14 + i64.extend_i32_u + i64.and + local.set $13 local.get $3 - local.get $14 + local.get $13 + i32.wrap_i64 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load i32.store offset=8 - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -10494,31 +10374,32 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 - local.tee $15 - local.get $5 local.tee $9 - local.get $15 - i32.load offset=8 + local.get $5 + local.tee $14 + local.get $9 + i32.load offset=16 local.tee $11 i32.ne if - local.get $9 + local.get $14 call $~lib/rt/pure/__retain - local.set $9 + local.set $14 local.get $11 call $~lib/rt/pure/__release end - local.get $9 - i32.store offset=8 + local.get $14 + i32.store offset=16 local.get $0 local.get $4 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $3 call $~lib/rt/pure/__release local.get $5 @@ -10526,10 +10407,10 @@ ) (func $~lib/set/Set#add (param $0 i32) (param $1 i64) (result i32) (local $2 i64) - (local $3 i32) + (local $3 i64) (local $4 i32) (local $5 i32) - block $~lib/util/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i64) local.get $1 local.set $2 i32.const 0 @@ -10539,16 +10420,8 @@ i32.const 0 drop i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 i32.const 4 - i32.eq + i32.le_u drop i32.const 8 i32.const 8 @@ -10568,43 +10441,44 @@ i32.eqz if local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/set/Set#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $5 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $5 i32.const 16 i32.mul @@ -10615,16 +10489,17 @@ i64.store local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $0 i32.load local.get $3 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -10642,7 +10517,7 @@ ) (func $~lib/set/Set#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/array/Array#constructor (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -10795,10 +10670,10 @@ (local $7 i32) (local $8 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $1 local.get $0 - i32.load offset=16 + i32.load offset=24 local.set $2 i32.const 0 local.get $2 @@ -10893,7 +10768,7 @@ (local $6 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i64) local.get $1 local.set $2 i32.const 0 @@ -10903,16 +10778,8 @@ i32.const 0 drop i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 i32.const 4 - i32.eq + i32.le_u drop i32.const 8 i32.const 8 @@ -10940,14 +10807,15 @@ i32.store offset=8 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.sub - i32.store offset=20 + i32.store offset=28 local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 local.set $4 local.get $4 i32.const 1 @@ -10955,7 +10823,7 @@ i32.const 4 local.tee $5 local.get $0 - i32.load offset=20 + i32.load offset=28 local.tee $6 local.get $5 local.get $6 @@ -10964,9 +10832,9 @@ i32.ge_u if (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 @@ -10999,10 +10867,10 @@ local.get $2 i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 local.tee $2 i32.const 0 @@ -11012,19 +10880,19 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $1 local.get $2 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__release local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 ) (func $std/set/testNumeric (local $0 i32) @@ -11367,7 +11235,7 @@ local.get $0 i32.eqz if - i32.const 24 + i32.const 32 i32.const 17 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -11381,29 +11249,29 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 i32.const 0 i32.const 4 i32.const 16 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 local.get $0 ) - (func $~lib/set/Set#find (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (param $0 i32) (param $1 i64) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -11411,8 +11279,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -11457,7 +11326,7 @@ (local $2 i64) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i64) local.get $1 local.set $2 i32.const 0 @@ -11467,16 +11336,8 @@ i32.const 0 drop i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 i32.const 4 - i32.eq + i32.le_u drop i32.const 8 i32.const 8 @@ -11504,7 +11365,6 @@ (local $12 i64) (local $13 i64) (local $14 i32) - (local $15 i32) local.get $1 i32.const 1 i32.add @@ -11528,11 +11388,11 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 16 i32.mul i32.add @@ -11562,7 +11422,7 @@ local.get $11 local.get $12 i64.store - block $~lib/util/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i64) local.get $12 local.set $13 i32.const 0 @@ -11572,16 +11432,8 @@ i32.const 0 drop i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 i32.const 4 - i32.eq + i32.le_u drop i32.const 8 i32.const 8 @@ -11592,19 +11444,21 @@ br $~lib/util/hash/HASH|inlined.2 end local.get $1 - i32.and - local.set $14 + i64.extend_i32_u + i64.and + local.set $13 local.get $3 - local.get $14 + local.get $13 + i32.wrap_i64 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load i32.store offset=8 - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -11638,31 +11492,32 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 - local.tee $15 - local.get $5 local.tee $9 - local.get $15 - i32.load offset=8 + local.get $5 + local.tee $14 + local.get $9 + i32.load offset=16 local.tee $11 i32.ne if - local.get $9 + local.get $14 call $~lib/rt/pure/__retain - local.set $9 + local.set $14 local.get $11 call $~lib/rt/pure/__release end - local.get $9 - i32.store offset=8 + local.get $14 + i32.store offset=16 local.get $0 local.get $4 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $3 call $~lib/rt/pure/__release local.get $5 @@ -11670,10 +11525,10 @@ ) (func $~lib/set/Set#add (param $0 i32) (param $1 i64) (result i32) (local $2 i64) - (local $3 i32) + (local $3 i64) (local $4 i32) (local $5 i32) - block $~lib/util/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i64) local.get $1 local.set $2 i32.const 0 @@ -11683,16 +11538,8 @@ i32.const 0 drop i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 i32.const 4 - i32.eq + i32.le_u drop i32.const 8 i32.const 8 @@ -11712,43 +11559,44 @@ i32.eqz if local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/set/Set#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $5 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $5 i32.const 16 i32.mul @@ -11759,16 +11607,17 @@ i64.store local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $0 i32.load local.get $3 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -11786,7 +11635,7 @@ ) (func $~lib/set/Set#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/array/Array#constructor (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -11939,10 +11788,10 @@ (local $7 i32) (local $8 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $1 local.get $0 - i32.load offset=16 + i32.load offset=24 local.set $2 i32.const 0 local.get $2 @@ -12037,7 +11886,7 @@ (local $6 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i64) local.get $1 local.set $2 i32.const 0 @@ -12047,16 +11896,8 @@ i32.const 0 drop i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 i32.const 4 - i32.eq + i32.le_u drop i32.const 8 i32.const 8 @@ -12084,14 +11925,15 @@ i32.store offset=8 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.sub - i32.store offset=20 + i32.store offset=28 local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 local.set $4 local.get $4 i32.const 1 @@ -12099,7 +11941,7 @@ i32.const 4 local.tee $5 local.get $0 - i32.load offset=20 + i32.load offset=28 local.tee $6 local.get $5 local.get $6 @@ -12108,9 +11950,9 @@ i32.ge_u if (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 @@ -12143,10 +11985,10 @@ local.get $2 i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 local.tee $2 i32.const 0 @@ -12156,19 +11998,19 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $1 local.get $2 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__release local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 ) (func $std/set/testNumeric (local $0 i32) @@ -12511,7 +12353,7 @@ local.get $0 i32.eqz if - i32.const 24 + i32.const 32 i32.const 19 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -12525,29 +12367,29 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 i32.const 0 i32.const 4 i32.const 8 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 local.get $0 ) - (func $~lib/set/Set#find (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (param $0 i32) (param $1 f32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -12555,8 +12397,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -12601,7 +12444,7 @@ (local $2 f32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i64) local.get $1 local.set $2 i32.const 0 @@ -12636,7 +12479,7 @@ (local $11 i32) (local $12 f32) (local $13 f32) - (local $14 i32) + (local $14 i64) (local $15 i32) local.get $1 i32.const 1 @@ -12661,11 +12504,11 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 8 i32.mul i32.add @@ -12695,7 +12538,7 @@ local.get $11 local.get $12 f32.store - block $~lib/util/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i64) local.get $12 local.set $13 i32.const 0 @@ -12714,10 +12557,12 @@ br $~lib/util/hash/HASH|inlined.2 end local.get $1 - i32.and + i64.extend_i32_u + i64.and local.set $14 local.get $3 local.get $14 + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -12744,47 +12589,48 @@ local.get $0 local.tee $11 local.get $3 - local.tee $14 + local.tee $15 local.get $11 i32.load local.tee $9 i32.ne if - local.get $14 + local.get $15 call $~lib/rt/pure/__retain - local.set $14 + local.set $15 local.get $9 call $~lib/rt/pure/__release end - local.get $14 + local.get $15 i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 - local.tee $15 - local.get $5 local.tee $9 - local.get $15 - i32.load offset=8 + local.get $5 + local.tee $15 + local.get $9 + i32.load offset=16 local.tee $11 i32.ne if - local.get $9 + local.get $15 call $~lib/rt/pure/__retain - local.set $9 + local.set $15 local.get $11 call $~lib/rt/pure/__release end - local.get $9 - i32.store offset=8 + local.get $15 + i32.store offset=16 local.get $0 local.get $4 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $3 call $~lib/rt/pure/__release local.get $5 @@ -12792,10 +12638,10 @@ ) (func $~lib/set/Set#add (param $0 i32) (param $1 f32) (result i32) (local $2 f32) - (local $3 i32) + (local $3 i64) (local $4 i32) (local $5 i32) - block $~lib/util/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i64) local.get $1 local.set $2 i32.const 0 @@ -12823,43 +12669,44 @@ i32.eqz if local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/set/Set#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $5 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $5 i32.const 8 i32.mul @@ -12870,16 +12717,17 @@ f32.store local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $0 i32.load local.get $3 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -12897,7 +12745,7 @@ ) (func $~lib/set/Set#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/array/Array#constructor (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -13050,10 +12898,10 @@ (local $7 i32) (local $8 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $1 local.get $0 - i32.load offset=16 + i32.load offset=24 local.set $2 i32.const 0 local.get $2 @@ -13148,7 +12996,7 @@ (local $6 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i64) local.get $1 local.set $2 i32.const 0 @@ -13184,14 +13032,15 @@ i32.store offset=4 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.sub - i32.store offset=20 + i32.store offset=28 local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 local.set $4 local.get $4 i32.const 1 @@ -13199,7 +13048,7 @@ i32.const 4 local.tee $5 local.get $0 - i32.load offset=20 + i32.load offset=28 local.tee $6 local.get $5 local.get $6 @@ -13208,9 +13057,9 @@ i32.ge_u if (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 @@ -13243,10 +13092,10 @@ local.get $2 i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 local.tee $2 i32.const 0 @@ -13256,19 +13105,19 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $1 local.get $2 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__release local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 ) (func $std/set/testNumeric (local $0 i32) @@ -13611,7 +13460,7 @@ local.get $0 i32.eqz if - i32.const 24 + i32.const 32 i32.const 21 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain @@ -13625,29 +13474,29 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 i32.const 0 i32.const 4 i32.const 16 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 local.get $0 ) - (func $~lib/set/Set#find (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (param $0 i32) (param $1 f64) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -13655,8 +13504,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -13701,7 +13551,7 @@ (local $2 f64) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i64) local.get $1 local.set $2 i32.const 0 @@ -13740,7 +13590,7 @@ (local $11 i32) (local $12 f64) (local $13 f64) - (local $14 i32) + (local $14 i64) (local $15 i32) local.get $1 i32.const 1 @@ -13765,11 +13615,11 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 16 i32.mul i32.add @@ -13799,7 +13649,7 @@ local.get $11 local.get $12 f64.store - block $~lib/util/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i64) local.get $12 local.set $13 i32.const 0 @@ -13822,10 +13672,12 @@ br $~lib/util/hash/HASH|inlined.2 end local.get $1 - i32.and + i64.extend_i32_u + i64.and local.set $14 local.get $3 local.get $14 + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -13852,47 +13704,48 @@ local.get $0 local.tee $11 local.get $3 - local.tee $14 + local.tee $15 local.get $11 i32.load local.tee $9 i32.ne if - local.get $14 + local.get $15 call $~lib/rt/pure/__retain - local.set $14 + local.set $15 local.get $9 call $~lib/rt/pure/__release end - local.get $14 + local.get $15 i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 - local.tee $15 - local.get $5 local.tee $9 - local.get $15 - i32.load offset=8 + local.get $5 + local.tee $15 + local.get $9 + i32.load offset=16 local.tee $11 i32.ne if - local.get $9 + local.get $15 call $~lib/rt/pure/__retain - local.set $9 + local.set $15 local.get $11 call $~lib/rt/pure/__release end - local.get $9 - i32.store offset=8 + local.get $15 + i32.store offset=16 local.get $0 local.get $4 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $3 call $~lib/rt/pure/__release local.get $5 @@ -13900,10 +13753,10 @@ ) (func $~lib/set/Set#add (param $0 i32) (param $1 f64) (result i32) (local $2 f64) - (local $3 i32) + (local $3 i64) (local $4 i32) (local $5 i32) - block $~lib/util/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i64) local.get $1 local.set $2 i32.const 0 @@ -13935,43 +13788,44 @@ i32.eqz if local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/set/Set#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $5 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $5 i32.const 16 i32.mul @@ -13982,16 +13836,17 @@ f64.store local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $0 i32.load local.get $3 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -14009,7 +13864,7 @@ ) (func $~lib/set/Set#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/array/Array#constructor (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -14162,10 +14017,10 @@ (local $7 i32) (local $8 i32) local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $1 local.get $0 - i32.load offset=16 + i32.load offset=24 local.set $2 i32.const 0 local.get $2 @@ -14260,7 +14115,7 @@ (local $6 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i64) local.get $1 local.set $2 i32.const 0 @@ -14300,14 +14155,15 @@ i32.store offset=8 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.sub - i32.store offset=20 + i32.store offset=28 local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 local.set $4 local.get $4 i32.const 1 @@ -14315,7 +14171,7 @@ i32.const 4 local.tee $5 local.get $0 - i32.load offset=20 + i32.load offset=28 local.tee $6 local.get $5 local.get $6 @@ -14324,9 +14180,9 @@ i32.ge_u if (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 @@ -14359,10 +14215,10 @@ local.get $2 i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 local.tee $2 i32.const 0 @@ -14372,19 +14228,19 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $1 local.get $2 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/pure/__release local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 ) (func $std/set/testNumeric (local $0 i32) @@ -14883,7 +14739,7 @@ local.get $1 call $~lib/rt/pure/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 drop @@ -14916,7 +14772,7 @@ local.get $1 call $~lib/rt/pure/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 drop @@ -14949,7 +14805,7 @@ local.get $1 call $~lib/rt/pure/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 drop @@ -14982,7 +14838,7 @@ local.get $1 call $~lib/rt/pure/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 drop @@ -15015,7 +14871,7 @@ local.get $1 call $~lib/rt/pure/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 drop @@ -15048,7 +14904,7 @@ local.get $1 call $~lib/rt/pure/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 drop @@ -15081,7 +14937,7 @@ local.get $1 call $~lib/rt/pure/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 drop @@ -15114,7 +14970,7 @@ local.get $1 call $~lib/rt/pure/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 drop @@ -15147,7 +15003,7 @@ local.get $1 call $~lib/rt/pure/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 drop @@ -15180,7 +15036,7 @@ local.get $1 call $~lib/rt/pure/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 drop diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index 7b2fd6d543..12b2e0c53d 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -1,12 +1,14 @@ (module + (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_i32_=>_none (func (param i32 i32))) (type $none_=>_none (func)) (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i64 (func (param i32) (result i64))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_i32_i64_=>_i32 (func (param i32 i32 i64) (result i32))) + (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 1036) "\06\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\06\00\00\001\002\003") @@ -343,46 +345,284 @@ call $~lib/memory/memory.fill local.get $1 ) - (func $~lib/util/hash/hashStr (param $0 i32) (result i32) + (func $~lib/util/hash/hashStr (param $0 i32) (result i64) (local $1 i32) (local $2 i32) - (local $3 i32) - i32.const -2128831035 - local.set $1 + (local $3 i64) + (local $4 i32) + (local $5 i32) + (local $6 i64) + (local $7 i64) + (local $8 i64) local.get $0 + i32.eqz if - local.get $0 - i32.const 20 + i64.const 0 + return + end + local.get $0 + i32.const 20 + i32.sub + i32.load offset=16 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl + local.tee $2 + i64.extend_i32_s + i64.const 2870177450012600261 + i64.add + local.set $8 + local.get $2 + i32.const 32 + i32.ge_s + if (result i32) + i64.const 6983438078262162902 + local.set $8 + i64.const -4417276706812531889 + local.set $7 + i64.const 7046029288634856825 + local.set $6 + local.get $2 + i32.const 32 i32.sub - i32.load offset=16 - i32.const 1 - i32.shr_u - i32.const 1 - i32.shl - local.set $3 - loop $for-loop|0 + local.set $2 + loop $while-continue|0 local.get $2 - local.get $3 - i32.lt_u + local.get $5 + i32.ge_s if - local.get $1 + local.get $8 local.get $0 - local.get $2 + local.get $5 i32.add - i32.load8_u - i32.xor - i32.const 16777619 - i32.mul - local.set $1 - local.get $2 - i32.const 1 + local.tee $4 + i64.load + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $8 + local.get $7 + local.get $4 + i64.load offset=8 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $7 + local.get $3 + local.get $4 + i64.load offset=16 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $3 + local.get $6 + local.get $4 + i64.load offset=24 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $6 + local.get $5 + i32.const 32 i32.add - local.set $2 - br $for-loop|0 + local.set $5 + br $while-continue|0 end end + local.get $2 + i64.extend_i32_s + local.get $8 + i64.const 1 + i64.rotl + local.get $7 + i64.const 7 + i64.rotl + i64.add + local.get $3 + i64.const 12 + i64.rotl + i64.add + local.get $6 + i64.const 18 + i64.rotl + i64.add + local.get $8 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.get $7 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.get $3 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.get $6 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + i64.add + local.set $8 + local.get $2 + local.get $5 + i32.sub + else + local.get $2 + end + i32.const 8 + i32.sub + local.set $2 + loop $while-continue|1 + local.get $1 + local.get $2 + i32.le_s + if + local.get $8 + local.get $0 + local.get $1 + i32.add + i64.load + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const 27 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $8 + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $while-continue|1 + end end + local.get $2 local.get $1 + i32.const 4 + i32.add + i32.ge_s + if + local.get $8 + local.get $0 + local.get $1 + i32.add + i64.load32_u + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $8 + local.get $1 + i32.const 4 + i32.add + local.set $1 + end + loop $while-continue|2 + local.get $1 + local.get $2 + i32.lt_s + if + local.get $8 + local.get $0 + local.get $1 + i32.add + i64.load8_u + i64.const 2870177450012600261 + i64.mul + i64.add + i64.const 11 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $8 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $while-continue|2 + end + end + local.get $8 + local.get $8 + i64.const 33 + i64.shr_u + i64.xor + i64.const -4417276706812531889 + i64.mul + local.tee $8 + local.get $8 + i64.const 29 + i64.shr_u + i64.xor + i64.const 1609587929392839161 + i64.mul + local.tee $8 + local.get $8 + i64.const 32 + i64.shr_u + i64.xor ) (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -498,13 +738,15 @@ end i32.const 0 ) - (func $~lib/map/Map<~lib/string/String,usize>#find (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map<~lib/string/String,usize>#find (param $0 i32) (param $1 i64) (result i32) + (local $2 i32) local.get $0 i32.load local.get $1 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -515,7 +757,7 @@ if local.get $0 i32.load offset=8 - local.tee $1 + local.tee $2 i32.const 1 i32.and if (result i32) @@ -530,7 +772,7 @@ local.get $0 return end - local.get $1 + local.get $2 i32.const -2 i32.and local.set $0 @@ -566,10 +808,10 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $8 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 12 i32.mul i32.add @@ -601,7 +843,9 @@ local.get $7 call $~lib/util/hash/hashStr local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -634,62 +878,160 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $3 local.tee $1 local.get $0 - i32.load offset=8 + i32.load offset=16 i32.ne drop local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $6 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 ) - (func $~lib/util/hash/hash32 (param $0 i32) (result i32) - local.get $0 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - local.get $0 - i32.const 8 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul + (func $~lib/map/Map<~lib/string/String,usize>#set (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i64) + (local $4 i64) + (local $5 i32) + i32.const 1056 + call $~lib/util/hash/hashStr + local.tee $3 + local.set $4 local.get $0 - i32.const 16 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul + local.get $3 + call $~lib/map/Map<~lib/string/String,usize>#find + local.tee $2 + if + local.get $2 + local.get $1 + i32.store offset=4 + else + local.get $0 + i32.load offset=24 + local.get $0 + i32.load offset=20 + i32.eq + if + local.get $0 + local.get $0 + i32.load offset=28 + local.get $0 + i32.load offset=20 + i32.const 3 + i32.mul + i32.const 4 + i32.div_s + i32.lt_s + if (result i64) + local.get $0 + i64.load offset=8 + else + local.get $0 + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or + end + i32.wrap_i64 + call $~lib/map/Map<~lib/string/String,usize>#rehash + end + local.get $0 + i32.load offset=16 + local.get $0 + local.get $0 + i32.load offset=24 + local.tee $5 + i32.const 1 + i32.add + i32.store offset=24 + local.get $5 + i32.const 12 + i32.mul + i32.add + local.tee $2 + i32.const 1056 + i32.store + local.get $2 + local.get $1 + i32.store offset=4 + local.get $0 + local.get $0 + i32.load offset=28 + i32.const 1 + i32.add + i32.store offset=28 + local.get $2 + local.get $0 + i32.load + local.get $4 + local.get $0 + i64.load offset=8 + i64.and + i32.wrap_i64 + i32.const 2 + i32.shl + i32.add + local.tee $0 + i32.load + i32.store offset=8 + local.get $0 + local.get $2 + i32.store + end + ) + (func $~lib/util/hash/hash32 (param $0 i32) (result i64) + (local $1 i64) local.get $0 - i32.const 24 - i32.shr_u - i32.xor - i32.const 16777619 - i32.mul + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.const 2870177450012600265 + i64.xor + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.tee $1 + local.get $1 + i64.const 33 + i64.shr_u + i64.xor + i64.const -4417276706812531889 + i64.mul + local.tee $1 + local.get $1 + i64.const 29 + i64.shr_u + i64.xor + i64.const 1609587929392839161 + i64.mul + local.tee $1 + local.get $1 + i64.const 32 + i64.shr_u + i64.xor ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (local $3 i32) local.get $0 i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -700,7 +1042,7 @@ if local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 i32.const 1 i32.and if (result i32) @@ -715,7 +1057,7 @@ local.get $0 return end - local.get $2 + local.get $3 i32.const -2 i32.and local.set $0 @@ -751,10 +1093,10 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $8 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 12 i32.mul i32.add @@ -786,7 +1128,9 @@ local.get $7 call $~lib/util/hash/hash32 local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -819,27 +1163,28 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $3 local.tee $1 local.get $0 - i32.load offset=8 + i32.load offset=16 i32.ne drop local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $6 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (local $2 i32) - (local $3 i32) + (local $3 i64) (local $4 i32) local.get $0 local.get $1 @@ -860,43 +1205,44 @@ end else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $4 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $4 i32.const 12 i32.mul @@ -909,17 +1255,18 @@ i32.store offset=4 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $2 local.get $0 i32.load local.get $3 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -933,10 +1280,6 @@ ) (func $~lib/symbol/_Symbol.for (result i32) (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) global.get $~lib/symbol/stringToId if global.get $~lib/symbol/stringToId @@ -963,7 +1306,7 @@ return end else - i32.const 24 + i32.const 32 i32.const 3 call $~lib/rt/stub/__new local.tee $0 @@ -971,24 +1314,24 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $0 i32.const 48 call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 local.get $0 global.set $~lib/symbol/stringToId - i32.const 24 + i32.const 32 i32.const 4 call $~lib/rt/stub/__new local.tee $0 @@ -996,21 +1339,21 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $0 i32.const 48 call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 local.get $0 global.set $~lib/symbol/idToString end @@ -1025,88 +1368,8 @@ unreachable end global.get $~lib/symbol/stringToId - local.tee $1 - i32.const 1056 - call $~lib/util/hash/hashStr - local.tee $3 - call $~lib/map/Map<~lib/string/String,usize>#find - local.tee $2 - if - local.get $2 - local.get $0 - i32.store offset=4 - else - local.get $1 - i32.load offset=16 - local.get $1 - i32.load offset=12 - i32.eq - if - local.get $1 - local.get $1 - i32.load offset=20 - local.get $1 - i32.load offset=12 - i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s - if (result i32) - local.get $1 - i32.load offset=4 - else - local.get $1 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or - end - call $~lib/map/Map<~lib/string/String,usize>#rehash - end - local.get $1 - i32.load offset=8 - local.get $1 - local.get $1 - i32.load offset=16 - local.tee $2 - i32.const 1 - i32.add - i32.store offset=16 - local.get $2 - i32.const 12 - i32.mul - i32.add - local.tee $2 - i32.const 1056 - i32.store - local.get $2 - local.get $0 - i32.store offset=4 - local.get $1 - local.get $1 - i32.load offset=20 - i32.const 1 - i32.add - i32.store offset=20 - local.get $2 - local.get $1 - i32.load - local.get $3 - local.get $1 - i32.load offset=4 - i32.and - i32.const 2 - i32.shl - i32.add - local.tee $1 - i32.load - i32.store offset=8 - local.get $1 - local.get $2 - i32.store - end + local.get $0 + call $~lib/map/Map<~lib/string/String,usize>#set global.get $~lib/symbol/idToString local.get $0 call $~lib/map/Map#set diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index 8e803a5f0f..00cc21e0f7 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -1,11 +1,13 @@ (module (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_i32_i64_=>_i32 (func (param i32 i32 i64) (result i32))) + (type $i32_=>_i64 (func (param i32) (result i64))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -470,7 +472,7 @@ local.get $0 i32.eqz if - i32.const 24 + i32.const 32 i32.const 3 call $~lib/rt/stub/__new call $~lib/rt/stub/__retain @@ -484,33 +486,33 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 i32.const 0 i32.const 4 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 local.get $0 ) (func $~lib/map/Map#constructor (param $0 i32) (result i32) local.get $0 i32.eqz if - i32.const 24 + i32.const 32 i32.const 4 call $~lib/rt/stub/__new call $~lib/rt/stub/__retain @@ -524,26 +526,26 @@ call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 4 - i32.const 1 - i32.sub - i32.store offset=4 + i64.const 4 + i64.const 1 + i64.sub + i64.store offset=8 local.get $0 i32.const 0 i32.const 4 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 + i32.store offset=16 local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 local.get $0 ) (func $~lib/string/String#get:length (param $0 i32) (result i32) @@ -554,56 +556,387 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/hash/hashStr (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/util/hash/hashStr (param $0 i32) (result i64) + (local $1 i64) (local $2 i32) - (local $3 i32) - (local $4 i32) + (local $3 i64) + (local $4 i64) + (local $5 i64) + (local $6 i64) + (local $7 i32) + (local $8 i32) + (local $9 i64) + (local $10 i64) + (local $11 i32) local.get $0 call $~lib/rt/stub/__retain local.set $0 - i32.const -2128831035 - local.set $1 local.get $0 i32.const 0 - i32.ne + i32.eq if + i64.const 0 + local.set $1 + local.get $0 + call $~lib/rt/stub/__release + local.get $1 + return + end + local.get $0 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + local.set $2 + i64.const 0 + i64.const 2870177450012600261 + i64.add + local.get $2 + i64.extend_i32_s + i64.add + local.set $3 + local.get $2 + i32.const 32 + i32.ge_s + if + i64.const 0 + i64.const -7046029288634856825 + i64.add + i64.const -4417276706812531889 + i64.add + local.set $1 + i64.const 0 + i64.const -4417276706812531889 + i64.add + local.set $4 + i64.const 0 + local.set $5 + i64.const 0 + i64.const -7046029288634856825 + i64.sub + local.set $6 i32.const 0 + local.set $7 + local.get $2 + i32.const 32 + i32.sub local.set $2 - local.get $0 - call $~lib/string/String#get:length - i32.const 1 - i32.shl - local.set $3 - loop $for-loop|0 + loop $while-continue|0 + local.get $7 local.get $2 - local.get $3 - i32.lt_u - local.set $4 - local.get $4 + i32.le_s + local.set $8 + local.get $8 if local.get $1 + local.set $10 local.get $0 - local.get $2 + local.get $7 i32.add - i32.load8_u - i32.xor - i32.const 16777619 - i32.mul + i64.load + local.set $9 + local.get $10 + local.get $9 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul local.set $1 - local.get $2 - i32.const 1 + local.get $4 + local.set $10 + local.get $0 + local.get $7 i32.add - local.set $2 - br $for-loop|0 + i64.load offset=8 + local.set $9 + local.get $10 + local.get $9 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $4 + local.get $5 + local.set $10 + local.get $0 + local.get $7 + i32.add + i64.load offset=16 + local.set $9 + local.get $10 + local.get $9 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $5 + local.get $6 + local.set $10 + local.get $0 + local.get $7 + i32.add + i64.load offset=24 + local.set $9 + local.get $10 + local.get $9 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $6 + local.get $7 + i32.const 32 + i32.add + local.set $7 + br $while-continue|0 end end + local.get $1 + i64.const 1 + i64.rotl + local.get $4 + i64.const 7 + i64.rotl + i64.add + local.get $5 + i64.const 12 + i64.rotl + i64.add + local.get $6 + i64.const 18 + i64.rotl + i64.add + local.set $3 + local.get $1 + i64.const -4417276706812531889 + i64.mul + local.set $1 + local.get $4 + i64.const -4417276706812531889 + i64.mul + local.set $4 + local.get $5 + i64.const -4417276706812531889 + i64.mul + local.set $5 + local.get $6 + i64.const -4417276706812531889 + i64.mul + local.set $6 + local.get $3 + local.set $10 + local.get $1 + local.set $9 + local.get $10 + local.get $9 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $3 + local.get $3 + local.set $10 + local.get $4 + local.set $9 + local.get $10 + local.get $9 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $3 + local.get $3 + local.set $10 + local.get $5 + local.set $9 + local.get $10 + local.get $9 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $3 + local.get $3 + local.set $10 + local.get $6 + local.set $9 + local.get $10 + local.get $9 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $3 + local.get $3 + local.get $2 + i64.extend_i32_s + i64.add + local.set $3 + local.get $2 + local.get $7 + i32.sub + local.set $2 end - local.get $1 + i32.const 0 + local.set $11 + local.get $2 + i32.const 8 + i32.sub + local.set $2 + loop $while-continue|1 + local.get $11 + local.get $2 + i32.le_s + local.set $7 + local.get $7 + if + local.get $3 + local.get $0 + local.get $11 + i32.add + i64.load + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $3 + local.get $3 + i64.const 27 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $3 + local.get $11 + i32.const 8 + i32.add + local.set $11 + br $while-continue|1 + end + end + local.get $11 + i32.const 4 + i32.add + local.get $2 + i32.le_s + if + local.get $3 + local.get $0 + local.get $11 + i32.add + i64.load32_u + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $3 + local.get $3 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $3 + local.get $11 + i32.const 4 + i32.add + local.set $11 + end + loop $while-continue|2 + local.get $11 + local.get $2 + i32.lt_s + local.set $7 + local.get $7 + if + local.get $3 + local.get $0 + local.get $11 + i32.add + i64.load8_u + i64.const 2870177450012600261 + i64.mul + i64.add + local.set $3 + local.get $3 + i64.const 11 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $3 + local.get $11 + i32.const 1 + i32.add + local.set $11 + br $while-continue|2 + end + end + local.get $3 + local.get $3 + i64.const 33 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const -4417276706812531889 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 29 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const 1609587929392839161 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 32 + i64.shr_u + i64.xor local.set $3 + local.get $3 + local.set $6 local.get $0 call $~lib/rt/stub/__release - local.get $3 + local.get $6 ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) @@ -804,7 +1137,7 @@ call $~lib/rt/stub/__release local.get $2 ) - (func $~lib/map/Map<~lib/string/String,usize>#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map<~lib/string/String,usize>#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -816,8 +1149,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -868,13 +1202,13 @@ ) (func $~lib/map/Map<~lib/string/String,usize>#has (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) + (local $3 i64) local.get $1 call $~lib/rt/stub/__retain local.set $1 local.get $0 local.get $1 - block $~lib/util/hash/HASH<~lib/string/String>|inlined.0 (result i32) + block $~lib/util/hash/HASH<~lib/string/String>|inlined.0 (result i64) local.get $1 call $~lib/rt/stub/__retain local.set $2 @@ -898,14 +1232,14 @@ ) (func $~lib/map/Map<~lib/string/String,usize>#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) + (local $3 i64) (local $4 i32) local.get $1 call $~lib/rt/stub/__retain local.set $1 local.get $0 local.get $1 - block $~lib/util/hash/HASH<~lib/string/String>|inlined.1 (result i32) + block $~lib/util/hash/HASH<~lib/string/String>|inlined.1 (result i64) local.get $1 call $~lib/rt/stub/__retain local.set $2 @@ -951,7 +1285,8 @@ (local $11 i32) (local $12 i32) (local $13 i32) - (local $14 i32) + (local $14 i64) + (local $15 i32) local.get $1 i32.const 1 i32.add @@ -975,11 +1310,11 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 12 i32.mul i32.add @@ -1014,7 +1349,7 @@ local.get $10 i32.load offset=4 i32.store offset=4 - block $~lib/util/hash/HASH<~lib/string/String>|inlined.3 (result i32) + block $~lib/util/hash/HASH<~lib/string/String>|inlined.3 (result i64) local.get $12 call $~lib/rt/stub/__retain local.set $13 @@ -1029,19 +1364,21 @@ br $~lib/util/hash/HASH<~lib/string/String>|inlined.3 end local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 local.set $13 local.get $3 local.get $13 i32.const 4 i32.mul i32.add - local.set $14 + local.set $15 local.get $11 - local.get $14 + local.get $15 i32.load i32.store offset=8 - local.get $14 + local.get $15 local.get $8 i32.store local.get $8 @@ -1077,31 +1414,32 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.tee $13 local.get $5 - local.tee $14 + local.tee $15 local.get $13 - i32.load offset=8 + i32.load offset=16 local.tee $11 i32.ne if - local.get $14 + local.get $15 call $~lib/rt/stub/__retain - local.set $14 + local.set $15 local.get $11 call $~lib/rt/stub/__release end - local.get $14 - i32.store offset=8 + local.get $15 + i32.store offset=16 local.get $0 local.get $4 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $3 call $~lib/rt/stub/__release local.get $5 @@ -1109,13 +1447,14 @@ ) (func $~lib/map/Map<~lib/string/String,usize>#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) - (local $5 i32) + (local $4 i64) + (local $5 i64) (local $6 i32) + (local $7 i32) local.get $1 call $~lib/rt/stub/__retain local.set $1 - block $~lib/util/hash/HASH<~lib/string/String>|inlined.2 (result i32) + block $~lib/util/hash/HASH<~lib/string/String>|inlined.2 (result i64) local.get $1 call $~lib/rt/stub/__retain local.set $3 @@ -1144,47 +1483,48 @@ i32.store offset=4 else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map<~lib/string/String,usize>#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/stub/__retain local.set $3 local.get $3 local.get $0 local.get $0 - i32.load offset=16 - local.tee $4 + i32.load offset=24 + local.tee $7 i32.const 1 i32.add - i32.store offset=16 - local.get $4 + i32.store offset=24 + local.get $7 i32.const 12 i32.mul i32.add @@ -1198,25 +1538,26 @@ i32.store offset=4 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $0 i32.load local.get $5 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add - local.set $4 + local.set $7 local.get $6 - local.get $4 + local.get $7 i32.load i32.store offset=8 - local.get $4 + local.get $7 local.get $6 i32.store local.get $3 @@ -1224,54 +1565,63 @@ end local.get $0 call $~lib/rt/stub/__retain - local.set $4 + local.set $7 local.get $1 call $~lib/rt/stub/__release - local.get $4 + local.get $7 ) - (func $~lib/util/hash/hash32 (param $0 i32) (result i32) - (local $1 i32) - i32.const -2128831035 + (func $~lib/util/hash/hash32 (param $0 i32) (result i64) + (local $1 i64) + i64.const 0 + i64.const 2870177450012600261 + i64.add + i64.const 4 + i64.add local.set $1 local.get $1 local.get $0 - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.xor local.set $1 local.get $1 - local.get $0 - i32.const 8 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add local.set $1 local.get $1 - local.get $0 - i32.const 16 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul + local.get $1 + i64.const 33 + i64.shr_u + i64.xor local.set $1 local.get $1 - local.get $0 - i32.const 24 - i32.shr_u - i32.xor - i32.const 16777619 - i32.mul + i64.const -4417276706812531889 + i64.mul + local.set $1 + local.get $1 + local.get $1 + i64.const 29 + i64.shr_u + i64.xor + local.set $1 + local.get $1 + i64.const 1609587929392839161 + i64.mul + local.set $1 + local.get $1 + local.get $1 + i64.const 32 + i64.shr_u + i64.xor local.set $1 local.get $1 ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1279,8 +1629,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -1358,11 +1709,11 @@ call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 12 i32.mul i32.add @@ -1396,7 +1747,7 @@ local.get $10 i32.load offset=4 i32.store offset=4 - block $~lib/util/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i64) local.get $12 local.set $13 i32.const 0 @@ -1406,23 +1757,17 @@ i32.const 0 drop i32.const 4 - i32.const 1 - i32.eq - drop i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq + i32.le_u drop local.get $13 call $~lib/util/hash/hash32 br $~lib/util/hash/HASH|inlined.1 end local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 local.set $13 local.get $3 local.get $13 @@ -1468,13 +1813,14 @@ i32.store local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.tee $13 local.get $5 local.tee $14 local.get $13 - i32.load offset=8 + i32.load offset=16 local.tee $11 i32.ne if @@ -1485,14 +1831,14 @@ call $~lib/rt/stub/__release end local.get $14 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $4 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 local.get $3 call $~lib/rt/stub/__release local.get $5 @@ -1500,13 +1846,13 @@ ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) + (local $4 i64) (local $5 i32) (local $6 i32) local.get $2 call $~lib/rt/stub/__retain local.set $2 - block $~lib/util/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i64) local.get $1 local.set $3 i32.const 0 @@ -1516,16 +1862,8 @@ i32.const 0 drop i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 i32.const 4 - i32.eq + i32.le_u drop local.get $3 call $~lib/util/hash/hash32 @@ -1557,46 +1895,47 @@ end else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/stub/__retain local.set $3 local.get $3 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $6 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $6 i32.const 12 i32.mul @@ -1611,16 +1950,17 @@ i32.store offset=4 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $0 i32.load local.get $4 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -1712,7 +2052,7 @@ (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i64) local.get $1 local.set $2 i32.const 0 @@ -1722,16 +2062,8 @@ i32.const 0 drop i32.const 4 - i32.const 1 - i32.eq - drop i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq + i32.le_u drop local.get $2 call $~lib/util/hash/hash32 @@ -1746,7 +2078,7 @@ (local $3 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i64) local.get $1 local.set $2 i32.const 0 @@ -1756,16 +2088,8 @@ i32.const 0 drop i32.const 4 - i32.const 1 - i32.eq - drop i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq + i32.le_u drop local.get $2 call $~lib/util/hash/hash32 From 02c21243d139b47d74e969b5693b2459722fe33b Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Mon, 14 Dec 2020 23:16:03 +0200 Subject: [PATCH 02/10] fix --- std/assembly/util/hash.ts | 4 +- tests/compiler/std/hash.optimized.wat | 115 ++++++++++----------- tests/compiler/std/hash.untouched.wat | 13 ++- tests/compiler/std/symbol.optimized.wat | 127 ++++++++++++------------ tests/compiler/std/symbol.untouched.wat | 13 ++- 5 files changed, 141 insertions(+), 131 deletions(-) diff --git a/std/assembly/util/hash.ts b/std/assembly/util/hash.ts index 2ab7ff84eb..8ff0ad25e0 100644 --- a/std/assembly/util/hash.ts +++ b/std/assembly/util/hash.ts @@ -73,7 +73,7 @@ function hashStr(key: string): u64 { return XXH64_SEED; } var len = key.length << 1; - var h: u64 = XXH64_SEED + XXH64_P5 + u64(len); + var h: u64 = 0; if (len >= 32) { let s1 = XXH64_SEED + XXH64_P1 + XXH64_P2; @@ -105,6 +105,8 @@ function hashStr(key: string): u64 { h += u64(len); len -= i; + } else { + h = u64(len) + XXH64_SEED + XXH64_P5; } var i = 0; diff --git a/tests/compiler/std/hash.optimized.wat b/tests/compiler/std/hash.optimized.wat index 77c1ba967f..89ccad1ce0 100644 --- a/tests/compiler/std/hash.optimized.wat +++ b/tests/compiler/std/hash.optimized.wat @@ -16,12 +16,12 @@ (start $~start) (func $~lib/util/hash/hashStr (param $0 i32) (local $1 i32) - (local $2 i32) - (local $3 i64) - (local $4 i32) - (local $5 i32) - (local $6 i64) - (local $7 i64) + (local $2 i64) + (local $3 i32) + (local $4 i64) + (local $5 i64) + (local $6 i32) + (local $7 i32) (local $8 i64) local.get $0 i32.eqz @@ -36,35 +36,30 @@ i32.shr_u i32.const 1 i32.shl - local.tee $2 - i64.extend_i32_s - i64.const 2870177450012600261 - i64.add - local.set $8 - local.get $2 + local.tee $3 i32.const 32 i32.ge_s - if (result i32) + if i64.const 6983438078262162902 - local.set $8 + local.set $2 i64.const -4417276706812531889 - local.set $7 + local.set $4 i64.const 7046029288634856825 - local.set $6 - local.get $2 + local.set $5 + local.get $3 i32.const 32 i32.sub - local.set $2 + local.set $3 loop $while-continue|0 - local.get $2 - local.get $5 + local.get $3 + local.get $6 i32.ge_s if - local.get $8 + local.get $2 local.get $0 - local.get $5 + local.get $6 i32.add - local.tee $4 + local.tee $7 i64.load i64.const -4417276706812531889 i64.mul @@ -73,9 +68,9 @@ i64.rotl i64.const -7046029288634856825 i64.mul - local.set $8 - local.get $7 + local.set $2 local.get $4 + local.get $7 i64.load offset=8 i64.const -4417276706812531889 i64.mul @@ -84,9 +79,9 @@ i64.rotl i64.const -7046029288634856825 i64.mul - local.set $7 - local.get $3 - local.get $4 + local.set $4 + local.get $8 + local.get $7 i64.load offset=16 i64.const -4417276706812531889 i64.mul @@ -95,9 +90,9 @@ i64.rotl i64.const -7046029288634856825 i64.mul - local.set $3 - local.get $6 - local.get $4 + local.set $8 + local.get $5 + local.get $7 i64.load offset=24 i64.const -4417276706812531889 i64.mul @@ -106,32 +101,32 @@ i64.rotl i64.const -7046029288634856825 i64.mul - local.set $6 - local.get $5 + local.set $5 + local.get $6 i32.const 32 i32.add - local.set $5 + local.set $6 br $while-continue|0 end end - local.get $2 + local.get $3 i64.extend_i32_s - local.get $8 + local.get $2 i64.const 1 i64.rotl - local.get $7 + local.get $4 i64.const 7 i64.rotl i64.add - local.get $3 + local.get $8 i64.const 12 i64.rotl i64.add - local.get $6 + local.get $5 i64.const 18 i64.rotl i64.add - local.get $8 + local.get $2 i64.const -4417276706812531889 i64.mul i64.const 31 @@ -143,7 +138,7 @@ i64.mul i64.const -8796714831421723037 i64.add - local.get $7 + local.get $4 i64.const -4417276706812531889 i64.mul i64.const 31 @@ -155,7 +150,7 @@ i64.mul i64.const -8796714831421723037 i64.add - local.get $3 + local.get $8 i64.const -4417276706812531889 i64.mul i64.const 31 @@ -167,7 +162,7 @@ i64.mul i64.const -8796714831421723037 i64.add - local.get $6 + local.get $5 i64.const -4417276706812531889 i64.mul i64.const 31 @@ -180,22 +175,28 @@ i64.const -8796714831421723037 i64.add i64.add - local.set $8 - local.get $2 - local.get $5 + local.set $2 + local.get $3 + local.get $6 i32.sub + local.set $3 else - local.get $2 + local.get $3 + i64.extend_i32_s + i64.const 2870177450012600261 + i64.add + local.set $2 end + local.get $3 i32.const 8 i32.sub - local.set $2 + local.set $3 loop $while-continue|1 local.get $1 - local.get $2 + local.get $3 i32.le_s if - local.get $8 + local.get $2 local.get $0 local.get $1 i32.add @@ -213,7 +214,7 @@ i64.mul i64.const -8796714831421723037 i64.add - local.set $8 + local.set $2 local.get $1 i32.const 8 i32.add @@ -221,13 +222,13 @@ br $while-continue|1 end end - local.get $2 + local.get $3 local.get $1 i32.const 4 i32.add i32.ge_s if - local.get $8 + local.get $2 local.get $0 local.get $1 i32.add @@ -241,7 +242,7 @@ i64.mul i64.const 1609587929392839161 i64.add - local.set $8 + local.set $2 local.get $1 i32.const 4 i32.add @@ -249,10 +250,10 @@ end loop $while-continue|2 local.get $1 - local.get $2 + local.get $3 i32.lt_s if - local.get $8 + local.get $2 local.get $0 local.get $1 i32.add @@ -264,7 +265,7 @@ i64.rotl i64.const -7046029288634856825 i64.mul - local.set $8 + local.set $2 local.get $1 i32.const 1 i32.add diff --git a/tests/compiler/std/hash.untouched.wat b/tests/compiler/std/hash.untouched.wat index 8bdd3461c0..8c9d3c1ccc 100644 --- a/tests/compiler/std/hash.untouched.wat +++ b/tests/compiler/std/hash.untouched.wat @@ -65,11 +65,6 @@ i32.shl local.set $2 i64.const 0 - i64.const 2870177450012600261 - i64.add - local.get $2 - i64.extend_i32_s - i64.add local.set $3 local.get $2 i32.const 32 @@ -284,6 +279,14 @@ local.get $7 i32.sub local.set $2 + else + local.get $2 + i64.extend_i32_s + i64.const 0 + i64.add + i64.const 2870177450012600261 + i64.add + local.set $3 end i32.const 0 local.set $11 diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index 12b2e0c53d..d7356a85f5 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -347,12 +347,12 @@ ) (func $~lib/util/hash/hashStr (param $0 i32) (result i64) (local $1 i32) - (local $2 i32) - (local $3 i64) - (local $4 i32) - (local $5 i32) - (local $6 i64) - (local $7 i64) + (local $2 i64) + (local $3 i32) + (local $4 i64) + (local $5 i64) + (local $6 i32) + (local $7 i32) (local $8 i64) local.get $0 i32.eqz @@ -368,35 +368,30 @@ i32.shr_u i32.const 1 i32.shl - local.tee $2 - i64.extend_i32_s - i64.const 2870177450012600261 - i64.add - local.set $8 - local.get $2 + local.tee $3 i32.const 32 i32.ge_s - if (result i32) + if i64.const 6983438078262162902 - local.set $8 + local.set $2 i64.const -4417276706812531889 - local.set $7 + local.set $4 i64.const 7046029288634856825 - local.set $6 - local.get $2 + local.set $5 + local.get $3 i32.const 32 i32.sub - local.set $2 + local.set $3 loop $while-continue|0 - local.get $2 - local.get $5 + local.get $3 + local.get $6 i32.ge_s if - local.get $8 + local.get $2 local.get $0 - local.get $5 + local.get $6 i32.add - local.tee $4 + local.tee $7 i64.load i64.const -4417276706812531889 i64.mul @@ -405,9 +400,9 @@ i64.rotl i64.const -7046029288634856825 i64.mul - local.set $8 - local.get $7 + local.set $2 local.get $4 + local.get $7 i64.load offset=8 i64.const -4417276706812531889 i64.mul @@ -416,9 +411,9 @@ i64.rotl i64.const -7046029288634856825 i64.mul - local.set $7 - local.get $3 - local.get $4 + local.set $4 + local.get $8 + local.get $7 i64.load offset=16 i64.const -4417276706812531889 i64.mul @@ -427,9 +422,9 @@ i64.rotl i64.const -7046029288634856825 i64.mul - local.set $3 - local.get $6 - local.get $4 + local.set $8 + local.get $5 + local.get $7 i64.load offset=24 i64.const -4417276706812531889 i64.mul @@ -438,32 +433,32 @@ i64.rotl i64.const -7046029288634856825 i64.mul - local.set $6 - local.get $5 + local.set $5 + local.get $6 i32.const 32 i32.add - local.set $5 + local.set $6 br $while-continue|0 end end - local.get $2 + local.get $3 i64.extend_i32_s - local.get $8 + local.get $2 i64.const 1 i64.rotl - local.get $7 + local.get $4 i64.const 7 i64.rotl i64.add - local.get $3 + local.get $8 i64.const 12 i64.rotl i64.add - local.get $6 + local.get $5 i64.const 18 i64.rotl i64.add - local.get $8 + local.get $2 i64.const -4417276706812531889 i64.mul i64.const 31 @@ -475,7 +470,7 @@ i64.mul i64.const -8796714831421723037 i64.add - local.get $7 + local.get $4 i64.const -4417276706812531889 i64.mul i64.const 31 @@ -487,7 +482,7 @@ i64.mul i64.const -8796714831421723037 i64.add - local.get $3 + local.get $8 i64.const -4417276706812531889 i64.mul i64.const 31 @@ -499,7 +494,7 @@ i64.mul i64.const -8796714831421723037 i64.add - local.get $6 + local.get $5 i64.const -4417276706812531889 i64.mul i64.const 31 @@ -512,22 +507,28 @@ i64.const -8796714831421723037 i64.add i64.add - local.set $8 - local.get $2 - local.get $5 + local.set $2 + local.get $3 + local.get $6 i32.sub + local.set $3 else - local.get $2 + local.get $3 + i64.extend_i32_s + i64.const 2870177450012600261 + i64.add + local.set $2 end + local.get $3 i32.const 8 i32.sub - local.set $2 + local.set $3 loop $while-continue|1 local.get $1 - local.get $2 + local.get $3 i32.le_s if - local.get $8 + local.get $2 local.get $0 local.get $1 i32.add @@ -545,7 +546,7 @@ i64.mul i64.const -8796714831421723037 i64.add - local.set $8 + local.set $2 local.get $1 i32.const 8 i32.add @@ -553,13 +554,13 @@ br $while-continue|1 end end - local.get $2 + local.get $3 local.get $1 i32.const 4 i32.add i32.ge_s if - local.get $8 + local.get $2 local.get $0 local.get $1 i32.add @@ -573,7 +574,7 @@ i64.mul i64.const 1609587929392839161 i64.add - local.set $8 + local.set $2 local.get $1 i32.const 4 i32.add @@ -581,10 +582,10 @@ end loop $while-continue|2 local.get $1 - local.get $2 + local.get $3 i32.lt_s if - local.get $8 + local.get $2 local.get $0 local.get $1 i32.add @@ -596,7 +597,7 @@ i64.rotl i64.const -7046029288634856825 i64.mul - local.set $8 + local.set $2 local.get $1 i32.const 1 i32.add @@ -604,22 +605,22 @@ br $while-continue|2 end end - local.get $8 - local.get $8 + local.get $2 + local.get $2 i64.const 33 i64.shr_u i64.xor i64.const -4417276706812531889 i64.mul - local.tee $8 - local.get $8 + local.tee $2 + local.get $2 i64.const 29 i64.shr_u i64.xor i64.const 1609587929392839161 i64.mul - local.tee $8 - local.get $8 + local.tee $2 + local.get $2 i64.const 32 i64.shr_u i64.xor diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index 00cc21e0f7..e34176d378 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -588,11 +588,6 @@ i32.shl local.set $2 i64.const 0 - i64.const 2870177450012600261 - i64.add - local.get $2 - i64.extend_i32_s - i64.add local.set $3 local.get $2 i32.const 32 @@ -807,6 +802,14 @@ local.get $7 i32.sub local.set $2 + else + local.get $2 + i64.extend_i32_s + i64.const 0 + i64.add + i64.const 2870177450012600261 + i64.add + local.set $3 end i32.const 0 local.set $11 From 9c3e5485e0bbea634d088f3aaa8667193f776771 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Tue, 15 Dec 2020 00:34:39 +0200 Subject: [PATCH 03/10] refactoring --- std/assembly/util/hash.ts | 19 +- tests/compiler/std/hash.optimized.wat | 453 +-- tests/compiler/std/hash.untouched.wat | 1601 ++++++----- tests/compiler/std/map.optimized.wat | 413 ++- tests/compiler/std/map.untouched.wat | 3367 +++++++++-------------- tests/compiler/std/set.optimized.wat | 339 ++- tests/compiler/std/set.untouched.wat | 2203 +++++++-------- tests/compiler/std/symbol.optimized.wat | 498 ++-- tests/compiler/std/symbol.untouched.wat | 1004 ++++--- 9 files changed, 4767 insertions(+), 5130 deletions(-) diff --git a/std/assembly/util/hash.ts b/std/assembly/util/hash.ts index 8ff0ad25e0..1869d53c75 100644 --- a/std/assembly/util/hash.ts +++ b/std/assembly/util/hash.ts @@ -1,5 +1,3 @@ -// @ts-ignore: decorator -@inline export function HASH(key: T): u64 { if (isString()) { return hashStr(changetype(key)); @@ -10,7 +8,7 @@ export function HASH(key: T): u64 { if (sizeof() == 4) return hash32(reinterpret(f32(key))); if (sizeof() == 8) return hash64(reinterpret(f64(key))); } else { - if (sizeof() <= 4) return hash32(u32(key)); + if (sizeof() <= 4) return hash32(u32(key), sizeof()); if (sizeof() == 8) return hash64(u64(key)); } return unreachable(); @@ -32,8 +30,10 @@ export function HASH(key: T): u64 { // @ts-ignore: decorator @inline const XXH64_SEED: u64 = 0; -function hash32(key: u32): u64 { - var h: u64 = XXH64_SEED + XXH64_P5 + 4; +// @ts-ignore: decorator +@inline +function hash32(key: u32, len: u64 = 4): u64 { + var h: u64 = XXH64_SEED + XXH64_P5 + len; h ^= u64(key) * XXH64_P1; h = rotl(h, 23) * XXH64_P2 + XXH64_P3; h ^= h >> 33; @@ -44,6 +44,8 @@ function hash32(key: u32): u64 { return h; } +// @ts-ignore: decorator +@inline function hash64(key: u64): u64 { var h: u64 = XXH64_SEED + XXH64_P5 + 8; h ^= rotl(key * XXH64_P2, 31) * XXH64_P1; @@ -68,6 +70,8 @@ function mix2(h: u64, s: u64): u64 { return (h ^ (rotl(s, 31) * XXH64_P1)) * XXH64_P1 + XXH64_P4; } +// @ts-ignore: decorator +@inline function hashStr(key: string): u64 { if (key === null) { return XXH64_SEED; @@ -80,6 +84,7 @@ function hashStr(key: string): u64 { let s2 = XXH64_SEED + XXH64_P2; let s3 = XXH64_SEED; let s4 = XXH64_SEED - XXH64_P1; + let ln = len; let i = 0; len -= 32; @@ -102,11 +107,11 @@ function hashStr(key: string): u64 { h = mix2(h, s2); h = mix2(h, s3); h = mix2(h, s4); + h += ln; - h += u64(len); len -= i; } else { - h = u64(len) + XXH64_SEED + XXH64_P5; + h = len + XXH64_SEED + XXH64_P5; } var i = 0; diff --git a/tests/compiler/std/hash.optimized.wat b/tests/compiler/std/hash.optimized.wat index 89ccad1ce0..4a8616daa8 100644 --- a/tests/compiler/std/hash.optimized.wat +++ b/tests/compiler/std/hash.optimized.wat @@ -14,290 +14,291 @@ (data (i32.const 1356) "\12\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00a\00b\00c\00d\00e\00f\00g\00h\00i") (export "memory" (memory $0)) (start $~start) - (func $~lib/util/hash/hashStr (param $0 i32) + (func $~lib/util/hash/HASH<~lib/string/String|null> (param $0 i32) (local $1 i32) - (local $2 i64) + (local $2 i32) (local $3 i32) (local $4 i64) (local $5 i64) - (local $6 i32) - (local $7 i32) - (local $8 i64) + (local $6 i64) + (local $7 i64) + (local $8 i32) local.get $0 - i32.eqz if - return - end - local.get $0 - i32.const 20 - i32.sub - i32.load offset=16 - i32.const 1 - i32.shr_u - i32.const 1 - i32.shl - local.tee $3 - i32.const 32 - i32.ge_s - if - i64.const 6983438078262162902 - local.set $2 - i64.const -4417276706812531889 - local.set $4 - i64.const 7046029288634856825 - local.set $5 - local.get $3 - i32.const 32 + local.get $0 + i32.const 20 i32.sub - local.set $3 - loop $while-continue|0 + i32.load offset=16 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl + local.tee $2 + i32.const 32 + i32.ge_s + if (result i64) + i64.const 6983438078262162902 + local.set $4 + i64.const -4417276706812531889 + local.set $5 + i64.const 7046029288634856825 + local.set $6 + local.get $2 + local.tee $3 + i32.const 32 + i32.sub + local.set $8 + loop $while-continue|0 + local.get $1 + local.get $8 + i32.le_s + if + local.get $4 + local.get $0 + local.get $1 + i32.add + local.tee $2 + i64.load + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $4 + local.get $5 + local.get $2 + i64.load offset=8 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $5 + local.get $7 + local.get $2 + i64.load offset=16 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $7 + local.get $6 + local.get $2 + i64.load offset=24 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $6 + local.get $1 + i32.const 32 + i32.add + local.set $1 + br $while-continue|0 + end + end + local.get $8 + local.get $1 + i32.sub + local.set $2 local.get $3 + i64.extend_i32_s + local.get $4 + i64.const 1 + i64.rotl + local.get $5 + i64.const 7 + i64.rotl + i64.add + local.get $7 + i64.const 12 + i64.rotl + i64.add local.get $6 - i32.ge_s + i64.const 18 + i64.rotl + i64.add + local.get $4 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.get $5 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.get $7 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.get $6 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + i64.add + else + local.get $2 + i64.extend_i32_s + i64.const 2870177450012600261 + i64.add + end + local.set $4 + i32.const 0 + local.set $1 + local.get $2 + i32.const 8 + i32.sub + local.set $2 + loop $while-continue|1 + local.get $1 + local.get $2 + i32.le_s if - local.get $2 + local.get $4 local.get $0 - local.get $6 + local.get $1 i32.add - local.tee $7 i64.load i64.const -4417276706812531889 i64.mul - i64.add - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - local.set $2 - local.get $4 - local.get $7 - i64.load offset=8 - i64.const -4417276706812531889 - i64.mul - i64.add i64.const 31 i64.rotl i64.const -7046029288634856825 i64.mul - local.set $4 - local.get $8 - local.get $7 - i64.load offset=16 - i64.const -4417276706812531889 - i64.mul - i64.add - i64.const 31 + i64.xor + i64.const 27 i64.rotl i64.const -7046029288634856825 i64.mul - local.set $8 - local.get $5 - local.get $7 - i64.load offset=24 - i64.const -4417276706812531889 - i64.mul + i64.const -8796714831421723037 i64.add - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - local.set $5 - local.get $6 - i32.const 32 + local.set $4 + local.get $1 + i32.const 8 i32.add - local.set $6 - br $while-continue|0 + local.set $1 + br $while-continue|1 end end - local.get $3 - i64.extend_i32_s - local.get $2 - i64.const 1 - i64.rotl - local.get $4 - i64.const 7 - i64.rotl - i64.add - local.get $8 - i64.const 12 - i64.rotl - i64.add - local.get $5 - i64.const 18 - i64.rotl - i64.add local.get $2 - i64.const -4417276706812531889 - i64.mul - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.get $4 - i64.const -4417276706812531889 - i64.mul - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.get $8 - i64.const -4417276706812531889 - i64.mul - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.get $5 - i64.const -4417276706812531889 - i64.mul - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - i64.add - local.set $2 - local.get $3 - local.get $6 - i32.sub - local.set $3 - else - local.get $3 - i64.extend_i32_s - i64.const 2870177450012600261 - i64.add - local.set $2 - end - local.get $3 - i32.const 8 - i32.sub - local.set $3 - loop $while-continue|1 local.get $1 - local.get $3 - i32.le_s + i32.const 4 + i32.add + i32.ge_s if - local.get $2 + local.get $4 local.get $0 local.get $1 i32.add - i64.load - i64.const -4417276706812531889 - i64.mul - i64.const 31 - i64.rotl + i64.load32_u i64.const -7046029288634856825 i64.mul i64.xor - i64.const 27 + i64.const 23 i64.rotl - i64.const -7046029288634856825 + i64.const -4417276706812531889 i64.mul - i64.const -8796714831421723037 + i64.const 1609587929392839161 i64.add - local.set $2 + local.set $4 local.get $1 - i32.const 8 + i32.const 4 i32.add local.set $1 - br $while-continue|1 end - end - local.get $3 - local.get $1 - i32.const 4 - i32.add - i32.ge_s - if - local.get $2 - local.get $0 - local.get $1 - i32.add - i64.load32_u - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const 23 - i64.rotl - i64.const -4417276706812531889 - i64.mul - i64.const 1609587929392839161 - i64.add - local.set $2 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - loop $while-continue|2 - local.get $1 - local.get $3 - i32.lt_s - if - local.get $2 - local.get $0 + loop $while-continue|2 local.get $1 - i32.add - i64.load8_u - i64.const 2870177450012600261 - i64.mul - i64.add - i64.const 11 - i64.rotl - i64.const -7046029288634856825 - i64.mul - local.set $2 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $while-continue|2 + local.get $2 + i32.lt_s + if + local.get $4 + local.get $0 + local.get $1 + i32.add + i64.load8_u + i64.const 2870177450012600261 + i64.mul + i64.add + i64.const 11 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $4 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $while-continue|2 + end end end ) (func $~start - (local $0 i32) + (local $0 f32) (local $1 i64) + (local $2 f64) i32.const 0 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String|null> i32.const 1056 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String|null> i32.const 1088 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String|null> i32.const 1120 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String|null> i32.const 1152 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String|null> i32.const 1184 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String|null> i32.const 1216 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String|null> i32.const 1248 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String|null> i32.const 1280 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String|null> i32.const 1328 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String|null> i32.const 1376 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String|null> ) ) diff --git a/tests/compiler/std/hash.untouched.wat b/tests/compiler/std/hash.untouched.wat index 8c9d3c1ccc..5a5512d950 100644 --- a/tests/compiler/std/hash.untouched.wat +++ b/tests/compiler/std/hash.untouched.wat @@ -4,7 +4,8 @@ (type $i32_=>_i64 (func (param i32) (result i64))) (type $i32_=>_none (func (param i32))) (type $i64_=>_i32 (func (param i64) (result i32))) - (type $i64_=>_i64 (func (param i64) (result i64))) + (type $f32_=>_i64 (func (param f32) (result i64))) + (type $f64_=>_i64 (func (param f64) (result i64))) (memory $0 1) (data (i32.const 12) "\00\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00") (data (i32.const 44) "\02\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00a\00") @@ -33,455 +34,906 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/hash/hashStr (param $0 i32) (result i64) - (local $1 i64) - (local $2 i32) - (local $3 i64) + (func $~lib/util/hash/HASH<~lib/string/String|null> (param $0 i32) (result i64) + (local $1 i32) + (local $2 i64) + (local $3 i32) (local $4 i64) (local $5 i64) (local $6 i64) - (local $7 i32) + (local $7 i64) (local $8 i32) - (local $9 i64) - (local $10 i64) - (local $11 i32) + (local $9 i32) + (local $10 i32) + (local $11 i64) + (local $12 i64) local.get $0 call $~lib/rt/stub/__retain local.set $0 - local.get $0 - i32.const 0 - i32.eq - if - i64.const 0 - local.set $1 - local.get $0 - call $~lib/rt/stub/__release - local.get $1 - return - end - local.get $0 - call $~lib/string/String#get:length i32.const 1 - i32.shl - local.set $2 - i64.const 0 - local.set $3 - local.get $2 - i32.const 32 - i32.ge_s - if - i64.const 0 - i64.const -7046029288634856825 - i64.add - i64.const -4417276706812531889 - i64.add + drop + block $~lib/util/hash/hashStr|inlined.0 (result i64) + local.get $0 + call $~lib/rt/stub/__retain local.set $1 - i64.const 0 - i64.const -4417276706812531889 - i64.add - local.set $4 - i64.const 0 - local.set $5 - i64.const 0 - i64.const -7046029288634856825 - i64.sub - local.set $6 + local.get $1 i32.const 0 - local.set $7 - local.get $2 - i32.const 32 - i32.sub + i32.eq + if + i64.const 0 + local.set $2 + local.get $1 + call $~lib/rt/stub/__release + local.get $2 + br $~lib/util/hash/hashStr|inlined.0 + end + local.get $1 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + local.set $3 + i64.const 0 local.set $2 - loop $while-continue|0 + local.get $3 + i32.const 32 + i32.ge_s + if + i64.const 0 + i64.const -7046029288634856825 + i64.add + i64.const -4417276706812531889 + i64.add + local.set $4 + i64.const 0 + i64.const -4417276706812531889 + i64.add + local.set $5 + i64.const 0 + local.set $6 + i64.const 0 + i64.const -7046029288634856825 + i64.sub + local.set $7 + local.get $3 + local.set $8 + i32.const 0 + local.set $9 + local.get $3 + i32.const 32 + i32.sub + local.set $3 + loop $while-continue|0 + local.get $9 + local.get $3 + i32.le_s + local.set $10 + local.get $10 + if + local.get $4 + local.set $12 + local.get $1 + local.get $9 + i32.add + i64.load + local.set $11 + local.get $12 + local.get $11 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $4 + local.get $5 + local.set $12 + local.get $1 + local.get $9 + i32.add + i64.load offset=8 + local.set $11 + local.get $12 + local.get $11 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $5 + local.get $6 + local.set $12 + local.get $1 + local.get $9 + i32.add + i64.load offset=16 + local.set $11 + local.get $12 + local.get $11 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $6 + local.get $7 + local.set $12 + local.get $1 + local.get $9 + i32.add + i64.load offset=24 + local.set $11 + local.get $12 + local.get $11 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $7 + local.get $9 + i32.const 32 + i32.add + local.set $9 + br $while-continue|0 + end + end + local.get $4 + i64.const 1 + i64.rotl + local.get $5 + i64.const 7 + i64.rotl + i64.add + local.get $6 + i64.const 12 + i64.rotl + i64.add + local.get $7 + i64.const 18 + i64.rotl + i64.add + local.set $2 + local.get $4 + i64.const -4417276706812531889 + i64.mul + local.set $4 + local.get $5 + i64.const -4417276706812531889 + i64.mul + local.set $5 + local.get $6 + i64.const -4417276706812531889 + i64.mul + local.set $6 + local.get $7 + i64.const -4417276706812531889 + i64.mul + local.set $7 + local.get $2 + local.set $12 + local.get $4 + local.set $11 + local.get $12 + local.get $11 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $2 + local.get $2 + local.set $12 + local.get $5 + local.set $11 + local.get $12 + local.get $11 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $2 + local.get $2 + local.set $12 + local.get $6 + local.set $11 + local.get $12 + local.get $11 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $2 + local.get $2 + local.set $12 local.get $7 + local.set $11 + local.get $12 + local.get $11 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $2 local.get $2 + local.get $8 + i64.extend_i32_s + i64.add + local.set $2 + local.get $3 + local.get $9 + i32.sub + local.set $3 + else + local.get $3 + i64.extend_i32_s + i64.const 0 + i64.add + i64.const 2870177450012600261 + i64.add + local.set $2 + end + i32.const 0 + local.set $9 + local.get $3 + i32.const 8 + i32.sub + local.set $3 + loop $while-continue|1 + local.get $9 + local.get $3 i32.le_s local.set $8 local.get $8 if + local.get $2 local.get $1 - local.set $10 - local.get $0 - local.get $7 + local.get $9 i32.add i64.load - local.set $9 - local.get $10 - local.get $9 i64.const -4417276706812531889 i64.mul - i64.add i64.const 31 i64.rotl i64.const -7046029288634856825 i64.mul - local.set $1 - local.get $4 - local.set $10 - local.get $0 - local.get $7 + i64.xor + local.set $2 + local.get $2 + i64.const 27 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $2 + local.get $9 + i32.const 8 i32.add - i64.load offset=8 local.set $9 - local.get $10 + br $while-continue|1 + end + end + local.get $9 + i32.const 4 + i32.add + local.get $3 + i32.le_s + if + local.get $2 + local.get $1 + local.get $9 + i32.add + i64.load32_u + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $2 + local.get $2 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $2 + local.get $9 + i32.const 4 + i32.add + local.set $9 + end + loop $while-continue|2 + local.get $9 + local.get $3 + i32.lt_s + local.set $8 + local.get $8 + if + local.get $2 + local.get $1 local.get $9 - i64.const -4417276706812531889 + i32.add + i64.load8_u + i64.const 2870177450012600261 i64.mul i64.add - i64.const 31 + local.set $2 + local.get $2 + i64.const 11 i64.rotl i64.const -7046029288634856825 i64.mul - local.set $4 - local.get $5 - local.set $10 - local.get $0 - local.get $7 + local.set $2 + local.get $9 + i32.const 1 i32.add - i64.load offset=16 local.set $9 + br $while-continue|2 + end + end + local.get $2 + local.get $2 + i64.const 33 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + i64.const -4417276706812531889 + i64.mul + local.set $2 + local.get $2 + local.get $2 + i64.const 29 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + i64.const 1609587929392839161 + i64.mul + local.set $2 + local.get $2 + local.get $2 + i64.const 32 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + local.set $7 + local.get $1 + call $~lib/rt/stub/__release + local.get $7 + end + local.set $2 + local.get $0 + call $~lib/rt/stub/__release + local.get $2 + return + ) + (func $std/hash/check (param $0 i64) (result i32) + i32.const 1 + ) + (func $~lib/util/hash/HASH<~lib/string/String> (param $0 i32) (result i64) + (local $1 i32) + (local $2 i64) + (local $3 i32) + (local $4 i64) + (local $5 i64) + (local $6 i64) + (local $7 i64) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i64) + (local $12 i64) + local.get $0 + call $~lib/rt/stub/__retain + local.set $0 + i32.const 1 + drop + block $~lib/util/hash/hashStr|inlined.1 (result i64) + local.get $0 + call $~lib/rt/stub/__retain + local.set $1 + local.get $1 + i32.const 0 + i32.eq + if + i64.const 0 + local.set $2 + local.get $1 + call $~lib/rt/stub/__release + local.get $2 + br $~lib/util/hash/hashStr|inlined.1 + end + local.get $1 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + local.set $3 + i64.const 0 + local.set $2 + local.get $3 + i32.const 32 + i32.ge_s + if + i64.const 0 + i64.const -7046029288634856825 + i64.add + i64.const -4417276706812531889 + i64.add + local.set $4 + i64.const 0 + i64.const -4417276706812531889 + i64.add + local.set $5 + i64.const 0 + local.set $6 + i64.const 0 + i64.const -7046029288634856825 + i64.sub + local.set $7 + local.get $3 + local.set $8 + i32.const 0 + local.set $9 + local.get $3 + i32.const 32 + i32.sub + local.set $3 + loop $while-continue|0 + local.get $9 + local.get $3 + i32.le_s + local.set $10 local.get $10 + if + local.get $4 + local.set $12 + local.get $1 + local.get $9 + i32.add + i64.load + local.set $11 + local.get $12 + local.get $11 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $4 + local.get $5 + local.set $12 + local.get $1 + local.get $9 + i32.add + i64.load offset=8 + local.set $11 + local.get $12 + local.get $11 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $5 + local.get $6 + local.set $12 + local.get $1 + local.get $9 + i32.add + i64.load offset=16 + local.set $11 + local.get $12 + local.get $11 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $6 + local.get $7 + local.set $12 + local.get $1 + local.get $9 + i32.add + i64.load offset=24 + local.set $11 + local.get $12 + local.get $11 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $7 + local.get $9 + i32.const 32 + i32.add + local.set $9 + br $while-continue|0 + end + end + local.get $4 + i64.const 1 + i64.rotl + local.get $5 + i64.const 7 + i64.rotl + i64.add + local.get $6 + i64.const 12 + i64.rotl + i64.add + local.get $7 + i64.const 18 + i64.rotl + i64.add + local.set $2 + local.get $4 + i64.const -4417276706812531889 + i64.mul + local.set $4 + local.get $5 + i64.const -4417276706812531889 + i64.mul + local.set $5 + local.get $6 + i64.const -4417276706812531889 + i64.mul + local.set $6 + local.get $7 + i64.const -4417276706812531889 + i64.mul + local.set $7 + local.get $2 + local.set $12 + local.get $4 + local.set $11 + local.get $12 + local.get $11 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $2 + local.get $2 + local.set $12 + local.get $5 + local.set $11 + local.get $12 + local.get $11 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $2 + local.get $2 + local.set $12 + local.get $6 + local.set $11 + local.get $12 + local.get $11 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $2 + local.get $2 + local.set $12 + local.get $7 + local.set $11 + local.get $12 + local.get $11 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $2 + local.get $2 + local.get $8 + i64.extend_i32_s + i64.add + local.set $2 + local.get $3 + local.get $9 + i32.sub + local.set $3 + else + local.get $3 + i64.extend_i32_s + i64.const 0 + i64.add + i64.const 2870177450012600261 + i64.add + local.set $2 + end + i32.const 0 + local.set $9 + local.get $3 + i32.const 8 + i32.sub + local.set $3 + loop $while-continue|1 + local.get $9 + local.get $3 + i32.le_s + local.set $8 + local.get $8 + if + local.get $2 + local.get $1 local.get $9 + i32.add + i64.load i64.const -4417276706812531889 i64.mul - i64.add i64.const 31 i64.rotl i64.const -7046029288634856825 i64.mul - local.set $5 - local.get $6 - local.set $10 - local.get $0 - local.get $7 - i32.add - i64.load offset=24 - local.set $9 - local.get $10 - local.get $9 - i64.const -4417276706812531889 - i64.mul - i64.add - i64.const 31 + i64.xor + local.set $2 + local.get $2 + i64.const 27 i64.rotl i64.const -7046029288634856825 i64.mul - local.set $6 - local.get $7 - i32.const 32 + i64.const -8796714831421723037 + i64.add + local.set $2 + local.get $9 + i32.const 8 i32.add - local.set $7 - br $while-continue|0 + local.set $9 + br $while-continue|1 end end - local.get $1 - i64.const 1 - i64.rotl - local.get $4 - i64.const 7 - i64.rotl - i64.add - local.get $5 - i64.const 12 - i64.rotl - i64.add - local.get $6 - i64.const 18 - i64.rotl - i64.add - local.set $3 - local.get $1 - i64.const -4417276706812531889 - i64.mul - local.set $1 - local.get $4 - i64.const -4417276706812531889 - i64.mul - local.set $4 - local.get $5 - i64.const -4417276706812531889 - i64.mul - local.set $5 - local.get $6 - i64.const -4417276706812531889 - i64.mul - local.set $6 - local.get $3 - local.set $10 - local.get $1 - local.set $9 - local.get $10 - local.get $9 - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.set $3 - local.get $3 - local.set $10 - local.get $4 - local.set $9 - local.get $10 - local.get $9 - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.set $3 - local.get $3 - local.set $10 - local.get $5 - local.set $9 - local.get $10 - local.get $9 - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.set $3 - local.get $3 - local.set $10 - local.get $6 - local.set $9 - local.get $10 local.get $9 - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.set $3 + i32.const 4 + i32.add local.get $3 - local.get $2 - i64.extend_i32_s - i64.add - local.set $3 - local.get $2 - local.get $7 - i32.sub - local.set $2 - else - local.get $2 - i64.extend_i32_s - i64.const 0 - i64.add - i64.const 2870177450012600261 - i64.add - local.set $3 - end - i32.const 0 - local.set $11 - local.get $2 - i32.const 8 - i32.sub - local.set $2 - loop $while-continue|1 - local.get $11 - local.get $2 i32.le_s - local.set $7 - local.get $7 if - local.get $3 - local.get $0 - local.get $11 + local.get $2 + local.get $1 + local.get $9 i32.add - i64.load - i64.const -4417276706812531889 - i64.mul - i64.const 31 - i64.rotl + i64.load32_u i64.const -7046029288634856825 i64.mul i64.xor - local.set $3 - local.get $3 - i64.const 27 + local.set $2 + local.get $2 + i64.const 23 i64.rotl - i64.const -7046029288634856825 + i64.const -4417276706812531889 i64.mul - i64.const -8796714831421723037 + i64.const 1609587929392839161 i64.add - local.set $3 - local.get $11 - i32.const 8 + local.set $2 + local.get $9 + i32.const 4 i32.add - local.set $11 - br $while-continue|1 + local.set $9 end - end - local.get $11 - i32.const 4 - i32.add - local.get $2 - i32.le_s - if - local.get $3 - local.get $0 - local.get $11 - i32.add - i64.load32_u - i64.const -7046029288634856825 - i64.mul + loop $while-continue|2 + local.get $9 + local.get $3 + i32.lt_s + local.set $8 + local.get $8 + if + local.get $2 + local.get $1 + local.get $9 + i32.add + i64.load8_u + i64.const 2870177450012600261 + i64.mul + i64.add + local.set $2 + local.get $2 + i64.const 11 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $2 + local.get $9 + i32.const 1 + i32.add + local.set $9 + br $while-continue|2 + end + end + local.get $2 + local.get $2 + i64.const 33 + i64.shr_u i64.xor - local.set $3 - local.get $3 - i64.const 23 - i64.rotl + local.set $2 + local.get $2 i64.const -4417276706812531889 i64.mul + local.set $2 + local.get $2 + local.get $2 + i64.const 29 + i64.shr_u + i64.xor + local.set $2 + local.get $2 i64.const 1609587929392839161 - i64.add - local.set $3 - local.get $11 - i32.const 4 - i32.add - local.set $11 - end - loop $while-continue|2 - local.get $11 + i64.mul + local.set $2 + local.get $2 + local.get $2 + i64.const 32 + i64.shr_u + i64.xor + local.set $2 local.get $2 - i32.lt_s local.set $7 + local.get $1 + call $~lib/rt/stub/__release local.get $7 - if - local.get $3 - local.get $0 - local.get $11 - i32.add - i64.load8_u - i64.const 2870177450012600261 - i64.mul - i64.add - local.set $3 - local.get $3 - i64.const 11 - i64.rotl - i64.const -7046029288634856825 - i64.mul - local.set $3 - local.get $11 - i32.const 1 - i32.add - local.set $11 - br $while-continue|2 - end end - local.get $3 - local.get $3 - i64.const 33 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const -4417276706812531889 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 29 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const 1609587929392839161 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 32 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - local.set $6 + local.set $2 local.get $0 call $~lib/rt/stub/__release - local.get $6 + local.get $2 + return ) - (func $std/hash/check (param $0 i64) (result i32) + (func $~lib/util/hash/HASH (param $0 f32) (result i64) + (local $1 i32) + (local $2 i64) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop i32.const 1 - ) - (func $~lib/util/hash/hash32 (param $0 i32) (result i64) - (local $1 i64) + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $0 + i32.reinterpret_f32 + local.set $1 + i64.const 4 + local.set $2 i64.const 0 i64.const 2870177450012600261 i64.add - i64.const 4 + local.get $2 i64.add - local.set $1 + local.set $3 + local.get $3 local.get $1 - local.get $0 i64.extend_i32_u i64.const -7046029288634856825 i64.mul i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 i64.const 23 i64.rotl i64.const -4417276706812531889 i64.mul i64.const 1609587929392839161 i64.add - local.set $1 - local.get $1 - local.get $1 + local.set $3 + local.get $3 + local.get $3 i64.const 33 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 i64.const -4417276706812531889 i64.mul - local.set $1 - local.get $1 - local.get $1 + local.set $3 + local.get $3 + local.get $3 i64.const 29 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 i64.const 1609587929392839161 i64.mul - local.set $1 - local.get $1 - local.get $1 + local.set $3 + local.get $3 + local.get $3 i64.const 32 i64.shr_u i64.xor + local.set $3 + local.get $3 + return + ) + (func $~lib/util/hash/HASH (param $0 f64) (result i64) + (local $1 i64) + (local $2 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $0 + i64.reinterpret_f64 local.set $1 - local.get $1 - ) - (func $~lib/util/hash/hash64 (param $0 i64) (result i64) - (local $1 i64) i64.const 0 i64.const 2870177450012600261 i64.add i64.const 8 i64.add - local.set $1 + local.set $2 + local.get $2 local.get $1 - local.get $0 i64.const -4417276706812531889 i64.mul i64.const 31 @@ -489,476 +941,135 @@ i64.const -7046029288634856825 i64.mul i64.xor - local.set $1 - local.get $1 + local.set $2 + local.get $2 i64.const 27 i64.rotl i64.const -7046029288634856825 i64.mul i64.const -8796714831421723037 i64.add - local.set $1 - local.get $1 - local.get $1 + local.set $2 + local.get $2 + local.get $2 i64.const 33 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $2 + local.get $2 i64.const -4417276706812531889 i64.mul - local.set $1 - local.get $1 - local.get $1 + local.set $2 + local.get $2 + local.get $2 i64.const 29 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $2 + local.get $2 i64.const 1609587929392839161 i64.mul - local.set $1 - local.get $1 - local.get $1 + local.set $2 + local.get $2 + local.get $2 i64.const 32 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $2 + local.get $2 + return ) (func $start:std/hash - (local $0 i32) - (local $1 i64) - (local $2 f32) - (local $3 f64) - block $~lib/util/hash/HASH<~lib/string/String|null>|inlined.0 (result i64) - i32.const 0 - call $~lib/rt/stub/__retain - local.set $0 - i32.const 1 - drop - local.get $0 - call $~lib/util/hash/hashStr - local.set $1 - local.get $0 - call $~lib/rt/stub/__release - local.get $1 - br $~lib/util/hash/HASH<~lib/string/String|null>|inlined.0 - end + i32.const 0 + call $~lib/util/hash/HASH<~lib/string/String|null> call $std/hash/check drop - block $~lib/util/hash/HASH<~lib/string/String>|inlined.0 (result i64) - i32.const 32 - local.set $0 - i32.const 1 - drop - local.get $0 - call $~lib/util/hash/hashStr - local.set $1 - local.get $0 - call $~lib/rt/stub/__release - local.get $1 - br $~lib/util/hash/HASH<~lib/string/String>|inlined.0 - end + i32.const 32 + call $~lib/util/hash/HASH<~lib/string/String> call $std/hash/check drop - block $~lib/util/hash/HASH<~lib/string/String>|inlined.1 (result i64) - i32.const 64 - local.set $0 - i32.const 1 - drop - local.get $0 - call $~lib/util/hash/hashStr - local.set $1 - local.get $0 - call $~lib/rt/stub/__release - local.get $1 - br $~lib/util/hash/HASH<~lib/string/String>|inlined.1 - end + i32.const 64 + call $~lib/util/hash/HASH<~lib/string/String> call $std/hash/check drop - block $~lib/util/hash/HASH<~lib/string/String>|inlined.2 (result i64) - i32.const 96 - local.set $0 - i32.const 1 - drop - local.get $0 - call $~lib/util/hash/hashStr - local.set $1 - local.get $0 - call $~lib/rt/stub/__release - local.get $1 - br $~lib/util/hash/HASH<~lib/string/String>|inlined.2 - end + i32.const 96 + call $~lib/util/hash/HASH<~lib/string/String> call $std/hash/check drop - block $~lib/util/hash/HASH<~lib/string/String>|inlined.3 (result i64) - i32.const 128 - local.set $0 - i32.const 1 - drop - local.get $0 - call $~lib/util/hash/hashStr - local.set $1 - local.get $0 - call $~lib/rt/stub/__release - local.get $1 - br $~lib/util/hash/HASH<~lib/string/String>|inlined.3 - end + i32.const 128 + call $~lib/util/hash/HASH<~lib/string/String> call $std/hash/check drop - block $~lib/util/hash/HASH<~lib/string/String>|inlined.4 (result i64) - i32.const 160 - local.set $0 - i32.const 1 - drop - local.get $0 - call $~lib/util/hash/hashStr - local.set $1 - local.get $0 - call $~lib/rt/stub/__release - local.get $1 - br $~lib/util/hash/HASH<~lib/string/String>|inlined.4 - end + i32.const 160 + call $~lib/util/hash/HASH<~lib/string/String> call $std/hash/check drop - block $~lib/util/hash/HASH<~lib/string/String>|inlined.5 (result i64) - i32.const 192 - local.set $0 - i32.const 1 - drop - local.get $0 - call $~lib/util/hash/hashStr - local.set $1 - local.get $0 - call $~lib/rt/stub/__release - local.get $1 - br $~lib/util/hash/HASH<~lib/string/String>|inlined.5 - end + i32.const 192 + call $~lib/util/hash/HASH<~lib/string/String> call $std/hash/check drop - block $~lib/util/hash/HASH<~lib/string/String>|inlined.6 (result i64) - i32.const 224 - local.set $0 - i32.const 1 - drop - local.get $0 - call $~lib/util/hash/hashStr - local.set $1 - local.get $0 - call $~lib/rt/stub/__release - local.get $1 - br $~lib/util/hash/HASH<~lib/string/String>|inlined.6 - end + i32.const 224 + call $~lib/util/hash/HASH<~lib/string/String> call $std/hash/check drop - block $~lib/util/hash/HASH<~lib/string/String>|inlined.7 (result i64) - i32.const 256 - local.set $0 - i32.const 1 - drop - local.get $0 - call $~lib/util/hash/hashStr - local.set $1 - local.get $0 - call $~lib/rt/stub/__release - local.get $1 - br $~lib/util/hash/HASH<~lib/string/String>|inlined.7 - end + i32.const 256 + call $~lib/util/hash/HASH<~lib/string/String> call $std/hash/check drop - block $~lib/util/hash/HASH<~lib/string/String>|inlined.8 (result i64) - i32.const 304 - local.set $0 - i32.const 1 - drop - local.get $0 - call $~lib/util/hash/hashStr - local.set $1 - local.get $0 - call $~lib/rt/stub/__release - local.get $1 - br $~lib/util/hash/HASH<~lib/string/String>|inlined.8 - end + i32.const 304 + call $~lib/util/hash/HASH<~lib/string/String> call $std/hash/check drop - block $~lib/util/hash/HASH<~lib/string/String>|inlined.9 (result i64) - i32.const 352 - local.set $0 - i32.const 1 - drop - local.get $0 - call $~lib/util/hash/hashStr - local.set $1 - local.get $0 - call $~lib/rt/stub/__release - local.get $1 - br $~lib/util/hash/HASH<~lib/string/String>|inlined.9 - end + i32.const 352 + call $~lib/util/hash/HASH<~lib/string/String> call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.0 (result i64) - f32.const 0 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end + f32.const 0 + call $~lib/util/hash/HASH call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.1 (result i64) - f32.const 1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end + f32.const 1 + call $~lib/util/hash/HASH call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.2 (result i64) - f32.const 1.100000023841858 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + f32.const 1.100000023841858 + call $~lib/util/hash/HASH call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.3 (result i64) - f32.const 0 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end + f32.const 0 + call $~lib/util/hash/HASH call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.4 (result i64) - f32.const inf - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.4 - end + f32.const inf + call $~lib/util/hash/HASH call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.5 (result i64) - f32.const nan:0x400000 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.5 - end + f32.const nan:0x400000 + call $~lib/util/hash/HASH call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.0 (result i64) - f64.const 0 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.0 - end + f64.const 0 + call $~lib/util/hash/HASH call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.1 (result i64) - f64.const 1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.1 - end + f64.const 1 + call $~lib/util/hash/HASH call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.2 (result i64) - f64.const 1.1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.2 - end + f64.const 1.1 + call $~lib/util/hash/HASH call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.3 (result i64) - f64.const 0 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.3 - end + f64.const 0 + call $~lib/util/hash/HASH call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.4 (result i64) - f64.const inf - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.4 - end + f64.const inf + call $~lib/util/hash/HASH call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.5 (result i64) - f64.const nan:0x8000000000000 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.5 - end + f64.const nan:0x8000000000000 + call $~lib/util/hash/HASH call $std/hash/check drop ) diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index b7bf6d4862..6febe140dc 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -6,6 +6,7 @@ (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_none (func (param i32))) + (type $i32_=>_i64 (func (param i32) (result i64))) (type $i32_i32_i64_=>_i32 (func (param i32 i32 i64) (result i32))) (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) (type $i32_i64_i64_=>_i32 (func (param i32 i64 i64) (result i32))) @@ -24,9 +25,10 @@ (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) (type $i32_f64_i64_=>_i32 (func (param i32 f64 i64) (result i32))) (type $i32_f64_f64_=>_i32 (func (param i32 f64 f64) (result i32))) - (type $i32_=>_i64 (func (param i32) (result i64))) (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) (type $i64_=>_i64 (func (param i64) (result i64))) + (type $f32_=>_i64 (func (param f32) (result i64))) + (type $f64_=>_i64 (func (param f64) (result i64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 1036) "(\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00(\00\00\00a\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") @@ -1294,13 +1296,17 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/util/hash/hash32 (param $0 i32) (result i64) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) (local $1 i64) local.get $0 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s i64.extend_i32_u i64.const -7046029288634856825 i64.mul - i64.const 2870177450012600265 + i64.const 2870177450012600262 i64.xor i64.const 23 i64.rotl @@ -1377,11 +1383,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -1446,7 +1448,7 @@ local.get $2 local.get $5 local.get $6 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -1527,11 +1529,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.tee $5 call $~lib/map/Map#find local.tee $3 @@ -1625,11 +1623,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $0 i32.eqz @@ -2507,7 +2501,7 @@ local.get $2 local.get $5 local.get $6 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -2587,11 +2581,7 @@ (local $5 i64) local.get $1 local.tee $3 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.set $5 local.get $0 i32.load @@ -2722,6 +2712,40 @@ local.get $0 call $~lib/rt/pure/__retain ) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) + local.get $0 + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.const 2870177450012600265 + i64.xor + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.tee $1 + local.get $1 + i64.const 33 + i64.shr_u + i64.xor + i64.const -4417276706812531889 + i64.mul + local.tee $1 + local.get $1 + i64.const 29 + i64.shr_u + i64.xor + i64.const 1609587929392839161 + i64.mul + local.tee $1 + local.get $1 + i64.const 32 + i64.shr_u + i64.xor + ) (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) local.get $0 @@ -2825,7 +2849,7 @@ local.get $2 local.get $5 local.get $6 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -2906,7 +2930,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.tee $5 call $~lib/map/Map#find local.tee $3 @@ -3001,11 +3025,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $1 i32.eqz @@ -3616,13 +3636,47 @@ local.get $0 call $~lib/rt/pure/__release ) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) + local.get $0 + i32.const 255 + i32.and + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.const 2870177450012600262 + i64.xor + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.tee $1 + local.get $1 + i64.const 33 + i64.shr_u + i64.xor + i64.const -4417276706812531889 + i64.mul + local.tee $1 + local.get $1 + i64.const 29 + i64.shr_u + i64.xor + i64.const 1609587929392839161 + i64.mul + local.tee $1 + local.get $1 + i64.const 32 + i64.shr_u + i64.xor + ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 - i32.const 255 - i32.and - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -3687,7 +3741,7 @@ local.get $2 local.get $5 local.get $6 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -3768,9 +3822,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 255 - i32.and - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.tee $5 call $~lib/map/Map#find local.tee $3 @@ -3864,9 +3916,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 255 - i32.and - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $0 i32.eqz @@ -4054,7 +4104,7 @@ local.get $2 local.get $5 local.get $6 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -4134,9 +4184,7 @@ (local $5 i64) local.get $1 local.tee $3 - i32.const 255 - i32.and - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.set $5 local.get $0 i32.load @@ -4272,9 +4320,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 255 - i32.and - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $1 i32.eqz @@ -4830,6 +4876,44 @@ local.get $0 call $~lib/rt/pure/__release ) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) + local.get $0 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.const 2870177450012600263 + i64.xor + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.tee $1 + local.get $1 + i64.const 33 + i64.shr_u + i64.xor + i64.const -4417276706812531889 + i64.mul + local.tee $1 + local.get $1 + i64.const 29 + i64.shr_u + i64.xor + i64.const 1609587929392839161 + i64.mul + local.tee $1 + local.get $1 + i64.const 32 + i64.shr_u + i64.xor + ) (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) local.get $0 @@ -4879,11 +4963,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -4948,7 +5028,7 @@ local.get $2 local.get $5 local.get $6 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -5029,11 +5109,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.tee $5 call $~lib/map/Map#find local.tee $3 @@ -5127,11 +5203,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $0 i32.eqz @@ -5373,7 +5445,7 @@ local.get $2 local.get $5 local.get $6 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -5453,11 +5525,7 @@ (local $5 i64) local.get $1 local.tee $3 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.set $5 local.get $0 i32.load @@ -5593,11 +5661,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $1 i32.eqz @@ -6177,13 +6241,47 @@ local.get $0 call $~lib/rt/pure/__release ) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) + local.get $0 + i32.const 65535 + i32.and + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.const 2870177450012600263 + i64.xor + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.tee $1 + local.get $1 + i64.const 33 + i64.shr_u + i64.xor + i64.const -4417276706812531889 + i64.mul + local.tee $1 + local.get $1 + i64.const 29 + i64.shr_u + i64.xor + i64.const 1609587929392839161 + i64.mul + local.tee $1 + local.get $1 + i64.const 32 + i64.shr_u + i64.xor + ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 - i32.const 65535 - i32.and - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -6248,7 +6346,7 @@ local.get $2 local.get $5 local.get $6 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -6329,9 +6427,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 65535 - i32.and - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.tee $5 call $~lib/map/Map#find local.tee $3 @@ -6425,9 +6521,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 65535 - i32.and - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $0 i32.eqz @@ -6619,7 +6713,7 @@ local.get $2 local.get $5 local.get $6 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -6699,9 +6793,7 @@ (local $5 i64) local.get $1 local.tee $3 - i32.const 65535 - i32.and - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.set $5 local.get $0 i32.load @@ -6837,9 +6929,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 65535 - i32.and - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $1 i32.eqz @@ -7401,7 +7491,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -7410,7 +7500,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $0 i32.eqz @@ -7430,7 +7520,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $1 i32.eqz @@ -8529,7 +8619,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/util/hash/hash64 (param $0 i64) (result i64) + (func $~lib/util/hash/HASH (param $0 i64) (result i64) local.get $0 i64.const -4417276706812531889 i64.mul @@ -8612,7 +8702,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -8678,7 +8768,7 @@ local.get $2 local.get $5 local.get $8 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -8759,7 +8849,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.tee $5 call $~lib/map/Map#find local.tee $3 @@ -8853,7 +8943,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $0 i32.eqz @@ -9169,7 +9259,7 @@ local.get $2 local.get $5 local.get $8 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -9249,7 +9339,7 @@ (local $5 i64) (local $6 i32) local.get $1 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.set $5 local.get $0 i32.load @@ -9384,7 +9474,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $2 i32.eqz @@ -10535,6 +10625,41 @@ local.get $1 call $~lib/rt/pure/__release ) + (func $~lib/util/hash/HASH (param $0 f32) (result i64) + (local $1 i64) + local.get $0 + i32.reinterpret_f32 + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.const 2870177450012600265 + i64.xor + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.tee $1 + local.get $1 + i64.const 33 + i64.shr_u + i64.xor + i64.const -4417276706812531889 + i64.mul + local.tee $1 + local.get $1 + i64.const 29 + i64.shr_u + i64.xor + i64.const 1609587929392839161 + i64.mul + local.tee $1 + local.get $1 + i64.const 32 + i64.shr_u + i64.xor + ) (func $~lib/map/Map#find (param $0 i32) (param $1 f32) (param $2 i64) (result i32) (local $3 i32) local.get $0 @@ -10582,8 +10707,7 @@ local.get $0 local.get $1 local.get $1 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -10649,8 +10773,7 @@ local.get $2 local.get $5 local.get $8 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -10731,8 +10854,7 @@ local.get $0 local.get $1 local.get $1 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.tee $5 call $~lib/map/Map#find local.tee $3 @@ -10826,8 +10948,7 @@ local.get $0 local.get $1 local.get $1 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $0 i32.eqz @@ -11054,8 +11175,7 @@ local.get $2 local.get $5 local.get $8 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -11137,8 +11257,7 @@ local.get $0 local.get $1 local.get $1 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.tee $5 call $~lib/map/Map#find local.tee $3 @@ -11234,8 +11353,7 @@ local.get $0 local.get $1 local.get $1 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $2 i32.eqz @@ -11779,6 +11897,44 @@ local.get $1 call $~lib/rt/pure/__release ) + (func $~lib/util/hash/HASH (param $0 f64) (result i64) + (local $1 i64) + local.get $0 + i64.reinterpret_f64 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const 2870177450012600269 + i64.xor + i64.const 27 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.tee $1 + local.get $1 + i64.const 33 + i64.shr_u + i64.xor + i64.const -4417276706812531889 + i64.mul + local.tee $1 + local.get $1 + i64.const 29 + i64.shr_u + i64.xor + i64.const 1609587929392839161 + i64.mul + local.tee $1 + local.get $1 + i64.const 32 + i64.shr_u + i64.xor + ) (func $~lib/map/Map#find (param $0 i32) (param $1 f64) (param $2 i64) (result i32) (local $3 i32) local.get $0 @@ -11826,8 +11982,7 @@ local.get $0 local.get $1 local.get $1 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -11893,8 +12048,7 @@ local.get $2 local.get $5 local.get $8 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -11975,8 +12129,7 @@ local.get $0 local.get $1 local.get $1 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.tee $5 call $~lib/map/Map#find local.tee $3 @@ -12070,8 +12223,7 @@ local.get $0 local.get $1 local.get $1 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $0 i32.eqz @@ -12298,8 +12450,7 @@ local.get $2 local.get $5 local.get $8 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -12379,8 +12530,7 @@ (local $5 i64) (local $6 i32) local.get $1 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.set $5 local.get $0 i32.load @@ -12515,8 +12665,7 @@ local.get $0 local.get $1 local.get $1 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $2 i32.eqz diff --git a/tests/compiler/std/map.untouched.wat b/tests/compiler/std/map.untouched.wat index 3a58527b5a..d4b6c92c2d 100644 --- a/tests/compiler/std/map.untouched.wat +++ b/tests/compiler/std/map.untouched.wat @@ -9,6 +9,7 @@ (type $i32_i32_i64_=>_i32 (func (param i32 i32 i64) (result i32))) (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) (type $i32_i64_i64_=>_i32 (func (param i32 i64 i64) (result i32))) + (type $i32_=>_i64 (func (param i32) (result i64))) (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) (type $i32_f32_=>_i32 (func (param i32 f32) (result i32))) @@ -18,6 +19,7 @@ (type $i32_i64_i32_=>_i32 (func (param i32 i64 i32) (result i32))) (type $i32_f32_i64_=>_i32 (func (param i32 f32 i64) (result i32))) (type $i32_f64_i64_=>_i32 (func (param i32 f64 i64) (result i32))) + (type $i64_=>_i64 (func (param i64) (result i64))) (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) @@ -25,8 +27,8 @@ (type $i32_f32_f32_=>_i32 (func (param i32 f32 f32) (result i32))) (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) (type $i32_f64_f64_=>_i32 (func (param i32 f64 f64) (result i32))) - (type $i32_=>_i64 (func (param i32) (result i64))) - (type $i64_=>_i64 (func (param i64) (result i64))) + (type $f32_=>_i64 (func (param f32) (result i64))) + (type $f64_=>_i64 (func (param f64) (result i64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 12) "(\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00(\00\00\00a\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e\00") @@ -1807,56 +1809,77 @@ i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/hash32 (param $0 i32) (result i64) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) (local $1 i64) + (local $2 i32) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + i32.const 4 + i32.le_u + drop + local.get $0 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + local.set $2 + i64.const 1 + local.set $1 i64.const 0 i64.const 2870177450012600261 i64.add - i64.const 4 - i64.add - local.set $1 local.get $1 - local.get $0 + i64.add + local.set $3 + local.get $3 + local.get $2 i64.extend_i32_u i64.const -7046029288634856825 i64.mul i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 i64.const 23 i64.rotl i64.const -4417276706812531889 i64.mul i64.const 1609587929392839161 i64.add - local.set $1 - local.get $1 - local.get $1 + local.set $3 + local.get $3 + local.get $3 i64.const 33 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 i64.const -4417276706812531889 i64.mul - local.set $1 - local.get $1 - local.get $1 + local.set $3 + local.get $3 + local.get $3 i64.const 29 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 i64.const 1609587929392839161 i64.mul - local.set $1 - local.get $1 - local.get $1 + local.set $3 + local.get $3 + local.get $3 i64.const 32 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 + return ) (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) @@ -1914,30 +1937,10 @@ i32.const 0 ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 4 - i32.le_u - drop - local.get $2 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -2017,23 +2020,8 @@ local.get $10 i32.load offset=4 i32.store offset=4 - block $~lib/util/hash/HASH|inlined.2 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 4 - i32.le_u - drop - local.get $13 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -2115,42 +2103,23 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i64) + (local $3 i64) + (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/util/hash/HASH|inlined.1 (result i64) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 4 - i32.le_u - drop - local.get $3 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i32.store offset=4 else @@ -2187,8 +2156,8 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $3 - local.get $3 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=24 @@ -2200,11 +2169,11 @@ i32.const 12 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i32.store8 - local.get $5 + local.get $4 local.get $2 i32.store offset=4 local.get $0 @@ -2215,7 +2184,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -2224,14 +2193,14 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load i32.store offset=8 local.get $6 - local.get $5 + local.get $4 i32.store - local.get $3 + local.get $5 call $~lib/rt/pure/__release end local.get $0 @@ -2239,33 +2208,13 @@ ) (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 4 - i32.le_u - drop - local.get $2 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 384 @@ -2275,7 +2224,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=4 ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) @@ -4512,23 +4461,8 @@ local.get $10 i32.load8_s offset=1 i32.store8 offset=1 - block $~lib/util/hash/HASH|inlined.5 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 4 - i32.le_u - drop - local.get $13 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -4610,42 +4544,23 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i64) + (local $3 i64) + (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/util/hash/HASH|inlined.4 (result i64) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 4 - i32.le_u - drop - local.get $3 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.4 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i32.store8 offset=1 else @@ -4682,8 +4597,8 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $3 - local.get $3 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=24 @@ -4695,11 +4610,11 @@ i32.const 8 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i32.store8 - local.get $5 + local.get $4 local.get $2 i32.store8 offset=1 local.get $0 @@ -4710,7 +4625,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -4719,29 +4634,97 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load i32.store offset=4 local.get $6 - local.get $5 + local.get $4 i32.store - local.get $3 + local.get $5 call $~lib/rt/pure/__release end local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) + (local $2 i32) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 4 + i32.le_u + drop local.get $0 - i32.load + local.set $2 + i64.const 4 + local.set $1 + i64.const 0 + i64.const 2870177450012600261 + i64.add + local.get $1 + i64.add + local.set $3 + local.get $3 local.get $2 - local.get $0 - i64.load offset=8 - i64.and + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $3 + local.get $3 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $3 + local.get $3 + local.get $3 + i64.const 33 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const -4417276706812531889 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 29 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const 1609587929392839161 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 32 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + return + ) + (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load + local.get $2 + local.get $0 + i64.load offset=8 + i64.and i32.wrap_i64 i32.const 4 i32.mul @@ -4858,23 +4841,8 @@ local.get $10 i32.load offset=4 i32.store offset=4 - block $~lib/util/hash/HASH|inlined.1 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 4 - i32.le_u - drop - local.get $13 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -4956,38 +4924,23 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i64) + (local $3 i64) + (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/util/hash/HASH|inlined.0 (result i64) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 4 - i32.le_u - drop - local.get $3 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i32.store offset=4 else @@ -5024,8 +4977,8 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $3 - local.get $3 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=24 @@ -5037,11 +4990,11 @@ i32.const 12 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i32.store - local.get $5 + local.get $4 local.get $2 i32.store offset=4 local.get $0 @@ -5052,7 +5005,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -5061,14 +5014,14 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load i32.store offset=8 local.get $6 - local.get $5 + local.get $4 i32.store - local.get $3 + local.get $5 call $~lib/rt/pure/__release end local.get $0 @@ -5089,30 +5042,11 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 4 - i32.le_u - drop - local.get $2 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.6 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -5122,8 +5056,8 @@ drop i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=8 i32.const 1 i32.or @@ -5139,16 +5073,16 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=28 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -5168,7 +5102,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/map/Map#rehash end i32.const 1 @@ -5766,6 +5700,76 @@ i32.store offset=28 local.get $0 ) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) + (local $2 i32) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + i32.const 4 + i32.le_u + drop + local.get $0 + i32.const 255 + i32.and + local.set $2 + i64.const 1 + local.set $1 + i64.const 0 + i64.const 2870177450012600261 + i64.add + local.get $1 + i64.add + local.set $3 + local.get $3 + local.get $2 + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $3 + local.get $3 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $3 + local.get $3 + local.get $3 + i64.const 33 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const -4417276706812531889 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 29 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const 1609587929392839161 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 32 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + return + ) (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) @@ -5820,28 +5824,10 @@ i32.const 0 ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 4 - i32.le_u - drop - local.get $2 - i32.const 255 - i32.and - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -5921,23 +5907,8 @@ local.get $10 i32.load offset=4 i32.store offset=4 - block $~lib/util/hash/HASH|inlined.2 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 4 - i32.le_u - drop - local.get $13 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -6019,40 +5990,23 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i64) + (local $3 i64) + (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/util/hash/HASH|inlined.1 (result i64) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 4 - i32.le_u - drop - local.get $3 - i32.const 255 - i32.and - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i32.store offset=4 else @@ -6089,8 +6043,8 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $3 - local.get $3 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=24 @@ -6102,11 +6056,11 @@ i32.const 12 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i32.store8 - local.get $5 + local.get $4 local.get $2 i32.store offset=4 local.get $0 @@ -6117,7 +6071,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -6126,14 +6080,14 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load i32.store offset=8 local.get $6 - local.get $5 + local.get $4 i32.store - local.get $3 + local.get $5 call $~lib/rt/pure/__release end local.get $0 @@ -6141,31 +6095,13 @@ ) (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 4 - i32.le_u - drop - local.get $2 - i32.const 255 - i32.and - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 384 @@ -6175,7 +6111,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=4 ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) @@ -6656,23 +6592,8 @@ local.get $10 i32.load8_u offset=1 i32.store8 offset=1 - block $~lib/util/hash/HASH|inlined.5 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 4 - i32.le_u - drop - local.get $13 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -6754,40 +6675,23 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i64) + (local $3 i64) + (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/util/hash/HASH|inlined.4 (result i64) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 4 - i32.le_u - drop - local.get $3 - i32.const 255 - i32.and - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.4 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i32.store8 offset=1 else @@ -6824,8 +6728,8 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $3 - local.get $3 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=24 @@ -6837,11 +6741,11 @@ i32.const 8 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i32.store8 - local.get $5 + local.get $4 local.get $2 i32.store8 offset=1 local.get $0 @@ -6852,7 +6756,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -6861,14 +6765,14 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load i32.store offset=4 local.get $6 - local.get $5 + local.get $4 i32.store - local.get $3 + local.get $5 call $~lib/rt/pure/__release end local.get $0 @@ -6885,28 +6789,11 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 4 - i32.le_u - drop - local.get $2 - i32.const 255 - i32.and - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.6 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -6916,8 +6803,8 @@ drop i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=8 i32.const 1 i32.or @@ -6933,16 +6820,16 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=28 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -6962,7 +6849,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/map/Map#rehash end i32.const 1 @@ -7538,6 +7425,78 @@ i32.store offset=28 local.get $0 ) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) + (local $2 i32) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 2 + i32.const 4 + i32.le_u + drop + local.get $0 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + local.set $2 + i64.const 2 + local.set $1 + i64.const 0 + i64.const 2870177450012600261 + i64.add + local.get $1 + i64.add + local.set $3 + local.get $3 + local.get $2 + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $3 + local.get $3 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $3 + local.get $3 + local.get $3 + i64.const 33 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const -4417276706812531889 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 29 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const 1609587929392839161 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 32 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + return + ) (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) @@ -7594,30 +7553,10 @@ i32.const 0 ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 4 - i32.le_u - drop - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -7697,23 +7636,8 @@ local.get $10 i32.load offset=4 i32.store offset=4 - block $~lib/util/hash/HASH|inlined.2 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 4 - i32.le_u - drop - local.get $13 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -7795,42 +7719,23 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i64) + (local $3 i64) + (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/util/hash/HASH|inlined.1 (result i64) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop + local.get $1 + call $~lib/util/hash/HASH + local.set $3 + local.get $0 + local.get $1 + local.get $3 + call $~lib/map/Map#find + local.set $4 + local.get $4 + if i32.const 0 drop - i32.const 2 - i32.const 4 - i32.le_u - drop - local.get $3 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $4 - local.get $0 - local.get $1 - local.get $4 - call $~lib/map/Map#find - local.set $5 - local.get $5 - if - i32.const 0 - drop - local.get $5 + local.get $4 local.get $2 i32.store offset=4 else @@ -7867,8 +7772,8 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $3 - local.get $3 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=24 @@ -7880,11 +7785,11 @@ i32.const 12 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i32.store16 - local.get $5 + local.get $4 local.get $2 i32.store offset=4 local.get $0 @@ -7895,7 +7800,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -7904,14 +7809,14 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load i32.store offset=8 local.get $6 - local.get $5 + local.get $4 i32.store - local.get $3 + local.get $5 call $~lib/rt/pure/__release end local.get $0 @@ -7919,33 +7824,13 @@ ) (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 4 - i32.le_u - drop - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 384 @@ -7955,7 +7840,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=4 ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) @@ -8438,23 +8323,8 @@ local.get $10 i32.load16_s offset=2 i32.store16 offset=2 - block $~lib/util/hash/HASH|inlined.5 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 4 - i32.le_u - drop - local.get $13 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -8536,42 +8406,23 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i64) + (local $3 i64) + (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/util/hash/HASH|inlined.4 (result i64) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 4 - i32.le_u - drop - local.get $3 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.4 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i32.store16 offset=2 else @@ -8608,8 +8459,8 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $3 - local.get $3 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=24 @@ -8621,11 +8472,11 @@ i32.const 8 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i32.store16 - local.get $5 + local.get $4 local.get $2 i32.store16 offset=2 local.get $0 @@ -8636,7 +8487,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -8645,14 +8496,14 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load i32.store offset=4 local.get $6 - local.get $5 + local.get $4 i32.store - local.get $3 + local.get $5 call $~lib/rt/pure/__release end local.get $0 @@ -8669,30 +8520,11 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 4 - i32.le_u - drop - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.6 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -8702,8 +8534,8 @@ drop i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=8 i32.const 1 i32.or @@ -8719,16 +8551,16 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=28 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -8748,7 +8580,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/map/Map#rehash end i32.const 1 @@ -9346,6 +9178,76 @@ i32.store offset=28 local.get $0 ) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) + (local $2 i32) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 2 + i32.const 4 + i32.le_u + drop + local.get $0 + i32.const 65535 + i32.and + local.set $2 + i64.const 2 + local.set $1 + i64.const 0 + i64.const 2870177450012600261 + i64.add + local.get $1 + i64.add + local.set $3 + local.get $3 + local.get $2 + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $3 + local.get $3 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $3 + local.get $3 + local.get $3 + i64.const 33 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const -4417276706812531889 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 29 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const 1609587929392839161 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 32 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + return + ) (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) @@ -9400,28 +9302,10 @@ i32.const 0 ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 4 - i32.le_u - drop - local.get $2 - i32.const 65535 - i32.and - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -9501,23 +9385,8 @@ local.get $10 i32.load offset=4 i32.store offset=4 - block $~lib/util/hash/HASH|inlined.2 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 4 - i32.le_u - drop - local.get $13 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -9599,40 +9468,23 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i64) + (local $3 i64) + (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/util/hash/HASH|inlined.1 (result i64) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 4 - i32.le_u - drop - local.get $3 - i32.const 65535 - i32.and - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i32.store offset=4 else @@ -9669,8 +9521,8 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $3 - local.get $3 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=24 @@ -9682,11 +9534,11 @@ i32.const 12 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i32.store16 - local.get $5 + local.get $4 local.get $2 i32.store offset=4 local.get $0 @@ -9697,7 +9549,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -9706,14 +9558,14 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load i32.store offset=8 local.get $6 - local.get $5 + local.get $4 i32.store - local.get $3 + local.get $5 call $~lib/rt/pure/__release end local.get $0 @@ -9721,31 +9573,13 @@ ) (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 4 - i32.le_u - drop - local.get $2 - i32.const 65535 - i32.and - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 384 @@ -9755,7 +9589,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=4 ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) @@ -10236,23 +10070,8 @@ local.get $10 i32.load16_u offset=2 i32.store16 offset=2 - block $~lib/util/hash/HASH|inlined.5 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 4 - i32.le_u - drop - local.get $13 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -10334,40 +10153,23 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i64) + (local $3 i64) + (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/util/hash/HASH|inlined.4 (result i64) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 4 - i32.le_u - drop - local.get $3 - i32.const 65535 - i32.and - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.4 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i32.store16 offset=2 else @@ -10404,8 +10206,8 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $3 - local.get $3 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=24 @@ -10417,11 +10219,11 @@ i32.const 8 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i32.store16 - local.get $5 + local.get $4 local.get $2 i32.store16 offset=2 local.get $0 @@ -10432,7 +10234,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -10441,14 +10243,14 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load i32.store offset=4 local.get $6 - local.get $5 + local.get $4 i32.store - local.get $3 + local.get $5 call $~lib/rt/pure/__release end local.get $0 @@ -10465,28 +10267,11 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 4 - i32.le_u - drop - local.get $2 - i32.const 65535 - i32.and - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.6 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -10496,8 +10281,8 @@ drop i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=8 i32.const 1 i32.or @@ -10513,16 +10298,16 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=28 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -10542,7 +10327,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/map/Map#rehash end i32.const 1 @@ -11079,55 +10864,23 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.2 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 4 - i32.le_u - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne ) (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 4 - i32.le_u - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 384 @@ -11137,7 +10890,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=4 ) (func $~lib/map/Map#keys (param $0 i32) (result i32) @@ -11281,26 +11034,11 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.4 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 4 - i32.le_u - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.4 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -11310,8 +11048,8 @@ drop i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=8 i32.const 1 i32.or @@ -11327,16 +11065,16 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=28 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -11356,7 +11094,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/map/Map#rehash end i32.const 1 @@ -11908,16 +11646,84 @@ i32.store offset=28 local.get $0 ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) + (local $2 i32) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 4 + i32.le_u + drop local.get $0 - i32.load + local.set $2 + i64.const 4 + local.set $1 + i64.const 0 + i64.const 2870177450012600261 + i64.add + local.get $1 + i64.add + local.set $3 + local.get $3 local.get $2 - local.get $0 - i64.load offset=8 - i64.and + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $3 + local.get $3 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $3 + local.get $3 + local.get $3 + i64.const 33 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const -4417276706812531889 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 29 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const 1609587929392839161 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 32 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + return + ) + (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load + local.get $2 + local.get $0 + i64.load offset=8 + i64.and i32.wrap_i64 i32.const 4 i32.mul @@ -11960,26 +11766,10 @@ i32.const 0 ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 4 - i32.le_u - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -12059,23 +11849,8 @@ local.get $10 i32.load offset=4 i32.store offset=4 - block $~lib/util/hash/HASH|inlined.2 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 4 - i32.le_u - drop - local.get $13 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -12157,38 +11932,23 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i64) + (local $3 i64) + (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/util/hash/HASH|inlined.1 (result i64) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 4 - i32.le_u - drop - local.get $3 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i32.store offset=4 else @@ -12225,8 +11985,8 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $3 - local.get $3 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=24 @@ -12238,11 +11998,11 @@ i32.const 12 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i32.store - local.get $5 + local.get $4 local.get $2 i32.store offset=4 local.get $0 @@ -12253,7 +12013,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -12262,14 +12022,14 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load i32.store offset=8 local.get $6 - local.get $5 + local.get $4 i32.store - local.get $3 + local.get $5 call $~lib/rt/pure/__release end local.get $0 @@ -12277,29 +12037,13 @@ ) (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 4 - i32.le_u - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 384 @@ -12309,7 +12053,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=4 ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) @@ -12788,23 +12532,8 @@ local.get $10 i32.load offset=4 i32.store offset=4 - block $~lib/util/hash/HASH|inlined.5 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 4 - i32.le_u - drop - local.get $13 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -12886,38 +12615,23 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i64) + (local $3 i64) + (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/util/hash/HASH|inlined.4 (result i64) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 4 - i32.le_u - drop - local.get $3 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.4 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i32.store offset=4 else @@ -12954,8 +12668,8 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $3 - local.get $3 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=24 @@ -12967,11 +12681,11 @@ i32.const 12 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i32.store - local.get $5 + local.get $4 local.get $2 i32.store offset=4 local.get $0 @@ -12982,7 +12696,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -12991,14 +12705,14 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load i32.store offset=8 local.get $6 - local.get $5 + local.get $4 i32.store - local.get $3 + local.get $5 call $~lib/rt/pure/__release end local.get $0 @@ -13015,26 +12729,11 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 4 - i32.le_u - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.6 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -13044,8 +12743,8 @@ drop i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=8 i32.const 1 i32.or @@ -13061,16 +12760,16 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=28 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -13090,7 +12789,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/map/Map#rehash end i32.const 1 @@ -13642,16 +13341,33 @@ i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/hash64 (param $0 i64) (result i64) + (func $~lib/util/hash/HASH (param $0 i64) (result i64) (local $1 i64) + (local $2 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 8 + i32.const 4 + i32.le_u + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $0 + local.set $1 i64.const 0 i64.const 2870177450012600261 i64.add i64.const 8 i64.add - local.set $1 + local.set $2 + local.get $2 local.get $1 - local.get $0 i64.const -4417276706812531889 i64.mul i64.const 31 @@ -13659,42 +13375,43 @@ i64.const -7046029288634856825 i64.mul i64.xor - local.set $1 - local.get $1 + local.set $2 + local.get $2 i64.const 27 i64.rotl i64.const -7046029288634856825 i64.mul i64.const -8796714831421723037 i64.add - local.set $1 - local.get $1 - local.get $1 + local.set $2 + local.get $2 + local.get $2 i64.const 33 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $2 + local.get $2 i64.const -4417276706812531889 i64.mul - local.set $1 - local.get $1 - local.get $1 + local.set $2 + local.get $2 + local.get $2 i64.const 29 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $2 + local.get $2 i64.const 1609587929392839161 i64.mul - local.set $1 - local.get $1 - local.get $1 + local.set $2 + local.get $2 + local.get $2 i64.const 32 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $2 + local.get $2 + return ) (func $~lib/map/Map#find (param $0 i32) (param $1 i64) (param $2 i64) (result i32) (local $3 i32) @@ -13748,30 +13465,10 @@ i32.const 0 ) (func $~lib/map/Map#has (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 4 - i32.le_u - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -13788,9 +13485,8 @@ (local $10 i32) (local $11 i32) (local $12 i64) - (local $13 i64) + (local $13 i32) (local $14 i32) - (local $15 i32) local.get $1 i32.const 1 i32.add @@ -13852,43 +13548,24 @@ local.get $10 i32.load offset=8 i32.store offset=8 - block $~lib/util/hash/HASH|inlined.2 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 4 - i32.le_u - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and i32.wrap_i64 - local.set $14 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load i32.store offset=12 - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -13906,29 +13583,29 @@ local.get $0 local.tee $11 local.get $3 - local.tee $14 + local.tee $13 local.get $11 i32.load local.tee $9 i32.ne if - local.get $14 + local.get $13 call $~lib/rt/pure/__retain - local.set $14 + local.set $13 local.get $9 call $~lib/rt/pure/__release end - local.get $14 + local.get $13 i32.store local.get $0 local.get $1 i64.extend_i32_u i64.store offset=8 local.get $0 - local.tee $15 + local.tee $14 local.get $5 local.tee $9 - local.get $15 + local.get $14 i32.load offset=16 local.tee $11 i32.ne @@ -13955,42 +13632,22 @@ ) (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i64) - (local $4 i64) + (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/util/hash/HASH|inlined.1 (result i64) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 4 - i32.le_u - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i32.store offset=8 else @@ -14027,24 +13684,24 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $6 - local.get $6 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=24 - local.tee $7 + local.tee $6 i32.const 1 i32.add i32.store offset=24 - local.get $7 + local.get $6 i32.const 16 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i64.store - local.get $5 + local.get $4 local.get $2 i32.store offset=8 local.get $0 @@ -14055,7 +13712,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -14063,49 +13720,29 @@ i32.const 4 i32.mul i32.add - local.set $7 - local.get $5 - local.get $7 + local.set $6 + local.get $4 + local.get $6 i32.load i32.store offset=12 - local.get $7 - local.get $5 - i32.store local.get $6 + local.get $4 + i32.store + local.get $5 call $~lib/rt/pure/__release end local.get $0 call $~lib/rt/pure/__retain ) (func $~lib/map/Map#get (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) - (local $3 i32) + (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 4 - i32.le_u - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 384 @@ -14115,7 +13752,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=8 ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) @@ -14531,9 +14168,8 @@ (local $10 i32) (local $11 i32) (local $12 i64) - (local $13 i64) + (local $13 i32) (local $14 i32) - (local $15 i32) local.get $1 i32.const 1 i32.add @@ -14595,43 +14231,24 @@ local.get $10 i64.load offset=8 i64.store offset=8 - block $~lib/util/hash/HASH|inlined.5 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 4 - i32.le_u - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and i32.wrap_i64 - local.set $14 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load i32.store offset=16 - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -14649,29 +14266,29 @@ local.get $0 local.tee $11 local.get $3 - local.tee $14 + local.tee $13 local.get $11 i32.load local.tee $9 i32.ne if - local.get $14 + local.get $13 call $~lib/rt/pure/__retain - local.set $14 + local.set $13 local.get $9 call $~lib/rt/pure/__release end - local.get $14 + local.get $13 i32.store local.get $0 local.get $1 i64.extend_i32_u i64.store offset=8 local.get $0 - local.tee $15 + local.tee $14 local.get $5 local.tee $9 - local.get $15 + local.get $14 i32.load offset=16 local.tee $11 i32.ne @@ -14698,42 +14315,22 @@ ) (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i64) (result i32) (local $3 i64) - (local $4 i64) + (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/util/hash/HASH|inlined.4 (result i64) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 4 - i32.le_u - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.4 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i64.store offset=8 else @@ -14770,24 +14367,24 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $6 - local.get $6 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=24 - local.tee $7 + local.tee $6 i32.const 1 i32.add i32.store offset=24 - local.get $7 + local.get $6 i32.const 24 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i64.store - local.get $5 + local.get $4 local.get $2 i64.store offset=8 local.get $0 @@ -14798,7 +14395,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -14806,15 +14403,15 @@ i32.const 4 i32.mul i32.add - local.set $7 - local.get $5 - local.get $7 + local.set $6 + local.get $4 + local.get $6 i32.load i32.store offset=16 - local.get $7 - local.get $5 - i32.store local.get $6 + local.get $4 + i32.store + local.get $5 call $~lib/rt/pure/__release end local.get $0 @@ -14825,39 +14422,19 @@ i32.load offset=28 ) (func $~lib/map/Map#delete (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 4 - i32.le_u - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.6 - end - call $~lib/map/Map#find - local.set $3 - local.get $3 - i32.eqz - if + local.get $1 + call $~lib/util/hash/HASH + call $~lib/map/Map#find + local.set $2 + local.get $2 + i32.eqz + if i32.const 0 return end @@ -14865,8 +14442,8 @@ drop i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=12 i32.const 1 i32.or @@ -14882,17 +14459,17 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $5 + local.tee $4 local.get $0 i32.load offset=28 - local.tee $6 + local.tee $5 + local.get $4 local.get $5 - local.get $6 i32.gt_u select i32.ge_u @@ -14911,7 +14488,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/map/Map#rehash end i32.const 1 @@ -15471,6 +15048,78 @@ i32.store offset=28 local.get $0 ) + (func $~lib/util/hash/HASH (param $0 i64) (result i64) + (local $1 i64) + (local $2 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 8 + i32.const 4 + i32.le_u + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $0 + local.set $1 + i64.const 0 + i64.const 2870177450012600261 + i64.add + i64.const 8 + i64.add + local.set $2 + local.get $2 + local.get $1 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $2 + local.get $2 + i64.const 27 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $2 + local.get $2 + local.get $2 + i64.const 33 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + i64.const -4417276706812531889 + i64.mul + local.set $2 + local.get $2 + local.get $2 + i64.const 29 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + i64.const 1609587929392839161 + i64.mul + local.set $2 + local.get $2 + local.get $2 + i64.const 32 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + return + ) (func $~lib/map/Map#find (param $0 i32) (param $1 i64) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) @@ -15523,30 +15172,10 @@ i32.const 0 ) (func $~lib/map/Map#has (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 4 - i32.le_u - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -15563,9 +15192,8 @@ (local $10 i32) (local $11 i32) (local $12 i64) - (local $13 i64) + (local $13 i32) (local $14 i32) - (local $15 i32) local.get $1 i32.const 1 i32.add @@ -15627,43 +15255,24 @@ local.get $10 i32.load offset=8 i32.store offset=8 - block $~lib/util/hash/HASH|inlined.2 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 4 - i32.le_u - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and i32.wrap_i64 - local.set $14 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load i32.store offset=12 - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -15681,29 +15290,29 @@ local.get $0 local.tee $11 local.get $3 - local.tee $14 + local.tee $13 local.get $11 i32.load local.tee $9 i32.ne if - local.get $14 + local.get $13 call $~lib/rt/pure/__retain - local.set $14 + local.set $13 local.get $9 call $~lib/rt/pure/__release end - local.get $14 + local.get $13 i32.store local.get $0 local.get $1 i64.extend_i32_u i64.store offset=8 local.get $0 - local.tee $15 + local.tee $14 local.get $5 local.tee $9 - local.get $15 + local.get $14 i32.load offset=16 local.tee $11 i32.ne @@ -15730,42 +15339,22 @@ ) (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i64) - (local $4 i64) + (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/util/hash/HASH|inlined.1 (result i64) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 4 - i32.le_u - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i32.store offset=8 else @@ -15802,24 +15391,24 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $6 - local.get $6 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=24 - local.tee $7 + local.tee $6 i32.const 1 i32.add i32.store offset=24 - local.get $7 + local.get $6 i32.const 16 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i64.store - local.get $5 + local.get $4 local.get $2 i32.store offset=8 local.get $0 @@ -15830,7 +15419,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -15838,49 +15427,29 @@ i32.const 4 i32.mul i32.add - local.set $7 - local.get $5 - local.get $7 + local.set $6 + local.get $4 + local.get $6 i32.load i32.store offset=12 - local.get $7 - local.get $5 - i32.store local.get $6 + local.get $4 + i32.store + local.get $5 call $~lib/rt/pure/__release end local.get $0 call $~lib/rt/pure/__retain ) (func $~lib/map/Map#get (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) - (local $3 i32) + (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 4 - i32.le_u - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 384 @@ -15890,7 +15459,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=8 ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) @@ -16306,9 +15875,8 @@ (local $10 i32) (local $11 i32) (local $12 i64) - (local $13 i64) + (local $13 i32) (local $14 i32) - (local $15 i32) local.get $1 i32.const 1 i32.add @@ -16370,43 +15938,24 @@ local.get $10 i64.load offset=8 i64.store offset=8 - block $~lib/util/hash/HASH|inlined.5 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 4 - i32.le_u - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and i32.wrap_i64 - local.set $14 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load i32.store offset=16 - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -16424,29 +15973,29 @@ local.get $0 local.tee $11 local.get $3 - local.tee $14 + local.tee $13 local.get $11 i32.load local.tee $9 i32.ne if - local.get $14 + local.get $13 call $~lib/rt/pure/__retain - local.set $14 + local.set $13 local.get $9 call $~lib/rt/pure/__release end - local.get $14 + local.get $13 i32.store local.get $0 local.get $1 i64.extend_i32_u i64.store offset=8 local.get $0 - local.tee $15 + local.tee $14 local.get $5 local.tee $9 - local.get $15 + local.get $14 i32.load offset=16 local.tee $11 i32.ne @@ -16473,42 +16022,22 @@ ) (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i64) (result i32) (local $3 i64) - (local $4 i64) + (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/util/hash/HASH|inlined.4 (result i64) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 4 - i32.le_u - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.4 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i64.store offset=8 else @@ -16545,24 +16074,24 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $6 - local.get $6 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=24 - local.tee $7 + local.tee $6 i32.const 1 i32.add i32.store offset=24 - local.get $7 + local.get $6 i32.const 24 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i64.store - local.get $5 + local.get $4 local.get $2 i64.store offset=8 local.get $0 @@ -16573,7 +16102,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -16581,15 +16110,15 @@ i32.const 4 i32.mul i32.add - local.set $7 - local.get $5 - local.get $7 + local.set $6 + local.get $4 + local.get $6 i32.load i32.store offset=16 - local.get $7 - local.get $5 - i32.store local.get $6 + local.get $4 + i32.store + local.get $5 call $~lib/rt/pure/__release end local.get $0 @@ -16600,37 +16129,17 @@ i32.load offset=28 ) (func $~lib/map/Map#delete (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 4 - i32.le_u - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.6 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -16640,8 +16149,8 @@ drop i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=12 i32.const 1 i32.or @@ -16657,17 +16166,17 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $5 + local.tee $4 local.get $0 i32.load offset=28 - local.tee $6 + local.tee $5 + local.get $4 local.get $5 - local.get $6 i32.gt_u select i32.ge_u @@ -16686,7 +16195,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/map/Map#rehash end i32.const 1 @@ -17246,6 +16755,75 @@ i32.store offset=28 local.get $0 ) + (func $~lib/util/hash/HASH (param $0 f32) (result i64) + (local $1 i32) + (local $2 i64) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $0 + i32.reinterpret_f32 + local.set $1 + i64.const 4 + local.set $2 + i64.const 0 + i64.const 2870177450012600261 + i64.add + local.get $2 + i64.add + local.set $3 + local.get $3 + local.get $1 + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $3 + local.get $3 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $3 + local.get $3 + local.get $3 + i64.const 33 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const -4417276706812531889 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 29 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const 1609587929392839161 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 32 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + return + ) (func $~lib/map/Map#find (param $0 i32) (param $1 f32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) @@ -17298,27 +16876,10 @@ i32.const 0 ) (func $~lib/map/Map#has (param $0 i32) (param $1 f32) (result i32) - (local $2 f32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -17335,9 +16896,8 @@ (local $10 i32) (local $11 i32) (local $12 f32) - (local $13 f32) + (local $13 i32) (local $14 i32) - (local $15 i32) local.get $1 i32.const 1 i32.add @@ -17399,40 +16959,24 @@ local.get $10 i32.load offset=4 i32.store offset=4 - block $~lib/util/hash/HASH|inlined.2 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $13 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and i32.wrap_i64 - local.set $14 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load i32.store offset=8 - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -17450,29 +16994,29 @@ local.get $0 local.tee $11 local.get $3 - local.tee $14 + local.tee $13 local.get $11 i32.load local.tee $9 i32.ne if - local.get $14 + local.get $13 call $~lib/rt/pure/__retain - local.set $14 + local.set $13 local.get $9 call $~lib/rt/pure/__release end - local.get $14 + local.get $13 i32.store local.get $0 local.get $1 i64.extend_i32_u i64.store offset=8 local.get $0 - local.tee $15 + local.tee $14 local.get $5 local.tee $9 - local.get $15 + local.get $14 i32.load offset=16 local.tee $11 i32.ne @@ -17498,40 +17042,23 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 f32) (param $2 i32) (result i32) - (local $3 f32) - (local $4 i64) + (local $3 i64) + (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/util/hash/HASH|inlined.1 (result i64) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $3 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i32.store offset=4 else @@ -17568,24 +17095,24 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $6 - local.get $6 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=24 - local.tee $7 + local.tee $6 i32.const 1 i32.add i32.store offset=24 - local.get $7 + local.get $6 i32.const 12 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 f32.store - local.get $5 + local.get $4 local.get $2 i32.store offset=4 local.get $0 @@ -17596,7 +17123,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -17604,46 +17131,29 @@ i32.const 4 i32.mul i32.add - local.set $7 - local.get $5 - local.get $7 - i32.load - i32.store offset=8 - local.get $7 - local.get $5 - i32.store + local.set $6 + local.get $4 + local.get $6 + i32.load + i32.store offset=8 local.get $6 + local.get $4 + i32.store + local.get $5 call $~lib/rt/pure/__release end local.get $0 call $~lib/rt/pure/__retain ) (func $~lib/map/Map#get (param $0 i32) (param $1 f32) (result i32) - (local $2 f32) - (local $3 i32) + (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 384 @@ -17653,7 +17163,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=4 ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) @@ -18069,9 +17579,8 @@ (local $10 i32) (local $11 i32) (local $12 f32) - (local $13 f32) + (local $13 i32) (local $14 i32) - (local $15 i32) local.get $1 i32.const 1 i32.add @@ -18133,40 +17642,24 @@ local.get $10 f32.load offset=4 f32.store offset=4 - block $~lib/util/hash/HASH|inlined.5 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $13 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and i32.wrap_i64 - local.set $14 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load i32.store offset=8 - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -18184,29 +17677,29 @@ local.get $0 local.tee $11 local.get $3 - local.tee $14 + local.tee $13 local.get $11 i32.load local.tee $9 i32.ne if - local.get $14 + local.get $13 call $~lib/rt/pure/__retain - local.set $14 + local.set $13 local.get $9 call $~lib/rt/pure/__release end - local.get $14 + local.get $13 i32.store local.get $0 local.get $1 i64.extend_i32_u i64.store offset=8 local.get $0 - local.tee $15 + local.tee $14 local.get $5 local.tee $9 - local.get $15 + local.get $14 i32.load offset=16 local.tee $11 i32.ne @@ -18232,40 +17725,23 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 f32) (param $2 f32) (result i32) - (local $3 f32) - (local $4 i64) + (local $3 i64) + (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/util/hash/HASH|inlined.4 (result i64) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $3 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.4 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 f32.store offset=4 else @@ -18302,24 +17778,24 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $6 - local.get $6 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=24 - local.tee $7 + local.tee $6 i32.const 1 i32.add i32.store offset=24 - local.get $7 + local.get $6 i32.const 12 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 f32.store - local.get $5 + local.get $4 local.get $2 f32.store offset=4 local.get $0 @@ -18330,7 +17806,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -18338,15 +17814,15 @@ i32.const 4 i32.mul i32.add - local.set $7 - local.get $5 - local.get $7 + local.set $6 + local.get $4 + local.get $6 i32.load i32.store offset=8 - local.get $7 - local.get $5 - i32.store local.get $6 + local.get $4 + i32.store + local.get $5 call $~lib/rt/pure/__release end local.get $0 @@ -18357,34 +17833,17 @@ i32.load offset=28 ) (func $~lib/map/Map#delete (param $0 i32) (param $1 f32) (result i32) - (local $2 f32) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.6 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -18394,8 +17853,8 @@ drop i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=8 i32.const 1 i32.or @@ -18411,17 +17870,17 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $5 + local.tee $4 local.get $0 i32.load offset=28 - local.tee $6 + local.tee $5 + local.get $4 local.get $5 - local.get $6 i32.gt_u select i32.ge_u @@ -18440,7 +17899,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/map/Map#rehash end i32.const 1 @@ -19000,6 +18459,79 @@ i32.store offset=28 local.get $0 ) + (func $~lib/util/hash/HASH (param $0 f64) (result i64) + (local $1 i64) + (local $2 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $0 + i64.reinterpret_f64 + local.set $1 + i64.const 0 + i64.const 2870177450012600261 + i64.add + i64.const 8 + i64.add + local.set $2 + local.get $2 + local.get $1 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $2 + local.get $2 + i64.const 27 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $2 + local.get $2 + local.get $2 + i64.const 33 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + i64.const -4417276706812531889 + i64.mul + local.set $2 + local.get $2 + local.get $2 + i64.const 29 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + i64.const 1609587929392839161 + i64.mul + local.set $2 + local.get $2 + local.get $2 + i64.const 32 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + return + ) (func $~lib/map/Map#find (param $0 i32) (param $1 f64) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) @@ -19052,31 +18584,10 @@ i32.const 0 ) (func $~lib/map/Map#has (param $0 i32) (param $1 f64) (result i32) - (local $2 f64) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -19093,9 +18604,8 @@ (local $10 i32) (local $11 i32) (local $12 f64) - (local $13 f64) + (local $13 i32) (local $14 i32) - (local $15 i32) local.get $1 i32.const 1 i32.add @@ -19157,44 +18667,24 @@ local.get $10 i32.load offset=8 i32.store offset=8 - block $~lib/util/hash/HASH|inlined.2 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $13 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and i32.wrap_i64 - local.set $14 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load i32.store offset=12 - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -19212,29 +18702,29 @@ local.get $0 local.tee $11 local.get $3 - local.tee $14 + local.tee $13 local.get $11 i32.load local.tee $9 i32.ne if - local.get $14 + local.get $13 call $~lib/rt/pure/__retain - local.set $14 + local.set $13 local.get $9 call $~lib/rt/pure/__release end - local.get $14 + local.get $13 i32.store local.get $0 local.get $1 i64.extend_i32_u i64.store offset=8 local.get $0 - local.tee $15 + local.tee $14 local.get $5 local.tee $9 - local.get $15 + local.get $14 i32.load offset=16 local.tee $11 i32.ne @@ -19260,44 +18750,23 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 f64) (param $2 i32) (result i32) - (local $3 f64) - (local $4 i64) + (local $3 i64) + (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/util/hash/HASH|inlined.1 (result i64) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i32.store offset=8 else @@ -19334,24 +18803,24 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $6 - local.get $6 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=24 - local.tee $7 + local.tee $6 i32.const 1 i32.add i32.store offset=24 - local.get $7 + local.get $6 i32.const 16 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 f64.store - local.get $5 + local.get $4 local.get $2 i32.store offset=8 local.get $0 @@ -19362,7 +18831,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -19370,50 +18839,29 @@ i32.const 4 i32.mul i32.add - local.set $7 - local.get $5 - local.get $7 + local.set $6 + local.get $4 + local.get $6 i32.load i32.store offset=12 - local.get $7 - local.get $5 - i32.store local.get $6 + local.get $4 + i32.store + local.get $5 call $~lib/rt/pure/__release end local.get $0 call $~lib/rt/pure/__retain ) (func $~lib/map/Map#get (param $0 i32) (param $1 f64) (result i32) - (local $2 f64) - (local $3 i32) + (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 384 @@ -19423,7 +18871,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=8 ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) @@ -19839,9 +19287,8 @@ (local $10 i32) (local $11 i32) (local $12 f64) - (local $13 f64) + (local $13 i32) (local $14 i32) - (local $15 i32) local.get $1 i32.const 1 i32.add @@ -19903,44 +19350,24 @@ local.get $10 f64.load offset=8 f64.store offset=8 - block $~lib/util/hash/HASH|inlined.5 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $13 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and i32.wrap_i64 - local.set $14 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load i32.store offset=16 - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -19958,29 +19385,29 @@ local.get $0 local.tee $11 local.get $3 - local.tee $14 + local.tee $13 local.get $11 i32.load local.tee $9 i32.ne if - local.get $14 + local.get $13 call $~lib/rt/pure/__retain - local.set $14 + local.set $13 local.get $9 call $~lib/rt/pure/__release end - local.get $14 + local.get $13 i32.store local.get $0 local.get $1 i64.extend_i32_u i64.store offset=8 local.get $0 - local.tee $15 + local.tee $14 local.get $5 local.tee $9 - local.get $15 + local.get $14 i32.load offset=16 local.tee $11 i32.ne @@ -20006,44 +19433,23 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 f64) (param $2 f64) (result i32) - (local $3 f64) - (local $4 i64) + (local $3 i64) + (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/util/hash/HASH|inlined.4 (result i64) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.4 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 f64.store offset=8 else @@ -20080,24 +19486,24 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $6 - local.get $6 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=24 - local.tee $7 + local.tee $6 i32.const 1 i32.add i32.store offset=24 - local.get $7 + local.get $6 i32.const 24 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 f64.store - local.get $5 + local.get $4 local.get $2 f64.store offset=8 local.get $0 @@ -20108,7 +19514,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -20116,15 +19522,15 @@ i32.const 4 i32.mul i32.add - local.set $7 - local.get $5 - local.get $7 + local.set $6 + local.get $4 + local.get $6 i32.load i32.store offset=16 - local.get $7 - local.get $5 - i32.store local.get $6 + local.get $4 + i32.store + local.get $5 call $~lib/rt/pure/__release end local.get $0 @@ -20135,38 +19541,17 @@ i32.load offset=28 ) (func $~lib/map/Map#delete (param $0 i32) (param $1 f64) (result i32) - (local $2 f64) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.6 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -20176,8 +19561,8 @@ drop i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=12 i32.const 1 i32.or @@ -20193,17 +19578,17 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $5 + local.tee $4 local.get $0 i32.load offset=28 - local.tee $6 + local.tee $5 + local.get $4 local.get $5 - local.get $6 i32.gt_u select i32.ge_u @@ -20222,7 +19607,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/map/Map#rehash end i32.const 1 diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index a11d72a0c8..677356ad55 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -6,6 +6,7 @@ (type $none_=>_i32 (func (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_none (func (param i32))) + (type $i32_=>_i64 (func (param i32) (result i64))) (type $i32_i32_i64_=>_i32 (func (param i32 i32 i64) (result i32))) (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) (type $i32_f32_=>_i32 (func (param i32 f32) (result i32))) @@ -19,9 +20,10 @@ (type $i32_i64_i64_=>_i32 (func (param i32 i64 i64) (result i32))) (type $i32_f32_i64_=>_i32 (func (param i32 f32 i64) (result i32))) (type $i32_f64_i64_=>_i32 (func (param i32 f64 i64) (result i32))) - (type $i32_=>_i64 (func (param i32) (result i64))) (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) (type $i64_=>_i64 (func (param i64) (result i64))) + (type $f32_=>_i64 (func (param f32) (result i64))) + (type $f64_=>_i64 (func (param f64) (result i64))) (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -1317,13 +1319,17 @@ i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/hash32 (param $0 i32) (result i64) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) (local $1 i64) local.get $0 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s i64.extend_i32_u i64.const -7046029288634856825 i64.mul - i64.const 2870177450012600265 + i64.const 2870177450012600262 i64.xor i64.const 23 i64.rotl @@ -1400,11 +1406,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -1466,7 +1468,7 @@ local.get $2 local.get $5 local.get $4 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -1547,11 +1549,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.tee $3 call $~lib/set/Set#find i32.eqz @@ -2235,11 +2233,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/set/Set#find local.tee $1 i32.eqz @@ -2672,13 +2666,47 @@ i32.store offset=28 local.get $0 ) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) + local.get $0 + i32.const 255 + i32.and + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.const 2870177450012600262 + i64.xor + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.tee $1 + local.get $1 + i64.const 33 + i64.shr_u + i64.xor + i64.const -4417276706812531889 + i64.mul + local.tee $1 + local.get $1 + i64.const 29 + i64.shr_u + i64.xor + i64.const 1609587929392839161 + i64.mul + local.tee $1 + local.get $1 + i64.const 32 + i64.shr_u + i64.xor + ) (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 - i32.const 255 - i32.and - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -2740,7 +2768,7 @@ local.get $2 local.get $5 local.get $4 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -2821,9 +2849,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 255 - i32.and - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.tee $3 call $~lib/set/Set#find i32.eqz @@ -3038,9 +3064,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 255 - i32.and - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/set/Set#find local.tee $1 i32.eqz @@ -3432,6 +3456,44 @@ i32.store offset=28 local.get $0 ) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) + local.get $0 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.const 2870177450012600263 + i64.xor + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.tee $1 + local.get $1 + i64.const 33 + i64.shr_u + i64.xor + i64.const -4417276706812531889 + i64.mul + local.tee $1 + local.get $1 + i64.const 29 + i64.shr_u + i64.xor + i64.const 1609587929392839161 + i64.mul + local.tee $1 + local.get $1 + i64.const 32 + i64.shr_u + i64.xor + ) (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) local.get $0 @@ -3481,11 +3543,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -3547,7 +3605,7 @@ local.get $2 local.get $5 local.get $4 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -3628,11 +3686,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.tee $3 call $~lib/set/Set#find i32.eqz @@ -3903,11 +3957,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/set/Set#find local.tee $1 i32.eqz @@ -4307,13 +4357,47 @@ i32.store offset=28 local.get $0 ) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) + local.get $0 + i32.const 65535 + i32.and + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.const 2870177450012600263 + i64.xor + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.tee $1 + local.get $1 + i64.const 33 + i64.shr_u + i64.xor + i64.const -4417276706812531889 + i64.mul + local.tee $1 + local.get $1 + i64.const 29 + i64.shr_u + i64.xor + i64.const 1609587929392839161 + i64.mul + local.tee $1 + local.get $1 + i64.const 32 + i64.shr_u + i64.xor + ) (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 - i32.const 65535 - i32.and - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -4375,7 +4459,7 @@ local.get $2 local.get $5 local.get $4 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -4456,9 +4540,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 65535 - i32.and - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.tee $3 call $~lib/set/Set#find i32.eqz @@ -4679,9 +4761,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 65535 - i32.and - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/set/Set#find local.tee $1 i32.eqz @@ -5073,6 +5153,40 @@ i32.store offset=28 local.get $0 ) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) + local.get $0 + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.const 2870177450012600265 + i64.xor + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.tee $1 + local.get $1 + i64.const 33 + i64.shr_u + i64.xor + i64.const -4417276706812531889 + i64.mul + local.tee $1 + local.get $1 + i64.const 29 + i64.shr_u + i64.xor + i64.const 1609587929392839161 + i64.mul + local.tee $1 + local.get $1 + i64.const 32 + i64.shr_u + i64.xor + ) (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) local.get $0 @@ -5120,7 +5234,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -5182,7 +5296,7 @@ local.get $2 local.get $5 local.get $4 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -5263,7 +5377,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.tee $3 call $~lib/set/Set#find i32.eqz @@ -5534,7 +5648,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/set/Set#find local.tee $1 i32.eqz @@ -6364,7 +6478,7 @@ i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/hash64 (param $0 i64) (result i64) + (func $~lib/util/hash/HASH (param $0 i64) (result i64) local.get $0 i64.const -4417276706812531889 i64.mul @@ -6447,7 +6561,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -6510,7 +6624,7 @@ local.get $2 local.get $6 local.get $9 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -6591,7 +6705,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.tee $4 call $~lib/set/Set#find i32.eqz @@ -6863,7 +6977,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH call $~lib/set/Set#find local.tee $2 i32.eqz @@ -7728,6 +7842,41 @@ i32.store offset=28 local.get $0 ) + (func $~lib/util/hash/HASH (param $0 f32) (result i64) + (local $1 i64) + local.get $0 + i32.reinterpret_f32 + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.const 2870177450012600265 + i64.xor + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.tee $1 + local.get $1 + i64.const 33 + i64.shr_u + i64.xor + i64.const -4417276706812531889 + i64.mul + local.tee $1 + local.get $1 + i64.const 29 + i64.shr_u + i64.xor + i64.const 1609587929392839161 + i64.mul + local.tee $1 + local.get $1 + i64.const 32 + i64.shr_u + i64.xor + ) (func $~lib/set/Set#find (param $0 i32) (param $1 f32) (param $2 i64) (result i32) (local $3 i32) local.get $0 @@ -7775,8 +7924,7 @@ local.get $0 local.get $1 local.get $1 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -7839,8 +7987,7 @@ local.get $2 local.get $6 local.get $9 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -7921,8 +8068,7 @@ local.get $0 local.get $1 local.get $1 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.tee $4 call $~lib/set/Set#find i32.eqz @@ -8178,8 +8324,7 @@ local.get $0 local.get $1 local.get $1 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/set/Set#find local.tee $2 i32.eqz @@ -8564,6 +8709,44 @@ i32.store offset=28 local.get $0 ) + (func $~lib/util/hash/HASH (param $0 f64) (result i64) + (local $1 i64) + local.get $0 + i64.reinterpret_f64 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const 2870177450012600269 + i64.xor + i64.const 27 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.tee $1 + local.get $1 + i64.const 33 + i64.shr_u + i64.xor + i64.const -4417276706812531889 + i64.mul + local.tee $1 + local.get $1 + i64.const 29 + i64.shr_u + i64.xor + i64.const 1609587929392839161 + i64.mul + local.tee $1 + local.get $1 + i64.const 32 + i64.shr_u + i64.xor + ) (func $~lib/set/Set#find (param $0 i32) (param $1 f64) (param $2 i64) (result i32) (local $3 i32) local.get $0 @@ -8611,8 +8794,7 @@ local.get $0 local.get $1 local.get $1 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -8675,8 +8857,7 @@ local.get $2 local.get $6 local.get $9 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -8757,8 +8938,7 @@ local.get $0 local.get $1 local.get $1 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.tee $4 call $~lib/set/Set#find i32.eqz @@ -9014,8 +9194,7 @@ local.get $0 local.get $1 local.get $1 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH call $~lib/set/Set#find local.tee $2 i32.eqz diff --git a/tests/compiler/std/set.untouched.wat b/tests/compiler/std/set.untouched.wat index b932743dab..ca6387fe9c 100644 --- a/tests/compiler/std/set.untouched.wat +++ b/tests/compiler/std/set.untouched.wat @@ -7,6 +7,7 @@ (type $none_=>_none (func)) (type $i32_i32_i64_=>_i32 (func (param i32 i32 i64) (result i32))) (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) + (type $i32_=>_i64 (func (param i32) (result i64))) (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) @@ -15,13 +16,14 @@ (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) (type $i32_i32_f64_=>_none (func (param i32 i32 f64))) (type $i32_i64_i64_=>_i32 (func (param i32 i64 i64) (result i32))) + (type $i64_=>_i64 (func (param i64) (result i64))) (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_f32_i64_=>_i32 (func (param i32 f32 i64) (result i32))) (type $i32_f64_i64_=>_i32 (func (param i32 f64 i64) (result i32))) - (type $i32_=>_i64 (func (param i32) (result i64))) - (type $i64_=>_i64 (func (param i64) (result i64))) + (type $f32_=>_i64 (func (param f32) (result i64))) + (type $f64_=>_i64 (func (param f64) (result i64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 12) "(\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00(\00\00\00a\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e\00") @@ -1800,56 +1802,77 @@ i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/hash32 (param $0 i32) (result i64) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) (local $1 i64) + (local $2 i32) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + i32.const 4 + i32.le_u + drop + local.get $0 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + local.set $2 + i64.const 1 + local.set $1 i64.const 0 i64.const 2870177450012600261 i64.add - i64.const 4 - i64.add - local.set $1 local.get $1 - local.get $0 + i64.add + local.set $3 + local.get $3 + local.get $2 i64.extend_i32_u i64.const -7046029288634856825 i64.mul i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 i64.const 23 i64.rotl i64.const -4417276706812531889 i64.mul i64.const 1609587929392839161 i64.add - local.set $1 - local.get $1 - local.get $1 + local.set $3 + local.get $3 + local.get $3 i64.const 33 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 i64.const -4417276706812531889 i64.mul - local.set $1 - local.get $1 - local.get $1 + local.set $3 + local.get $3 + local.get $3 i64.const 29 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 i64.const 1609587929392839161 i64.mul - local.set $1 - local.get $1 - local.get $1 + local.set $3 + local.get $3 + local.get $3 i64.const 32 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 + return ) (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) @@ -1907,30 +1930,10 @@ i32.const 0 ) (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 4 - i32.le_u - drop - local.get $2 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -1947,8 +1950,8 @@ (local $10 i32) (local $11 i32) (local $12 i32) - (local $13 i32) - (local $14 i64) + (local $13 i64) + (local $14 i32) local.get $1 i32.const 1 i32.add @@ -2006,39 +2009,24 @@ local.get $11 local.get $12 i32.store8 - block $~lib/util/hash/HASH|inlined.2 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 4 - i32.le_u - drop - local.get $13 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and - local.set $14 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.wrap_i64 i32.const 4 i32.mul i32.add - local.set $13 + local.set $14 local.get $11 - local.get $13 + local.get $14 i32.load i32.store offset=4 - local.get $13 + local.get $14 local.get $8 i32.store local.get $8 @@ -2075,10 +2063,10 @@ i64.extend_i32_u i64.store offset=8 local.get $0 - local.tee $13 + local.tee $14 local.get $5 local.tee $9 - local.get $13 + local.get $14 i32.load offset=16 local.tee $11 i32.ne @@ -2104,37 +2092,18 @@ call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i64) + (local $2 i64) + (local $3 i32) (local $4 i32) - block $~lib/util/hash/HASH|inlined.1 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 4 - i32.le_u - drop - local.get $2 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 + local.get $1 + call $~lib/util/hash/HASH + local.set $2 local.get $0 local.get $1 - local.get $3 + local.get $2 call $~lib/set/Set#find - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if local.get $0 @@ -2172,16 +2141,16 @@ local.get $0 local.get $0 i32.load offset=24 - local.tee $2 + local.tee $4 i32.const 1 i32.add i32.store offset=24 - local.get $2 + local.get $4 i32.const 8 i32.mul i32.add - local.set $4 - local.get $4 + local.set $3 + local.get $3 local.get $1 i32.store8 local.get $0 @@ -2192,7 +2161,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $3 + local.get $2 local.get $0 i64.load offset=8 i64.and @@ -2200,13 +2169,13 @@ i32.const 4 i32.mul i32.add - local.set $2 + local.set $4 + local.get $3 local.get $4 - local.get $2 i32.load i32.store offset=4 - local.get $2 local.get $4 + local.get $3 i32.store end local.get $0 @@ -4006,30 +3975,11 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 4 - i32.le_u - drop - local.get $2 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -4037,8 +3987,8 @@ end i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=4 i32.const 1 i32.or @@ -4054,16 +4004,16 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=28 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -4083,7 +4033,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/set/Set#rehash end i32.const 1 @@ -4528,6 +4478,76 @@ i32.store offset=28 local.get $0 ) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) + (local $2 i32) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + i32.const 4 + i32.le_u + drop + local.get $0 + i32.const 255 + i32.and + local.set $2 + i64.const 1 + local.set $1 + i64.const 0 + i64.const 2870177450012600261 + i64.add + local.get $1 + i64.add + local.set $3 + local.get $3 + local.get $2 + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $3 + local.get $3 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $3 + local.get $3 + local.get $3 + i64.const 33 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const -4417276706812531889 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 29 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const 1609587929392839161 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 32 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + return + ) (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) @@ -4582,28 +4602,10 @@ i32.const 0 ) (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 4 - i32.le_u - drop - local.get $2 - i32.const 255 - i32.and - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -4620,8 +4622,8 @@ (local $10 i32) (local $11 i32) (local $12 i32) - (local $13 i32) - (local $14 i64) + (local $13 i64) + (local $14 i32) local.get $1 i32.const 1 i32.add @@ -4679,39 +4681,24 @@ local.get $11 local.get $12 i32.store8 - block $~lib/util/hash/HASH|inlined.2 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 4 - i32.le_u - drop - local.get $13 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and - local.set $14 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.wrap_i64 i32.const 4 i32.mul i32.add - local.set $13 + local.set $14 local.get $11 - local.get $13 + local.get $14 i32.load i32.store offset=4 - local.get $13 + local.get $14 local.get $8 i32.store local.get $8 @@ -4748,10 +4735,10 @@ i64.extend_i32_u i64.store offset=8 local.get $0 - local.tee $13 + local.tee $14 local.get $5 local.tee $9 - local.get $13 + local.get $14 i32.load offset=16 local.tee $11 i32.ne @@ -4777,35 +4764,18 @@ call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i64) + (local $2 i64) + (local $3 i32) (local $4 i32) - block $~lib/util/hash/HASH|inlined.1 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 4 - i32.le_u - drop - local.get $2 - i32.const 255 - i32.and - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 + local.get $1 + call $~lib/util/hash/HASH + local.set $2 local.get $0 local.get $1 - local.get $3 + local.get $2 call $~lib/set/Set#find - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if local.get $0 @@ -4843,16 +4813,16 @@ local.get $0 local.get $0 i32.load offset=24 - local.tee $2 + local.tee $4 i32.const 1 i32.add i32.store offset=24 - local.get $2 + local.get $4 i32.const 8 i32.mul i32.add - local.set $4 - local.get $4 + local.set $3 + local.get $3 local.get $1 i32.store8 local.get $0 @@ -4863,7 +4833,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $3 + local.get $2 local.get $0 i64.load offset=8 i64.and @@ -4871,13 +4841,13 @@ i32.const 4 i32.mul i32.add - local.set $2 + local.set $4 + local.get $3 local.get $4 - local.get $2 i32.load i32.store offset=4 - local.get $2 local.get $4 + local.get $3 i32.store end local.get $0 @@ -5135,28 +5105,11 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 4 - i32.le_u - drop - local.get $2 - i32.const 255 - i32.and - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -5164,8 +5117,8 @@ end i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=4 i32.const 1 i32.or @@ -5181,16 +5134,16 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=28 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -5210,7 +5163,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/set/Set#rehash end i32.const 1 @@ -5647,6 +5600,78 @@ i32.store offset=28 local.get $0 ) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) + (local $2 i32) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 2 + i32.const 4 + i32.le_u + drop + local.get $0 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + local.set $2 + i64.const 2 + local.set $1 + i64.const 0 + i64.const 2870177450012600261 + i64.add + local.get $1 + i64.add + local.set $3 + local.get $3 + local.get $2 + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $3 + local.get $3 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $3 + local.get $3 + local.get $3 + i64.const 33 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const -4417276706812531889 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 29 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const 1609587929392839161 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 32 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + return + ) (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) @@ -5703,30 +5728,10 @@ i32.const 0 ) (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 4 - i32.le_u - drop - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -5743,8 +5748,8 @@ (local $10 i32) (local $11 i32) (local $12 i32) - (local $13 i32) - (local $14 i64) + (local $13 i64) + (local $14 i32) local.get $1 i32.const 1 i32.add @@ -5802,39 +5807,24 @@ local.get $11 local.get $12 i32.store16 - block $~lib/util/hash/HASH|inlined.2 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 4 - i32.le_u - drop - local.get $13 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and - local.set $14 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.wrap_i64 i32.const 4 i32.mul i32.add - local.set $13 + local.set $14 local.get $11 - local.get $13 + local.get $14 i32.load i32.store offset=4 - local.get $13 + local.get $14 local.get $8 i32.store local.get $8 @@ -5871,10 +5861,10 @@ i64.extend_i32_u i64.store offset=8 local.get $0 - local.tee $13 + local.tee $14 local.get $5 local.tee $9 - local.get $13 + local.get $14 i32.load offset=16 local.tee $11 i32.ne @@ -5900,37 +5890,18 @@ call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i64) + (local $2 i64) + (local $3 i32) (local $4 i32) - block $~lib/util/hash/HASH|inlined.1 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 4 - i32.le_u - drop - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 + local.get $1 + call $~lib/util/hash/HASH + local.set $2 local.get $0 local.get $1 - local.get $3 + local.get $2 call $~lib/set/Set#find - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if local.get $0 @@ -5968,16 +5939,16 @@ local.get $0 local.get $0 i32.load offset=24 - local.tee $2 + local.tee $4 i32.const 1 i32.add i32.store offset=24 - local.get $2 + local.get $4 i32.const 8 i32.mul i32.add - local.set $4 - local.get $4 + local.set $3 + local.get $3 local.get $1 i32.store16 local.get $0 @@ -5988,7 +5959,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $3 + local.get $2 local.get $0 i64.load offset=8 i64.and @@ -5996,13 +5967,13 @@ i32.const 4 i32.mul i32.add - local.set $2 + local.set $4 + local.get $3 local.get $4 - local.get $2 i32.load i32.store offset=4 - local.get $2 local.get $4 + local.get $3 i32.store end local.get $0 @@ -6260,30 +6231,11 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 4 - i32.le_u - drop - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -6291,8 +6243,8 @@ end i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=4 i32.const 1 i32.or @@ -6308,16 +6260,16 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=28 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -6337,7 +6289,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/set/Set#rehash end i32.const 1 @@ -6782,6 +6734,76 @@ i32.store offset=28 local.get $0 ) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) + (local $2 i32) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 2 + i32.const 4 + i32.le_u + drop + local.get $0 + i32.const 65535 + i32.and + local.set $2 + i64.const 2 + local.set $1 + i64.const 0 + i64.const 2870177450012600261 + i64.add + local.get $1 + i64.add + local.set $3 + local.get $3 + local.get $2 + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $3 + local.get $3 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $3 + local.get $3 + local.get $3 + i64.const 33 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const -4417276706812531889 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 29 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const 1609587929392839161 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 32 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + return + ) (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) @@ -6836,28 +6858,10 @@ i32.const 0 ) (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 4 - i32.le_u - drop - local.get $2 - i32.const 65535 - i32.and - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -6874,8 +6878,8 @@ (local $10 i32) (local $11 i32) (local $12 i32) - (local $13 i32) - (local $14 i64) + (local $13 i64) + (local $14 i32) local.get $1 i32.const 1 i32.add @@ -6933,39 +6937,24 @@ local.get $11 local.get $12 i32.store16 - block $~lib/util/hash/HASH|inlined.2 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 4 - i32.le_u - drop - local.get $13 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and - local.set $14 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.wrap_i64 i32.const 4 i32.mul i32.add - local.set $13 + local.set $14 local.get $11 - local.get $13 + local.get $14 i32.load i32.store offset=4 - local.get $13 + local.get $14 local.get $8 i32.store local.get $8 @@ -7002,10 +6991,10 @@ i64.extend_i32_u i64.store offset=8 local.get $0 - local.tee $13 + local.tee $14 local.get $5 local.tee $9 - local.get $13 + local.get $14 i32.load offset=16 local.tee $11 i32.ne @@ -7031,35 +7020,18 @@ call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i64) + (local $2 i64) + (local $3 i32) (local $4 i32) - block $~lib/util/hash/HASH|inlined.1 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 4 - i32.le_u - drop - local.get $2 - i32.const 65535 - i32.and - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 + local.get $1 + call $~lib/util/hash/HASH + local.set $2 local.get $0 local.get $1 - local.get $3 + local.get $2 call $~lib/set/Set#find - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if local.get $0 @@ -7097,16 +7069,16 @@ local.get $0 local.get $0 i32.load offset=24 - local.tee $2 + local.tee $4 i32.const 1 i32.add i32.store offset=24 - local.get $2 + local.get $4 i32.const 8 i32.mul i32.add - local.set $4 - local.get $4 + local.set $3 + local.get $3 local.get $1 i32.store16 local.get $0 @@ -7117,7 +7089,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $3 + local.get $2 local.get $0 i64.load offset=8 i64.and @@ -7125,13 +7097,13 @@ i32.const 4 i32.mul i32.add - local.set $2 + local.set $4 + local.get $3 local.get $4 - local.get $2 i32.load i32.store offset=4 - local.get $2 local.get $4 + local.get $3 i32.store end local.get $0 @@ -7389,28 +7361,11 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 4 - i32.le_u - drop - local.get $2 - i32.const 65535 - i32.and - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -7418,8 +7373,8 @@ end i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=4 i32.const 1 i32.or @@ -7435,16 +7390,16 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=28 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -7464,7 +7419,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/set/Set#rehash end i32.const 1 @@ -7901,6 +7856,74 @@ i32.store offset=28 local.get $0 ) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) + (local $2 i32) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 4 + i32.le_u + drop + local.get $0 + local.set $2 + i64.const 4 + local.set $1 + i64.const 0 + i64.const 2870177450012600261 + i64.add + local.get $1 + i64.add + local.set $3 + local.get $3 + local.get $2 + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $3 + local.get $3 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $3 + local.get $3 + local.get $3 + i64.const 33 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const -4417276706812531889 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 29 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const 1609587929392839161 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 32 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + return + ) (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) @@ -7953,26 +7976,10 @@ i32.const 0 ) (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 4 - i32.le_u - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -7989,8 +7996,8 @@ (local $10 i32) (local $11 i32) (local $12 i32) - (local $13 i32) - (local $14 i64) + (local $13 i64) + (local $14 i32) local.get $1 i32.const 1 i32.add @@ -8048,39 +8055,24 @@ local.get $11 local.get $12 i32.store - block $~lib/util/hash/HASH|inlined.2 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 4 - i32.le_u - drop - local.get $13 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and - local.set $14 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.wrap_i64 i32.const 4 i32.mul i32.add - local.set $13 + local.set $14 local.get $11 - local.get $13 + local.get $14 i32.load i32.store offset=4 - local.get $13 + local.get $14 local.get $8 i32.store local.get $8 @@ -8117,10 +8109,10 @@ i64.extend_i32_u i64.store offset=8 local.get $0 - local.tee $13 + local.tee $14 local.get $5 local.tee $9 - local.get $13 + local.get $14 i32.load offset=16 local.tee $11 i32.ne @@ -8146,33 +8138,18 @@ call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i64) + (local $2 i64) + (local $3 i32) (local $4 i32) - block $~lib/util/hash/HASH|inlined.1 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 4 - i32.le_u - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 + local.get $1 + call $~lib/util/hash/HASH + local.set $2 local.get $0 local.get $1 - local.get $3 + local.get $2 call $~lib/set/Set#find - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if local.get $0 @@ -8210,16 +8187,16 @@ local.get $0 local.get $0 i32.load offset=24 - local.tee $2 + local.tee $4 i32.const 1 i32.add i32.store offset=24 - local.get $2 + local.get $4 i32.const 8 i32.mul i32.add - local.set $4 - local.get $4 + local.set $3 + local.get $3 local.get $1 i32.store local.get $0 @@ -8230,7 +8207,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $3 + local.get $2 local.get $0 i64.load offset=8 i64.and @@ -8238,13 +8215,13 @@ i32.const 4 i32.mul i32.add - local.set $2 + local.set $4 + local.get $3 local.get $4 - local.get $2 i32.load i32.store offset=4 - local.get $2 local.get $4 + local.get $3 i32.store end local.get $0 @@ -8502,26 +8479,11 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 4 - i32.le_u - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -8529,8 +8491,8 @@ end i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=4 i32.const 1 i32.or @@ -8546,16 +8508,16 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=28 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -8575,7 +8537,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/set/Set#rehash end i32.const 1 @@ -9000,6 +8962,74 @@ i32.store offset=28 local.get $0 ) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) + (local $2 i32) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 4 + i32.le_u + drop + local.get $0 + local.set $2 + i64.const 4 + local.set $1 + i64.const 0 + i64.const 2870177450012600261 + i64.add + local.get $1 + i64.add + local.set $3 + local.get $3 + local.get $2 + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $3 + local.get $3 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $3 + local.get $3 + local.get $3 + i64.const 33 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const -4417276706812531889 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 29 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const 1609587929392839161 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 32 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + return + ) (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) @@ -9052,26 +9082,10 @@ i32.const 0 ) (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 4 - i32.le_u - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -9088,8 +9102,8 @@ (local $10 i32) (local $11 i32) (local $12 i32) - (local $13 i32) - (local $14 i64) + (local $13 i64) + (local $14 i32) local.get $1 i32.const 1 i32.add @@ -9147,39 +9161,24 @@ local.get $11 local.get $12 i32.store - block $~lib/util/hash/HASH|inlined.2 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 4 - i32.le_u - drop - local.get $13 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and - local.set $14 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.wrap_i64 i32.const 4 i32.mul i32.add - local.set $13 + local.set $14 local.get $11 - local.get $13 + local.get $14 i32.load i32.store offset=4 - local.get $13 + local.get $14 local.get $8 i32.store local.get $8 @@ -9216,10 +9215,10 @@ i64.extend_i32_u i64.store offset=8 local.get $0 - local.tee $13 + local.tee $14 local.get $5 local.tee $9 - local.get $13 + local.get $14 i32.load offset=16 local.tee $11 i32.ne @@ -9245,33 +9244,18 @@ call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i64) + (local $2 i64) + (local $3 i32) (local $4 i32) - block $~lib/util/hash/HASH|inlined.1 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 4 - i32.le_u - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 + local.get $1 + call $~lib/util/hash/HASH + local.set $2 local.get $0 local.get $1 - local.get $3 + local.get $2 call $~lib/set/Set#find - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if local.get $0 @@ -9309,16 +9293,16 @@ local.get $0 local.get $0 i32.load offset=24 - local.tee $2 + local.tee $4 i32.const 1 i32.add i32.store offset=24 - local.get $2 + local.get $4 i32.const 8 i32.mul i32.add - local.set $4 - local.get $4 + local.set $3 + local.get $3 local.get $1 i32.store local.get $0 @@ -9329,7 +9313,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $3 + local.get $2 local.get $0 i64.load offset=8 i64.and @@ -9337,13 +9321,13 @@ i32.const 4 i32.mul i32.add - local.set $2 + local.set $4 + local.get $3 local.get $4 - local.get $2 i32.load i32.store offset=4 - local.get $2 local.get $4 + local.get $3 i32.store end local.get $0 @@ -9601,26 +9585,11 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 4 - i32.le_u - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -9628,8 +9597,8 @@ end i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=4 i32.const 1 i32.or @@ -9645,16 +9614,16 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=28 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -9674,7 +9643,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/set/Set#rehash end i32.const 1 @@ -10099,16 +10068,33 @@ i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/hash64 (param $0 i64) (result i64) + (func $~lib/util/hash/HASH (param $0 i64) (result i64) (local $1 i64) + (local $2 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 8 + i32.const 4 + i32.le_u + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $0 + local.set $1 i64.const 0 i64.const 2870177450012600261 i64.add i64.const 8 i64.add - local.set $1 + local.set $2 + local.get $2 local.get $1 - local.get $0 i64.const -4417276706812531889 i64.mul i64.const 31 @@ -10116,42 +10102,43 @@ i64.const -7046029288634856825 i64.mul i64.xor - local.set $1 - local.get $1 + local.set $2 + local.get $2 i64.const 27 i64.rotl i64.const -7046029288634856825 i64.mul i64.const -8796714831421723037 i64.add - local.set $1 - local.get $1 - local.get $1 + local.set $2 + local.get $2 + local.get $2 i64.const 33 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $2 + local.get $2 i64.const -4417276706812531889 i64.mul - local.set $1 - local.get $1 - local.get $1 + local.set $2 + local.get $2 + local.get $2 i64.const 29 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $2 + local.get $2 i64.const 1609587929392839161 i64.mul - local.set $1 - local.get $1 - local.get $1 + local.set $2 + local.get $2 + local.get $2 i64.const 32 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $2 + local.get $2 + return ) (func $~lib/set/Set#find (param $0 i32) (param $1 i64) (param $2 i64) (result i32) (local $3 i32) @@ -10205,30 +10192,10 @@ i32.const 0 ) (func $~lib/set/Set#has (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 4 - i32.le_u - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -10304,27 +10271,8 @@ local.get $11 local.get $12 i64.store - block $~lib/util/hash/HASH|inlined.2 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 4 - i32.le_u - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -10407,37 +10355,17 @@ ) (func $~lib/set/Set#add (param $0 i32) (param $1 i64) (result i32) (local $2 i64) - (local $3 i64) + (local $3 i32) (local $4 i32) - (local $5 i32) - block $~lib/util/hash/HASH|inlined.1 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 4 - i32.le_u - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 + local.get $1 + call $~lib/util/hash/HASH + local.set $2 local.get $0 local.get $1 - local.get $3 + local.get $2 call $~lib/set/Set#find - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if local.get $0 @@ -10475,16 +10403,16 @@ local.get $0 local.get $0 i32.load offset=24 - local.tee $5 + local.tee $4 i32.const 1 i32.add i32.store offset=24 - local.get $5 + local.get $4 i32.const 16 i32.mul i32.add - local.set $4 - local.get $4 + local.set $3 + local.get $3 local.get $1 i64.store local.get $0 @@ -10495,7 +10423,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $3 + local.get $2 local.get $0 i64.load offset=8 i64.and @@ -10503,13 +10431,13 @@ i32.const 4 i32.mul i32.add - local.set $5 + local.set $4 + local.get $3 local.get $4 - local.get $5 i32.load i32.store offset=8 - local.get $5 local.get $4 + local.get $3 i32.store end local.get $0 @@ -10761,37 +10689,17 @@ local.get $2 ) (func $~lib/set/Set#delete (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 4 - i32.le_u - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -10799,8 +10707,8 @@ end i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=8 i32.const 1 i32.or @@ -10816,17 +10724,17 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $5 + local.tee $4 local.get $0 i32.load offset=28 - local.tee $6 + local.tee $5 + local.get $4 local.get $5 - local.get $6 i32.gt_u select i32.ge_u @@ -10845,7 +10753,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/set/Set#rehash end i32.const 1 @@ -11271,6 +11179,78 @@ i32.store offset=28 local.get $0 ) + (func $~lib/util/hash/HASH (param $0 i64) (result i64) + (local $1 i64) + (local $2 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 8 + i32.const 4 + i32.le_u + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $0 + local.set $1 + i64.const 0 + i64.const 2870177450012600261 + i64.add + i64.const 8 + i64.add + local.set $2 + local.get $2 + local.get $1 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $2 + local.get $2 + i64.const 27 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $2 + local.get $2 + local.get $2 + i64.const 33 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + i64.const -4417276706812531889 + i64.mul + local.set $2 + local.get $2 + local.get $2 + i64.const 29 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + i64.const 1609587929392839161 + i64.mul + local.set $2 + local.get $2 + local.get $2 + i64.const 32 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + return + ) (func $~lib/set/Set#find (param $0 i32) (param $1 i64) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) @@ -11323,30 +11303,10 @@ i32.const 0 ) (func $~lib/set/Set#has (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 4 - i32.le_u - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -11422,27 +11382,8 @@ local.get $11 local.get $12 i64.store - block $~lib/util/hash/HASH|inlined.2 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 4 - i32.le_u - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -11525,37 +11466,17 @@ ) (func $~lib/set/Set#add (param $0 i32) (param $1 i64) (result i32) (local $2 i64) - (local $3 i64) + (local $3 i32) (local $4 i32) - (local $5 i32) - block $~lib/util/hash/HASH|inlined.1 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 4 - i32.le_u - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 + local.get $1 + call $~lib/util/hash/HASH + local.set $2 local.get $0 local.get $1 - local.get $3 + local.get $2 call $~lib/set/Set#find - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if local.get $0 @@ -11593,16 +11514,16 @@ local.get $0 local.get $0 i32.load offset=24 - local.tee $5 + local.tee $4 i32.const 1 i32.add i32.store offset=24 - local.get $5 + local.get $4 i32.const 16 i32.mul i32.add - local.set $4 - local.get $4 + local.set $3 + local.get $3 local.get $1 i64.store local.get $0 @@ -11613,7 +11534,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $3 + local.get $2 local.get $0 i64.load offset=8 i64.and @@ -11621,13 +11542,13 @@ i32.const 4 i32.mul i32.add - local.set $5 + local.set $4 + local.get $3 local.get $4 - local.get $5 i32.load i32.store offset=8 - local.get $5 local.get $4 + local.get $3 i32.store end local.get $0 @@ -11879,37 +11800,17 @@ local.get $2 ) (func $~lib/set/Set#delete (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 4 - i32.le_u - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -11917,8 +11818,8 @@ end i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=8 i32.const 1 i32.or @@ -11934,17 +11835,17 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $5 + local.tee $4 local.get $0 i32.load offset=28 - local.tee $6 + local.tee $5 + local.get $4 local.get $5 - local.get $6 i32.gt_u select i32.ge_u @@ -11963,7 +11864,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/set/Set#rehash end i32.const 1 @@ -12389,6 +12290,75 @@ i32.store offset=28 local.get $0 ) + (func $~lib/util/hash/HASH (param $0 f32) (result i64) + (local $1 i32) + (local $2 i64) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $0 + i32.reinterpret_f32 + local.set $1 + i64.const 4 + local.set $2 + i64.const 0 + i64.const 2870177450012600261 + i64.add + local.get $2 + i64.add + local.set $3 + local.get $3 + local.get $1 + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $3 + local.get $3 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $3 + local.get $3 + local.get $3 + i64.const 33 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const -4417276706812531889 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 29 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const 1609587929392839161 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 32 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + return + ) (func $~lib/set/Set#find (param $0 i32) (param $1 f32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) @@ -12441,27 +12411,10 @@ i32.const 0 ) (func $~lib/set/Set#has (param $0 i32) (param $1 f32) (result i32) - (local $2 f32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -12478,9 +12431,8 @@ (local $10 i32) (local $11 i32) (local $12 f32) - (local $13 f32) - (local $14 i64) - (local $15 i32) + (local $13 i64) + (local $14 i32) local.get $1 i32.const 1 i32.add @@ -12538,40 +12490,24 @@ local.get $11 local.get $12 f32.store - block $~lib/util/hash/HASH|inlined.2 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $13 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and - local.set $14 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.wrap_i64 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load i32.store offset=4 - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -12589,19 +12525,19 @@ local.get $0 local.tee $11 local.get $3 - local.tee $15 + local.tee $14 local.get $11 i32.load local.tee $9 i32.ne if - local.get $15 + local.get $14 call $~lib/rt/pure/__retain - local.set $15 + local.set $14 local.get $9 call $~lib/rt/pure/__release end - local.get $15 + local.get $14 i32.store local.get $0 local.get $1 @@ -12610,19 +12546,19 @@ local.get $0 local.tee $9 local.get $5 - local.tee $15 + local.tee $14 local.get $9 i32.load offset=16 local.tee $11 i32.ne if - local.get $15 + local.get $14 call $~lib/rt/pure/__retain - local.set $15 + local.set $14 local.get $11 call $~lib/rt/pure/__release end - local.get $15 + local.get $14 i32.store offset=16 local.get $0 local.get $4 @@ -12637,35 +12573,18 @@ call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (param $0 i32) (param $1 f32) (result i32) - (local $2 f32) - (local $3 i64) + (local $2 i64) + (local $3 i32) (local $4 i32) - (local $5 i32) - block $~lib/util/hash/HASH|inlined.1 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 + local.get $1 + call $~lib/util/hash/HASH + local.set $2 local.get $0 local.get $1 - local.get $3 + local.get $2 call $~lib/set/Set#find - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if local.get $0 @@ -12703,16 +12622,16 @@ local.get $0 local.get $0 i32.load offset=24 - local.tee $5 + local.tee $4 i32.const 1 i32.add i32.store offset=24 - local.get $5 + local.get $4 i32.const 8 i32.mul i32.add - local.set $4 - local.get $4 + local.set $3 + local.get $3 local.get $1 f32.store local.get $0 @@ -12723,7 +12642,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $3 + local.get $2 local.get $0 i64.load offset=8 i64.and @@ -12731,13 +12650,13 @@ i32.const 4 i32.mul i32.add - local.set $5 + local.set $4 + local.get $3 local.get $4 - local.get $5 i32.load i32.store offset=4 - local.get $5 local.get $4 + local.get $3 i32.store end local.get $0 @@ -12989,34 +12908,17 @@ local.get $2 ) (func $~lib/set/Set#delete (param $0 i32) (param $1 f32) (result i32) - (local $2 f32) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -13024,8 +12926,8 @@ end i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=4 i32.const 1 i32.or @@ -13041,17 +12943,17 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $5 + local.tee $4 local.get $0 i32.load offset=28 - local.tee $6 + local.tee $5 + local.get $4 local.get $5 - local.get $6 i32.gt_u select i32.ge_u @@ -13070,7 +12972,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/set/Set#rehash end i32.const 1 @@ -13496,6 +13398,79 @@ i32.store offset=28 local.get $0 ) + (func $~lib/util/hash/HASH (param $0 f64) (result i64) + (local $1 i64) + (local $2 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $0 + i64.reinterpret_f64 + local.set $1 + i64.const 0 + i64.const 2870177450012600261 + i64.add + i64.const 8 + i64.add + local.set $2 + local.get $2 + local.get $1 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $2 + local.get $2 + i64.const 27 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $2 + local.get $2 + local.get $2 + i64.const 33 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + i64.const -4417276706812531889 + i64.mul + local.set $2 + local.get $2 + local.get $2 + i64.const 29 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + i64.const 1609587929392839161 + i64.mul + local.set $2 + local.get $2 + local.get $2 + i64.const 32 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + return + ) (func $~lib/set/Set#find (param $0 i32) (param $1 f64) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) @@ -13548,31 +13523,10 @@ i32.const 0 ) (func $~lib/set/Set#has (param $0 i32) (param $1 f64) (result i32) - (local $2 f64) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -13589,9 +13543,8 @@ (local $10 i32) (local $11 i32) (local $12 f64) - (local $13 f64) - (local $14 i64) - (local $15 i32) + (local $13 i64) + (local $14 i32) local.get $1 i32.const 1 i32.add @@ -13649,44 +13602,24 @@ local.get $11 local.get $12 f64.store - block $~lib/util/hash/HASH|inlined.2 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $13 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and - local.set $14 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.wrap_i64 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load i32.store offset=8 - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -13704,19 +13637,19 @@ local.get $0 local.tee $11 local.get $3 - local.tee $15 + local.tee $14 local.get $11 i32.load local.tee $9 i32.ne if - local.get $15 + local.get $14 call $~lib/rt/pure/__retain - local.set $15 + local.set $14 local.get $9 call $~lib/rt/pure/__release end - local.get $15 + local.get $14 i32.store local.get $0 local.get $1 @@ -13725,19 +13658,19 @@ local.get $0 local.tee $9 local.get $5 - local.tee $15 + local.tee $14 local.get $9 i32.load offset=16 local.tee $11 i32.ne if - local.get $15 + local.get $14 call $~lib/rt/pure/__retain - local.set $15 + local.set $14 local.get $11 call $~lib/rt/pure/__release end - local.get $15 + local.get $14 i32.store offset=16 local.get $0 local.get $4 @@ -13752,39 +13685,18 @@ call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (param $0 i32) (param $1 f64) (result i32) - (local $2 f64) - (local $3 i64) + (local $2 i64) + (local $3 i32) (local $4 i32) - (local $5 i32) - block $~lib/util/hash/HASH|inlined.1 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 + local.get $1 + call $~lib/util/hash/HASH + local.set $2 local.get $0 local.get $1 - local.get $3 + local.get $2 call $~lib/set/Set#find - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if local.get $0 @@ -13822,16 +13734,16 @@ local.get $0 local.get $0 i32.load offset=24 - local.tee $5 + local.tee $4 i32.const 1 i32.add i32.store offset=24 - local.get $5 + local.get $4 i32.const 16 i32.mul i32.add - local.set $4 - local.get $4 + local.set $3 + local.get $3 local.get $1 f64.store local.get $0 @@ -13842,7 +13754,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $3 + local.get $2 local.get $0 i64.load offset=8 i64.and @@ -13850,13 +13762,13 @@ i32.const 4 i32.mul i32.add - local.set $5 + local.set $4 + local.get $3 local.get $4 - local.get $5 i32.load i32.store offset=8 - local.get $5 local.get $4 + local.get $3 i32.store end local.get $0 @@ -14108,38 +14020,17 @@ local.get $2 ) (func $~lib/set/Set#delete (param $0 i32) (param $1 f64) (result i32) - (local $2 f64) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -14147,8 +14038,8 @@ end i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=8 i32.const 1 i32.or @@ -14164,17 +14055,17 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $5 + local.tee $4 local.get $0 i32.load offset=28 - local.tee $6 + local.tee $5 + local.get $4 local.get $5 - local.get $6 i32.gt_u select i32.ge_u @@ -14193,7 +14084,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/set/Set#rehash end i32.const 1 diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index d7356a85f5..32cd47b904 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -345,285 +345,286 @@ call $~lib/memory/memory.fill local.get $1 ) - (func $~lib/util/hash/hashStr (param $0 i32) (result i64) + (func $~lib/util/hash/HASH<~lib/string/String> (param $0 i32) (result i64) (local $1 i32) - (local $2 i64) + (local $2 i32) (local $3 i32) (local $4 i64) (local $5 i64) - (local $6 i32) - (local $7 i32) - (local $8 i64) - local.get $0 - i32.eqz - if - i64.const 0 - return - end + (local $6 i64) + (local $7 i64) + (local $8 i32) local.get $0 - i32.const 20 - i32.sub - i32.load offset=16 - i32.const 1 - i32.shr_u - i32.const 1 - i32.shl - local.tee $3 - i32.const 32 - i32.ge_s - if - i64.const 6983438078262162902 - local.set $2 - i64.const -4417276706812531889 - local.set $4 - i64.const 7046029288634856825 - local.set $5 - local.get $3 - i32.const 32 + if (result i64) + local.get $0 + i32.const 20 i32.sub - local.set $3 - loop $while-continue|0 + i32.load offset=16 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl + local.tee $2 + i32.const 32 + i32.ge_s + if (result i64) + i64.const 6983438078262162902 + local.set $4 + i64.const -4417276706812531889 + local.set $5 + i64.const 7046029288634856825 + local.set $6 + local.get $2 + local.tee $3 + i32.const 32 + i32.sub + local.set $8 + loop $while-continue|0 + local.get $1 + local.get $8 + i32.le_s + if + local.get $4 + local.get $0 + local.get $1 + i32.add + local.tee $2 + i64.load + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $4 + local.get $5 + local.get $2 + i64.load offset=8 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $5 + local.get $7 + local.get $2 + i64.load offset=16 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $7 + local.get $6 + local.get $2 + i64.load offset=24 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $6 + local.get $1 + i32.const 32 + i32.add + local.set $1 + br $while-continue|0 + end + end + local.get $8 + local.get $1 + i32.sub + local.set $2 local.get $3 + i64.extend_i32_s + local.get $4 + i64.const 1 + i64.rotl + local.get $5 + i64.const 7 + i64.rotl + i64.add + local.get $7 + i64.const 12 + i64.rotl + i64.add + local.get $6 + i64.const 18 + i64.rotl + i64.add + local.get $4 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.get $5 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.get $7 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add local.get $6 - i32.ge_s + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + i64.add + else + local.get $2 + i64.extend_i32_s + i64.const 2870177450012600261 + i64.add + end + local.set $4 + i32.const 0 + local.set $1 + local.get $2 + i32.const 8 + i32.sub + local.set $2 + loop $while-continue|1 + local.get $1 + local.get $2 + i32.le_s if - local.get $2 + local.get $4 local.get $0 - local.get $6 + local.get $1 i32.add - local.tee $7 i64.load i64.const -4417276706812531889 i64.mul - i64.add i64.const 31 i64.rotl i64.const -7046029288634856825 i64.mul - local.set $2 - local.get $4 - local.get $7 - i64.load offset=8 - i64.const -4417276706812531889 - i64.mul - i64.add - i64.const 31 + i64.xor + i64.const 27 i64.rotl i64.const -7046029288634856825 i64.mul - local.set $4 - local.get $8 - local.get $7 - i64.load offset=16 - i64.const -4417276706812531889 - i64.mul + i64.const -8796714831421723037 i64.add - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - local.set $8 - local.get $5 - local.get $7 - i64.load offset=24 - i64.const -4417276706812531889 - i64.mul - i64.add - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - local.set $5 - local.get $6 - i32.const 32 + local.set $4 + local.get $1 + i32.const 8 i32.add - local.set $6 - br $while-continue|0 + local.set $1 + br $while-continue|1 end end - local.get $3 - i64.extend_i32_s - local.get $2 - i64.const 1 - i64.rotl - local.get $4 - i64.const 7 - i64.rotl - i64.add - local.get $8 - i64.const 12 - i64.rotl - i64.add - local.get $5 - i64.const 18 - i64.rotl - i64.add local.get $2 - i64.const -4417276706812531889 - i64.mul - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.get $4 - i64.const -4417276706812531889 - i64.mul - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.get $8 - i64.const -4417276706812531889 - i64.mul - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.get $5 - i64.const -4417276706812531889 - i64.mul - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - i64.add - local.set $2 - local.get $3 - local.get $6 - i32.sub - local.set $3 - else - local.get $3 - i64.extend_i32_s - i64.const 2870177450012600261 - i64.add - local.set $2 - end - local.get $3 - i32.const 8 - i32.sub - local.set $3 - loop $while-continue|1 local.get $1 - local.get $3 - i32.le_s + i32.const 4 + i32.add + i32.ge_s if - local.get $2 + local.get $4 local.get $0 local.get $1 i32.add - i64.load - i64.const -4417276706812531889 - i64.mul - i64.const 31 - i64.rotl + i64.load32_u i64.const -7046029288634856825 i64.mul i64.xor - i64.const 27 + i64.const 23 i64.rotl - i64.const -7046029288634856825 + i64.const -4417276706812531889 i64.mul - i64.const -8796714831421723037 + i64.const 1609587929392839161 i64.add - local.set $2 + local.set $4 local.get $1 - i32.const 8 + i32.const 4 i32.add local.set $1 - br $while-continue|1 end - end - local.get $3 - local.get $1 - i32.const 4 - i32.add - i32.ge_s - if - local.get $2 - local.get $0 - local.get $1 - i32.add - i64.load32_u - i64.const -7046029288634856825 - i64.mul + loop $while-continue|2 + local.get $1 + local.get $2 + i32.lt_s + if + local.get $4 + local.get $0 + local.get $1 + i32.add + i64.load8_u + i64.const 2870177450012600261 + i64.mul + i64.add + i64.const 11 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $4 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $while-continue|2 + end + end + local.get $4 + local.get $4 + i64.const 33 + i64.shr_u i64.xor - i64.const 23 - i64.rotl i64.const -4417276706812531889 i64.mul + local.tee $4 + local.get $4 + i64.const 29 + i64.shr_u + i64.xor i64.const 1609587929392839161 - i64.add - local.set $2 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - loop $while-continue|2 - local.get $1 - local.get $3 - i32.lt_s - if - local.get $2 - local.get $0 - local.get $1 - i32.add - i64.load8_u - i64.const 2870177450012600261 - i64.mul - i64.add - i64.const 11 - i64.rotl - i64.const -7046029288634856825 - i64.mul - local.set $2 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $while-continue|2 - end + i64.mul + local.tee $4 + local.get $4 + i64.const 32 + i64.shr_u + i64.xor + else + i64.const 0 end - local.get $2 - local.get $2 - i64.const 33 - i64.shr_u - i64.xor - i64.const -4417276706812531889 - i64.mul - local.tee $2 - local.get $2 - i64.const 29 - i64.shr_u - i64.xor - i64.const 1609587929392839161 - i64.mul - local.tee $2 - local.get $2 - i64.const 32 - i64.shr_u - i64.xor ) (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -842,7 +843,7 @@ local.get $2 local.get $4 local.get $7 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String> local.get $1 i64.extend_i32_u i64.and @@ -901,14 +902,11 @@ (func $~lib/map/Map<~lib/string/String,usize>#set (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i64) - (local $4 i64) - (local $5 i32) + (local $4 i32) + local.get $0 i32.const 1056 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String> local.tee $3 - local.set $4 - local.get $0 - local.get $3 call $~lib/map/Map<~lib/string/String,usize>#find local.tee $2 if @@ -951,11 +949,11 @@ local.get $0 local.get $0 i32.load offset=24 - local.tee $5 + local.tee $4 i32.const 1 i32.add i32.store offset=24 - local.get $5 + local.get $4 i32.const 12 i32.mul i32.add @@ -974,7 +972,7 @@ local.get $2 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -990,7 +988,7 @@ i32.store end ) - (func $~lib/util/hash/hash32 (param $0 i32) (result i64) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) (local $1 i64) local.get $0 i64.extend_i32_u @@ -1127,7 +1125,7 @@ local.get $2 local.get $4 local.get $7 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -1190,7 +1188,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.tee $3 call $~lib/map/Map#find local.tee $2 @@ -1285,12 +1283,12 @@ if global.get $~lib/symbol/stringToId i32.const 1056 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String> call $~lib/map/Map<~lib/string/String,usize>#find if global.get $~lib/symbol/stringToId i32.const 1056 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String> call $~lib/map/Map<~lib/string/String,usize>#find local.tee $0 i32.eqz @@ -1380,7 +1378,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -1389,7 +1387,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $0 i32.eqz diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index e34176d378..e99a279001 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -556,390 +556,405 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/hash/hashStr (param $0 i32) (result i64) - (local $1 i64) - (local $2 i32) - (local $3 i64) + (func $~lib/util/hash/HASH<~lib/string/String> (param $0 i32) (result i64) + (local $1 i32) + (local $2 i64) + (local $3 i32) (local $4 i64) (local $5 i64) (local $6 i64) - (local $7 i32) + (local $7 i64) (local $8 i32) - (local $9 i64) - (local $10 i64) - (local $11 i32) + (local $9 i32) + (local $10 i32) + (local $11 i64) + (local $12 i64) local.get $0 call $~lib/rt/stub/__retain local.set $0 - local.get $0 - i32.const 0 - i32.eq - if - i64.const 0 - local.set $1 - local.get $0 - call $~lib/rt/stub/__release - local.get $1 - return - end - local.get $0 - call $~lib/string/String#get:length i32.const 1 - i32.shl - local.set $2 - i64.const 0 - local.set $3 - local.get $2 - i32.const 32 - i32.ge_s - if - i64.const 0 - i64.const -7046029288634856825 - i64.add - i64.const -4417276706812531889 - i64.add + drop + block $~lib/util/hash/hashStr|inlined.0 (result i64) + local.get $0 + call $~lib/rt/stub/__retain local.set $1 - i64.const 0 - i64.const -4417276706812531889 - i64.add - local.set $4 - i64.const 0 - local.set $5 - i64.const 0 - i64.const -7046029288634856825 - i64.sub - local.set $6 + local.get $1 i32.const 0 - local.set $7 - local.get $2 - i32.const 32 - i32.sub + i32.eq + if + i64.const 0 + local.set $2 + local.get $1 + call $~lib/rt/stub/__release + local.get $2 + br $~lib/util/hash/hashStr|inlined.0 + end + local.get $1 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + local.set $3 + i64.const 0 local.set $2 - loop $while-continue|0 + local.get $3 + i32.const 32 + i32.ge_s + if + i64.const 0 + i64.const -7046029288634856825 + i64.add + i64.const -4417276706812531889 + i64.add + local.set $4 + i64.const 0 + i64.const -4417276706812531889 + i64.add + local.set $5 + i64.const 0 + local.set $6 + i64.const 0 + i64.const -7046029288634856825 + i64.sub + local.set $7 + local.get $3 + local.set $8 + i32.const 0 + local.set $9 + local.get $3 + i32.const 32 + i32.sub + local.set $3 + loop $while-continue|0 + local.get $9 + local.get $3 + i32.le_s + local.set $10 + local.get $10 + if + local.get $4 + local.set $12 + local.get $1 + local.get $9 + i32.add + i64.load + local.set $11 + local.get $12 + local.get $11 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $4 + local.get $5 + local.set $12 + local.get $1 + local.get $9 + i32.add + i64.load offset=8 + local.set $11 + local.get $12 + local.get $11 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $5 + local.get $6 + local.set $12 + local.get $1 + local.get $9 + i32.add + i64.load offset=16 + local.set $11 + local.get $12 + local.get $11 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $6 + local.get $7 + local.set $12 + local.get $1 + local.get $9 + i32.add + i64.load offset=24 + local.set $11 + local.get $12 + local.get $11 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $7 + local.get $9 + i32.const 32 + i32.add + local.set $9 + br $while-continue|0 + end + end + local.get $4 + i64.const 1 + i64.rotl + local.get $5 + i64.const 7 + i64.rotl + i64.add + local.get $6 + i64.const 12 + i64.rotl + i64.add local.get $7 + i64.const 18 + i64.rotl + i64.add + local.set $2 + local.get $4 + i64.const -4417276706812531889 + i64.mul + local.set $4 + local.get $5 + i64.const -4417276706812531889 + i64.mul + local.set $5 + local.get $6 + i64.const -4417276706812531889 + i64.mul + local.set $6 + local.get $7 + i64.const -4417276706812531889 + i64.mul + local.set $7 + local.get $2 + local.set $12 + local.get $4 + local.set $11 + local.get $12 + local.get $11 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $2 local.get $2 + local.set $12 + local.get $5 + local.set $11 + local.get $12 + local.get $11 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $2 + local.get $2 + local.set $12 + local.get $6 + local.set $11 + local.get $12 + local.get $11 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $2 + local.get $2 + local.set $12 + local.get $7 + local.set $11 + local.get $12 + local.get $11 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $2 + local.get $2 + local.get $8 + i64.extend_i32_s + i64.add + local.set $2 + local.get $3 + local.get $9 + i32.sub + local.set $3 + else + local.get $3 + i64.extend_i32_s + i64.const 0 + i64.add + i64.const 2870177450012600261 + i64.add + local.set $2 + end + i32.const 0 + local.set $9 + local.get $3 + i32.const 8 + i32.sub + local.set $3 + loop $while-continue|1 + local.get $9 + local.get $3 i32.le_s local.set $8 local.get $8 if + local.get $2 local.get $1 - local.set $10 - local.get $0 - local.get $7 + local.get $9 i32.add i64.load - local.set $9 - local.get $10 - local.get $9 i64.const -4417276706812531889 i64.mul - i64.add i64.const 31 i64.rotl i64.const -7046029288634856825 i64.mul - local.set $1 - local.get $4 - local.set $10 - local.get $0 - local.get $7 - i32.add - i64.load offset=8 - local.set $9 - local.get $10 - local.get $9 - i64.const -4417276706812531889 - i64.mul - i64.add - i64.const 31 + i64.xor + local.set $2 + local.get $2 + i64.const 27 i64.rotl i64.const -7046029288634856825 i64.mul - local.set $4 - local.get $5 - local.set $10 - local.get $0 - local.get $7 - i32.add - i64.load offset=16 - local.set $9 - local.get $10 - local.get $9 - i64.const -4417276706812531889 - i64.mul + i64.const -8796714831421723037 i64.add - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - local.set $5 - local.get $6 - local.set $10 - local.get $0 - local.get $7 - i32.add - i64.load offset=24 - local.set $9 - local.get $10 + local.set $2 local.get $9 - i64.const -4417276706812531889 - i64.mul - i64.add - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - local.set $6 - local.get $7 - i32.const 32 + i32.const 8 i32.add - local.set $7 - br $while-continue|0 + local.set $9 + br $while-continue|1 end end - local.get $1 - i64.const 1 - i64.rotl - local.get $4 - i64.const 7 - i64.rotl - i64.add - local.get $5 - i64.const 12 - i64.rotl - i64.add - local.get $6 - i64.const 18 - i64.rotl - i64.add - local.set $3 - local.get $1 - i64.const -4417276706812531889 - i64.mul - local.set $1 - local.get $4 - i64.const -4417276706812531889 - i64.mul - local.set $4 - local.get $5 - i64.const -4417276706812531889 - i64.mul - local.set $5 - local.get $6 - i64.const -4417276706812531889 - i64.mul - local.set $6 - local.get $3 - local.set $10 - local.get $1 - local.set $9 - local.get $10 - local.get $9 - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.set $3 - local.get $3 - local.set $10 - local.get $4 - local.set $9 - local.get $10 - local.get $9 - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.set $3 - local.get $3 - local.set $10 - local.get $5 - local.set $9 - local.get $10 local.get $9 - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.set $3 - local.get $3 - local.set $10 - local.get $6 - local.set $9 - local.get $10 - local.get $9 - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.set $3 + i32.const 4 + i32.add local.get $3 - local.get $2 - i64.extend_i32_s - i64.add - local.set $3 - local.get $2 - local.get $7 - i32.sub - local.set $2 - else - local.get $2 - i64.extend_i32_s - i64.const 0 - i64.add - i64.const 2870177450012600261 - i64.add - local.set $3 - end - i32.const 0 - local.set $11 - local.get $2 - i32.const 8 - i32.sub - local.set $2 - loop $while-continue|1 - local.get $11 - local.get $2 i32.le_s - local.set $7 - local.get $7 if - local.get $3 - local.get $0 - local.get $11 + local.get $2 + local.get $1 + local.get $9 i32.add - i64.load - i64.const -4417276706812531889 - i64.mul - i64.const 31 - i64.rotl + i64.load32_u i64.const -7046029288634856825 i64.mul i64.xor - local.set $3 - local.get $3 - i64.const 27 + local.set $2 + local.get $2 + i64.const 23 i64.rotl - i64.const -7046029288634856825 + i64.const -4417276706812531889 i64.mul - i64.const -8796714831421723037 + i64.const 1609587929392839161 i64.add - local.set $3 - local.get $11 - i32.const 8 + local.set $2 + local.get $9 + i32.const 4 i32.add - local.set $11 - br $while-continue|1 + local.set $9 end - end - local.get $11 - i32.const 4 - i32.add - local.get $2 - i32.le_s - if - local.get $3 - local.get $0 - local.get $11 - i32.add - i64.load32_u - i64.const -7046029288634856825 - i64.mul + loop $while-continue|2 + local.get $9 + local.get $3 + i32.lt_s + local.set $8 + local.get $8 + if + local.get $2 + local.get $1 + local.get $9 + i32.add + i64.load8_u + i64.const 2870177450012600261 + i64.mul + i64.add + local.set $2 + local.get $2 + i64.const 11 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $2 + local.get $9 + i32.const 1 + i32.add + local.set $9 + br $while-continue|2 + end + end + local.get $2 + local.get $2 + i64.const 33 + i64.shr_u i64.xor - local.set $3 - local.get $3 - i64.const 23 - i64.rotl + local.set $2 + local.get $2 i64.const -4417276706812531889 i64.mul + local.set $2 + local.get $2 + local.get $2 + i64.const 29 + i64.shr_u + i64.xor + local.set $2 + local.get $2 i64.const 1609587929392839161 - i64.add - local.set $3 - local.get $11 - i32.const 4 - i32.add - local.set $11 - end - loop $while-continue|2 - local.get $11 + i64.mul + local.set $2 + local.get $2 + local.get $2 + i64.const 32 + i64.shr_u + i64.xor + local.set $2 local.get $2 - i32.lt_s local.set $7 + local.get $1 + call $~lib/rt/stub/__release local.get $7 - if - local.get $3 - local.get $0 - local.get $11 - i32.add - i64.load8_u - i64.const 2870177450012600261 - i64.mul - i64.add - local.set $3 - local.get $3 - i64.const 11 - i64.rotl - i64.const -7046029288634856825 - i64.mul - local.set $3 - local.get $11 - i32.const 1 - i32.add - local.set $11 - br $while-continue|2 - end end - local.get $3 - local.get $3 - i64.const 33 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const -4417276706812531889 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 29 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const 1609587929392839161 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 32 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - local.set $6 + local.set $2 local.get $0 call $~lib/rt/stub/__release - local.get $6 + local.get $2 + return ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) @@ -1205,26 +1220,13 @@ ) (func $~lib/map/Map<~lib/string/String,usize>#has (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i64) - local.get $1 - call $~lib/rt/stub/__retain - local.set $1 - local.get $0 - local.get $1 - block $~lib/util/hash/HASH<~lib/string/String>|inlined.0 (result i64) - local.get $1 - call $~lib/rt/stub/__retain - local.set $2 - i32.const 1 - drop - local.get $2 - call $~lib/util/hash/hashStr - local.set $3 - local.get $2 - call $~lib/rt/stub/__release - local.get $3 - br $~lib/util/hash/HASH<~lib/string/String>|inlined.0 - end + local.get $1 + call $~lib/rt/stub/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $1 + call $~lib/util/hash/HASH<~lib/string/String> call $~lib/map/Map<~lib/string/String,usize>#find i32.const 0 i32.ne @@ -1235,30 +1237,17 @@ ) (func $~lib/map/Map<~lib/string/String,usize>#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i64) - (local $4 i32) + (local $3 i32) local.get $1 call $~lib/rt/stub/__retain local.set $1 local.get $0 local.get $1 - block $~lib/util/hash/HASH<~lib/string/String>|inlined.1 (result i64) - local.get $1 - call $~lib/rt/stub/__retain - local.set $2 - i32.const 1 - drop - local.get $2 - call $~lib/util/hash/hashStr - local.set $3 - local.get $2 - call $~lib/rt/stub/__release - local.get $3 - br $~lib/util/hash/HASH<~lib/string/String>|inlined.1 - end + local.get $1 + call $~lib/util/hash/HASH<~lib/string/String> call $~lib/map/Map<~lib/string/String,usize>#find - local.set $4 - local.get $4 + local.set $2 + local.get $2 i32.eqz if i32.const 224 @@ -1268,12 +1257,12 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $2 i32.load offset=4 - local.set $2 + local.set $3 local.get $1 call $~lib/rt/stub/__release - local.get $2 + local.get $3 ) (func $~lib/map/Map<~lib/string/String,usize>#rehash (param $0 i32) (param $1 i32) (local $2 i32) @@ -1288,8 +1277,7 @@ (local $11 i32) (local $12 i32) (local $13 i32) - (local $14 i64) - (local $15 i32) + (local $14 i32) local.get $1 i32.const 1 i32.add @@ -1352,20 +1340,8 @@ local.get $10 i32.load offset=4 i32.store offset=4 - block $~lib/util/hash/HASH<~lib/string/String>|inlined.3 (result i64) - local.get $12 - call $~lib/rt/stub/__retain - local.set $13 - i32.const 1 - drop - local.get $13 - call $~lib/util/hash/hashStr - local.set $14 - local.get $13 - call $~lib/rt/stub/__release - local.get $14 - br $~lib/util/hash/HASH<~lib/string/String>|inlined.3 - end + local.get $12 + call $~lib/util/hash/HASH<~lib/string/String> local.get $1 i64.extend_i32_u i64.and @@ -1376,12 +1352,12 @@ i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load i32.store offset=8 - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -1422,19 +1398,19 @@ local.get $0 local.tee $13 local.get $5 - local.tee $15 + local.tee $14 local.get $13 i32.load offset=16 local.tee $11 i32.ne if - local.get $15 + local.get $14 call $~lib/rt/stub/__retain - local.set $15 + local.set $14 local.get $11 call $~lib/rt/stub/__release end - local.get $15 + local.get $14 i32.store offset=16 local.get $0 local.get $4 @@ -1449,39 +1425,26 @@ call $~lib/rt/stub/__release ) (func $~lib/map/Map<~lib/string/String,usize>#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i64) - (local $5 i64) + (local $3 i64) + (local $4 i32) + (local $5 i32) (local $6 i32) - (local $7 i32) local.get $1 call $~lib/rt/stub/__retain local.set $1 - block $~lib/util/hash/HASH<~lib/string/String>|inlined.2 (result i64) - local.get $1 - call $~lib/rt/stub/__retain - local.set $3 - i32.const 1 - drop - local.get $3 - call $~lib/util/hash/hashStr - local.set $4 - local.get $3 - call $~lib/rt/stub/__release - local.get $4 - br $~lib/util/hash/HASH<~lib/string/String>|inlined.2 - end - local.set $5 + local.get $1 + call $~lib/util/hash/HASH<~lib/string/String> + local.set $3 local.get $0 local.get $1 - local.get $5 + local.get $3 call $~lib/map/Map<~lib/string/String,usize>#find - local.set $6 - local.get $6 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $6 + local.get $4 local.get $2 i32.store offset=4 else @@ -1518,25 +1481,25 @@ local.get $0 i32.load offset=16 call $~lib/rt/stub/__retain - local.set $3 - local.get $3 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=24 - local.tee $7 + local.tee $6 i32.const 1 i32.add i32.store offset=24 - local.get $7 + local.get $6 i32.const 12 i32.mul i32.add - local.set $6 - local.get $6 + local.set $4 + local.get $4 local.get $1 call $~lib/rt/stub/__retain i32.store - local.get $6 + local.get $4 local.get $2 i32.store offset=4 local.get $0 @@ -1547,7 +1510,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $5 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -1555,74 +1518,91 @@ i32.const 4 i32.mul i32.add - local.set $7 + local.set $6 + local.get $4 local.get $6 - local.get $7 i32.load i32.store offset=8 - local.get $7 local.get $6 + local.get $4 i32.store - local.get $3 + local.get $5 call $~lib/rt/stub/__release end local.get $0 call $~lib/rt/stub/__retain - local.set $7 + local.set $6 local.get $1 call $~lib/rt/stub/__release - local.get $7 + local.get $6 ) - (func $~lib/util/hash/hash32 (param $0 i32) (result i64) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) (local $1 i64) + (local $2 i32) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 4 + i32.le_u + drop + local.get $0 + local.set $2 + i64.const 4 + local.set $1 i64.const 0 i64.const 2870177450012600261 i64.add - i64.const 4 - i64.add - local.set $1 local.get $1 - local.get $0 + i64.add + local.set $3 + local.get $3 + local.get $2 i64.extend_i32_u i64.const -7046029288634856825 i64.mul i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 i64.const 23 i64.rotl i64.const -4417276706812531889 i64.mul i64.const 1609587929392839161 i64.add - local.set $1 - local.get $1 - local.get $1 + local.set $3 + local.get $3 + local.get $3 i64.const 33 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 i64.const -4417276706812531889 i64.mul - local.set $1 - local.get $1 - local.get $1 + local.set $3 + local.get $3 + local.get $3 i64.const 29 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 i64.const 1609587929392839161 i64.mul - local.set $1 - local.get $1 - local.get $1 + local.set $3 + local.get $3 + local.get $3 i64.const 32 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 + return ) (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) @@ -1750,23 +1730,8 @@ local.get $10 i32.load offset=4 i32.store offset=4 - block $~lib/util/hash/HASH|inlined.1 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 4 - i32.le_u - drop - local.get $13 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -1848,52 +1813,37 @@ call $~lib/rt/stub/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i64) + (local $3 i64) + (local $4 i32) (local $5 i32) (local $6 i32) local.get $2 call $~lib/rt/stub/__retain local.set $2 - block $~lib/util/hash/HASH|inlined.0 (result i64) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 4 - i32.le_u - drop - local.get $3 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 1 drop - local.get $5 + local.get $4 i32.load offset=4 - local.set $3 + local.set $5 local.get $2 - local.get $3 + local.get $5 i32.ne if - local.get $5 + local.get $4 local.get $2 call $~lib/rt/stub/__retain i32.store offset=4 - local.get $3 + local.get $5 call $~lib/rt/stub/__release end else @@ -1930,8 +1880,8 @@ local.get $0 i32.load offset=16 call $~lib/rt/stub/__retain - local.set $3 - local.get $3 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=24 @@ -1943,11 +1893,11 @@ i32.const 12 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i32.store - local.get $5 + local.get $4 local.get $2 call $~lib/rt/stub/__retain i32.store offset=4 @@ -1959,7 +1909,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -1968,14 +1918,14 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load i32.store offset=8 local.get $6 - local.get $5 + local.get $4 i32.store - local.get $3 + local.get $5 call $~lib/rt/stub/__release end local.get $0 @@ -2052,55 +2002,23 @@ local.get $1 ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.2 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 4 - i32.le_u - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne ) (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 4 - i32.le_u - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 224 @@ -2110,7 +2028,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=4 call $~lib/rt/stub/__retain ) From 7b62f44b6dcb09c7db40067e61be2e00708bd8d2 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sun, 20 Dec 2020 11:16:58 +0200 Subject: [PATCH 04/10] update fixtures --- tests/compiler/std/hash.optimized.wat | 6 ++++++ tests/compiler/std/hash.untouched.wat | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/tests/compiler/std/hash.optimized.wat b/tests/compiler/std/hash.optimized.wat index f6ba0f153a..636afd70f2 100644 --- a/tests/compiler/std/hash.optimized.wat +++ b/tests/compiler/std/hash.optimized.wat @@ -6,6 +6,12 @@ (data (i32.const 1068) "\1c\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00a") (data (i32.const 1100) "\1c\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00a\00b") (data (i32.const 1132) "\1c\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00a\00b\00c") + (data (i32.const 1164) "\1c\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00a\00b\00c\00d") + (data (i32.const 1196) "\1c\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00a\00b\00c\00d\00e") + (data (i32.const 1228) "\1c\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00a\00b\00c\00d\00e\00f") + (data (i32.const 1260) ",\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00a\00b\00c\00d\00e\00f\00g") + (data (i32.const 1308) ",\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00a\00b\00c\00d\00e\00f\00g\00h") + (data (i32.const 1356) ",\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00a\00b\00c\00d\00e\00f\00g\00h\00i") (export "memory" (memory $0)) (start $~start) (func $~lib/util/hash/HASH<~lib/string/String|null> (param $0 i32) diff --git a/tests/compiler/std/hash.untouched.wat b/tests/compiler/std/hash.untouched.wat index 5a2bdcdbc5..879dacfb6e 100644 --- a/tests/compiler/std/hash.untouched.wat +++ b/tests/compiler/std/hash.untouched.wat @@ -11,6 +11,12 @@ (data (i32.const 44) "\1c\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00a\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 76) "\1c\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00a\00b\00\00\00\00\00\00\00\00\00") (data (i32.const 108) "\1c\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00a\00b\00c\00\00\00\00\00\00\00") + (data (i32.const 140) "\1c\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00a\00b\00c\00d\00\00\00\00\00") + (data (i32.const 172) "\1c\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00a\00b\00c\00d\00e\00\00\00") + (data (i32.const 204) "\1c\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00a\00b\00c\00d\00e\00f\00") + (data (i32.const 236) ",\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00a\00b\00c\00d\00e\00f\00g\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 284) ",\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00a\00b\00c\00d\00e\00f\00g\00h\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 332) ",\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00a\00b\00c\00d\00e\00f\00g\00h\00i\00\00\00\00\00\00\00\00\00\00\00") (table $0 1 funcref) (export "memory" (memory $0)) (start $~start) From 09860fd55771150c6ad875eeedb2adc517ef7baa Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Mon, 21 Dec 2020 23:15:49 +0200 Subject: [PATCH 05/10] refactor --- std/assembly/util/hash.ts | 42 +- tests/compiler/std/hash.optimized.wat | 443 ++- tests/compiler/std/hash.untouched.wat | 1605 +++++----- tests/compiler/std/map.optimized.wat | 870 ++++-- tests/compiler/std/map.untouched.wat | 3692 +++++++++++++++-------- tests/compiler/std/set.optimized.wat | 789 +++-- tests/compiler/std/set.untouched.wat | 2411 ++++++++------- tests/compiler/std/symbol.optimized.wat | 504 ++-- tests/compiler/std/symbol.untouched.wat | 1051 ++++--- 9 files changed, 6671 insertions(+), 4736 deletions(-) diff --git a/std/assembly/util/hash.ts b/std/assembly/util/hash.ts index 1869d53c75..ab0e8800d3 100644 --- a/std/assembly/util/hash.ts +++ b/std/assembly/util/hash.ts @@ -1,3 +1,5 @@ +// @ts-ignore: decorator +@inline export function HASH(key: T): u64 { if (isString()) { return hashStr(changetype(key)); @@ -8,7 +10,9 @@ export function HASH(key: T): u64 { if (sizeof() == 4) return hash32(reinterpret(f32(key))); if (sizeof() == 8) return hash64(reinterpret(f64(key))); } else { - if (sizeof() <= 4) return hash32(u32(key), sizeof()); + if (sizeof() == 1) return hash8(u64(key)); + if (sizeof() == 2) return hash16(u64(key)); + if (sizeof() == 4) return hash32(u64(key)); if (sizeof() == 8) return hash64(u64(key)); } return unreachable(); @@ -30,11 +34,33 @@ export function HASH(key: T): u64 { // @ts-ignore: decorator @inline const XXH64_SEED: u64 = 0; -// @ts-ignore: decorator -@inline -function hash32(key: u32, len: u64 = 4): u64 { - var h: u64 = XXH64_SEED + XXH64_P5 + len; - h ^= u64(key) * XXH64_P1; +function hash8(key: u64): u64 { + var h: u64 = XXH64_SEED + XXH64_P5 + 1; + h ^= key * XXH64_P1; + h = rotl(h, 23) * XXH64_P2 + XXH64_P3; + h ^= h >> 33; + h *= XXH64_P2; + h ^= h >> 29; + h *= XXH64_P3; + h ^= h >> 32; + return h; +} + +function hash16(key: u64): u64 { + var h: u64 = XXH64_SEED + XXH64_P5 + 2; + h ^= key * XXH64_P1; + h = rotl(h, 23) * XXH64_P2 + XXH64_P3; + h ^= h >> 33; + h *= XXH64_P2; + h ^= h >> 29; + h *= XXH64_P3; + h ^= h >> 32; + return h; +} + +function hash32(key: u64): u64 { + var h: u64 = XXH64_SEED + XXH64_P5 + 4; + h ^= key * XXH64_P1; h = rotl(h, 23) * XXH64_P2 + XXH64_P3; h ^= h >> 33; h *= XXH64_P2; @@ -44,8 +70,6 @@ function hash32(key: u32, len: u64 = 4): u64 { return h; } -// @ts-ignore: decorator -@inline function hash64(key: u64): u64 { var h: u64 = XXH64_SEED + XXH64_P5 + 8; h ^= rotl(key * XXH64_P2, 31) * XXH64_P1; @@ -70,8 +94,6 @@ function mix2(h: u64, s: u64): u64 { return (h ^ (rotl(s, 31) * XXH64_P1)) * XXH64_P1 + XXH64_P4; } -// @ts-ignore: decorator -@inline function hashStr(key: string): u64 { if (key === null) { return XXH64_SEED; diff --git a/tests/compiler/std/hash.optimized.wat b/tests/compiler/std/hash.optimized.wat index 636afd70f2..feee5e7279 100644 --- a/tests/compiler/std/hash.optimized.wat +++ b/tests/compiler/std/hash.optimized.wat @@ -14,291 +14,290 @@ (data (i32.const 1356) ",\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00a\00b\00c\00d\00e\00f\00g\00h\00i") (export "memory" (memory $0)) (start $~start) - (func $~lib/util/hash/HASH<~lib/string/String|null> (param $0 i32) + (func $~lib/util/hash/hashStr (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i64) (local $5 i64) (local $6 i64) - (local $7 i64) - (local $8 i32) + (local $7 i32) + (local $8 i64) + (local $9 i32) local.get $0 + i32.eqz if - local.get $0 - i32.const 20 - i32.sub - i32.load offset=16 - i32.const 1 - i32.shr_u - i32.const 1 - i32.shl - local.tee $2 - i32.const 32 - i32.ge_s - if (result i64) - i64.const 6983438078262162902 - local.set $4 - i64.const -4417276706812531889 - local.set $5 - i64.const 7046029288634856825 - local.set $6 - local.get $2 - local.tee $3 - i32.const 32 - i32.sub - local.set $8 - loop $while-continue|0 - local.get $1 - local.get $8 - i32.le_s - if - local.get $4 - local.get $0 - local.get $1 - i32.add - local.tee $2 - i64.load - i64.const -4417276706812531889 - i64.mul - i64.add - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - local.set $4 - local.get $5 - local.get $2 - i64.load offset=8 - i64.const -4417276706812531889 - i64.mul - i64.add - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - local.set $5 - local.get $7 - local.get $2 - i64.load offset=16 - i64.const -4417276706812531889 - i64.mul - i64.add - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - local.set $7 - local.get $6 - local.get $2 - i64.load offset=24 - i64.const -4417276706812531889 - i64.mul - i64.add - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - local.set $6 - local.get $1 - i32.const 32 - i32.add - local.set $1 - br $while-continue|0 - end - end - local.get $8 - local.get $1 - i32.sub - local.set $2 - local.get $3 - i64.extend_i32_s - local.get $4 - i64.const 1 - i64.rotl - local.get $5 - i64.const 7 - i64.rotl - i64.add - local.get $7 - i64.const 12 - i64.rotl - i64.add - local.get $6 - i64.const 18 - i64.rotl - i64.add - local.get $4 - i64.const -4417276706812531889 - i64.mul - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.get $5 - i64.const -4417276706812531889 - i64.mul - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.get $7 - i64.const -4417276706812531889 - i64.mul - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.get $6 - i64.const -4417276706812531889 - i64.mul - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - i64.add - else - local.get $2 - i64.extend_i32_s - i64.const 2870177450012600261 - i64.add - end + return + end + local.get $0 + i32.const 20 + i32.sub + i32.load offset=16 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl + local.tee $2 + i32.const 32 + i32.ge_s + if (result i64) + i64.const 6983438078262162902 local.set $4 - i32.const 0 - local.set $1 + i64.const -4417276706812531889 + local.set $5 + i64.const 7046029288634856825 + local.set $6 local.get $2 - i32.const 8 + local.tee $3 + i32.const 32 i32.sub - local.set $2 - loop $while-continue|1 - local.get $1 - local.get $2 + local.set $9 + loop $while-continue|0 + local.get $7 + local.get $9 i32.le_s if local.get $4 local.get $0 - local.get $1 + local.get $7 i32.add + local.tee $2 i64.load i64.const -4417276706812531889 i64.mul + i64.add i64.const 31 i64.rotl i64.const -7046029288634856825 i64.mul - i64.xor - i64.const 27 + local.set $4 + local.get $5 + local.get $2 + i64.load offset=8 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 i64.rotl i64.const -7046029288634856825 i64.mul - i64.const -8796714831421723037 + local.set $5 + local.get $8 + local.get $2 + i64.load offset=16 + i64.const -4417276706812531889 + i64.mul i64.add - local.set $4 - local.get $1 - i32.const 8 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $8 + local.get $6 + local.get $2 + i64.load offset=24 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $6 + local.get $7 + i32.const 32 i32.add - local.set $1 - br $while-continue|1 + local.set $7 + br $while-continue|0 end end + local.get $9 + local.get $7 + i32.sub + local.set $2 + local.get $3 + i64.extend_i32_s + local.get $4 + i64.const 1 + i64.rotl + local.get $5 + i64.const 7 + i64.rotl + i64.add + local.get $8 + i64.const 12 + i64.rotl + i64.add + local.get $6 + i64.const 18 + i64.rotl + i64.add + local.get $4 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.get $5 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.get $8 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.get $6 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + i64.add + else local.get $2 + i64.extend_i32_s + i64.const 2870177450012600261 + i64.add + end + local.set $4 + local.get $2 + i32.const 8 + i32.sub + local.set $2 + loop $while-continue|1 local.get $1 - i32.const 4 - i32.add - i32.ge_s + local.get $2 + i32.le_s if local.get $4 local.get $0 local.get $1 i32.add - i64.load32_u + i64.load + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl i64.const -7046029288634856825 i64.mul i64.xor - i64.const 23 + i64.const 27 i64.rotl - i64.const -4417276706812531889 + i64.const -7046029288634856825 i64.mul - i64.const 1609587929392839161 + i64.const -8796714831421723037 i64.add local.set $4 local.get $1 - i32.const 4 + i32.const 8 i32.add local.set $1 + br $while-continue|1 end - loop $while-continue|2 + end + local.get $2 + local.get $1 + i32.const 4 + i32.add + i32.ge_s + if + local.get $4 + local.get $0 + local.get $1 + i32.add + i64.load32_u + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $4 + local.get $1 + i32.const 4 + i32.add + local.set $1 + end + loop $while-continue|2 + local.get $1 + local.get $2 + i32.lt_s + if + local.get $4 + local.get $0 local.get $1 - local.get $2 - i32.lt_s - if - local.get $4 - local.get $0 - local.get $1 - i32.add - i64.load8_u - i64.const 2870177450012600261 - i64.mul - i64.add - i64.const 11 - i64.rotl - i64.const -7046029288634856825 - i64.mul - local.set $4 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $while-continue|2 - end + i32.add + i64.load8_u + i64.const 2870177450012600261 + i64.mul + i64.add + i64.const 11 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $4 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $while-continue|2 end end ) (func $~start - (local $0 f32) - (local $1 i64) - (local $2 f64) + (local $0 i64) i32.const 0 - call $~lib/util/hash/HASH<~lib/string/String|null> + call $~lib/util/hash/hashStr i32.const 1056 - call $~lib/util/hash/HASH<~lib/string/String|null> + call $~lib/util/hash/hashStr i32.const 1088 - call $~lib/util/hash/HASH<~lib/string/String|null> + call $~lib/util/hash/hashStr i32.const 1120 - call $~lib/util/hash/HASH<~lib/string/String|null> + call $~lib/util/hash/hashStr i32.const 1152 - call $~lib/util/hash/HASH<~lib/string/String|null> + call $~lib/util/hash/hashStr i32.const 1184 - call $~lib/util/hash/HASH<~lib/string/String|null> + call $~lib/util/hash/hashStr i32.const 1216 - call $~lib/util/hash/HASH<~lib/string/String|null> + call $~lib/util/hash/hashStr i32.const 1248 - call $~lib/util/hash/HASH<~lib/string/String|null> + call $~lib/util/hash/hashStr i32.const 1280 - call $~lib/util/hash/HASH<~lib/string/String|null> + call $~lib/util/hash/hashStr i32.const 1328 - call $~lib/util/hash/HASH<~lib/string/String|null> + call $~lib/util/hash/hashStr i32.const 1376 - call $~lib/util/hash/HASH<~lib/string/String|null> + call $~lib/util/hash/hashStr ) ) diff --git a/tests/compiler/std/hash.untouched.wat b/tests/compiler/std/hash.untouched.wat index 879dacfb6e..dae49c2483 100644 --- a/tests/compiler/std/hash.untouched.wat +++ b/tests/compiler/std/hash.untouched.wat @@ -1,11 +1,10 @@ (module (type $none_=>_none (func)) (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_=>_i64 (func (param i32) (result i64))) + (type $i64_=>_i64 (func (param i64) (result i64))) (type $i32_=>_none (func (param i32))) (type $i64_=>_i32 (func (param i64) (result i32))) - (type $f32_=>_i64 (func (param f32) (result i64))) - (type $f64_=>_i64 (func (param f64) (result i64))) + (type $i32_=>_i64 (func (param i32) (result i64))) (memory $0 1) (data (i32.const 12) "\1c\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 44) "\1c\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00a\00\00\00\00\00\00\00\00\00\00\00") @@ -34,849 +33,362 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/hash/HASH<~lib/string/String|null> (param $0 i32) (result i64) - (local $1 i32) - (local $2 i64) - (local $3 i32) + (func $~lib/util/hash/hashStr (param $0 i32) (result i64) + (local $1 i64) + (local $2 i32) + (local $3 i64) (local $4 i64) (local $5 i64) (local $6 i64) - (local $7 i64) + (local $7 i32) (local $8 i32) (local $9 i32) - (local $10 i32) + (local $10 i64) (local $11 i64) - (local $12 i64) + (local $12 i32) local.get $0 call $~lib/rt/stub/__retain local.set $0 - i32.const 1 - drop - block $~lib/util/hash/hashStr|inlined.0 (result i64) - local.get $0 - call $~lib/rt/stub/__retain + local.get $0 + i32.const 0 + i32.eq + if + i64.const 0 local.set $1 + local.get $0 + call $~lib/rt/stub/__release local.get $1 - i32.const 0 - i32.eq - if - i64.const 0 - local.set $2 - local.get $1 - call $~lib/rt/stub/__release - local.get $2 - br $~lib/util/hash/hashStr|inlined.0 - end - local.get $1 - call $~lib/string/String#get:length - i32.const 1 - i32.shl - local.set $3 + return + end + local.get $0 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + local.set $2 + i64.const 0 + local.set $3 + local.get $2 + i32.const 32 + i32.ge_s + if i64.const 0 - local.set $2 - local.get $3 - i32.const 32 - i32.ge_s - if - i64.const 0 - i64.const -7046029288634856825 - i64.add - i64.const -4417276706812531889 - i64.add - local.set $4 - i64.const 0 - i64.const -4417276706812531889 - i64.add - local.set $5 - i64.const 0 - local.set $6 - i64.const 0 - i64.const -7046029288634856825 - i64.sub - local.set $7 - local.get $3 - local.set $8 - i32.const 0 - local.set $9 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - loop $while-continue|0 - local.get $9 - local.get $3 - i32.le_s - local.set $10 - local.get $10 - if - local.get $4 - local.set $12 - local.get $1 - local.get $9 - i32.add - i64.load - local.set $11 - local.get $12 - local.get $11 - i64.const -4417276706812531889 - i64.mul - i64.add - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - local.set $4 - local.get $5 - local.set $12 - local.get $1 - local.get $9 - i32.add - i64.load offset=8 - local.set $11 - local.get $12 - local.get $11 - i64.const -4417276706812531889 - i64.mul - i64.add - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - local.set $5 - local.get $6 - local.set $12 - local.get $1 - local.get $9 - i32.add - i64.load offset=16 - local.set $11 - local.get $12 - local.get $11 - i64.const -4417276706812531889 - i64.mul - i64.add - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - local.set $6 - local.get $7 - local.set $12 - local.get $1 - local.get $9 - i32.add - i64.load offset=24 - local.set $11 - local.get $12 - local.get $11 - i64.const -4417276706812531889 - i64.mul - i64.add - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - local.set $7 - local.get $9 - i32.const 32 - i32.add - local.set $9 - br $while-continue|0 - end - end - local.get $4 - i64.const 1 - i64.rotl - local.get $5 - i64.const 7 - i64.rotl - i64.add - local.get $6 - i64.const 12 - i64.rotl - i64.add - local.get $7 - i64.const 18 - i64.rotl - i64.add - local.set $2 - local.get $4 - i64.const -4417276706812531889 - i64.mul - local.set $4 - local.get $5 - i64.const -4417276706812531889 - i64.mul - local.set $5 - local.get $6 - i64.const -4417276706812531889 - i64.mul - local.set $6 - local.get $7 - i64.const -4417276706812531889 - i64.mul - local.set $7 - local.get $2 - local.set $12 - local.get $4 - local.set $11 - local.get $12 - local.get $11 - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.set $2 - local.get $2 - local.set $12 - local.get $5 - local.set $11 - local.get $12 - local.get $11 - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.set $2 - local.get $2 - local.set $12 - local.get $6 - local.set $11 - local.get $12 - local.get $11 - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.set $2 - local.get $2 - local.set $12 - local.get $7 - local.set $11 - local.get $12 - local.get $11 - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.set $2 - local.get $2 - local.get $8 - i64.extend_i32_s - i64.add - local.set $2 - local.get $3 - local.get $9 - i32.sub - local.set $3 - else - local.get $3 - i64.extend_i32_s - i64.const 0 - i64.add - i64.const 2870177450012600261 - i64.add - local.set $2 - end + i64.const -7046029288634856825 + i64.add + i64.const -4417276706812531889 + i64.add + local.set $1 + i64.const 0 + i64.const -4417276706812531889 + i64.add + local.set $4 + i64.const 0 + local.set $5 + i64.const 0 + i64.const -7046029288634856825 + i64.sub + local.set $6 + local.get $2 + local.set $7 i32.const 0 - local.set $9 - local.get $3 - i32.const 8 + local.set $8 + local.get $2 + i32.const 32 i32.sub - local.set $3 - loop $while-continue|1 - local.get $9 - local.get $3 - i32.le_s - local.set $8 + local.set $2 + loop $while-continue|0 local.get $8 + local.get $2 + i32.le_s + local.set $9 + local.get $9 if - local.get $2 local.get $1 - local.get $9 + local.set $11 + local.get $0 + local.get $8 i32.add i64.load + local.set $10 + local.get $11 + local.get $10 i64.const -4417276706812531889 i64.mul + i64.add i64.const 31 i64.rotl i64.const -7046029288634856825 i64.mul - i64.xor - local.set $2 - local.get $2 - i64.const 27 + local.set $1 + local.get $4 + local.set $11 + local.get $0 + local.get $8 + i32.add + i64.load offset=8 + local.set $10 + local.get $11 + local.get $10 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 i64.rotl i64.const -7046029288634856825 i64.mul - i64.const -8796714831421723037 - i64.add - local.set $2 - local.get $9 - i32.const 8 + local.set $4 + local.get $5 + local.set $11 + local.get $0 + local.get $8 i32.add - local.set $9 - br $while-continue|1 - end - end - local.get $9 - i32.const 4 - i32.add - local.get $3 - i32.le_s - if - local.get $2 - local.get $1 - local.get $9 - i32.add - i64.load32_u - i64.const -7046029288634856825 - i64.mul - i64.xor - local.set $2 - local.get $2 - i64.const 23 - i64.rotl - i64.const -4417276706812531889 - i64.mul - i64.const 1609587929392839161 - i64.add - local.set $2 - local.get $9 - i32.const 4 - i32.add - local.set $9 - end - loop $while-continue|2 - local.get $9 - local.get $3 - i32.lt_s - local.set $8 - local.get $8 - if - local.get $2 - local.get $1 - local.get $9 + i64.load offset=16 + local.set $10 + local.get $11 + local.get $10 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $5 + local.get $6 + local.set $11 + local.get $0 + local.get $8 i32.add - i64.load8_u - i64.const 2870177450012600261 + i64.load offset=24 + local.set $10 + local.get $11 + local.get $10 + i64.const -4417276706812531889 i64.mul i64.add - local.set $2 - local.get $2 - i64.const 11 + i64.const 31 i64.rotl i64.const -7046029288634856825 i64.mul - local.set $2 - local.get $9 - i32.const 1 + local.set $6 + local.get $8 + i32.const 32 i32.add - local.set $9 - br $while-continue|2 + local.set $8 + br $while-continue|0 end end - local.get $2 - local.get $2 - i64.const 33 - i64.shr_u - i64.xor - local.set $2 - local.get $2 + local.get $1 + i64.const 1 + i64.rotl + local.get $4 + i64.const 7 + i64.rotl + i64.add + local.get $5 + i64.const 12 + i64.rotl + i64.add + local.get $6 + i64.const 18 + i64.rotl + i64.add + local.set $3 + local.get $1 i64.const -4417276706812531889 i64.mul - local.set $2 - local.get $2 - local.get $2 - i64.const 29 - i64.shr_u + local.set $1 + local.get $4 + i64.const -4417276706812531889 + i64.mul + local.set $4 + local.get $5 + i64.const -4417276706812531889 + i64.mul + local.set $5 + local.get $6 + i64.const -4417276706812531889 + i64.mul + local.set $6 + local.get $3 + local.set $11 + local.get $1 + local.set $10 + local.get $11 + local.get $10 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul i64.xor - local.set $2 - local.get $2 - i64.const 1609587929392839161 + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $3 + local.get $3 + local.set $11 + local.get $4 + local.set $10 + local.get $11 + local.get $10 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 i64.mul - local.set $2 - local.get $2 - local.get $2 - i64.const 32 - i64.shr_u i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $3 + local.get $3 + local.set $11 + local.get $5 + local.set $10 + local.get $11 + local.get $10 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $3 + local.get $3 + local.set $11 + local.get $6 + local.set $10 + local.get $11 + local.get $10 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $3 + local.get $3 + local.get $7 + i64.extend_i32_s + i64.add + local.set $3 + local.get $2 + local.get $8 + i32.sub local.set $2 + else local.get $2 - local.set $7 - local.get $1 - call $~lib/rt/stub/__release - local.get $7 + i64.extend_i32_s + i64.const 0 + i64.add + i64.const 2870177450012600261 + i64.add + local.set $3 end - local.set $2 - local.get $0 - call $~lib/rt/stub/__release + i32.const 0 + local.set $12 local.get $2 - return - ) - (func $std/hash/check (param $0 i64) (result i32) - i32.const 1 - ) - (func $~lib/util/hash/HASH<~lib/string/String> (param $0 i32) (result i64) - (local $1 i32) - (local $2 i64) - (local $3 i32) - (local $4 i64) - (local $5 i64) - (local $6 i64) - (local $7 i64) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i64) - (local $12 i64) - local.get $0 - call $~lib/rt/stub/__retain - local.set $0 - i32.const 1 - drop - block $~lib/util/hash/hashStr|inlined.1 (result i64) - local.get $0 - call $~lib/rt/stub/__retain - local.set $1 - local.get $1 - i32.const 0 - i32.eq - if - i64.const 0 - local.set $2 - local.get $1 - call $~lib/rt/stub/__release - local.get $2 - br $~lib/util/hash/hashStr|inlined.1 - end - local.get $1 - call $~lib/string/String#get:length - i32.const 1 - i32.shl - local.set $3 - i64.const 0 - local.set $2 - local.get $3 - i32.const 32 - i32.ge_s + i32.const 8 + i32.sub + local.set $2 + loop $while-continue|1 + local.get $12 + local.get $2 + i32.le_s + local.set $8 + local.get $8 if - i64.const 0 - i64.const -7046029288634856825 - i64.add - i64.const -4417276706812531889 - i64.add - local.set $4 - i64.const 0 - i64.const -4417276706812531889 - i64.add - local.set $5 - i64.const 0 - local.set $6 - i64.const 0 - i64.const -7046029288634856825 - i64.sub - local.set $7 local.get $3 - local.set $8 - i32.const 0 - local.set $9 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - loop $while-continue|0 - local.get $9 - local.get $3 - i32.le_s - local.set $10 - local.get $10 - if - local.get $4 - local.set $12 - local.get $1 - local.get $9 - i32.add - i64.load - local.set $11 - local.get $12 - local.get $11 - i64.const -4417276706812531889 - i64.mul - i64.add - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - local.set $4 - local.get $5 - local.set $12 - local.get $1 - local.get $9 - i32.add - i64.load offset=8 - local.set $11 - local.get $12 - local.get $11 - i64.const -4417276706812531889 - i64.mul - i64.add - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - local.set $5 - local.get $6 - local.set $12 - local.get $1 - local.get $9 - i32.add - i64.load offset=16 - local.set $11 - local.get $12 - local.get $11 - i64.const -4417276706812531889 - i64.mul - i64.add - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - local.set $6 - local.get $7 - local.set $12 - local.get $1 - local.get $9 - i32.add - i64.load offset=24 - local.set $11 - local.get $12 - local.get $11 - i64.const -4417276706812531889 - i64.mul - i64.add - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - local.set $7 - local.get $9 - i32.const 32 - i32.add - local.set $9 - br $while-continue|0 - end - end - local.get $4 - i64.const 1 - i64.rotl - local.get $5 - i64.const 7 - i64.rotl - i64.add - local.get $6 - i64.const 12 - i64.rotl - i64.add - local.get $7 - i64.const 18 - i64.rotl - i64.add - local.set $2 - local.get $4 - i64.const -4417276706812531889 - i64.mul - local.set $4 - local.get $5 - i64.const -4417276706812531889 - i64.mul - local.set $5 - local.get $6 - i64.const -4417276706812531889 - i64.mul - local.set $6 - local.get $7 + local.get $0 + local.get $12 + i32.add + i64.load i64.const -4417276706812531889 i64.mul - local.set $7 - local.get $2 - local.set $12 - local.get $4 - local.set $11 - local.get $12 - local.get $11 i64.const 31 i64.rotl i64.const -7046029288634856825 i64.mul i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.set $2 - local.get $2 - local.set $12 - local.get $5 - local.set $11 - local.get $12 - local.get $11 - i64.const 31 + local.set $3 + local.get $3 + i64.const 27 i64.rotl i64.const -7046029288634856825 i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul i64.const -8796714831421723037 i64.add - local.set $2 - local.get $2 - local.set $12 - local.get $6 - local.set $11 + local.set $3 local.get $12 - local.get $11 - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.set $2 - local.get $2 + i32.const 8 + i32.add local.set $12 - local.get $7 - local.set $11 - local.get $12 - local.get $11 - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.set $2 - local.get $2 - local.get $8 - i64.extend_i32_s - i64.add - local.set $2 - local.get $3 - local.get $9 - i32.sub - local.set $3 - else - local.get $3 - i64.extend_i32_s - i64.const 0 - i64.add - i64.const 2870177450012600261 - i64.add - local.set $2 + br $while-continue|1 end - i32.const 0 - local.set $9 + end + local.get $12 + i32.const 4 + i32.add + local.get $2 + i32.le_s + if local.get $3 - i32.const 8 - i32.sub + local.get $0 + local.get $12 + i32.add + i64.load32_u + i64.const -7046029288634856825 + i64.mul + i64.xor local.set $3 - loop $while-continue|1 - local.get $9 - local.get $3 - i32.le_s - local.set $8 - local.get $8 - if - local.get $2 - local.get $1 - local.get $9 - i32.add - i64.load - i64.const -4417276706812531889 - i64.mul - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - local.set $2 - local.get $2 - i64.const 27 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.set $2 - local.get $9 - i32.const 8 - i32.add - local.set $9 - br $while-continue|1 - end - end - local.get $9 + local.get $3 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $3 + local.get $12 i32.const 4 i32.add - local.get $3 - i32.le_s + local.set $12 + end + loop $while-continue|2 + local.get $12 + local.get $2 + i32.lt_s + local.set $8 + local.get $8 if - local.get $2 - local.get $1 - local.get $9 + local.get $3 + local.get $0 + local.get $12 i32.add - i64.load32_u - i64.const -7046029288634856825 + i64.load8_u + i64.const 2870177450012600261 i64.mul - i64.xor - local.set $2 - local.get $2 - i64.const 23 + i64.add + local.set $3 + local.get $3 + i64.const 11 i64.rotl - i64.const -4417276706812531889 + i64.const -7046029288634856825 i64.mul - i64.const 1609587929392839161 - i64.add - local.set $2 - local.get $9 - i32.const 4 + local.set $3 + local.get $12 + i32.const 1 i32.add - local.set $9 - end - loop $while-continue|2 - local.get $9 - local.get $3 - i32.lt_s - local.set $8 - local.get $8 - if - local.get $2 - local.get $1 - local.get $9 - i32.add - i64.load8_u - i64.const 2870177450012600261 - i64.mul - i64.add - local.set $2 - local.get $2 - i64.const 11 - i64.rotl - i64.const -7046029288634856825 - i64.mul - local.set $2 - local.get $9 - i32.const 1 - i32.add - local.set $9 - br $while-continue|2 - end + local.set $12 + br $while-continue|2 end - local.get $2 - local.get $2 - i64.const 33 - i64.shr_u - i64.xor - local.set $2 - local.get $2 - i64.const -4417276706812531889 - i64.mul - local.set $2 - local.get $2 - local.get $2 - i64.const 29 - i64.shr_u - i64.xor - local.set $2 - local.get $2 - i64.const 1609587929392839161 - i64.mul - local.set $2 - local.get $2 - local.get $2 - i64.const 32 - i64.shr_u - i64.xor - local.set $2 - local.get $2 - local.set $7 - local.get $1 - call $~lib/rt/stub/__release - local.get $7 end - local.set $2 - local.get $0 - call $~lib/rt/stub/__release - local.get $2 - return - ) - (func $~lib/util/hash/HASH (param $0 f32) (result i64) - (local $1 i32) - (local $2 i64) - (local $3 i64) - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $0 - i32.reinterpret_f32 - local.set $1 - i64.const 4 - local.set $2 - i64.const 0 - i64.const 2870177450012600261 - i64.add - local.get $2 - i64.add - local.set $3 - local.get $3 - local.get $1 - i64.extend_i32_u - i64.const -7046029288634856825 - i64.mul - i64.xor - local.set $3 - local.get $3 - i64.const 23 - i64.rotl - i64.const -4417276706812531889 - i64.mul - i64.const 1609587929392839161 - i64.add - local.set $3 local.get $3 local.get $3 i64.const 33 @@ -904,36 +416,74 @@ i64.xor local.set $3 local.get $3 - return + local.set $6 + local.get $0 + call $~lib/rt/stub/__release + local.get $6 ) - (func $~lib/util/hash/HASH (param $0 f64) (result i64) - (local $1 i64) - (local $2 i64) - i32.const 0 - drop - i32.const 0 - drop + (func $std/hash/check (param $0 i64) (result i32) i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop + ) + (func $~lib/util/hash/hash32 (param $0 i64) (result i64) + (local $1 i64) + i64.const 0 + i64.const 2870177450012600261 + i64.add + i64.const 4 + i64.add + local.set $1 + local.get $1 local.get $0 - i64.reinterpret_f64 + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $1 + local.get $1 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $1 + local.get $1 + local.get $1 + i64.const 33 + i64.shr_u + i64.xor + local.set $1 + local.get $1 + i64.const -4417276706812531889 + i64.mul + local.set $1 + local.get $1 + local.get $1 + i64.const 29 + i64.shr_u + i64.xor + local.set $1 + local.get $1 + i64.const 1609587929392839161 + i64.mul local.set $1 + local.get $1 + local.get $1 + i64.const 32 + i64.shr_u + i64.xor + local.set $1 + local.get $1 + ) + (func $~lib/util/hash/hash64 (param $0 i64) (result i64) + (local $1 i64) i64.const 0 i64.const 2870177450012600261 i64.add i64.const 8 i64.add - local.set $2 - local.get $2 + local.set $1 local.get $1 + local.get $0 i64.const -4417276706812531889 i64.mul i64.const 31 @@ -941,135 +491,482 @@ i64.const -7046029288634856825 i64.mul i64.xor - local.set $2 - local.get $2 + local.set $1 + local.get $1 i64.const 27 i64.rotl i64.const -7046029288634856825 i64.mul i64.const -8796714831421723037 i64.add - local.set $2 - local.get $2 - local.get $2 + local.set $1 + local.get $1 + local.get $1 i64.const 33 i64.shr_u i64.xor - local.set $2 - local.get $2 + local.set $1 + local.get $1 i64.const -4417276706812531889 i64.mul - local.set $2 - local.get $2 - local.get $2 + local.set $1 + local.get $1 + local.get $1 i64.const 29 i64.shr_u i64.xor - local.set $2 - local.get $2 + local.set $1 + local.get $1 i64.const 1609587929392839161 i64.mul - local.set $2 - local.get $2 - local.get $2 + local.set $1 + local.get $1 + local.get $1 i64.const 32 i64.shr_u i64.xor - local.set $2 - local.get $2 - return + local.set $1 + local.get $1 ) (func $start:std/hash - i32.const 0 - call $~lib/util/hash/HASH<~lib/string/String|null> + (local $0 i32) + (local $1 i64) + (local $2 f32) + (local $3 f64) + block $~lib/util/hash/HASH<~lib/string/String|null>|inlined.0 (result i64) + i32.const 0 + call $~lib/rt/stub/__retain + local.set $0 + i32.const 1 + drop + local.get $0 + call $~lib/util/hash/hashStr + local.set $1 + local.get $0 + call $~lib/rt/stub/__release + local.get $1 + br $~lib/util/hash/HASH<~lib/string/String|null>|inlined.0 + end call $std/hash/check drop - i32.const 32 - call $~lib/util/hash/HASH<~lib/string/String> + block $~lib/util/hash/HASH<~lib/string/String>|inlined.0 (result i64) + i32.const 32 + local.set $0 + i32.const 1 + drop + local.get $0 + call $~lib/util/hash/hashStr + local.set $1 + local.get $0 + call $~lib/rt/stub/__release + local.get $1 + br $~lib/util/hash/HASH<~lib/string/String>|inlined.0 + end call $std/hash/check drop - i32.const 64 - call $~lib/util/hash/HASH<~lib/string/String> + block $~lib/util/hash/HASH<~lib/string/String>|inlined.1 (result i64) + i32.const 64 + local.set $0 + i32.const 1 + drop + local.get $0 + call $~lib/util/hash/hashStr + local.set $1 + local.get $0 + call $~lib/rt/stub/__release + local.get $1 + br $~lib/util/hash/HASH<~lib/string/String>|inlined.1 + end call $std/hash/check drop - i32.const 96 - call $~lib/util/hash/HASH<~lib/string/String> + block $~lib/util/hash/HASH<~lib/string/String>|inlined.2 (result i64) + i32.const 96 + local.set $0 + i32.const 1 + drop + local.get $0 + call $~lib/util/hash/hashStr + local.set $1 + local.get $0 + call $~lib/rt/stub/__release + local.get $1 + br $~lib/util/hash/HASH<~lib/string/String>|inlined.2 + end call $std/hash/check drop - i32.const 128 - call $~lib/util/hash/HASH<~lib/string/String> + block $~lib/util/hash/HASH<~lib/string/String>|inlined.3 (result i64) + i32.const 128 + local.set $0 + i32.const 1 + drop + local.get $0 + call $~lib/util/hash/hashStr + local.set $1 + local.get $0 + call $~lib/rt/stub/__release + local.get $1 + br $~lib/util/hash/HASH<~lib/string/String>|inlined.3 + end call $std/hash/check drop - i32.const 160 - call $~lib/util/hash/HASH<~lib/string/String> + block $~lib/util/hash/HASH<~lib/string/String>|inlined.4 (result i64) + i32.const 160 + local.set $0 + i32.const 1 + drop + local.get $0 + call $~lib/util/hash/hashStr + local.set $1 + local.get $0 + call $~lib/rt/stub/__release + local.get $1 + br $~lib/util/hash/HASH<~lib/string/String>|inlined.4 + end call $std/hash/check drop - i32.const 192 - call $~lib/util/hash/HASH<~lib/string/String> + block $~lib/util/hash/HASH<~lib/string/String>|inlined.5 (result i64) + i32.const 192 + local.set $0 + i32.const 1 + drop + local.get $0 + call $~lib/util/hash/hashStr + local.set $1 + local.get $0 + call $~lib/rt/stub/__release + local.get $1 + br $~lib/util/hash/HASH<~lib/string/String>|inlined.5 + end call $std/hash/check drop - i32.const 224 - call $~lib/util/hash/HASH<~lib/string/String> + block $~lib/util/hash/HASH<~lib/string/String>|inlined.6 (result i64) + i32.const 224 + local.set $0 + i32.const 1 + drop + local.get $0 + call $~lib/util/hash/hashStr + local.set $1 + local.get $0 + call $~lib/rt/stub/__release + local.get $1 + br $~lib/util/hash/HASH<~lib/string/String>|inlined.6 + end call $std/hash/check drop - i32.const 256 - call $~lib/util/hash/HASH<~lib/string/String> + block $~lib/util/hash/HASH<~lib/string/String>|inlined.7 (result i64) + i32.const 256 + local.set $0 + i32.const 1 + drop + local.get $0 + call $~lib/util/hash/hashStr + local.set $1 + local.get $0 + call $~lib/rt/stub/__release + local.get $1 + br $~lib/util/hash/HASH<~lib/string/String>|inlined.7 + end call $std/hash/check drop - i32.const 304 - call $~lib/util/hash/HASH<~lib/string/String> + block $~lib/util/hash/HASH<~lib/string/String>|inlined.8 (result i64) + i32.const 304 + local.set $0 + i32.const 1 + drop + local.get $0 + call $~lib/util/hash/hashStr + local.set $1 + local.get $0 + call $~lib/rt/stub/__release + local.get $1 + br $~lib/util/hash/HASH<~lib/string/String>|inlined.8 + end call $std/hash/check drop - i32.const 352 - call $~lib/util/hash/HASH<~lib/string/String> + block $~lib/util/hash/HASH<~lib/string/String>|inlined.9 (result i64) + i32.const 352 + local.set $0 + i32.const 1 + drop + local.get $0 + call $~lib/util/hash/hashStr + local.set $1 + local.get $0 + call $~lib/rt/stub/__release + local.get $1 + br $~lib/util/hash/HASH<~lib/string/String>|inlined.9 + end call $std/hash/check drop - f32.const 0 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.0 (result i64) + f32.const 0 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $2 + i32.reinterpret_f32 + i64.extend_i32_u + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.0 + end call $std/hash/check drop - f32.const 1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.1 (result i64) + f32.const 1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $2 + i32.reinterpret_f32 + i64.extend_i32_u + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.1 + end call $std/hash/check drop - f32.const 1.100000023841858 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.2 (result i64) + f32.const 1.100000023841858 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $2 + i32.reinterpret_f32 + i64.extend_i32_u + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.2 + end call $std/hash/check drop - f32.const 0 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.3 (result i64) + f32.const 0 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $2 + i32.reinterpret_f32 + i64.extend_i32_u + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.3 + end call $std/hash/check drop - f32.const inf - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.4 (result i64) + f32.const inf + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $2 + i32.reinterpret_f32 + i64.extend_i32_u + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.4 + end call $std/hash/check drop - f32.const nan:0x400000 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.5 (result i64) + f32.const nan:0x400000 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $2 + i32.reinterpret_f32 + i64.extend_i32_u + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.5 + end call $std/hash/check drop - f64.const 0 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.0 (result i64) + f64.const 0 + local.set $3 + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $3 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.0 + end call $std/hash/check drop - f64.const 1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.1 (result i64) + f64.const 1 + local.set $3 + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $3 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.1 + end call $std/hash/check drop - f64.const 1.1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.2 (result i64) + f64.const 1.1 + local.set $3 + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $3 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.2 + end call $std/hash/check drop - f64.const 0 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.3 (result i64) + f64.const 0 + local.set $3 + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $3 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.3 + end call $std/hash/check drop - f64.const inf - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.4 (result i64) + f64.const inf + local.set $3 + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $3 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.4 + end call $std/hash/check drop - f64.const nan:0x8000000000000 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.5 (result i64) + f64.const nan:0x8000000000000 + local.set $3 + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $3 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.5 + end call $std/hash/check drop ) diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index b3db9e9321..71f78a91b5 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -1,12 +1,12 @@ (module (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_none (func (param i32))) - (type $i32_=>_i64 (func (param i32) (result i64))) + (type $i64_=>_i64 (func (param i64) (result i64))) (type $i32_i32_i64_=>_i32 (func (param i32 i32 i64) (result i32))) (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) (type $i32_i64_i64_=>_i32 (func (param i32 i64 i64) (result i32))) @@ -26,9 +26,6 @@ (type $i32_f64_i64_=>_i32 (func (param i32 f64 i64) (result i32))) (type $i32_f64_f64_=>_i32 (func (param i32 f64 f64) (result i32))) (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) - (type $i64_=>_i64 (func (param i64) (result i64))) - (type $f32_=>_i64 (func (param f32) (result i64))) - (type $f64_=>_i64 (func (param f64) (result i64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 1036) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00(\00\00\00a\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") @@ -1296,14 +1293,8 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/util/hash/HASH (param $0 i32) (result i64) - (local $1 i64) + (func $~lib/util/hash/hash8 (param $0 i64) (result i64) local.get $0 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i64.extend_i32_u i64.const -7046029288634856825 i64.mul i64.const 2870177450012600262 @@ -1314,22 +1305,22 @@ i64.mul i64.const 1609587929392839161 i64.add - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i64.const 33 i64.shr_u i64.xor i64.const -4417276706812531889 i64.mul - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i64.const 29 i64.shr_u i64.xor i64.const 1609587929392839161 i64.mul - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i64.const 32 i64.shr_u i64.xor @@ -1383,7 +1374,12 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i64.extend_i32_s + call $~lib/util/hash/hash8 call $~lib/map/Map#find i32.const 0 i32.ne @@ -1448,7 +1444,8 @@ local.get $2 local.get $5 local.get $6 - call $~lib/util/hash/HASH + i64.extend_i32_s + call $~lib/util/hash/hash8 local.get $1 i64.extend_i32_u i64.and @@ -1529,7 +1526,12 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i64.extend_i32_s + call $~lib/util/hash/hash8 local.tee $5 call $~lib/map/Map#find local.tee $3 @@ -1623,7 +1625,12 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i64.extend_i32_s + call $~lib/util/hash/hash8 call $~lib/map/Map#find local.tee $0 i32.eqz @@ -2501,7 +2508,8 @@ local.get $2 local.get $5 local.get $6 - call $~lib/util/hash/HASH + i64.extend_i32_s + call $~lib/util/hash/hash8 local.get $1 i64.extend_i32_u i64.and @@ -2581,7 +2589,12 @@ (local $5 i64) local.get $1 local.tee $3 - call $~lib/util/hash/HASH + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i64.extend_i32_s + call $~lib/util/hash/hash8 local.set $5 local.get $0 i32.load @@ -2712,10 +2725,8 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/util/hash/HASH (param $0 i32) (result i64) - (local $1 i64) + (func $~lib/util/hash/hash32 (param $0 i64) (result i64) local.get $0 - i64.extend_i32_u i64.const -7046029288634856825 i64.mul i64.const 2870177450012600265 @@ -2726,22 +2737,22 @@ i64.mul i64.const 1609587929392839161 i64.add - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i64.const 33 i64.shr_u i64.xor i64.const -4417276706812531889 i64.mul - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i64.const 29 i64.shr_u i64.xor i64.const 1609587929392839161 i64.mul - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i64.const 32 i64.shr_u i64.xor @@ -2849,7 +2860,8 @@ local.get $2 local.get $5 local.get $6 - call $~lib/util/hash/HASH + i64.extend_i32_s + call $~lib/util/hash/hash32 local.get $1 i64.extend_i32_u i64.and @@ -2930,7 +2942,8 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i64.extend_i32_s + call $~lib/util/hash/hash32 local.tee $5 call $~lib/map/Map#find local.tee $3 @@ -3025,7 +3038,12 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i64.extend_i32_s + call $~lib/util/hash/hash8 call $~lib/map/Map#find local.tee $1 i32.eqz @@ -3636,47 +3654,14 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/util/hash/HASH (param $0 i32) (result i64) - (local $1 i64) - local.get $0 - i32.const 255 - i32.and - i64.extend_i32_u - i64.const -7046029288634856825 - i64.mul - i64.const 2870177450012600262 - i64.xor - i64.const 23 - i64.rotl - i64.const -4417276706812531889 - i64.mul - i64.const 1609587929392839161 - i64.add - local.tee $1 - local.get $1 - i64.const 33 - i64.shr_u - i64.xor - i64.const -4417276706812531889 - i64.mul - local.tee $1 - local.get $1 - i64.const 29 - i64.shr_u - i64.xor - i64.const 1609587929392839161 - i64.mul - local.tee $1 - local.get $1 - i64.const 32 - i64.shr_u - i64.xor - ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.const 255 + i32.and + i64.extend_i32_u + call $~lib/util/hash/hash8 call $~lib/map/Map#find i32.const 0 i32.ne @@ -3741,7 +3726,8 @@ local.get $2 local.get $5 local.get $6 - call $~lib/util/hash/HASH + i64.extend_i32_u + call $~lib/util/hash/hash8 local.get $1 i64.extend_i32_u i64.and @@ -3822,7 +3808,10 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.const 255 + i32.and + i64.extend_i32_u + call $~lib/util/hash/hash8 local.tee $5 call $~lib/map/Map#find local.tee $3 @@ -3916,7 +3905,10 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.const 255 + i32.and + i64.extend_i32_u + call $~lib/util/hash/hash8 call $~lib/map/Map#find local.tee $0 i32.eqz @@ -4104,7 +4096,8 @@ local.get $2 local.get $5 local.get $6 - call $~lib/util/hash/HASH + i64.extend_i32_u + call $~lib/util/hash/hash8 local.get $1 i64.extend_i32_u i64.and @@ -4184,7 +4177,10 @@ (local $5 i64) local.get $1 local.tee $3 - call $~lib/util/hash/HASH + i32.const 255 + i32.and + i64.extend_i32_u + call $~lib/util/hash/hash8 local.set $5 local.get $0 i32.load @@ -4320,7 +4316,10 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.const 255 + i32.and + i64.extend_i32_u + call $~lib/util/hash/hash8 call $~lib/map/Map#find local.tee $1 i32.eqz @@ -4876,14 +4875,8 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/util/hash/HASH (param $0 i32) (result i64) - (local $1 i64) + (func $~lib/util/hash/hash16 (param $0 i64) (result i64) local.get $0 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i64.extend_i32_u i64.const -7046029288634856825 i64.mul i64.const 2870177450012600263 @@ -4894,22 +4887,22 @@ i64.mul i64.const 1609587929392839161 i64.add - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i64.const 33 i64.shr_u i64.xor i64.const -4417276706812531889 i64.mul - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i64.const 29 i64.shr_u i64.xor i64.const 1609587929392839161 i64.mul - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i64.const 32 i64.shr_u i64.xor @@ -4963,7 +4956,12 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i64.extend_i32_s + call $~lib/util/hash/hash16 call $~lib/map/Map#find i32.const 0 i32.ne @@ -5028,7 +5026,8 @@ local.get $2 local.get $5 local.get $6 - call $~lib/util/hash/HASH + i64.extend_i32_s + call $~lib/util/hash/hash16 local.get $1 i64.extend_i32_u i64.and @@ -5109,7 +5108,12 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i64.extend_i32_s + call $~lib/util/hash/hash16 local.tee $5 call $~lib/map/Map#find local.tee $3 @@ -5203,7 +5207,12 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i64.extend_i32_s + call $~lib/util/hash/hash16 call $~lib/map/Map#find local.tee $0 i32.eqz @@ -5445,7 +5454,8 @@ local.get $2 local.get $5 local.get $6 - call $~lib/util/hash/HASH + i64.extend_i32_s + call $~lib/util/hash/hash16 local.get $1 i64.extend_i32_u i64.and @@ -5525,7 +5535,12 @@ (local $5 i64) local.get $1 local.tee $3 - call $~lib/util/hash/HASH + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i64.extend_i32_s + call $~lib/util/hash/hash16 local.set $5 local.get $0 i32.load @@ -5661,7 +5676,12 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i64.extend_i32_s + call $~lib/util/hash/hash16 call $~lib/map/Map#find local.tee $1 i32.eqz @@ -6241,47 +6261,14 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/util/hash/HASH (param $0 i32) (result i64) - (local $1 i64) - local.get $0 - i32.const 65535 - i32.and - i64.extend_i32_u - i64.const -7046029288634856825 - i64.mul - i64.const 2870177450012600263 - i64.xor - i64.const 23 - i64.rotl - i64.const -4417276706812531889 - i64.mul - i64.const 1609587929392839161 - i64.add - local.tee $1 - local.get $1 - i64.const 33 - i64.shr_u - i64.xor - i64.const -4417276706812531889 - i64.mul - local.tee $1 - local.get $1 - i64.const 29 - i64.shr_u - i64.xor - i64.const 1609587929392839161 - i64.mul - local.tee $1 - local.get $1 - i64.const 32 - i64.shr_u - i64.xor - ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.const 65535 + i32.and + i64.extend_i32_u + call $~lib/util/hash/hash16 call $~lib/map/Map#find i32.const 0 i32.ne @@ -6346,7 +6333,8 @@ local.get $2 local.get $5 local.get $6 - call $~lib/util/hash/HASH + i64.extend_i32_u + call $~lib/util/hash/hash16 local.get $1 i64.extend_i32_u i64.and @@ -6427,7 +6415,10 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.const 65535 + i32.and + i64.extend_i32_u + call $~lib/util/hash/hash16 local.tee $5 call $~lib/map/Map#find local.tee $3 @@ -6521,7 +6512,10 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.const 65535 + i32.and + i64.extend_i32_u + call $~lib/util/hash/hash16 call $~lib/map/Map#find local.tee $0 i32.eqz @@ -6713,7 +6707,8 @@ local.get $2 local.get $5 local.get $6 - call $~lib/util/hash/HASH + i64.extend_i32_u + call $~lib/util/hash/hash16 local.get $1 i64.extend_i32_u i64.and @@ -6793,7 +6788,10 @@ (local $5 i64) local.get $1 local.tee $3 - call $~lib/util/hash/HASH + i32.const 65535 + i32.and + i64.extend_i32_u + call $~lib/util/hash/hash16 local.set $5 local.get $0 i32.load @@ -6929,7 +6927,10 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.const 65535 + i32.and + i64.extend_i32_u + call $~lib/util/hash/hash16 call $~lib/map/Map#find local.tee $1 i32.eqz @@ -7491,7 +7492,8 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i64.extend_i32_s + call $~lib/util/hash/hash32 call $~lib/map/Map#find i32.const 0 i32.ne @@ -7500,7 +7502,8 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i64.extend_i32_s + call $~lib/util/hash/hash32 call $~lib/map/Map#find local.tee $0 i32.eqz @@ -7520,7 +7523,8 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i64.extend_i32_s + call $~lib/util/hash/hash32 call $~lib/map/Map#find local.tee $1 i32.eqz @@ -8037,8 +8041,17 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#keys (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + local.get $1 + i64.extend_i32_u + call $~lib/util/hash/hash32 + call $~lib/map/Map#find + i32.const 0 + i32.ne + ) + (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8046,44 +8059,298 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 2 + i32.shl + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $5 + local.get $3 + i32.const 3 + i32.shl + i32.const 3 + i32.div_s + local.tee $7 + i32.const 12 + i32.mul + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $3 local.get $0 i32.load offset=16 - local.set $5 + local.tee $4 local.get $0 i32.load offset=24 - local.tee $8 - local.set $7 - i32.const 16 - i32.const 18 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.tee $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 - i32.const 0 - i32.store offset=12 - local.get $8 - i32.const 268435455 - i32.gt_u - if - i32.const 1248 - i32.const 1520 - i32.const 57 - i32.const 60 - call $~lib/builtins/abort - unreachable - end - local.get $7 - i32.const 2 - i32.shl + i32.const 12 + i32.mul + i32.add + local.set $8 + local.get $3 + local.set $2 + loop $while-continue|0 + local.get $4 + local.get $8 + i32.ne + if + local.get $4 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $2 + local.get $4 + i32.load + local.tee $6 + i32.store + local.get $2 + local.get $4 + i32.load offset=4 + i32.store offset=4 + local.get $2 + local.get $5 + local.get $6 + i64.extend_i32_u + call $~lib/util/hash/hash32 + local.get $1 + i64.extend_i32_u + i64.and + i32.wrap_i64 + i32.const 2 + i32.shl + i32.add + local.tee $6 + i32.load + i32.store offset=8 + local.get $6 + local.get $2 + i32.store + local.get $2 + i32.const 12 + i32.add + local.set $2 + end + local.get $4 + i32.const 12 + i32.add + local.set $4 + br $while-continue|0 + end + end + local.get $5 + local.tee $4 + local.get $0 + i32.load + local.tee $2 + i32.ne + if + local.get $4 + call $~lib/rt/pure/__retain + local.set $4 + local.get $2 + call $~lib/rt/pure/__release + end + local.get $0 + local.get $4 + i32.store + local.get $0 + local.get $1 + i64.extend_i32_u + i64.store offset=8 + local.get $3 + local.tee $1 + local.get $0 + i32.load offset=16 + local.tee $4 + i32.ne + if + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $4 + call $~lib/rt/pure/__release + end + local.get $0 + local.get $1 + i32.store offset=16 + local.get $0 + local.get $7 + i32.store offset=20 + local.get $0 + local.get $0 + i32.load offset=28 + i32.store offset=24 + local.get $5 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + ) + (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i64) + local.get $0 + local.get $1 + local.get $1 + i64.extend_i32_u + call $~lib/util/hash/hash32 + local.tee $5 + call $~lib/map/Map#find + local.tee $3 + if + local.get $3 + local.get $2 + i32.store offset=4 + else + local.get $0 + i32.load offset=24 + local.get $0 + i32.load offset=20 + i32.eq + if + local.get $0 + local.get $0 + i32.load offset=28 + local.get $0 + i32.load offset=20 + i32.const 3 + i32.mul + i32.const 4 + i32.div_s + i32.lt_s + if (result i64) + local.get $0 + i64.load offset=8 + else + local.get $0 + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or + end + i32.wrap_i64 + call $~lib/map/Map#rehash + end + local.get $0 + i32.load offset=16 + call $~lib/rt/pure/__retain + local.set $4 + local.get $0 + local.get $0 + i32.load offset=24 + local.tee $3 + i32.const 1 + i32.add + i32.store offset=24 + local.get $4 + local.get $3 + i32.const 12 + i32.mul + i32.add + local.tee $3 + local.get $1 + i32.store + local.get $3 + local.get $2 + i32.store offset=4 + local.get $0 + local.get $0 + i32.load offset=28 + i32.const 1 + i32.add + i32.store offset=28 + local.get $3 + local.get $0 + i32.load + local.get $5 + local.get $0 + i64.load offset=8 + i64.and + i32.wrap_i64 + i32.const 2 + i32.shl + i32.add + local.tee $1 + i32.load + i32.store offset=8 + local.get $1 + local.get $3 + i32.store + local.get $4 + call $~lib/rt/pure/__release + end + local.get $0 + call $~lib/rt/pure/__retain + ) + (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + local.get $1 + i64.extend_i32_u + call $~lib/util/hash/hash32 + call $~lib/map/Map#find + local.tee $0 + i32.eqz + if + i32.const 1408 + i32.const 1472 + i32.const 105 + i32.const 17 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + ) + (func $~lib/map/Map#keys (param $0 i32) (result i32) + (local $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=16 + local.set $5 + local.get $0 + i32.load offset=24 + local.tee $8 + local.set $7 + i32.const 16 + i32.const 18 + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain + local.tee $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 + i32.const 0 + i32.store offset=12 + local.get $8 + i32.const 268435455 + i32.gt_u + if + i32.const 1248 + i32.const 1520 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $7 + i32.const 2 + i32.shl local.tee $6 i32.const 0 call $~lib/rt/pure/__new @@ -8154,6 +8421,67 @@ call $~lib/array/Array#set:length local.get $0 ) + (func $~lib/map/Map#delete (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + local.get $1 + local.get $1 + i64.extend_i32_u + call $~lib/util/hash/hash32 + call $~lib/map/Map#find + local.tee $1 + i32.eqz + if + return + end + local.get $1 + local.get $1 + i32.load offset=8 + i32.const 1 + i32.or + i32.store offset=8 + local.get $0 + local.get $0 + i32.load offset=28 + i32.const 1 + i32.sub + i32.store offset=28 + local.get $0 + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 + local.tee $2 + i32.const 1 + i32.add + i32.const 4 + local.get $0 + i32.load offset=28 + local.tee $1 + local.get $1 + i32.const 4 + i32.lt_u + select + i32.ge_u + if (result i32) + local.get $0 + i32.load offset=28 + local.get $0 + i32.load offset=20 + i32.const 3 + i32.mul + i32.const 4 + i32.div_s + i32.lt_s + else + i32.const 0 + end + if + local.get $0 + local.get $2 + call $~lib/map/Map#rehash + end + ) (func $std/map/testNumeric (local $0 i32) (local $1 i32) @@ -8194,7 +8522,7 @@ if local.get $0 local.get $1 - call $~lib/map/Map#has + call $~lib/map/Map#has if i32.const 0 i32.const 1360 @@ -8208,11 +8536,11 @@ local.get $1 i32.const 10 i32.add - call $~lib/map/Map#set + call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $0 local.get $1 - call $~lib/map/Map#has + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -8224,7 +8552,7 @@ end local.get $0 local.get $1 - call $~lib/map/Map#get + call $~lib/map/Map#get local.get $1 i32.const 10 i32.add @@ -8265,7 +8593,7 @@ if local.get $0 local.get $1 - call $~lib/map/Map#has + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -8277,7 +8605,7 @@ end local.get $0 local.get $1 - call $~lib/map/Map#get + call $~lib/map/Map#get local.get $1 i32.const 10 i32.add @@ -8295,11 +8623,11 @@ local.get $1 i32.const 20 i32.add - call $~lib/map/Map#set + call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $0 local.get $1 - call $~lib/map/Map#has + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -8311,7 +8639,7 @@ end local.get $0 local.get $1 - call $~lib/map/Map#get + call $~lib/map/Map#get local.get $1 i32.const 20 i32.add @@ -8391,7 +8719,7 @@ local.set $7 local.get $0 local.get $3 - call $~lib/map/Map#has + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -8405,7 +8733,7 @@ local.get $7 i32.const 20 i32.sub - call $~lib/map/Map#has + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -8418,7 +8746,7 @@ local.get $1 local.get $3 local.get $3 - call $~lib/map/Map#set + call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $5 local.get $7 @@ -8468,7 +8796,7 @@ if local.get $0 local.get $2 - call $~lib/map/Map#has + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -8480,7 +8808,7 @@ end local.get $0 local.get $2 - call $~lib/map/Map#get + call $~lib/map/Map#get local.get $2 i32.const 20 i32.add @@ -8495,10 +8823,10 @@ end local.get $0 local.get $2 - call $~lib/map/Map#delete + call $~lib/map/Map#delete local.get $0 local.get $2 - call $~lib/map/Map#has + call $~lib/map/Map#has if i32.const 0 i32.const 1360 @@ -8535,7 +8863,7 @@ if local.get $0 local.get $2 - call $~lib/map/Map#has + call $~lib/map/Map#has if i32.const 0 i32.const 1360 @@ -8549,11 +8877,11 @@ local.get $2 i32.const 10 i32.add - call $~lib/map/Map#set + call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $0 local.get $2 - call $~lib/map/Map#has + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -8565,10 +8893,10 @@ end local.get $0 local.get $2 - call $~lib/map/Map#delete + call $~lib/map/Map#delete local.get $0 local.get $2 - call $~lib/map/Map#has + call $~lib/map/Map#has if i32.const 0 i32.const 1360 @@ -8619,7 +8947,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/util/hash/HASH (param $0 i64) (result i64) + (func $~lib/util/hash/hash64 (param $0 i64) (result i64) local.get $0 i64.const -4417276706812531889 i64.mul @@ -8702,7 +9030,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + call $~lib/util/hash/hash64 call $~lib/map/Map#find i32.const 0 i32.ne @@ -8768,7 +9096,7 @@ local.get $2 local.get $5 local.get $8 - call $~lib/util/hash/HASH + call $~lib/util/hash/hash64 local.get $1 i64.extend_i32_u i64.and @@ -8849,7 +9177,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + call $~lib/util/hash/hash64 local.tee $5 call $~lib/map/Map#find local.tee $3 @@ -8943,7 +9271,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + call $~lib/util/hash/hash64 call $~lib/map/Map#find local.tee $0 i32.eqz @@ -9259,7 +9587,7 @@ local.get $2 local.get $5 local.get $8 - call $~lib/util/hash/HASH + call $~lib/util/hash/hash64 local.get $1 i64.extend_i32_u i64.and @@ -9339,7 +9667,7 @@ (local $5 i64) (local $6 i32) local.get $1 - call $~lib/util/hash/HASH + call $~lib/util/hash/hash64 local.set $5 local.get $0 i32.load @@ -9474,7 +9802,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + call $~lib/util/hash/hash64 call $~lib/map/Map#find local.tee $2 i32.eqz @@ -10625,41 +10953,6 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/util/hash/HASH (param $0 f32) (result i64) - (local $1 i64) - local.get $0 - i32.reinterpret_f32 - i64.extend_i32_u - i64.const -7046029288634856825 - i64.mul - i64.const 2870177450012600265 - i64.xor - i64.const 23 - i64.rotl - i64.const -4417276706812531889 - i64.mul - i64.const 1609587929392839161 - i64.add - local.tee $1 - local.get $1 - i64.const 33 - i64.shr_u - i64.xor - i64.const -4417276706812531889 - i64.mul - local.tee $1 - local.get $1 - i64.const 29 - i64.shr_u - i64.xor - i64.const 1609587929392839161 - i64.mul - local.tee $1 - local.get $1 - i64.const 32 - i64.shr_u - i64.xor - ) (func $~lib/map/Map#find (param $0 i32) (param $1 f32) (param $2 i64) (result i32) (local $3 i32) local.get $0 @@ -10707,7 +11000,9 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.reinterpret_f32 + i64.extend_i32_u + call $~lib/util/hash/hash32 call $~lib/map/Map#find i32.const 0 i32.ne @@ -10773,7 +11068,9 @@ local.get $2 local.get $5 local.get $8 - call $~lib/util/hash/HASH + i32.reinterpret_f32 + i64.extend_i32_u + call $~lib/util/hash/hash32 local.get $1 i64.extend_i32_u i64.and @@ -10854,7 +11151,9 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.reinterpret_f32 + i64.extend_i32_u + call $~lib/util/hash/hash32 local.tee $5 call $~lib/map/Map#find local.tee $3 @@ -10948,7 +11247,9 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.reinterpret_f32 + i64.extend_i32_u + call $~lib/util/hash/hash32 call $~lib/map/Map#find local.tee $0 i32.eqz @@ -11175,7 +11476,9 @@ local.get $2 local.get $5 local.get $8 - call $~lib/util/hash/HASH + i32.reinterpret_f32 + i64.extend_i32_u + call $~lib/util/hash/hash32 local.get $1 i64.extend_i32_u i64.and @@ -11257,7 +11560,9 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.reinterpret_f32 + i64.extend_i32_u + call $~lib/util/hash/hash32 local.tee $5 call $~lib/map/Map#find local.tee $3 @@ -11353,7 +11658,9 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.reinterpret_f32 + i64.extend_i32_u + call $~lib/util/hash/hash32 call $~lib/map/Map#find local.tee $2 i32.eqz @@ -11897,44 +12204,6 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/util/hash/HASH (param $0 f64) (result i64) - (local $1 i64) - local.get $0 - i64.reinterpret_f64 - i64.const -4417276706812531889 - i64.mul - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.const 2870177450012600269 - i64.xor - i64.const 27 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.tee $1 - local.get $1 - i64.const 33 - i64.shr_u - i64.xor - i64.const -4417276706812531889 - i64.mul - local.tee $1 - local.get $1 - i64.const 29 - i64.shr_u - i64.xor - i64.const 1609587929392839161 - i64.mul - local.tee $1 - local.get $1 - i64.const 32 - i64.shr_u - i64.xor - ) (func $~lib/map/Map#find (param $0 i32) (param $1 f64) (param $2 i64) (result i32) (local $3 i32) local.get $0 @@ -11982,7 +12251,8 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i64.reinterpret_f64 + call $~lib/util/hash/hash64 call $~lib/map/Map#find i32.const 0 i32.ne @@ -12048,7 +12318,8 @@ local.get $2 local.get $5 local.get $8 - call $~lib/util/hash/HASH + i64.reinterpret_f64 + call $~lib/util/hash/hash64 local.get $1 i64.extend_i32_u i64.and @@ -12129,7 +12400,8 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i64.reinterpret_f64 + call $~lib/util/hash/hash64 local.tee $5 call $~lib/map/Map#find local.tee $3 @@ -12223,7 +12495,8 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i64.reinterpret_f64 + call $~lib/util/hash/hash64 call $~lib/map/Map#find local.tee $0 i32.eqz @@ -12450,7 +12723,8 @@ local.get $2 local.get $5 local.get $8 - call $~lib/util/hash/HASH + i64.reinterpret_f64 + call $~lib/util/hash/hash64 local.get $1 i64.extend_i32_u i64.and @@ -12530,7 +12804,8 @@ (local $5 i64) (local $6 i32) local.get $1 - call $~lib/util/hash/HASH + i64.reinterpret_f64 + call $~lib/util/hash/hash64 local.set $5 local.get $0 i32.load @@ -12665,7 +12940,8 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i64.reinterpret_f64 + call $~lib/util/hash/hash64 call $~lib/map/Map#find local.tee $2 i32.eqz diff --git a/tests/compiler/std/map.untouched.wat b/tests/compiler/std/map.untouched.wat index ff966d33b4..a1e08900cd 100644 --- a/tests/compiler/std/map.untouched.wat +++ b/tests/compiler/std/map.untouched.wat @@ -9,9 +9,9 @@ (type $i32_i32_i64_=>_i32 (func (param i32 i32 i64) (result i32))) (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) (type $i32_i64_i64_=>_i32 (func (param i32 i64 i64) (result i32))) - (type $i32_=>_i64 (func (param i32) (result i64))) (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) + (type $i64_=>_i64 (func (param i64) (result i64))) (type $i32_f32_=>_i32 (func (param i32 f32) (result i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) @@ -19,7 +19,6 @@ (type $i32_i64_i32_=>_i32 (func (param i32 i64 i32) (result i32))) (type $i32_f32_i64_=>_i32 (func (param i32 f32 i64) (result i32))) (type $i32_f64_i64_=>_i32 (func (param i32 f64 i64) (result i32))) - (type $i64_=>_i64 (func (param i64) (result i64))) (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) @@ -27,8 +26,6 @@ (type $i32_f32_f32_=>_i32 (func (param i32 f32 f32) (result i32))) (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) (type $i32_f64_f64_=>_i32 (func (param i32 f64 f64) (result i32))) - (type $f32_=>_i64 (func (param f32) (result i64))) - (type $f64_=>_i64 (func (param f64) (result i64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 12) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00(\00\00\00a\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e\00\00\00\00\00") @@ -1809,77 +1806,55 @@ i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (func $~lib/util/hash/hash8 (param $0 i64) (result i64) (local $1 i64) - (local $2 i32) - (local $3 i64) - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 4 - i32.le_u - drop - local.get $0 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - local.set $2 - i64.const 1 - local.set $1 i64.const 0 i64.const 2870177450012600261 i64.add - local.get $1 + i64.const 1 i64.add - local.set $3 - local.get $3 - local.get $2 - i64.extend_i32_u + local.set $1 + local.get $1 + local.get $0 i64.const -7046029288634856825 i64.mul i64.xor - local.set $3 - local.get $3 + local.set $1 + local.get $1 i64.const 23 i64.rotl i64.const -4417276706812531889 i64.mul i64.const 1609587929392839161 i64.add - local.set $3 - local.get $3 - local.get $3 + local.set $1 + local.get $1 + local.get $1 i64.const 33 i64.shr_u i64.xor - local.set $3 - local.get $3 + local.set $1 + local.get $1 i64.const -4417276706812531889 i64.mul - local.set $3 - local.get $3 - local.get $3 + local.set $1 + local.get $1 + local.get $1 i64.const 29 i64.shr_u i64.xor - local.set $3 - local.get $3 + local.set $1 + local.get $1 i64.const 1609587929392839161 i64.mul - local.set $3 - local.get $3 - local.get $3 + local.set $1 + local.get $1 + local.get $1 i64.const 32 i64.shr_u i64.xor - local.set $3 - local.get $3 - return + local.set $1 + local.get $1 ) (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) @@ -1937,10 +1912,31 @@ i32.const 0 ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.0 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + i32.const 1 + i32.eq + drop + local.get $2 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i64.extend_i32_s + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.0 + end call $~lib/map/Map#find i32.const 0 i32.ne @@ -2020,8 +2016,24 @@ local.get $10 i32.load offset=4 i32.store offset=4 - local.get $12 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.2 (result i64) + local.get $12 + local.set $13 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + i32.const 1 + i32.eq + drop + local.get $13 + i64.extend_i32_s + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.2 + end local.get $1 i64.extend_i32_u i64.and @@ -2103,23 +2115,43 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i64) - (local $4 i32) + (local $3 i32) + (local $4 i64) (local $5 i32) (local $6 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $3 + block $~lib/util/hash/HASH|inlined.1 (result i64) + local.get $1 + local.set $3 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + i32.const 1 + i32.eq + drop + local.get $3 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i64.extend_i32_s + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.1 + end + local.set $4 local.get $0 local.get $1 - local.get $3 - call $~lib/map/Map#find - local.set $4 local.get $4 + call $~lib/map/Map#find + local.set $5 + local.get $5 if i32.const 0 drop - local.get $4 + local.get $5 local.get $2 i32.store offset=4 else @@ -2156,8 +2188,8 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $5 - local.get $5 + local.set $3 + local.get $3 local.get $0 local.get $0 i32.load offset=24 @@ -2169,11 +2201,11 @@ i32.const 12 i32.mul i32.add - local.set $4 - local.get $4 + local.set $5 + local.get $5 local.get $1 i32.store8 - local.get $4 + local.get $5 local.get $2 i32.store offset=4 local.get $0 @@ -2184,7 +2216,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $3 + local.get $4 local.get $0 i64.load offset=8 i64.and @@ -2193,14 +2225,14 @@ i32.mul i32.add local.set $6 - local.get $4 + local.get $5 local.get $6 i32.load i32.store offset=8 local.get $6 - local.get $4 - i32.store local.get $5 + i32.store + local.get $3 call $~lib/rt/pure/__release end local.get $0 @@ -2208,13 +2240,34 @@ ) (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.3 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + i32.const 1 + i32.eq + drop + local.get $2 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i64.extend_i32_s + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.3 + end call $~lib/map/Map#find - local.set $2 - local.get $2 + local.set $3 + local.get $3 i32.eqz if i32.const 384 @@ -2224,7 +2277,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.load offset=4 ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) @@ -4461,8 +4514,24 @@ local.get $10 i32.load8_s offset=1 i32.store8 offset=1 - local.get $12 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.5 (result i64) + local.get $12 + local.set $13 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + i32.const 1 + i32.eq + drop + local.get $13 + i64.extend_i32_s + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.5 + end local.get $1 i64.extend_i32_u i64.and @@ -4544,23 +4613,43 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i64) - (local $4 i32) + (local $3 i32) + (local $4 i64) (local $5 i32) (local $6 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $3 + block $~lib/util/hash/HASH|inlined.4 (result i64) + local.get $1 + local.set $3 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + i32.const 1 + i32.eq + drop + local.get $3 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i64.extend_i32_s + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.4 + end + local.set $4 local.get $0 local.get $1 - local.get $3 - call $~lib/map/Map#find - local.set $4 local.get $4 + call $~lib/map/Map#find + local.set $5 + local.get $5 if i32.const 0 drop - local.get $4 + local.get $5 local.get $2 i32.store8 offset=1 else @@ -4597,8 +4686,8 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $5 - local.get $5 + local.set $3 + local.get $3 local.get $0 local.get $0 i32.load offset=24 @@ -4610,11 +4699,11 @@ i32.const 8 i32.mul i32.add - local.set $4 - local.get $4 + local.set $5 + local.get $5 local.get $1 i32.store8 - local.get $4 + local.get $5 local.get $2 i32.store8 offset=1 local.get $0 @@ -4625,7 +4714,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $3 + local.get $4 local.get $0 i64.load offset=8 i64.and @@ -4634,86 +4723,68 @@ i32.mul i32.add local.set $6 - local.get $4 + local.get $5 local.get $6 i32.load i32.store offset=4 local.get $6 - local.get $4 - i32.store local.get $5 + i32.store + local.get $3 call $~lib/rt/pure/__release end local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (func $~lib/util/hash/hash32 (param $0 i64) (result i64) (local $1 i64) - (local $2 i32) - (local $3 i64) - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 4 - i32.le_u - drop - local.get $0 - local.set $2 - i64.const 4 - local.set $1 i64.const 0 i64.const 2870177450012600261 i64.add - local.get $1 + i64.const 4 i64.add - local.set $3 - local.get $3 - local.get $2 - i64.extend_i32_u + local.set $1 + local.get $1 + local.get $0 i64.const -7046029288634856825 i64.mul i64.xor - local.set $3 - local.get $3 + local.set $1 + local.get $1 i64.const 23 i64.rotl i64.const -4417276706812531889 i64.mul i64.const 1609587929392839161 i64.add - local.set $3 - local.get $3 - local.get $3 + local.set $1 + local.get $1 + local.get $1 i64.const 33 i64.shr_u i64.xor - local.set $3 - local.get $3 + local.set $1 + local.get $1 i64.const -4417276706812531889 i64.mul - local.set $3 - local.get $3 - local.get $3 + local.set $1 + local.get $1 + local.get $1 i64.const 29 i64.shr_u i64.xor - local.set $3 - local.get $3 + local.set $1 + local.get $1 i64.const 1609587929392839161 i64.mul - local.set $3 - local.get $3 - local.get $3 + local.set $1 + local.get $1 + local.get $1 i64.const 32 i64.shr_u i64.xor - local.set $3 - local.get $3 - return + local.set $1 + local.get $1 ) (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) @@ -4841,8 +4912,32 @@ local.get $10 i32.load offset=4 i32.store offset=4 - local.get $12 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.1 (result i64) + local.get $12 + local.set $13 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 1 + i32.eq + drop + i32.const 4 + i32.const 2 + i32.eq + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $13 + i64.extend_i32_s + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.1 + end local.get $1 i64.extend_i32_u i64.and @@ -4924,23 +5019,47 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i64) - (local $4 i32) + (local $3 i32) + (local $4 i64) (local $5 i32) (local $6 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $3 + block $~lib/util/hash/HASH|inlined.0 (result i64) + local.get $1 + local.set $3 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 1 + i32.eq + drop + i32.const 4 + i32.const 2 + i32.eq + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $3 + i64.extend_i32_s + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.0 + end + local.set $4 local.get $0 local.get $1 - local.get $3 - call $~lib/map/Map#find - local.set $4 local.get $4 + call $~lib/map/Map#find + local.set $5 + local.get $5 if i32.const 0 drop - local.get $4 + local.get $5 local.get $2 i32.store offset=4 else @@ -4977,8 +5096,8 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $5 - local.get $5 + local.set $3 + local.get $3 local.get $0 local.get $0 i32.load offset=24 @@ -4990,11 +5109,11 @@ i32.const 12 i32.mul i32.add - local.set $4 - local.get $4 + local.set $5 + local.get $5 local.get $1 i32.store - local.get $4 + local.get $5 local.get $2 i32.store offset=4 local.get $0 @@ -5005,7 +5124,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $3 + local.get $4 local.get $0 i64.load offset=8 i64.and @@ -5014,14 +5133,14 @@ i32.mul i32.add local.set $6 - local.get $4 + local.get $5 local.get $6 i32.load i32.store offset=8 local.get $6 - local.get $4 - i32.store local.get $5 + i32.store + local.get $3 call $~lib/rt/pure/__release end local.get $0 @@ -5042,11 +5161,31 @@ (local $5 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.6 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + i32.const 1 + i32.eq + drop + local.get $2 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i64.extend_i32_s + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.6 + end call $~lib/map/Map#find - local.set $2 - local.get $2 + local.set $3 + local.get $3 i32.eqz if i32.const 0 @@ -5056,8 +5195,8 @@ drop i32.const 0 drop - local.get $2 - local.get $2 + local.get $3 + local.get $3 i32.load offset=8 i32.const 1 i32.or @@ -5073,16 +5212,16 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $3 - local.get $3 + local.set $4 + local.get $4 i32.const 1 i32.add i32.const 4 - local.tee $4 + local.tee $2 local.get $0 i32.load offset=28 local.tee $5 - local.get $4 + local.get $2 local.get $5 i32.gt_u select @@ -5102,7 +5241,7 @@ end if local.get $0 - local.get $3 + local.get $4 call $~lib/map/Map#rehash end i32.const 1 @@ -5700,76 +5839,6 @@ i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/HASH (param $0 i32) (result i64) - (local $1 i64) - (local $2 i32) - (local $3 i64) - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 4 - i32.le_u - drop - local.get $0 - i32.const 255 - i32.and - local.set $2 - i64.const 1 - local.set $1 - i64.const 0 - i64.const 2870177450012600261 - i64.add - local.get $1 - i64.add - local.set $3 - local.get $3 - local.get $2 - i64.extend_i32_u - i64.const -7046029288634856825 - i64.mul - i64.xor - local.set $3 - local.get $3 - i64.const 23 - i64.rotl - i64.const -4417276706812531889 - i64.mul - i64.const 1609587929392839161 - i64.add - local.set $3 - local.get $3 - local.get $3 - i64.const 33 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const -4417276706812531889 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 29 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const 1609587929392839161 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 32 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - return - ) (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) @@ -5824,10 +5893,29 @@ i32.const 0 ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.0 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + i32.const 1 + i32.eq + drop + local.get $2 + i32.const 255 + i32.and + i64.extend_i32_u + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.0 + end call $~lib/map/Map#find i32.const 0 i32.ne @@ -5907,8 +5995,24 @@ local.get $10 i32.load offset=4 i32.store offset=4 - local.get $12 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.2 (result i64) + local.get $12 + local.set $13 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + i32.const 1 + i32.eq + drop + local.get $13 + i64.extend_i32_u + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.2 + end local.get $1 i64.extend_i32_u i64.and @@ -5990,23 +6094,41 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i64) - (local $4 i32) + (local $3 i32) + (local $4 i64) (local $5 i32) (local $6 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $3 + block $~lib/util/hash/HASH|inlined.1 (result i64) + local.get $1 + local.set $3 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + i32.const 1 + i32.eq + drop + local.get $3 + i32.const 255 + i32.and + i64.extend_i32_u + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.1 + end + local.set $4 local.get $0 local.get $1 - local.get $3 - call $~lib/map/Map#find - local.set $4 local.get $4 + call $~lib/map/Map#find + local.set $5 + local.get $5 if i32.const 0 drop - local.get $4 + local.get $5 local.get $2 i32.store offset=4 else @@ -6043,9 +6165,9 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $5 - local.get $5 - local.get $0 + local.set $3 + local.get $3 + local.get $0 local.get $0 i32.load offset=24 local.tee $6 @@ -6056,11 +6178,11 @@ i32.const 12 i32.mul i32.add - local.set $4 - local.get $4 + local.set $5 + local.get $5 local.get $1 i32.store8 - local.get $4 + local.get $5 local.get $2 i32.store offset=4 local.get $0 @@ -6071,7 +6193,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $3 + local.get $4 local.get $0 i64.load offset=8 i64.and @@ -6080,14 +6202,14 @@ i32.mul i32.add local.set $6 - local.get $4 + local.get $5 local.get $6 i32.load i32.store offset=8 local.get $6 - local.get $4 - i32.store local.get $5 + i32.store + local.get $3 call $~lib/rt/pure/__release end local.get $0 @@ -6095,13 +6217,32 @@ ) (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.3 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + i32.const 1 + i32.eq + drop + local.get $2 + i32.const 255 + i32.and + i64.extend_i32_u + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.3 + end call $~lib/map/Map#find - local.set $2 - local.get $2 + local.set $3 + local.get $3 i32.eqz if i32.const 384 @@ -6111,7 +6252,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.load offset=4 ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) @@ -6592,8 +6733,24 @@ local.get $10 i32.load8_u offset=1 i32.store8 offset=1 - local.get $12 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.5 (result i64) + local.get $12 + local.set $13 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + i32.const 1 + i32.eq + drop + local.get $13 + i64.extend_i32_u + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.5 + end local.get $1 i64.extend_i32_u i64.and @@ -6675,23 +6832,41 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i64) - (local $4 i32) + (local $3 i32) + (local $4 i64) (local $5 i32) (local $6 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $3 + block $~lib/util/hash/HASH|inlined.4 (result i64) + local.get $1 + local.set $3 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + i32.const 1 + i32.eq + drop + local.get $3 + i32.const 255 + i32.and + i64.extend_i32_u + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.4 + end + local.set $4 local.get $0 local.get $1 - local.get $3 - call $~lib/map/Map#find - local.set $4 local.get $4 + call $~lib/map/Map#find + local.set $5 + local.get $5 if i32.const 0 drop - local.get $4 + local.get $5 local.get $2 i32.store8 offset=1 else @@ -6728,8 +6903,8 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $5 - local.get $5 + local.set $3 + local.get $3 local.get $0 local.get $0 i32.load offset=24 @@ -6741,11 +6916,11 @@ i32.const 8 i32.mul i32.add - local.set $4 - local.get $4 + local.set $5 + local.get $5 local.get $1 i32.store8 - local.get $4 + local.get $5 local.get $2 i32.store8 offset=1 local.get $0 @@ -6756,7 +6931,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $3 + local.get $4 local.get $0 i64.load offset=8 i64.and @@ -6765,14 +6940,14 @@ i32.mul i32.add local.set $6 - local.get $4 + local.get $5 local.get $6 i32.load i32.store offset=4 local.get $6 - local.get $4 - i32.store local.get $5 + i32.store + local.get $3 call $~lib/rt/pure/__release end local.get $0 @@ -6789,11 +6964,29 @@ (local $5 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.6 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + i32.const 1 + i32.eq + drop + local.get $2 + i32.const 255 + i32.and + i64.extend_i32_u + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.6 + end call $~lib/map/Map#find - local.set $2 - local.get $2 + local.set $3 + local.get $3 i32.eqz if i32.const 0 @@ -6803,8 +6996,8 @@ drop i32.const 0 drop - local.get $2 - local.get $2 + local.get $3 + local.get $3 i32.load offset=8 i32.const 1 i32.or @@ -6820,16 +7013,16 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $3 - local.get $3 + local.set $4 + local.get $4 i32.const 1 i32.add i32.const 4 - local.tee $4 + local.tee $2 local.get $0 i32.load offset=28 local.tee $5 - local.get $4 + local.get $2 local.get $5 i32.gt_u select @@ -6849,7 +7042,7 @@ end if local.get $0 - local.get $3 + local.get $4 call $~lib/map/Map#rehash end i32.const 1 @@ -7425,77 +7618,55 @@ i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (func $~lib/util/hash/hash16 (param $0 i64) (result i64) (local $1 i64) - (local $2 i32) - (local $3 i64) - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 4 - i32.le_u - drop - local.get $0 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - local.set $2 - i64.const 2 - local.set $1 i64.const 0 i64.const 2870177450012600261 i64.add - local.get $1 + i64.const 2 i64.add - local.set $3 - local.get $3 - local.get $2 - i64.extend_i32_u + local.set $1 + local.get $1 + local.get $0 i64.const -7046029288634856825 i64.mul i64.xor - local.set $3 - local.get $3 + local.set $1 + local.get $1 i64.const 23 i64.rotl i64.const -4417276706812531889 i64.mul i64.const 1609587929392839161 i64.add - local.set $3 - local.get $3 - local.get $3 + local.set $1 + local.get $1 + local.get $1 i64.const 33 i64.shr_u i64.xor - local.set $3 - local.get $3 + local.set $1 + local.get $1 i64.const -4417276706812531889 i64.mul - local.set $3 - local.get $3 - local.get $3 + local.set $1 + local.get $1 + local.get $1 i64.const 29 i64.shr_u i64.xor - local.set $3 - local.get $3 + local.set $1 + local.get $1 i64.const 1609587929392839161 i64.mul - local.set $3 - local.get $3 - local.get $3 + local.set $1 + local.get $1 + local.get $1 i64.const 32 i64.shr_u i64.xor - local.set $3 - local.get $3 - return + local.set $1 + local.get $1 ) (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) @@ -7553,10 +7724,35 @@ i32.const 0 ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.0 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 2 + i32.const 1 + i32.eq + drop + i32.const 2 + i32.const 2 + i32.eq + drop + local.get $2 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i64.extend_i32_s + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.0 + end call $~lib/map/Map#find i32.const 0 i32.ne @@ -7636,8 +7832,28 @@ local.get $10 i32.load offset=4 i32.store offset=4 - local.get $12 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.2 (result i64) + local.get $12 + local.set $13 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 2 + i32.const 1 + i32.eq + drop + i32.const 2 + i32.const 2 + i32.eq + drop + local.get $13 + i64.extend_i32_s + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.2 + end local.get $1 i64.extend_i32_u i64.and @@ -7719,35 +7935,59 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i64) - (local $4 i32) + (local $3 i32) + (local $4 i64) (local $5 i32) (local $6 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $3 - local.get $0 - local.get $1 - local.get $3 - call $~lib/map/Map#find - local.set $4 - local.get $4 - if + block $~lib/util/hash/HASH|inlined.1 (result i64) + local.get $1 + local.set $3 i32.const 0 drop - local.get $4 - local.get $2 - i32.store offset=4 - else - local.get $0 - i32.load offset=24 - local.get $0 - i32.load offset=20 - i32.eq - if - local.get $0 - local.get $0 - i32.load offset=28 + i32.const 0 + drop + i32.const 0 + drop + i32.const 2 + i32.const 1 + i32.eq + drop + i32.const 2 + i32.const 2 + i32.eq + drop + local.get $3 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i64.extend_i32_s + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.1 + end + local.set $4 + local.get $0 + local.get $1 + local.get $4 + call $~lib/map/Map#find + local.set $5 + local.get $5 + if + i32.const 0 + drop + local.get $5 + local.get $2 + i32.store offset=4 + else + local.get $0 + i32.load offset=24 + local.get $0 + i32.load offset=20 + i32.eq + if + local.get $0 + local.get $0 + i32.load offset=28 local.get $0 i32.load offset=20 i32.const 3 @@ -7772,8 +8012,8 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $5 - local.get $5 + local.set $3 + local.get $3 local.get $0 local.get $0 i32.load offset=24 @@ -7785,11 +8025,11 @@ i32.const 12 i32.mul i32.add - local.set $4 - local.get $4 + local.set $5 + local.get $5 local.get $1 i32.store16 - local.get $4 + local.get $5 local.get $2 i32.store offset=4 local.get $0 @@ -7800,7 +8040,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $3 + local.get $4 local.get $0 i64.load offset=8 i64.and @@ -7809,14 +8049,14 @@ i32.mul i32.add local.set $6 - local.get $4 + local.get $5 local.get $6 i32.load i32.store offset=8 local.get $6 - local.get $4 - i32.store local.get $5 + i32.store + local.get $3 call $~lib/rt/pure/__release end local.get $0 @@ -7824,13 +8064,38 @@ ) (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.3 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 2 + i32.const 1 + i32.eq + drop + i32.const 2 + i32.const 2 + i32.eq + drop + local.get $2 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i64.extend_i32_s + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.3 + end call $~lib/map/Map#find - local.set $2 - local.get $2 + local.set $3 + local.get $3 i32.eqz if i32.const 384 @@ -7840,7 +8105,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.load offset=4 ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) @@ -8323,8 +8588,28 @@ local.get $10 i32.load16_s offset=2 i32.store16 offset=2 - local.get $12 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.5 (result i64) + local.get $12 + local.set $13 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 2 + i32.const 1 + i32.eq + drop + i32.const 2 + i32.const 2 + i32.eq + drop + local.get $13 + i64.extend_i32_s + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.5 + end local.get $1 i64.extend_i32_u i64.and @@ -8406,23 +8691,47 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i64) - (local $4 i32) + (local $3 i32) + (local $4 i64) (local $5 i32) (local $6 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $3 + block $~lib/util/hash/HASH|inlined.4 (result i64) + local.get $1 + local.set $3 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 2 + i32.const 1 + i32.eq + drop + i32.const 2 + i32.const 2 + i32.eq + drop + local.get $3 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i64.extend_i32_s + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.4 + end + local.set $4 local.get $0 local.get $1 - local.get $3 - call $~lib/map/Map#find - local.set $4 local.get $4 + call $~lib/map/Map#find + local.set $5 + local.get $5 if i32.const 0 drop - local.get $4 + local.get $5 local.get $2 i32.store16 offset=2 else @@ -8459,8 +8768,8 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $5 - local.get $5 + local.set $3 + local.get $3 local.get $0 local.get $0 i32.load offset=24 @@ -8472,11 +8781,11 @@ i32.const 8 i32.mul i32.add - local.set $4 - local.get $4 + local.set $5 + local.get $5 local.get $1 i32.store16 - local.get $4 + local.get $5 local.get $2 i32.store16 offset=2 local.get $0 @@ -8487,7 +8796,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $3 + local.get $4 local.get $0 i64.load offset=8 i64.and @@ -8496,14 +8805,14 @@ i32.mul i32.add local.set $6 - local.get $4 + local.get $5 local.get $6 i32.load i32.store offset=4 local.get $6 - local.get $4 - i32.store local.get $5 + i32.store + local.get $3 call $~lib/rt/pure/__release end local.get $0 @@ -8520,11 +8829,35 @@ (local $5 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.6 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 2 + i32.const 1 + i32.eq + drop + i32.const 2 + i32.const 2 + i32.eq + drop + local.get $2 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i64.extend_i32_s + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.6 + end call $~lib/map/Map#find - local.set $2 - local.get $2 + local.set $3 + local.get $3 i32.eqz if i32.const 0 @@ -8534,8 +8867,8 @@ drop i32.const 0 drop - local.get $2 - local.get $2 + local.get $3 + local.get $3 i32.load offset=8 i32.const 1 i32.or @@ -8551,16 +8884,16 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $3 - local.get $3 + local.set $4 + local.get $4 i32.const 1 i32.add i32.const 4 - local.tee $4 + local.tee $2 local.get $0 i32.load offset=28 local.tee $5 - local.get $4 + local.get $2 local.get $5 i32.gt_u select @@ -8580,7 +8913,7 @@ end if local.get $0 - local.get $3 + local.get $4 call $~lib/map/Map#rehash end i32.const 1 @@ -9178,91 +9511,21 @@ i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/HASH (param $0 i32) (result i64) - (local $1 i64) - (local $2 i32) - (local $3 i64) - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 4 - i32.le_u - drop + (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) local.get $0 - i32.const 65535 - i32.and - local.set $2 - i64.const 2 - local.set $1 - i64.const 0 - i64.const 2870177450012600261 - i64.add - local.get $1 - i64.add - local.set $3 - local.get $3 + i32.load local.get $2 - i64.extend_i32_u - i64.const -7046029288634856825 - i64.mul - i64.xor - local.set $3 - local.get $3 - i64.const 23 - i64.rotl - i64.const -4417276706812531889 - i64.mul - i64.const 1609587929392839161 - i64.add - local.set $3 - local.get $3 - local.get $3 - i64.const 33 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const -4417276706812531889 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 29 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const 1609587929392839161 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 32 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - return - ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.get $2 - local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - i32.load + local.get $0 + i64.load offset=8 + i64.and + i32.wrap_i64 + i32.const 4 + i32.mul + i32.add + i32.load local.set $3 loop $while-continue|0 local.get $3 @@ -9302,10 +9565,33 @@ i32.const 0 ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.0 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 2 + i32.const 1 + i32.eq + drop + i32.const 2 + i32.const 2 + i32.eq + drop + local.get $2 + i32.const 65535 + i32.and + i64.extend_i32_u + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.0 + end call $~lib/map/Map#find i32.const 0 i32.ne @@ -9385,8 +9671,28 @@ local.get $10 i32.load offset=4 i32.store offset=4 - local.get $12 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.2 (result i64) + local.get $12 + local.set $13 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 2 + i32.const 1 + i32.eq + drop + i32.const 2 + i32.const 2 + i32.eq + drop + local.get $13 + i64.extend_i32_u + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.2 + end local.get $1 i64.extend_i32_u i64.and @@ -9468,23 +9774,45 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i64) - (local $4 i32) + (local $3 i32) + (local $4 i64) (local $5 i32) (local $6 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $3 + block $~lib/util/hash/HASH|inlined.1 (result i64) + local.get $1 + local.set $3 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 2 + i32.const 1 + i32.eq + drop + i32.const 2 + i32.const 2 + i32.eq + drop + local.get $3 + i32.const 65535 + i32.and + i64.extend_i32_u + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.1 + end + local.set $4 local.get $0 local.get $1 - local.get $3 - call $~lib/map/Map#find - local.set $4 local.get $4 + call $~lib/map/Map#find + local.set $5 + local.get $5 if i32.const 0 drop - local.get $4 + local.get $5 local.get $2 i32.store offset=4 else @@ -9521,8 +9849,8 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $5 - local.get $5 + local.set $3 + local.get $3 local.get $0 local.get $0 i32.load offset=24 @@ -9534,11 +9862,11 @@ i32.const 12 i32.mul i32.add - local.set $4 - local.get $4 + local.set $5 + local.get $5 local.get $1 i32.store16 - local.get $4 + local.get $5 local.get $2 i32.store offset=4 local.get $0 @@ -9549,7 +9877,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $3 + local.get $4 local.get $0 i64.load offset=8 i64.and @@ -9558,14 +9886,14 @@ i32.mul i32.add local.set $6 - local.get $4 + local.get $5 local.get $6 i32.load i32.store offset=8 local.get $6 - local.get $4 - i32.store local.get $5 + i32.store + local.get $3 call $~lib/rt/pure/__release end local.get $0 @@ -9573,13 +9901,36 @@ ) (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.3 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 2 + i32.const 1 + i32.eq + drop + i32.const 2 + i32.const 2 + i32.eq + drop + local.get $2 + i32.const 65535 + i32.and + i64.extend_i32_u + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.3 + end call $~lib/map/Map#find - local.set $2 - local.get $2 + local.set $3 + local.get $3 i32.eqz if i32.const 384 @@ -9589,7 +9940,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.load offset=4 ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) @@ -10070,8 +10421,28 @@ local.get $10 i32.load16_u offset=2 i32.store16 offset=2 - local.get $12 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.5 (result i64) + local.get $12 + local.set $13 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 2 + i32.const 1 + i32.eq + drop + i32.const 2 + i32.const 2 + i32.eq + drop + local.get $13 + i64.extend_i32_u + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.5 + end local.get $1 i64.extend_i32_u i64.and @@ -10153,23 +10524,45 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i64) - (local $4 i32) + (local $3 i32) + (local $4 i64) (local $5 i32) (local $6 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $3 + block $~lib/util/hash/HASH|inlined.4 (result i64) + local.get $1 + local.set $3 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 2 + i32.const 1 + i32.eq + drop + i32.const 2 + i32.const 2 + i32.eq + drop + local.get $3 + i32.const 65535 + i32.and + i64.extend_i32_u + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.4 + end + local.set $4 local.get $0 local.get $1 - local.get $3 - call $~lib/map/Map#find - local.set $4 local.get $4 + call $~lib/map/Map#find + local.set $5 + local.get $5 if i32.const 0 drop - local.get $4 + local.get $5 local.get $2 i32.store16 offset=2 else @@ -10206,8 +10599,8 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $5 - local.get $5 + local.set $3 + local.get $3 local.get $0 local.get $0 i32.load offset=24 @@ -10219,11 +10612,11 @@ i32.const 8 i32.mul i32.add - local.set $4 - local.get $4 + local.set $5 + local.get $5 local.get $1 i32.store16 - local.get $4 + local.get $5 local.get $2 i32.store16 offset=2 local.get $0 @@ -10234,7 +10627,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $3 + local.get $4 local.get $0 i64.load offset=8 i64.and @@ -10243,14 +10636,14 @@ i32.mul i32.add local.set $6 - local.get $4 + local.get $5 local.get $6 i32.load i32.store offset=4 local.get $6 - local.get $4 - i32.store local.get $5 + i32.store + local.get $3 call $~lib/rt/pure/__release end local.get $0 @@ -10267,11 +10660,33 @@ (local $5 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.6 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 2 + i32.const 1 + i32.eq + drop + i32.const 2 + i32.const 2 + i32.eq + drop + local.get $2 + i32.const 65535 + i32.and + i64.extend_i32_u + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.6 + end call $~lib/map/Map#find - local.set $2 - local.get $2 + local.set $3 + local.get $3 i32.eqz if i32.const 0 @@ -10281,8 +10696,8 @@ drop i32.const 0 drop - local.get $2 - local.get $2 + local.get $3 + local.get $3 i32.load offset=8 i32.const 1 i32.or @@ -10298,16 +10713,16 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $3 - local.get $3 + local.set $4 + local.get $4 i32.const 1 i32.add i32.const 4 - local.tee $4 + local.tee $2 local.get $0 i32.load offset=28 local.tee $5 - local.get $4 + local.get $2 local.get $5 i32.gt_u select @@ -10327,7 +10742,7 @@ end if local.get $0 - local.get $3 + local.get $4 call $~lib/map/Map#rehash end i32.const 1 @@ -10864,23 +11279,73 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - local.get $1 - call $~lib/util/hash/HASH - call $~lib/map/Map#find - i32.const 0 - i32.ne - ) - (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.2 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 1 + i32.eq + drop + i32.const 4 + i32.const 2 + i32.eq + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $2 + i64.extend_i32_s + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.2 + end call $~lib/map/Map#find - local.set $2 - local.get $2 + i32.const 0 + i32.ne + ) + (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + local.get $1 + block $~lib/util/hash/HASH|inlined.3 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 1 + i32.eq + drop + i32.const 4 + i32.const 2 + i32.eq + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $2 + i64.extend_i32_s + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.3 + end + call $~lib/map/Map#find + local.set $3 + local.get $3 i32.eqz if i32.const 384 @@ -10890,7 +11355,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.load offset=4 ) (func $~lib/map/Map#keys (param $0 i32) (result i32) @@ -11034,11 +11499,35 @@ (local $5 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.4 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 1 + i32.eq + drop + i32.const 4 + i32.const 2 + i32.eq + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $2 + i64.extend_i32_s + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.4 + end call $~lib/map/Map#find - local.set $2 - local.get $2 + local.set $3 + local.get $3 i32.eqz if i32.const 0 @@ -11048,8 +11537,8 @@ drop i32.const 0 drop - local.get $2 - local.get $2 + local.get $3 + local.get $3 i32.load offset=8 i32.const 1 i32.or @@ -11065,16 +11554,16 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $3 - local.get $3 + local.set $4 + local.get $4 i32.const 1 i32.add i32.const 4 - local.tee $4 + local.tee $2 local.get $0 i32.load offset=28 local.tee $5 - local.get $4 + local.get $2 local.get $5 i32.gt_u select @@ -11094,7 +11583,7 @@ end if local.get $0 - local.get $3 + local.get $4 call $~lib/map/Map#rehash end i32.const 1 @@ -11646,74 +12135,6 @@ i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/HASH (param $0 i32) (result i64) - (local $1 i64) - (local $2 i32) - (local $3 i64) - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 4 - i32.le_u - drop - local.get $0 - local.set $2 - i64.const 4 - local.set $1 - i64.const 0 - i64.const 2870177450012600261 - i64.add - local.get $1 - i64.add - local.set $3 - local.get $3 - local.get $2 - i64.extend_i32_u - i64.const -7046029288634856825 - i64.mul - i64.xor - local.set $3 - local.get $3 - i64.const 23 - i64.rotl - i64.const -4417276706812531889 - i64.mul - i64.const 1609587929392839161 - i64.add - local.set $3 - local.get $3 - local.get $3 - i64.const 33 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const -4417276706812531889 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 29 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const 1609587929392839161 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 32 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - return - ) (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) @@ -11766,10 +12187,35 @@ i32.const 0 ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.0 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 1 + i32.eq + drop + i32.const 4 + i32.const 2 + i32.eq + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $2 + i64.extend_i32_u + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.0 + end call $~lib/map/Map#find i32.const 0 i32.ne @@ -11849,8 +12295,32 @@ local.get $10 i32.load offset=4 i32.store offset=4 - local.get $12 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.2 (result i64) + local.get $12 + local.set $13 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 1 + i32.eq + drop + i32.const 4 + i32.const 2 + i32.eq + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $13 + i64.extend_i32_u + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.2 + end local.get $1 i64.extend_i32_u i64.and @@ -11932,23 +12402,47 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i64) - (local $4 i32) + (local $3 i32) + (local $4 i64) (local $5 i32) (local $6 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $3 + block $~lib/util/hash/HASH|inlined.1 (result i64) + local.get $1 + local.set $3 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 1 + i32.eq + drop + i32.const 4 + i32.const 2 + i32.eq + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $3 + i64.extend_i32_u + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.1 + end + local.set $4 local.get $0 local.get $1 - local.get $3 - call $~lib/map/Map#find - local.set $4 local.get $4 + call $~lib/map/Map#find + local.set $5 + local.get $5 if i32.const 0 drop - local.get $4 + local.get $5 local.get $2 i32.store offset=4 else @@ -11985,8 +12479,8 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $5 - local.get $5 + local.set $3 + local.get $3 local.get $0 local.get $0 i32.load offset=24 @@ -11998,11 +12492,11 @@ i32.const 12 i32.mul i32.add - local.set $4 - local.get $4 + local.set $5 + local.get $5 local.get $1 i32.store - local.get $4 + local.get $5 local.get $2 i32.store offset=4 local.get $0 @@ -12013,7 +12507,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $3 + local.get $4 local.get $0 i64.load offset=8 i64.and @@ -12022,28 +12516,53 @@ i32.mul i32.add local.set $6 - local.get $4 + local.get $5 local.get $6 i32.load i32.store offset=8 local.get $6 - local.get $4 - i32.store local.get $5 - call $~lib/rt/pure/__release + i32.store + local.get $3 + call $~lib/rt/pure/__release end local.get $0 call $~lib/rt/pure/__retain ) (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.3 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 1 + i32.eq + drop + i32.const 4 + i32.const 2 + i32.eq + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $2 + i64.extend_i32_u + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.3 + end call $~lib/map/Map#find - local.set $2 - local.get $2 + local.set $3 + local.get $3 i32.eqz if i32.const 384 @@ -12053,7 +12572,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.load offset=4 ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) @@ -12532,8 +13051,32 @@ local.get $10 i32.load offset=4 i32.store offset=4 - local.get $12 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.5 (result i64) + local.get $12 + local.set $13 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 1 + i32.eq + drop + i32.const 4 + i32.const 2 + i32.eq + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $13 + i64.extend_i32_u + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.5 + end local.get $1 i64.extend_i32_u i64.and @@ -12615,23 +13158,47 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i64) - (local $4 i32) + (local $3 i32) + (local $4 i64) (local $5 i32) (local $6 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $3 + block $~lib/util/hash/HASH|inlined.4 (result i64) + local.get $1 + local.set $3 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 1 + i32.eq + drop + i32.const 4 + i32.const 2 + i32.eq + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $3 + i64.extend_i32_u + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.4 + end + local.set $4 local.get $0 local.get $1 - local.get $3 - call $~lib/map/Map#find - local.set $4 local.get $4 + call $~lib/map/Map#find + local.set $5 + local.get $5 if i32.const 0 drop - local.get $4 + local.get $5 local.get $2 i32.store offset=4 else @@ -12668,8 +13235,8 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $5 - local.get $5 + local.set $3 + local.get $3 local.get $0 local.get $0 i32.load offset=24 @@ -12681,11 +13248,11 @@ i32.const 12 i32.mul i32.add - local.set $4 - local.get $4 + local.set $5 + local.get $5 local.get $1 i32.store - local.get $4 + local.get $5 local.get $2 i32.store offset=4 local.get $0 @@ -12696,7 +13263,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $3 + local.get $4 local.get $0 i64.load offset=8 i64.and @@ -12705,14 +13272,14 @@ i32.mul i32.add local.set $6 - local.get $4 + local.get $5 local.get $6 i32.load i32.store offset=8 local.get $6 - local.get $4 - i32.store local.get $5 + i32.store + local.get $3 call $~lib/rt/pure/__release end local.get $0 @@ -12729,11 +13296,35 @@ (local $5 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.6 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 1 + i32.eq + drop + i32.const 4 + i32.const 2 + i32.eq + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $2 + i64.extend_i32_u + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.6 + end call $~lib/map/Map#find - local.set $2 - local.get $2 + local.set $3 + local.get $3 i32.eqz if i32.const 0 @@ -12743,8 +13334,8 @@ drop i32.const 0 drop - local.get $2 - local.get $2 + local.get $3 + local.get $3 i32.load offset=8 i32.const 1 i32.or @@ -12760,16 +13351,16 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $3 - local.get $3 + local.set $4 + local.get $4 i32.const 1 i32.add i32.const 4 - local.tee $4 + local.tee $2 local.get $0 i32.load offset=28 local.tee $5 - local.get $4 + local.get $2 local.get $5 i32.gt_u select @@ -12789,7 +13380,7 @@ end if local.get $0 - local.get $3 + local.get $4 call $~lib/map/Map#rehash end i32.const 1 @@ -13341,33 +13932,16 @@ i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/HASH (param $0 i64) (result i64) + (func $~lib/util/hash/hash64 (param $0 i64) (result i64) (local $1 i64) - (local $2 i64) - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 4 - i32.le_u - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $0 - local.set $1 i64.const 0 i64.const 2870177450012600261 i64.add i64.const 8 i64.add - local.set $2 - local.get $2 + local.set $1 local.get $1 + local.get $0 i64.const -4417276706812531889 i64.mul i64.const 31 @@ -13375,43 +13949,42 @@ i64.const -7046029288634856825 i64.mul i64.xor - local.set $2 - local.get $2 + local.set $1 + local.get $1 i64.const 27 i64.rotl i64.const -7046029288634856825 i64.mul i64.const -8796714831421723037 i64.add - local.set $2 - local.get $2 - local.get $2 + local.set $1 + local.get $1 + local.get $1 i64.const 33 i64.shr_u i64.xor - local.set $2 - local.get $2 + local.set $1 + local.get $1 i64.const -4417276706812531889 i64.mul - local.set $2 - local.get $2 - local.get $2 + local.set $1 + local.get $1 + local.get $1 i64.const 29 i64.shr_u i64.xor - local.set $2 - local.get $2 + local.set $1 + local.get $1 i64.const 1609587929392839161 i64.mul - local.set $2 - local.get $2 - local.get $2 + local.set $1 + local.get $1 + local.get $1 i64.const 32 i64.shr_u i64.xor - local.set $2 - local.get $2 - return + local.set $1 + local.get $1 ) (func $~lib/map/Map#find (param $0 i32) (param $1 i64) (param $2 i64) (result i32) (local $3 i32) @@ -13465,10 +14038,38 @@ i32.const 0 ) (func $~lib/map/Map#has (param $0 i32) (param $1 i64) (result i32) + (local $2 i64) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.0 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 8 + i32.const 1 + i32.eq + drop + i32.const 8 + i32.const 2 + i32.eq + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $2 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.0 + end call $~lib/map/Map#find i32.const 0 i32.ne @@ -13485,8 +14086,9 @@ (local $10 i32) (local $11 i32) (local $12 i64) - (local $13 i32) + (local $13 i64) (local $14 i32) + (local $15 i32) local.get $1 i32.const 1 i32.add @@ -13548,24 +14150,51 @@ local.get $10 i32.load offset=8 i32.store offset=8 - local.get $12 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.2 (result i64) + local.get $12 + local.set $13 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 8 + i32.const 1 + i32.eq + drop + i32.const 8 + i32.const 2 + i32.eq + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $13 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.2 + end local.get $1 i64.extend_i32_u i64.and i32.wrap_i64 - local.set $13 + local.set $14 local.get $3 - local.get $13 + local.get $14 i32.const 4 i32.mul i32.add - local.set $14 + local.set $15 local.get $11 - local.get $14 + local.get $15 i32.load i32.store offset=12 - local.get $14 + local.get $15 local.get $8 i32.store local.get $8 @@ -13583,29 +14212,29 @@ local.get $0 local.tee $11 local.get $3 - local.tee $13 + local.tee $14 local.get $11 i32.load local.tee $9 i32.ne if - local.get $13 + local.get $14 call $~lib/rt/pure/__retain - local.set $13 + local.set $14 local.get $9 call $~lib/rt/pure/__release end - local.get $13 + local.get $14 i32.store local.get $0 local.get $1 i64.extend_i32_u i64.store offset=8 local.get $0 - local.tee $14 + local.tee $15 local.get $5 local.tee $9 - local.get $14 + local.get $15 i32.load offset=16 local.tee $11 i32.ne @@ -13632,22 +14261,50 @@ ) (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i64) - (local $4 i32) + (local $4 i64) (local $5 i32) (local $6 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $3 + (local $7 i32) + block $~lib/util/hash/HASH|inlined.1 (result i64) + local.get $1 + local.set $3 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 8 + i32.const 1 + i32.eq + drop + i32.const 8 + i32.const 2 + i32.eq + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $3 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.1 + end + local.set $4 local.get $0 local.get $1 - local.get $3 - call $~lib/map/Map#find - local.set $4 local.get $4 + call $~lib/map/Map#find + local.set $5 + local.get $5 if i32.const 0 drop - local.get $4 + local.get $5 local.get $2 i32.store offset=8 else @@ -13684,24 +14341,24 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $5 - local.get $5 + local.set $6 + local.get $6 local.get $0 local.get $0 i32.load offset=24 - local.tee $6 + local.tee $7 i32.const 1 i32.add i32.store offset=24 - local.get $6 + local.get $7 i32.const 16 i32.mul i32.add - local.set $4 - local.get $4 + local.set $5 + local.get $5 local.get $1 i64.store - local.get $4 + local.get $5 local.get $2 i32.store offset=8 local.get $0 @@ -13712,7 +14369,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $3 + local.get $4 local.get $0 i64.load offset=8 i64.and @@ -13720,29 +14377,57 @@ i32.const 4 i32.mul i32.add - local.set $6 - local.get $4 - local.get $6 + local.set $7 + local.get $5 + local.get $7 i32.load i32.store offset=12 - local.get $6 - local.get $4 - i32.store + local.get $7 local.get $5 + i32.store + local.get $6 call $~lib/rt/pure/__release end local.get $0 call $~lib/rt/pure/__retain ) (func $~lib/map/Map#get (param $0 i32) (param $1 i64) (result i32) - (local $2 i32) + (local $2 i64) + (local $3 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.3 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 8 + i32.const 1 + i32.eq + drop + i32.const 8 + i32.const 2 + i32.eq + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $2 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.3 + end call $~lib/map/Map#find - local.set $2 - local.get $2 + local.set $3 + local.get $3 i32.eqz if i32.const 384 @@ -13752,7 +14437,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.load offset=8 ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) @@ -14168,8 +14853,9 @@ (local $10 i32) (local $11 i32) (local $12 i64) - (local $13 i32) + (local $13 i64) (local $14 i32) + (local $15 i32) local.get $1 i32.const 1 i32.add @@ -14231,24 +14917,51 @@ local.get $10 i64.load offset=8 i64.store offset=8 - local.get $12 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.5 (result i64) + local.get $12 + local.set $13 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 8 + i32.const 1 + i32.eq + drop + i32.const 8 + i32.const 2 + i32.eq + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $13 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.5 + end local.get $1 i64.extend_i32_u i64.and i32.wrap_i64 - local.set $13 + local.set $14 local.get $3 - local.get $13 + local.get $14 i32.const 4 i32.mul i32.add - local.set $14 + local.set $15 local.get $11 - local.get $14 + local.get $15 i32.load i32.store offset=16 - local.get $14 + local.get $15 local.get $8 i32.store local.get $8 @@ -14266,29 +14979,29 @@ local.get $0 local.tee $11 local.get $3 - local.tee $13 + local.tee $14 local.get $11 i32.load local.tee $9 i32.ne if - local.get $13 + local.get $14 call $~lib/rt/pure/__retain - local.set $13 + local.set $14 local.get $9 call $~lib/rt/pure/__release end - local.get $13 + local.get $14 i32.store local.get $0 local.get $1 i64.extend_i32_u i64.store offset=8 local.get $0 - local.tee $14 + local.tee $15 local.get $5 local.tee $9 - local.get $14 + local.get $15 i32.load offset=16 local.tee $11 i32.ne @@ -14315,22 +15028,50 @@ ) (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i64) (result i32) (local $3 i64) - (local $4 i32) + (local $4 i64) (local $5 i32) (local $6 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $3 + (local $7 i32) + block $~lib/util/hash/HASH|inlined.4 (result i64) + local.get $1 + local.set $3 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 8 + i32.const 1 + i32.eq + drop + i32.const 8 + i32.const 2 + i32.eq + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $3 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.4 + end + local.set $4 local.get $0 local.get $1 - local.get $3 - call $~lib/map/Map#find - local.set $4 local.get $4 + call $~lib/map/Map#find + local.set $5 + local.get $5 if i32.const 0 drop - local.get $4 + local.get $5 local.get $2 i64.store offset=8 else @@ -14367,24 +15108,24 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $5 - local.get $5 + local.set $6 + local.get $6 local.get $0 local.get $0 i32.load offset=24 - local.tee $6 + local.tee $7 i32.const 1 i32.add i32.store offset=24 - local.get $6 + local.get $7 i32.const 24 i32.mul i32.add - local.set $4 - local.get $4 + local.set $5 + local.get $5 local.get $1 i64.store - local.get $4 + local.get $5 local.get $2 i64.store offset=8 local.get $0 @@ -14395,7 +15136,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $3 + local.get $4 local.get $0 i64.load offset=8 i64.and @@ -14403,15 +15144,15 @@ i32.const 4 i32.mul i32.add - local.set $6 - local.get $4 - local.get $6 + local.set $7 + local.get $5 + local.get $7 i32.load i32.store offset=16 - local.get $6 - local.get $4 - i32.store + local.get $7 local.get $5 + i32.store + local.get $6 call $~lib/rt/pure/__release end local.get $0 @@ -14422,17 +15163,45 @@ i32.load offset=28 ) (func $~lib/map/Map#delete (param $0 i32) (param $1 i64) (result i32) - (local $2 i32) + (local $2 i64) (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.6 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 8 + i32.const 1 + i32.eq + drop + i32.const 8 + i32.const 2 + i32.eq + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $2 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.6 + end call $~lib/map/Map#find - local.set $2 - local.get $2 + local.set $3 + local.get $3 i32.eqz if i32.const 0 @@ -14442,8 +15211,8 @@ drop i32.const 0 drop - local.get $2 - local.get $2 + local.get $3 + local.get $3 i32.load offset=12 i32.const 1 i32.or @@ -14459,17 +15228,17 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $3 - local.get $3 + local.set $4 + local.get $4 i32.const 1 i32.add i32.const 4 - local.tee $4 + local.tee $5 local.get $0 i32.load offset=28 - local.tee $5 - local.get $4 + local.tee $6 local.get $5 + local.get $6 i32.gt_u select i32.ge_u @@ -14488,7 +15257,7 @@ end if local.get $0 - local.get $3 + local.get $4 call $~lib/map/Map#rehash end i32.const 1 @@ -15048,78 +15817,6 @@ i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/HASH (param $0 i64) (result i64) - (local $1 i64) - (local $2 i64) - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 4 - i32.le_u - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $0 - local.set $1 - i64.const 0 - i64.const 2870177450012600261 - i64.add - i64.const 8 - i64.add - local.set $2 - local.get $2 - local.get $1 - i64.const -4417276706812531889 - i64.mul - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - local.set $2 - local.get $2 - i64.const 27 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.set $2 - local.get $2 - local.get $2 - i64.const 33 - i64.shr_u - i64.xor - local.set $2 - local.get $2 - i64.const -4417276706812531889 - i64.mul - local.set $2 - local.get $2 - local.get $2 - i64.const 29 - i64.shr_u - i64.xor - local.set $2 - local.get $2 - i64.const 1609587929392839161 - i64.mul - local.set $2 - local.get $2 - local.get $2 - i64.const 32 - i64.shr_u - i64.xor - local.set $2 - local.get $2 - return - ) (func $~lib/map/Map#find (param $0 i32) (param $1 i64) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) @@ -15172,10 +15869,38 @@ i32.const 0 ) (func $~lib/map/Map#has (param $0 i32) (param $1 i64) (result i32) + (local $2 i64) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.0 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 8 + i32.const 1 + i32.eq + drop + i32.const 8 + i32.const 2 + i32.eq + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $2 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.0 + end call $~lib/map/Map#find i32.const 0 i32.ne @@ -15192,8 +15917,9 @@ (local $10 i32) (local $11 i32) (local $12 i64) - (local $13 i32) + (local $13 i64) (local $14 i32) + (local $15 i32) local.get $1 i32.const 1 i32.add @@ -15255,24 +15981,51 @@ local.get $10 i32.load offset=8 i32.store offset=8 - local.get $12 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.2 (result i64) + local.get $12 + local.set $13 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 8 + i32.const 1 + i32.eq + drop + i32.const 8 + i32.const 2 + i32.eq + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $13 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.2 + end local.get $1 i64.extend_i32_u i64.and i32.wrap_i64 - local.set $13 + local.set $14 local.get $3 - local.get $13 + local.get $14 i32.const 4 i32.mul i32.add - local.set $14 + local.set $15 local.get $11 - local.get $14 + local.get $15 i32.load i32.store offset=12 - local.get $14 + local.get $15 local.get $8 i32.store local.get $8 @@ -15290,29 +16043,29 @@ local.get $0 local.tee $11 local.get $3 - local.tee $13 + local.tee $14 local.get $11 i32.load local.tee $9 i32.ne if - local.get $13 + local.get $14 call $~lib/rt/pure/__retain - local.set $13 + local.set $14 local.get $9 call $~lib/rt/pure/__release end - local.get $13 + local.get $14 i32.store local.get $0 local.get $1 i64.extend_i32_u i64.store offset=8 local.get $0 - local.tee $14 + local.tee $15 local.get $5 local.tee $9 - local.get $14 + local.get $15 i32.load offset=16 local.tee $11 i32.ne @@ -15339,22 +16092,50 @@ ) (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i64) - (local $4 i32) + (local $4 i64) (local $5 i32) (local $6 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $3 + (local $7 i32) + block $~lib/util/hash/HASH|inlined.1 (result i64) + local.get $1 + local.set $3 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 8 + i32.const 1 + i32.eq + drop + i32.const 8 + i32.const 2 + i32.eq + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $3 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.1 + end + local.set $4 local.get $0 local.get $1 - local.get $3 - call $~lib/map/Map#find - local.set $4 local.get $4 + call $~lib/map/Map#find + local.set $5 + local.get $5 if i32.const 0 drop - local.get $4 + local.get $5 local.get $2 i32.store offset=8 else @@ -15391,24 +16172,24 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $5 - local.get $5 + local.set $6 + local.get $6 local.get $0 local.get $0 i32.load offset=24 - local.tee $6 + local.tee $7 i32.const 1 i32.add i32.store offset=24 - local.get $6 + local.get $7 i32.const 16 i32.mul i32.add - local.set $4 - local.get $4 + local.set $5 + local.get $5 local.get $1 i64.store - local.get $4 + local.get $5 local.get $2 i32.store offset=8 local.get $0 @@ -15419,7 +16200,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $3 + local.get $4 local.get $0 i64.load offset=8 i64.and @@ -15427,29 +16208,57 @@ i32.const 4 i32.mul i32.add - local.set $6 - local.get $4 - local.get $6 + local.set $7 + local.get $5 + local.get $7 i32.load i32.store offset=12 - local.get $6 - local.get $4 - i32.store + local.get $7 local.get $5 + i32.store + local.get $6 call $~lib/rt/pure/__release end local.get $0 call $~lib/rt/pure/__retain ) (func $~lib/map/Map#get (param $0 i32) (param $1 i64) (result i32) - (local $2 i32) + (local $2 i64) + (local $3 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.3 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 8 + i32.const 1 + i32.eq + drop + i32.const 8 + i32.const 2 + i32.eq + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $2 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.3 + end call $~lib/map/Map#find - local.set $2 - local.get $2 + local.set $3 + local.get $3 i32.eqz if i32.const 384 @@ -15459,7 +16268,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.load offset=8 ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) @@ -15875,8 +16684,9 @@ (local $10 i32) (local $11 i32) (local $12 i64) - (local $13 i32) + (local $13 i64) (local $14 i32) + (local $15 i32) local.get $1 i32.const 1 i32.add @@ -15938,24 +16748,51 @@ local.get $10 i64.load offset=8 i64.store offset=8 - local.get $12 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.5 (result i64) + local.get $12 + local.set $13 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 8 + i32.const 1 + i32.eq + drop + i32.const 8 + i32.const 2 + i32.eq + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $13 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.5 + end local.get $1 i64.extend_i32_u i64.and i32.wrap_i64 - local.set $13 + local.set $14 local.get $3 - local.get $13 + local.get $14 i32.const 4 i32.mul i32.add - local.set $14 + local.set $15 local.get $11 - local.get $14 + local.get $15 i32.load i32.store offset=16 - local.get $14 + local.get $15 local.get $8 i32.store local.get $8 @@ -15973,29 +16810,29 @@ local.get $0 local.tee $11 local.get $3 - local.tee $13 + local.tee $14 local.get $11 i32.load local.tee $9 i32.ne if - local.get $13 + local.get $14 call $~lib/rt/pure/__retain - local.set $13 + local.set $14 local.get $9 call $~lib/rt/pure/__release end - local.get $13 + local.get $14 i32.store local.get $0 local.get $1 i64.extend_i32_u i64.store offset=8 local.get $0 - local.tee $14 + local.tee $15 local.get $5 local.tee $9 - local.get $14 + local.get $15 i32.load offset=16 local.tee $11 i32.ne @@ -16022,22 +16859,50 @@ ) (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i64) (result i32) (local $3 i64) - (local $4 i32) + (local $4 i64) (local $5 i32) (local $6 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $3 + (local $7 i32) + block $~lib/util/hash/HASH|inlined.4 (result i64) + local.get $1 + local.set $3 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 8 + i32.const 1 + i32.eq + drop + i32.const 8 + i32.const 2 + i32.eq + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $3 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.4 + end + local.set $4 local.get $0 local.get $1 - local.get $3 - call $~lib/map/Map#find - local.set $4 local.get $4 + call $~lib/map/Map#find + local.set $5 + local.get $5 if i32.const 0 drop - local.get $4 + local.get $5 local.get $2 i64.store offset=8 else @@ -16074,24 +16939,24 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $5 - local.get $5 + local.set $6 + local.get $6 local.get $0 local.get $0 i32.load offset=24 - local.tee $6 + local.tee $7 i32.const 1 i32.add i32.store offset=24 - local.get $6 + local.get $7 i32.const 24 i32.mul i32.add - local.set $4 - local.get $4 + local.set $5 + local.get $5 local.get $1 i64.store - local.get $4 + local.get $5 local.get $2 i64.store offset=8 local.get $0 @@ -16102,7 +16967,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $3 + local.get $4 local.get $0 i64.load offset=8 i64.and @@ -16110,15 +16975,15 @@ i32.const 4 i32.mul i32.add - local.set $6 - local.get $4 - local.get $6 + local.set $7 + local.get $5 + local.get $7 i32.load i32.store offset=16 - local.get $6 - local.get $4 - i32.store + local.get $7 local.get $5 + i32.store + local.get $6 call $~lib/rt/pure/__release end local.get $0 @@ -16129,17 +16994,45 @@ i32.load offset=28 ) (func $~lib/map/Map#delete (param $0 i32) (param $1 i64) (result i32) - (local $2 i32) + (local $2 i64) (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.6 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 8 + i32.const 1 + i32.eq + drop + i32.const 8 + i32.const 2 + i32.eq + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $2 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.6 + end call $~lib/map/Map#find - local.set $2 - local.get $2 + local.set $3 + local.get $3 i32.eqz if i32.const 0 @@ -16149,8 +17042,8 @@ drop i32.const 0 drop - local.get $2 - local.get $2 + local.get $3 + local.get $3 i32.load offset=12 i32.const 1 i32.or @@ -16166,17 +17059,17 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $3 - local.get $3 + local.set $4 + local.get $4 i32.const 1 i32.add i32.const 4 - local.tee $4 + local.tee $5 local.get $0 i32.load offset=28 - local.tee $5 - local.get $4 + local.tee $6 local.get $5 + local.get $6 i32.gt_u select i32.ge_u @@ -16195,7 +17088,7 @@ end if local.get $0 - local.get $3 + local.get $4 call $~lib/map/Map#rehash end i32.const 1 @@ -16755,75 +17648,6 @@ i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/HASH (param $0 f32) (result i64) - (local $1 i32) - (local $2 i64) - (local $3 i64) - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $0 - i32.reinterpret_f32 - local.set $1 - i64.const 4 - local.set $2 - i64.const 0 - i64.const 2870177450012600261 - i64.add - local.get $2 - i64.add - local.set $3 - local.get $3 - local.get $1 - i64.extend_i32_u - i64.const -7046029288634856825 - i64.mul - i64.xor - local.set $3 - local.get $3 - i64.const 23 - i64.rotl - i64.const -4417276706812531889 - i64.mul - i64.const 1609587929392839161 - i64.add - local.set $3 - local.get $3 - local.get $3 - i64.const 33 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const -4417276706812531889 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 29 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const 1609587929392839161 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 32 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - return - ) (func $~lib/map/Map#find (param $0 i32) (param $1 f32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) @@ -16876,10 +17700,28 @@ i32.const 0 ) (func $~lib/map/Map#has (param $0 i32) (param $1 f32) (result i32) + (local $2 f32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.0 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $2 + i32.reinterpret_f32 + i64.extend_i32_u + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.0 + end call $~lib/map/Map#find i32.const 0 i32.ne @@ -16896,8 +17738,9 @@ (local $10 i32) (local $11 i32) (local $12 f32) - (local $13 i32) + (local $13 f32) (local $14 i32) + (local $15 i32) local.get $1 i32.const 1 i32.add @@ -16959,24 +17802,41 @@ local.get $10 i32.load offset=4 i32.store offset=4 - local.get $12 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.2 (result i64) + local.get $12 + local.set $13 + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $13 + i32.reinterpret_f32 + i64.extend_i32_u + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.2 + end local.get $1 i64.extend_i32_u i64.and i32.wrap_i64 - local.set $13 + local.set $14 local.get $3 - local.get $13 + local.get $14 i32.const 4 i32.mul i32.add - local.set $14 + local.set $15 local.get $11 - local.get $14 + local.get $15 i32.load i32.store offset=8 - local.get $14 + local.get $15 local.get $8 i32.store local.get $8 @@ -16994,29 +17854,29 @@ local.get $0 local.tee $11 local.get $3 - local.tee $13 + local.tee $14 local.get $11 i32.load local.tee $9 i32.ne if - local.get $13 + local.get $14 call $~lib/rt/pure/__retain - local.set $13 + local.set $14 local.get $9 call $~lib/rt/pure/__release end - local.get $13 + local.get $14 i32.store local.get $0 local.get $1 i64.extend_i32_u i64.store offset=8 local.get $0 - local.tee $14 + local.tee $15 local.get $5 local.tee $9 - local.get $14 + local.get $15 i32.load offset=16 local.tee $11 i32.ne @@ -17042,23 +17902,41 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 f32) (param $2 i32) (result i32) - (local $3 i64) - (local $4 i32) + (local $3 f32) + (local $4 i64) (local $5 i32) (local $6 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $3 + (local $7 i32) + block $~lib/util/hash/HASH|inlined.1 (result i64) + local.get $1 + local.set $3 + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $3 + i32.reinterpret_f32 + i64.extend_i32_u + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.1 + end + local.set $4 local.get $0 local.get $1 - local.get $3 - call $~lib/map/Map#find - local.set $4 local.get $4 + call $~lib/map/Map#find + local.set $5 + local.get $5 if i32.const 0 drop - local.get $4 + local.get $5 local.get $2 i32.store offset=4 else @@ -17095,24 +17973,24 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $5 - local.get $5 + local.set $6 + local.get $6 local.get $0 local.get $0 i32.load offset=24 - local.tee $6 + local.tee $7 i32.const 1 i32.add i32.store offset=24 - local.get $6 + local.get $7 i32.const 12 i32.mul i32.add - local.set $4 - local.get $4 + local.set $5 + local.get $5 local.get $1 f32.store - local.get $4 + local.get $5 local.get $2 i32.store offset=4 local.get $0 @@ -17123,7 +18001,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $3 + local.get $4 local.get $0 i64.load offset=8 i64.and @@ -17131,29 +18009,47 @@ i32.const 4 i32.mul i32.add - local.set $6 - local.get $4 - local.get $6 + local.set $7 + local.get $5 + local.get $7 i32.load i32.store offset=8 - local.get $6 - local.get $4 - i32.store + local.get $7 local.get $5 + i32.store + local.get $6 call $~lib/rt/pure/__release end local.get $0 call $~lib/rt/pure/__retain ) (func $~lib/map/Map#get (param $0 i32) (param $1 f32) (result i32) - (local $2 i32) + (local $2 f32) + (local $3 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.3 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $2 + i32.reinterpret_f32 + i64.extend_i32_u + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.3 + end call $~lib/map/Map#find - local.set $2 - local.get $2 + local.set $3 + local.get $3 i32.eqz if i32.const 384 @@ -17163,7 +18059,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.load offset=4 ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) @@ -17579,8 +18475,9 @@ (local $10 i32) (local $11 i32) (local $12 f32) - (local $13 i32) + (local $13 f32) (local $14 i32) + (local $15 i32) local.get $1 i32.const 1 i32.add @@ -17642,24 +18539,41 @@ local.get $10 f32.load offset=4 f32.store offset=4 - local.get $12 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.5 (result i64) + local.get $12 + local.set $13 + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $13 + i32.reinterpret_f32 + i64.extend_i32_u + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.5 + end local.get $1 i64.extend_i32_u i64.and i32.wrap_i64 - local.set $13 + local.set $14 local.get $3 - local.get $13 + local.get $14 i32.const 4 i32.mul i32.add - local.set $14 + local.set $15 local.get $11 - local.get $14 + local.get $15 i32.load i32.store offset=8 - local.get $14 + local.get $15 local.get $8 i32.store local.get $8 @@ -17677,29 +18591,29 @@ local.get $0 local.tee $11 local.get $3 - local.tee $13 + local.tee $14 local.get $11 i32.load local.tee $9 i32.ne if - local.get $13 + local.get $14 call $~lib/rt/pure/__retain - local.set $13 + local.set $14 local.get $9 call $~lib/rt/pure/__release end - local.get $13 + local.get $14 i32.store local.get $0 local.get $1 i64.extend_i32_u i64.store offset=8 local.get $0 - local.tee $14 + local.tee $15 local.get $5 local.tee $9 - local.get $14 + local.get $15 i32.load offset=16 local.tee $11 i32.ne @@ -17725,23 +18639,41 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 f32) (param $2 f32) (result i32) - (local $3 i64) - (local $4 i32) + (local $3 f32) + (local $4 i64) (local $5 i32) (local $6 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $3 + (local $7 i32) + block $~lib/util/hash/HASH|inlined.4 (result i64) + local.get $1 + local.set $3 + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $3 + i32.reinterpret_f32 + i64.extend_i32_u + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.4 + end + local.set $4 local.get $0 local.get $1 - local.get $3 - call $~lib/map/Map#find - local.set $4 local.get $4 + call $~lib/map/Map#find + local.set $5 + local.get $5 if i32.const 0 drop - local.get $4 + local.get $5 local.get $2 f32.store offset=4 else @@ -17778,24 +18710,24 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $5 - local.get $5 + local.set $6 + local.get $6 local.get $0 local.get $0 i32.load offset=24 - local.tee $6 + local.tee $7 i32.const 1 i32.add i32.store offset=24 - local.get $6 + local.get $7 i32.const 12 i32.mul i32.add - local.set $4 - local.get $4 + local.set $5 + local.get $5 local.get $1 f32.store - local.get $4 + local.get $5 local.get $2 f32.store offset=4 local.get $0 @@ -17806,7 +18738,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $3 + local.get $4 local.get $0 i64.load offset=8 i64.and @@ -17814,15 +18746,15 @@ i32.const 4 i32.mul i32.add - local.set $6 - local.get $4 - local.get $6 + local.set $7 + local.get $5 + local.get $7 i32.load i32.store offset=8 - local.get $6 - local.get $4 - i32.store + local.get $7 local.get $5 + i32.store + local.get $6 call $~lib/rt/pure/__release end local.get $0 @@ -17833,17 +18765,35 @@ i32.load offset=28 ) (func $~lib/map/Map#delete (param $0 i32) (param $1 f32) (result i32) - (local $2 i32) + (local $2 f32) (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.6 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $2 + i32.reinterpret_f32 + i64.extend_i32_u + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.6 + end call $~lib/map/Map#find - local.set $2 - local.get $2 + local.set $3 + local.get $3 i32.eqz if i32.const 0 @@ -17853,8 +18803,8 @@ drop i32.const 0 drop - local.get $2 - local.get $2 + local.get $3 + local.get $3 i32.load offset=8 i32.const 1 i32.or @@ -17870,17 +18820,17 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $3 - local.get $3 + local.set $4 + local.get $4 i32.const 1 i32.add i32.const 4 - local.tee $4 + local.tee $5 local.get $0 i32.load offset=28 - local.tee $5 - local.get $4 + local.tee $6 local.get $5 + local.get $6 i32.gt_u select i32.ge_u @@ -17899,7 +18849,7 @@ end if local.get $0 - local.get $3 + local.get $4 call $~lib/map/Map#rehash end i32.const 1 @@ -18459,79 +19409,6 @@ i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/HASH (param $0 f64) (result i64) - (local $1 i64) - (local $2 i64) - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $0 - i64.reinterpret_f64 - local.set $1 - i64.const 0 - i64.const 2870177450012600261 - i64.add - i64.const 8 - i64.add - local.set $2 - local.get $2 - local.get $1 - i64.const -4417276706812531889 - i64.mul - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - local.set $2 - local.get $2 - i64.const 27 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.set $2 - local.get $2 - local.get $2 - i64.const 33 - i64.shr_u - i64.xor - local.set $2 - local.get $2 - i64.const -4417276706812531889 - i64.mul - local.set $2 - local.get $2 - local.get $2 - i64.const 29 - i64.shr_u - i64.xor - local.set $2 - local.get $2 - i64.const 1609587929392839161 - i64.mul - local.set $2 - local.get $2 - local.get $2 - i64.const 32 - i64.shr_u - i64.xor - local.set $2 - local.get $2 - return - ) (func $~lib/map/Map#find (param $0 i32) (param $1 f64) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) @@ -18584,10 +19461,31 @@ i32.const 0 ) (func $~lib/map/Map#has (param $0 i32) (param $1 f64) (result i32) + (local $2 f64) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.0 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $2 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.0 + end call $~lib/map/Map#find i32.const 0 i32.ne @@ -18604,8 +19502,9 @@ (local $10 i32) (local $11 i32) (local $12 f64) - (local $13 i32) + (local $13 f64) (local $14 i32) + (local $15 i32) local.get $1 i32.const 1 i32.add @@ -18667,24 +19566,44 @@ local.get $10 i32.load offset=8 i32.store offset=8 - local.get $12 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.2 (result i64) + local.get $12 + local.set $13 + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $13 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.2 + end local.get $1 i64.extend_i32_u i64.and i32.wrap_i64 - local.set $13 + local.set $14 local.get $3 - local.get $13 + local.get $14 i32.const 4 i32.mul i32.add - local.set $14 + local.set $15 local.get $11 - local.get $14 + local.get $15 i32.load i32.store offset=12 - local.get $14 + local.get $15 local.get $8 i32.store local.get $8 @@ -18702,29 +19621,29 @@ local.get $0 local.tee $11 local.get $3 - local.tee $13 + local.tee $14 local.get $11 i32.load local.tee $9 i32.ne if - local.get $13 + local.get $14 call $~lib/rt/pure/__retain - local.set $13 + local.set $14 local.get $9 call $~lib/rt/pure/__release end - local.get $13 + local.get $14 i32.store local.get $0 local.get $1 i64.extend_i32_u i64.store offset=8 local.get $0 - local.tee $14 + local.tee $15 local.get $5 local.tee $9 - local.get $14 + local.get $15 i32.load offset=16 local.tee $11 i32.ne @@ -18750,23 +19669,44 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 f64) (param $2 i32) (result i32) - (local $3 i64) - (local $4 i32) + (local $3 f64) + (local $4 i64) (local $5 i32) (local $6 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $3 + (local $7 i32) + block $~lib/util/hash/HASH|inlined.1 (result i64) + local.get $1 + local.set $3 + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $3 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.1 + end + local.set $4 local.get $0 local.get $1 - local.get $3 - call $~lib/map/Map#find - local.set $4 local.get $4 + call $~lib/map/Map#find + local.set $5 + local.get $5 if i32.const 0 drop - local.get $4 + local.get $5 local.get $2 i32.store offset=8 else @@ -18803,24 +19743,24 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $5 - local.get $5 + local.set $6 + local.get $6 local.get $0 local.get $0 i32.load offset=24 - local.tee $6 + local.tee $7 i32.const 1 i32.add i32.store offset=24 - local.get $6 + local.get $7 i32.const 16 i32.mul i32.add - local.set $4 - local.get $4 + local.set $5 + local.get $5 local.get $1 f64.store - local.get $4 + local.get $5 local.get $2 i32.store offset=8 local.get $0 @@ -18831,7 +19771,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $3 + local.get $4 local.get $0 i64.load offset=8 i64.and @@ -18839,29 +19779,50 @@ i32.const 4 i32.mul i32.add - local.set $6 - local.get $4 - local.get $6 + local.set $7 + local.get $5 + local.get $7 i32.load i32.store offset=12 - local.get $6 - local.get $4 - i32.store + local.get $7 local.get $5 + i32.store + local.get $6 call $~lib/rt/pure/__release end local.get $0 call $~lib/rt/pure/__retain ) (func $~lib/map/Map#get (param $0 i32) (param $1 f64) (result i32) - (local $2 i32) + (local $2 f64) + (local $3 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.3 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $2 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.3 + end call $~lib/map/Map#find - local.set $2 - local.get $2 + local.set $3 + local.get $3 i32.eqz if i32.const 384 @@ -18871,7 +19832,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.load offset=8 ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) @@ -19287,8 +20248,9 @@ (local $10 i32) (local $11 i32) (local $12 f64) - (local $13 i32) + (local $13 f64) (local $14 i32) + (local $15 i32) local.get $1 i32.const 1 i32.add @@ -19350,24 +20312,44 @@ local.get $10 f64.load offset=8 f64.store offset=8 - local.get $12 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.5 (result i64) + local.get $12 + local.set $13 + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $13 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.5 + end local.get $1 i64.extend_i32_u i64.and i32.wrap_i64 - local.set $13 + local.set $14 local.get $3 - local.get $13 + local.get $14 i32.const 4 i32.mul i32.add - local.set $14 + local.set $15 local.get $11 - local.get $14 + local.get $15 i32.load i32.store offset=16 - local.get $14 + local.get $15 local.get $8 i32.store local.get $8 @@ -19385,29 +20367,29 @@ local.get $0 local.tee $11 local.get $3 - local.tee $13 + local.tee $14 local.get $11 i32.load local.tee $9 i32.ne if - local.get $13 + local.get $14 call $~lib/rt/pure/__retain - local.set $13 + local.set $14 local.get $9 call $~lib/rt/pure/__release end - local.get $13 + local.get $14 i32.store local.get $0 local.get $1 i64.extend_i32_u i64.store offset=8 local.get $0 - local.tee $14 + local.tee $15 local.get $5 local.tee $9 - local.get $14 + local.get $15 i32.load offset=16 local.tee $11 i32.ne @@ -19433,23 +20415,44 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 f64) (param $2 f64) (result i32) - (local $3 i64) - (local $4 i32) + (local $3 f64) + (local $4 i64) (local $5 i32) (local $6 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $3 + (local $7 i32) + block $~lib/util/hash/HASH|inlined.4 (result i64) + local.get $1 + local.set $3 + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $3 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.4 + end + local.set $4 local.get $0 local.get $1 - local.get $3 - call $~lib/map/Map#find - local.set $4 local.get $4 + call $~lib/map/Map#find + local.set $5 + local.get $5 if i32.const 0 drop - local.get $4 + local.get $5 local.get $2 f64.store offset=8 else @@ -19486,24 +20489,24 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $5 - local.get $5 + local.set $6 + local.get $6 local.get $0 local.get $0 i32.load offset=24 - local.tee $6 + local.tee $7 i32.const 1 i32.add i32.store offset=24 - local.get $6 + local.get $7 i32.const 24 i32.mul i32.add - local.set $4 - local.get $4 + local.set $5 + local.get $5 local.get $1 f64.store - local.get $4 + local.get $5 local.get $2 f64.store offset=8 local.get $0 @@ -19514,7 +20517,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $3 + local.get $4 local.get $0 i64.load offset=8 i64.and @@ -19522,15 +20525,15 @@ i32.const 4 i32.mul i32.add - local.set $6 - local.get $4 - local.get $6 + local.set $7 + local.get $5 + local.get $7 i32.load i32.store offset=16 - local.get $6 - local.get $4 - i32.store + local.get $7 local.get $5 + i32.store + local.get $6 call $~lib/rt/pure/__release end local.get $0 @@ -19541,17 +20544,38 @@ i32.load offset=28 ) (func $~lib/map/Map#delete (param $0 i32) (param $1 f64) (result i32) - (local $2 i32) + (local $2 f64) (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.6 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $2 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.6 + end call $~lib/map/Map#find - local.set $2 - local.get $2 + local.set $3 + local.get $3 i32.eqz if i32.const 0 @@ -19561,8 +20585,8 @@ drop i32.const 0 drop - local.get $2 - local.get $2 + local.get $3 + local.get $3 i32.load offset=12 i32.const 1 i32.or @@ -19578,17 +20602,17 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $3 - local.get $3 + local.set $4 + local.get $4 i32.const 1 i32.add i32.const 4 - local.tee $4 + local.tee $5 local.get $0 i32.load offset=28 - local.tee $5 - local.get $4 + local.tee $6 local.get $5 + local.get $6 i32.gt_u select i32.ge_u @@ -19607,7 +20631,7 @@ end if local.get $0 - local.get $3 + local.get $4 call $~lib/map/Map#rehash end i32.const 1 diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 8f73fa5a09..87384489ac 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -6,7 +6,7 @@ (type $none_=>_i32 (func (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_none (func (param i32))) - (type $i32_=>_i64 (func (param i32) (result i64))) + (type $i64_=>_i64 (func (param i64) (result i64))) (type $i32_i32_i64_=>_i32 (func (param i32 i32 i64) (result i32))) (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) (type $i32_f32_=>_i32 (func (param i32 f32) (result i32))) @@ -21,9 +21,6 @@ (type $i32_f32_i64_=>_i32 (func (param i32 f32 i64) (result i32))) (type $i32_f64_i64_=>_i32 (func (param i32 f64 i64) (result i32))) (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) - (type $i64_=>_i64 (func (param i64) (result i64))) - (type $f32_=>_i64 (func (param f32) (result i64))) - (type $f64_=>_i64 (func (param f64) (result i64))) (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -1319,14 +1316,8 @@ i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/HASH (param $0 i32) (result i64) - (local $1 i64) + (func $~lib/util/hash/hash8 (param $0 i64) (result i64) local.get $0 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i64.extend_i32_u i64.const -7046029288634856825 i64.mul i64.const 2870177450012600262 @@ -1337,22 +1328,22 @@ i64.mul i64.const 1609587929392839161 i64.add - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i64.const 33 i64.shr_u i64.xor i64.const -4417276706812531889 i64.mul - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i64.const 29 i64.shr_u i64.xor i64.const 1609587929392839161 i64.mul - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i64.const 32 i64.shr_u i64.xor @@ -1406,7 +1397,12 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i64.extend_i32_s + call $~lib/util/hash/hash8 call $~lib/set/Set#find i32.const 0 i32.ne @@ -1468,7 +1464,8 @@ local.get $2 local.get $5 local.get $4 - call $~lib/util/hash/HASH + i64.extend_i32_s + call $~lib/util/hash/hash8 local.get $1 i64.extend_i32_u i64.and @@ -1549,7 +1546,12 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i64.extend_i32_s + call $~lib/util/hash/hash8 local.tee $3 call $~lib/set/Set#find i32.eqz @@ -2233,7 +2235,12 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i64.extend_i32_s + call $~lib/util/hash/hash8 call $~lib/set/Set#find local.tee $1 i32.eqz @@ -2666,47 +2673,14 @@ i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/HASH (param $0 i32) (result i64) - (local $1 i64) - local.get $0 - i32.const 255 - i32.and - i64.extend_i32_u - i64.const -7046029288634856825 - i64.mul - i64.const 2870177450012600262 - i64.xor - i64.const 23 - i64.rotl - i64.const -4417276706812531889 - i64.mul - i64.const 1609587929392839161 - i64.add - local.tee $1 - local.get $1 - i64.const 33 - i64.shr_u - i64.xor - i64.const -4417276706812531889 - i64.mul - local.tee $1 - local.get $1 - i64.const 29 - i64.shr_u - i64.xor - i64.const 1609587929392839161 - i64.mul - local.tee $1 - local.get $1 - i64.const 32 - i64.shr_u - i64.xor - ) (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.const 255 + i32.and + i64.extend_i32_u + call $~lib/util/hash/hash8 call $~lib/set/Set#find i32.const 0 i32.ne @@ -2768,7 +2742,8 @@ local.get $2 local.get $5 local.get $4 - call $~lib/util/hash/HASH + i64.extend_i32_u + call $~lib/util/hash/hash8 local.get $1 i64.extend_i32_u i64.and @@ -2849,7 +2824,10 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.const 255 + i32.and + i64.extend_i32_u + call $~lib/util/hash/hash8 local.tee $3 call $~lib/set/Set#find i32.eqz @@ -3064,7 +3042,10 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.const 255 + i32.and + i64.extend_i32_u + call $~lib/util/hash/hash8 call $~lib/set/Set#find local.tee $1 i32.eqz @@ -3456,14 +3437,8 @@ i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/HASH (param $0 i32) (result i64) - (local $1 i64) + (func $~lib/util/hash/hash16 (param $0 i64) (result i64) local.get $0 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i64.extend_i32_u i64.const -7046029288634856825 i64.mul i64.const 2870177450012600263 @@ -3474,22 +3449,22 @@ i64.mul i64.const 1609587929392839161 i64.add - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i64.const 33 i64.shr_u i64.xor i64.const -4417276706812531889 i64.mul - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i64.const 29 i64.shr_u i64.xor i64.const 1609587929392839161 i64.mul - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i64.const 32 i64.shr_u i64.xor @@ -3543,7 +3518,12 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i64.extend_i32_s + call $~lib/util/hash/hash16 call $~lib/set/Set#find i32.const 0 i32.ne @@ -3605,7 +3585,8 @@ local.get $2 local.get $5 local.get $4 - call $~lib/util/hash/HASH + i64.extend_i32_s + call $~lib/util/hash/hash16 local.get $1 i64.extend_i32_u i64.and @@ -3686,7 +3667,12 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i64.extend_i32_s + call $~lib/util/hash/hash16 local.tee $3 call $~lib/set/Set#find i32.eqz @@ -3957,7 +3943,12 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i64.extend_i32_s + call $~lib/util/hash/hash16 call $~lib/set/Set#find local.tee $1 i32.eqz @@ -4357,47 +4348,14 @@ i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/HASH (param $0 i32) (result i64) - (local $1 i64) - local.get $0 - i32.const 65535 - i32.and - i64.extend_i32_u - i64.const -7046029288634856825 - i64.mul - i64.const 2870177450012600263 - i64.xor - i64.const 23 - i64.rotl - i64.const -4417276706812531889 - i64.mul - i64.const 1609587929392839161 - i64.add - local.tee $1 - local.get $1 - i64.const 33 - i64.shr_u - i64.xor - i64.const -4417276706812531889 - i64.mul - local.tee $1 - local.get $1 - i64.const 29 - i64.shr_u - i64.xor - i64.const 1609587929392839161 - i64.mul - local.tee $1 - local.get $1 - i64.const 32 - i64.shr_u - i64.xor - ) (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.const 65535 + i32.and + i64.extend_i32_u + call $~lib/util/hash/hash16 call $~lib/set/Set#find i32.const 0 i32.ne @@ -4459,7 +4417,8 @@ local.get $2 local.get $5 local.get $4 - call $~lib/util/hash/HASH + i64.extend_i32_u + call $~lib/util/hash/hash16 local.get $1 i64.extend_i32_u i64.and @@ -4540,7 +4499,10 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.const 65535 + i32.and + i64.extend_i32_u + call $~lib/util/hash/hash16 local.tee $3 call $~lib/set/Set#find i32.eqz @@ -4761,7 +4723,10 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.const 65535 + i32.and + i64.extend_i32_u + call $~lib/util/hash/hash16 call $~lib/set/Set#find local.tee $1 i32.eqz @@ -5153,10 +5118,8 @@ i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/HASH (param $0 i32) (result i64) - (local $1 i64) + (func $~lib/util/hash/hash32 (param $0 i64) (result i64) local.get $0 - i64.extend_i32_u i64.const -7046029288634856825 i64.mul i64.const 2870177450012600265 @@ -5167,22 +5130,22 @@ i64.mul i64.const 1609587929392839161 i64.add - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i64.const 33 i64.shr_u i64.xor i64.const -4417276706812531889 i64.mul - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i64.const 29 i64.shr_u i64.xor i64.const 1609587929392839161 i64.mul - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i64.const 32 i64.shr_u i64.xor @@ -5234,7 +5197,8 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i64.extend_i32_s + call $~lib/util/hash/hash32 call $~lib/set/Set#find i32.const 0 i32.ne @@ -5296,7 +5260,8 @@ local.get $2 local.get $5 local.get $4 - call $~lib/util/hash/HASH + i64.extend_i32_s + call $~lib/util/hash/hash32 local.get $1 i64.extend_i32_u i64.and @@ -5377,7 +5342,8 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i64.extend_i32_s + call $~lib/util/hash/hash32 local.tee $3 call $~lib/set/Set#find i32.eqz @@ -5648,7 +5614,8 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i64.extend_i32_s + call $~lib/util/hash/hash32 call $~lib/set/Set#find local.tee $1 i32.eqz @@ -6032,8 +5999,17 @@ i32.store offset=28 local.get $0 ) - (func $~lib/set/Set#values (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + local.get $1 + i64.extend_i32_u + call $~lib/util/hash/hash32 + call $~lib/set/Set#find + i32.const 0 + i32.ne + ) + (func $~lib/set/Set#rehash (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6041,76 +6017,295 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 2 + i32.shl + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $5 + local.get $3 + i32.const 3 + i32.shl + i32.const 3 + i32.div_s + local.tee $7 + i32.const 3 + i32.shl + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $3 local.get $0 i32.load offset=16 - local.set $5 + local.tee $4 local.get $0 i32.load offset=24 - local.tee $8 - local.set $7 - i32.const 16 - i32.const 14 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.tee $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 - i32.const 0 - i32.store offset=12 - local.get $8 - i32.const 268435455 - i32.gt_u - if - i32.const 1248 - i32.const 1408 - i32.const 57 - i32.const 60 - call $~lib/builtins/abort - unreachable - end - local.get $7 - i32.const 2 + i32.const 3 i32.shl - local.tee $6 - i32.const 0 - call $~lib/rt/pure/__new - local.tee $3 - local.get $6 - call $~lib/memory/memory.fill + i32.add + local.set $8 local.get $3 local.set $2 - local.get $3 - local.get $0 - i32.load - local.tee $4 - i32.ne - if - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 + loop $while-continue|0 local.get $4 - call $~lib/rt/pure/__release - end - local.get $0 - local.get $2 - i32.store - local.get $0 - local.get $3 - i32.store offset=4 - local.get $0 - local.get $6 - i32.store offset=8 - local.get $0 - local.get $7 - i32.store offset=12 + local.get $8 + i32.ne + if + local.get $4 + local.tee $6 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $2 + local.get $6 + i32.load + local.tee $4 + i32.store + local.get $2 + local.get $5 + local.get $4 + i64.extend_i32_u + call $~lib/util/hash/hash32 + local.get $1 + i64.extend_i32_u + i64.and + i32.wrap_i64 + i32.const 2 + i32.shl + i32.add + local.tee $4 + i32.load + i32.store offset=4 + local.get $4 + local.get $2 + i32.store + local.get $2 + i32.const 8 + i32.add + local.set $2 + end + local.get $6 + i32.const 8 + i32.add + local.set $4 + br $while-continue|0 + end + end + local.get $5 + local.tee $2 + local.get $0 + i32.load + local.tee $4 + i32.ne + if + local.get $2 + call $~lib/rt/pure/__retain + local.set $2 + local.get $4 + call $~lib/rt/pure/__release + end + local.get $0 + local.get $2 + i32.store + local.get $0 + local.get $1 + i64.extend_i32_u + i64.store offset=8 + local.get $3 + local.tee $1 + local.get $0 + i32.load offset=16 + local.tee $2 + i32.ne + if + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $2 + call $~lib/rt/pure/__release + end + local.get $0 + local.get $1 + i32.store offset=16 + local.get $0 + local.get $7 + i32.store offset=20 + local.get $0 + local.get $0 + i32.load offset=28 + i32.store offset=24 + local.get $5 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + ) + (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i64) + (local $4 i32) + local.get $0 + local.get $1 + local.get $1 + i64.extend_i32_u + call $~lib/util/hash/hash32 + local.tee $3 + call $~lib/set/Set#find + i32.eqz + if + local.get $0 + i32.load offset=24 + local.get $0 + i32.load offset=20 + i32.eq + if + local.get $0 + local.get $0 + i32.load offset=28 + local.get $0 + i32.load offset=20 + i32.const 3 + i32.mul + i32.const 4 + i32.div_s + i32.lt_s + if (result i64) + local.get $0 + i64.load offset=8 + else + local.get $0 + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or + end + i32.wrap_i64 + call $~lib/set/Set#rehash + end + local.get $0 + i32.load offset=16 + local.get $0 + local.get $0 + i32.load offset=24 + local.tee $4 + i32.const 1 + i32.add + i32.store offset=24 + local.get $4 + i32.const 3 + i32.shl + i32.add + local.tee $2 + local.get $1 + i32.store + local.get $0 + local.get $0 + i32.load offset=28 + i32.const 1 + i32.add + i32.store offset=28 + local.get $2 + local.get $0 + i32.load + local.get $3 + local.get $0 + i64.load offset=8 + i64.and + i32.wrap_i64 + i32.const 2 + i32.shl + i32.add + local.tee $1 + i32.load + i32.store offset=4 + local.get $1 + local.get $2 + i32.store + end + local.get $0 + call $~lib/rt/pure/__retain + ) + (func $~lib/set/Set#values (param $0 i32) (result i32) + (local $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=16 + local.set $5 + local.get $0 + i32.load offset=24 + local.tee $8 + local.set $7 + i32.const 16 + i32.const 14 + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain + local.tee $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 + i32.const 0 + i32.store offset=12 + local.get $8 + i32.const 268435455 + i32.gt_u + if + i32.const 1248 + i32.const 1408 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $7 + i32.const 2 + i32.shl + local.tee $6 + i32.const 0 + call $~lib/rt/pure/__new + local.tee $3 + local.get $6 + call $~lib/memory/memory.fill + local.get $3 + local.set $2 + local.get $3 + local.get $0 + i32.load + local.tee $4 + i32.ne + if + local.get $2 + call $~lib/rt/pure/__retain + local.set $2 + local.get $4 + call $~lib/rt/pure/__release + end + local.get $0 + local.get $2 + i32.store + local.get $0 + local.get $3 + i32.store offset=4 + local.get $0 + local.get $6 + i32.store offset=8 + local.get $0 + local.get $7 + i32.store offset=12 loop $for-loop|0 local.get $8 local.get $9 @@ -6149,6 +6344,67 @@ call $~lib/array/Array#set:length local.get $0 ) + (func $~lib/set/Set#delete (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + local.get $1 + local.get $1 + i64.extend_i32_u + call $~lib/util/hash/hash32 + call $~lib/set/Set#find + local.tee $1 + i32.eqz + if + return + end + local.get $1 + local.get $1 + i32.load offset=4 + i32.const 1 + i32.or + i32.store offset=4 + local.get $0 + local.get $0 + i32.load offset=28 + i32.const 1 + i32.sub + i32.store offset=28 + local.get $0 + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 + local.tee $2 + i32.const 1 + i32.add + i32.const 4 + local.get $0 + i32.load offset=28 + local.tee $1 + local.get $1 + i32.const 4 + i32.lt_u + select + i32.ge_u + if (result i32) + local.get $0 + i32.load offset=28 + local.get $0 + i32.load offset=20 + i32.const 3 + i32.mul + i32.const 4 + i32.div_s + i32.lt_s + else + i32.const 0 + end + if + local.get $0 + local.get $2 + call $~lib/set/Set#rehash + end + ) (func $std/set/testNumeric (local $0 i32) (local $1 i32) @@ -6163,7 +6419,7 @@ if local.get $0 local.get $2 - call $~lib/set/Set#has + call $~lib/set/Set#has if i32.const 0 i32.const 1360 @@ -6174,11 +6430,11 @@ end local.get $0 local.get $2 - call $~lib/set/Set#add + call $~lib/set/Set#add call $~lib/rt/pure/__release local.get $0 local.get $2 - call $~lib/set/Set#has + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -6216,7 +6472,7 @@ if local.get $0 local.get $2 - call $~lib/set/Set#has + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -6228,11 +6484,11 @@ end local.get $0 local.get $2 - call $~lib/set/Set#add + call $~lib/set/Set#add call $~lib/rt/pure/__release local.get $0 local.get $2 - call $~lib/set/Set#has + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -6276,7 +6532,7 @@ local.get $2 local.get $1 call $~lib/array/Array#__get - call $~lib/set/Set#has + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -6290,7 +6546,7 @@ local.get $2 local.get $1 call $~lib/array/Array#__get - call $~lib/set/Set#add + call $~lib/set/Set#add call $~lib/rt/pure/__release local.get $1 i32.const 1 @@ -6321,7 +6577,7 @@ if local.get $0 local.get $1 - call $~lib/set/Set#has + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -6333,10 +6589,10 @@ end local.get $0 local.get $1 - call $~lib/set/Set#delete + call $~lib/set/Set#delete local.get $0 local.get $1 - call $~lib/set/Set#has + call $~lib/set/Set#has if i32.const 0 i32.const 1360 @@ -6373,7 +6629,7 @@ if local.get $0 local.get $1 - call $~lib/set/Set#has + call $~lib/set/Set#has if i32.const 0 i32.const 1360 @@ -6384,11 +6640,11 @@ end local.get $0 local.get $1 - call $~lib/set/Set#add + call $~lib/set/Set#add call $~lib/rt/pure/__release local.get $0 local.get $1 - call $~lib/set/Set#has + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -6400,10 +6656,10 @@ end local.get $0 local.get $1 - call $~lib/set/Set#delete + call $~lib/set/Set#delete local.get $0 local.get $1 - call $~lib/set/Set#has + call $~lib/set/Set#has if i32.const 0 i32.const 1360 @@ -6478,7 +6734,7 @@ i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/HASH (param $0 i64) (result i64) + (func $~lib/util/hash/hash64 (param $0 i64) (result i64) local.get $0 i64.const -4417276706812531889 i64.mul @@ -6561,7 +6817,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + call $~lib/util/hash/hash64 call $~lib/set/Set#find i32.const 0 i32.ne @@ -6624,7 +6880,7 @@ local.get $2 local.get $6 local.get $9 - call $~lib/util/hash/HASH + call $~lib/util/hash/hash64 local.get $1 i64.extend_i32_u i64.and @@ -6705,7 +6961,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + call $~lib/util/hash/hash64 local.tee $4 call $~lib/set/Set#find i32.eqz @@ -6977,7 +7233,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + call $~lib/util/hash/hash64 call $~lib/set/Set#find local.tee $2 i32.eqz @@ -7842,41 +8098,6 @@ i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/HASH (param $0 f32) (result i64) - (local $1 i64) - local.get $0 - i32.reinterpret_f32 - i64.extend_i32_u - i64.const -7046029288634856825 - i64.mul - i64.const 2870177450012600265 - i64.xor - i64.const 23 - i64.rotl - i64.const -4417276706812531889 - i64.mul - i64.const 1609587929392839161 - i64.add - local.tee $1 - local.get $1 - i64.const 33 - i64.shr_u - i64.xor - i64.const -4417276706812531889 - i64.mul - local.tee $1 - local.get $1 - i64.const 29 - i64.shr_u - i64.xor - i64.const 1609587929392839161 - i64.mul - local.tee $1 - local.get $1 - i64.const 32 - i64.shr_u - i64.xor - ) (func $~lib/set/Set#find (param $0 i32) (param $1 f32) (param $2 i64) (result i32) (local $3 i32) local.get $0 @@ -7924,7 +8145,9 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.reinterpret_f32 + i64.extend_i32_u + call $~lib/util/hash/hash32 call $~lib/set/Set#find i32.const 0 i32.ne @@ -7987,7 +8210,9 @@ local.get $2 local.get $6 local.get $9 - call $~lib/util/hash/HASH + i32.reinterpret_f32 + i64.extend_i32_u + call $~lib/util/hash/hash32 local.get $1 i64.extend_i32_u i64.and @@ -8068,7 +8293,9 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.reinterpret_f32 + i64.extend_i32_u + call $~lib/util/hash/hash32 local.tee $4 call $~lib/set/Set#find i32.eqz @@ -8324,7 +8551,9 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.reinterpret_f32 + i64.extend_i32_u + call $~lib/util/hash/hash32 call $~lib/set/Set#find local.tee $2 i32.eqz @@ -8709,44 +8938,6 @@ i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/HASH (param $0 f64) (result i64) - (local $1 i64) - local.get $0 - i64.reinterpret_f64 - i64.const -4417276706812531889 - i64.mul - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.const 2870177450012600269 - i64.xor - i64.const 27 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.tee $1 - local.get $1 - i64.const 33 - i64.shr_u - i64.xor - i64.const -4417276706812531889 - i64.mul - local.tee $1 - local.get $1 - i64.const 29 - i64.shr_u - i64.xor - i64.const 1609587929392839161 - i64.mul - local.tee $1 - local.get $1 - i64.const 32 - i64.shr_u - i64.xor - ) (func $~lib/set/Set#find (param $0 i32) (param $1 f64) (param $2 i64) (result i32) (local $3 i32) local.get $0 @@ -8794,7 +8985,8 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i64.reinterpret_f64 + call $~lib/util/hash/hash64 call $~lib/set/Set#find i32.const 0 i32.ne @@ -8857,7 +9049,8 @@ local.get $2 local.get $6 local.get $9 - call $~lib/util/hash/HASH + i64.reinterpret_f64 + call $~lib/util/hash/hash64 local.get $1 i64.extend_i32_u i64.and @@ -8938,7 +9131,8 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i64.reinterpret_f64 + call $~lib/util/hash/hash64 local.tee $4 call $~lib/set/Set#find i32.eqz @@ -9194,7 +9388,8 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i64.reinterpret_f64 + call $~lib/util/hash/hash64 call $~lib/set/Set#find local.tee $2 i32.eqz diff --git a/tests/compiler/std/set.untouched.wat b/tests/compiler/std/set.untouched.wat index d6979646f5..10fc4c0012 100644 --- a/tests/compiler/std/set.untouched.wat +++ b/tests/compiler/std/set.untouched.wat @@ -7,23 +7,20 @@ (type $none_=>_none (func)) (type $i32_i32_i64_=>_i32 (func (param i32 i32 i64) (result i32))) (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) - (type $i32_=>_i64 (func (param i32) (result i64))) (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) + (type $i64_=>_i64 (func (param i64) (result i64))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_f32_=>_i32 (func (param i32 f32) (result i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) (type $i32_i32_f64_=>_none (func (param i32 i32 f64))) (type $i32_i64_i64_=>_i32 (func (param i32 i64 i64) (result i32))) - (type $i64_=>_i64 (func (param i64) (result i64))) (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_f32_i64_=>_i32 (func (param i32 f32 i64) (result i32))) (type $i32_f64_i64_=>_i32 (func (param i32 f64 i64) (result i32))) - (type $f32_=>_i64 (func (param f32) (result i64))) - (type $f64_=>_i64 (func (param f64) (result i64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 12) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00(\00\00\00a\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e\00\00\00\00\00") @@ -1802,77 +1799,55 @@ i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (func $~lib/util/hash/hash8 (param $0 i64) (result i64) (local $1 i64) - (local $2 i32) - (local $3 i64) - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 4 - i32.le_u - drop - local.get $0 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - local.set $2 - i64.const 1 - local.set $1 i64.const 0 i64.const 2870177450012600261 i64.add - local.get $1 + i64.const 1 i64.add - local.set $3 - local.get $3 - local.get $2 - i64.extend_i32_u + local.set $1 + local.get $1 + local.get $0 i64.const -7046029288634856825 i64.mul i64.xor - local.set $3 - local.get $3 + local.set $1 + local.get $1 i64.const 23 i64.rotl i64.const -4417276706812531889 i64.mul i64.const 1609587929392839161 i64.add - local.set $3 - local.get $3 - local.get $3 + local.set $1 + local.get $1 + local.get $1 i64.const 33 i64.shr_u i64.xor - local.set $3 - local.get $3 + local.set $1 + local.get $1 i64.const -4417276706812531889 i64.mul - local.set $3 - local.get $3 - local.get $3 + local.set $1 + local.get $1 + local.get $1 i64.const 29 i64.shr_u i64.xor - local.set $3 - local.get $3 + local.set $1 + local.get $1 i64.const 1609587929392839161 i64.mul - local.set $3 - local.get $3 - local.get $3 + local.set $1 + local.get $1 + local.get $1 i64.const 32 i64.shr_u i64.xor - local.set $3 - local.get $3 - return + local.set $1 + local.get $1 ) (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) @@ -1930,10 +1905,31 @@ i32.const 0 ) (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.0 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + i32.const 1 + i32.eq + drop + local.get $2 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i64.extend_i32_s + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.0 + end call $~lib/set/Set#find i32.const 0 i32.ne @@ -1950,8 +1946,8 @@ (local $10 i32) (local $11 i32) (local $12 i32) - (local $13 i64) - (local $14 i32) + (local $13 i32) + (local $14 i64) local.get $1 i32.const 1 i32.add @@ -2009,24 +2005,40 @@ local.get $11 local.get $12 i32.store8 - local.get $12 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.2 (result i64) + local.get $12 + local.set $13 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + i32.const 1 + i32.eq + drop + local.get $13 + i64.extend_i32_s + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.2 + end local.get $1 i64.extend_i32_u i64.and - local.set $13 + local.set $14 local.get $3 - local.get $13 + local.get $14 i32.wrap_i64 i32.const 4 i32.mul i32.add - local.set $14 + local.set $13 local.get $11 - local.get $14 + local.get $13 i32.load i32.store offset=4 - local.get $14 + local.get $13 local.get $8 i32.store local.get $8 @@ -2063,10 +2075,10 @@ i64.extend_i32_u i64.store offset=8 local.get $0 - local.tee $14 + local.tee $13 local.get $5 local.tee $9 - local.get $14 + local.get $13 i32.load offset=16 local.tee $11 i32.ne @@ -2092,18 +2104,38 @@ call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) - (local $2 i64) - (local $3 i32) + (local $2 i32) + (local $3 i64) (local $4 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $2 + block $~lib/util/hash/HASH|inlined.1 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + i32.const 1 + i32.eq + drop + local.get $2 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i64.extend_i32_s + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.1 + end + local.set $3 local.get $0 local.get $1 - local.get $2 - call $~lib/set/Set#find - local.set $3 local.get $3 + call $~lib/set/Set#find + local.set $4 + local.get $4 i32.eqz if local.get $0 @@ -2141,16 +2173,16 @@ local.get $0 local.get $0 i32.load offset=24 - local.tee $4 + local.tee $2 i32.const 1 i32.add i32.store offset=24 - local.get $4 + local.get $2 i32.const 8 i32.mul i32.add - local.set $3 - local.get $3 + local.set $4 + local.get $4 local.get $1 i32.store8 local.get $0 @@ -2161,7 +2193,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $2 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -2169,13 +2201,13 @@ i32.const 4 i32.mul i32.add - local.set $4 - local.get $3 + local.set $2 local.get $4 + local.get $2 i32.load i32.store offset=4 + local.get $2 local.get $4 - local.get $3 i32.store end local.get $0 @@ -3975,11 +4007,31 @@ (local $5 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.3 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + i32.const 1 + i32.eq + drop + local.get $2 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i64.extend_i32_s + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.3 + end call $~lib/set/Set#find - local.set $2 - local.get $2 + local.set $3 + local.get $3 i32.eqz if i32.const 0 @@ -3987,8 +4039,8 @@ end i32.const 0 drop - local.get $2 - local.get $2 + local.get $3 + local.get $3 i32.load offset=4 i32.const 1 i32.or @@ -4004,16 +4056,16 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $3 - local.get $3 + local.set $4 + local.get $4 i32.const 1 i32.add i32.const 4 - local.tee $4 + local.tee $2 local.get $0 i32.load offset=28 local.tee $5 - local.get $4 + local.get $2 local.get $5 i32.gt_u select @@ -4033,7 +4085,7 @@ end if local.get $0 - local.get $3 + local.get $4 call $~lib/set/Set#rehash end i32.const 1 @@ -4478,76 +4530,6 @@ i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/HASH (param $0 i32) (result i64) - (local $1 i64) - (local $2 i32) - (local $3 i64) - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 4 - i32.le_u - drop - local.get $0 - i32.const 255 - i32.and - local.set $2 - i64.const 1 - local.set $1 - i64.const 0 - i64.const 2870177450012600261 - i64.add - local.get $1 - i64.add - local.set $3 - local.get $3 - local.get $2 - i64.extend_i32_u - i64.const -7046029288634856825 - i64.mul - i64.xor - local.set $3 - local.get $3 - i64.const 23 - i64.rotl - i64.const -4417276706812531889 - i64.mul - i64.const 1609587929392839161 - i64.add - local.set $3 - local.get $3 - local.get $3 - i64.const 33 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const -4417276706812531889 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 29 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const 1609587929392839161 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 32 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - return - ) (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) @@ -4602,10 +4584,29 @@ i32.const 0 ) (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.0 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + i32.const 1 + i32.eq + drop + local.get $2 + i32.const 255 + i32.and + i64.extend_i32_u + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.0 + end call $~lib/set/Set#find i32.const 0 i32.ne @@ -4622,8 +4623,8 @@ (local $10 i32) (local $11 i32) (local $12 i32) - (local $13 i64) - (local $14 i32) + (local $13 i32) + (local $14 i64) local.get $1 i32.const 1 i32.add @@ -4681,24 +4682,40 @@ local.get $11 local.get $12 i32.store8 - local.get $12 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.2 (result i64) + local.get $12 + local.set $13 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + i32.const 1 + i32.eq + drop + local.get $13 + i64.extend_i32_u + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.2 + end local.get $1 i64.extend_i32_u i64.and - local.set $13 + local.set $14 local.get $3 - local.get $13 + local.get $14 i32.wrap_i64 i32.const 4 i32.mul i32.add - local.set $14 + local.set $13 local.get $11 - local.get $14 + local.get $13 i32.load i32.store offset=4 - local.get $14 + local.get $13 local.get $8 i32.store local.get $8 @@ -4735,10 +4752,10 @@ i64.extend_i32_u i64.store offset=8 local.get $0 - local.tee $14 + local.tee $13 local.get $5 local.tee $9 - local.get $14 + local.get $13 i32.load offset=16 local.tee $11 i32.ne @@ -4764,18 +4781,36 @@ call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) - (local $2 i64) - (local $3 i32) + (local $2 i32) + (local $3 i64) (local $4 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $2 + block $~lib/util/hash/HASH|inlined.1 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + i32.const 1 + i32.eq + drop + local.get $2 + i32.const 255 + i32.and + i64.extend_i32_u + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.1 + end + local.set $3 local.get $0 local.get $1 - local.get $2 - call $~lib/set/Set#find - local.set $3 local.get $3 + call $~lib/set/Set#find + local.set $4 + local.get $4 i32.eqz if local.get $0 @@ -4813,16 +4848,16 @@ local.get $0 local.get $0 i32.load offset=24 - local.tee $4 + local.tee $2 i32.const 1 i32.add i32.store offset=24 - local.get $4 + local.get $2 i32.const 8 i32.mul i32.add - local.set $3 - local.get $3 + local.set $4 + local.get $4 local.get $1 i32.store8 local.get $0 @@ -4833,7 +4868,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $2 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -4841,13 +4876,13 @@ i32.const 4 i32.mul i32.add - local.set $4 - local.get $3 + local.set $2 local.get $4 + local.get $2 i32.load i32.store offset=4 + local.get $2 local.get $4 - local.get $3 i32.store end local.get $0 @@ -5105,11 +5140,29 @@ (local $5 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.3 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + i32.const 1 + i32.eq + drop + local.get $2 + i32.const 255 + i32.and + i64.extend_i32_u + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.3 + end call $~lib/set/Set#find - local.set $2 - local.get $2 + local.set $3 + local.get $3 i32.eqz if i32.const 0 @@ -5117,8 +5170,8 @@ end i32.const 0 drop - local.get $2 - local.get $2 + local.get $3 + local.get $3 i32.load offset=4 i32.const 1 i32.or @@ -5134,16 +5187,16 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $3 - local.get $3 + local.set $4 + local.get $4 i32.const 1 i32.add i32.const 4 - local.tee $4 + local.tee $2 local.get $0 i32.load offset=28 local.tee $5 - local.get $4 + local.get $2 local.get $5 i32.gt_u select @@ -5163,7 +5216,7 @@ end if local.get $0 - local.get $3 + local.get $4 call $~lib/set/Set#rehash end i32.const 1 @@ -5600,77 +5653,55 @@ i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (func $~lib/util/hash/hash16 (param $0 i64) (result i64) (local $1 i64) - (local $2 i32) - (local $3 i64) - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 4 - i32.le_u - drop - local.get $0 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - local.set $2 - i64.const 2 - local.set $1 i64.const 0 i64.const 2870177450012600261 i64.add - local.get $1 + i64.const 2 i64.add - local.set $3 - local.get $3 - local.get $2 - i64.extend_i32_u + local.set $1 + local.get $1 + local.get $0 i64.const -7046029288634856825 i64.mul i64.xor - local.set $3 - local.get $3 + local.set $1 + local.get $1 i64.const 23 i64.rotl i64.const -4417276706812531889 i64.mul i64.const 1609587929392839161 i64.add - local.set $3 - local.get $3 - local.get $3 + local.set $1 + local.get $1 + local.get $1 i64.const 33 i64.shr_u i64.xor - local.set $3 - local.get $3 + local.set $1 + local.get $1 i64.const -4417276706812531889 i64.mul - local.set $3 - local.get $3 - local.get $3 + local.set $1 + local.get $1 + local.get $1 i64.const 29 i64.shr_u i64.xor - local.set $3 - local.get $3 + local.set $1 + local.get $1 i64.const 1609587929392839161 i64.mul - local.set $3 - local.get $3 - local.get $3 + local.set $1 + local.get $1 + local.get $1 i64.const 32 i64.shr_u i64.xor - local.set $3 - local.get $3 - return + local.set $1 + local.get $1 ) (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) @@ -5728,10 +5759,35 @@ i32.const 0 ) (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.0 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 2 + i32.const 1 + i32.eq + drop + i32.const 2 + i32.const 2 + i32.eq + drop + local.get $2 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i64.extend_i32_s + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.0 + end call $~lib/set/Set#find i32.const 0 i32.ne @@ -5748,8 +5804,8 @@ (local $10 i32) (local $11 i32) (local $12 i32) - (local $13 i64) - (local $14 i32) + (local $13 i32) + (local $14 i64) local.get $1 i32.const 1 i32.add @@ -5807,24 +5863,44 @@ local.get $11 local.get $12 i32.store16 - local.get $12 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.2 (result i64) + local.get $12 + local.set $13 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 2 + i32.const 1 + i32.eq + drop + i32.const 2 + i32.const 2 + i32.eq + drop + local.get $13 + i64.extend_i32_s + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.2 + end local.get $1 i64.extend_i32_u i64.and - local.set $13 + local.set $14 local.get $3 - local.get $13 + local.get $14 i32.wrap_i64 i32.const 4 i32.mul i32.add - local.set $14 + local.set $13 local.get $11 - local.get $14 + local.get $13 i32.load i32.store offset=4 - local.get $14 + local.get $13 local.get $8 i32.store local.get $8 @@ -5861,10 +5937,10 @@ i64.extend_i32_u i64.store offset=8 local.get $0 - local.tee $14 + local.tee $13 local.get $5 local.tee $9 - local.get $14 + local.get $13 i32.load offset=16 local.tee $11 i32.ne @@ -5890,31 +5966,55 @@ call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) - (local $2 i64) - (local $3 i32) + (local $2 i32) + (local $3 i64) (local $4 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $2 - local.get $0 - local.get $1 - local.get $2 - call $~lib/set/Set#find - local.set $3 - local.get $3 - i32.eqz - if - local.get $0 - i32.load offset=24 - local.get $0 - i32.load offset=20 - i32.eq - if - local.get $0 - local.get $0 - i32.load offset=28 - local.get $0 - i32.load offset=20 + block $~lib/util/hash/HASH|inlined.1 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 2 + i32.const 1 + i32.eq + drop + i32.const 2 + i32.const 2 + i32.eq + drop + local.get $2 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i64.extend_i32_s + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.1 + end + local.set $3 + local.get $0 + local.get $1 + local.get $3 + call $~lib/set/Set#find + local.set $4 + local.get $4 + i32.eqz + if + local.get $0 + i32.load offset=24 + local.get $0 + i32.load offset=20 + i32.eq + if + local.get $0 + local.get $0 + i32.load offset=28 + local.get $0 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 @@ -5939,16 +6039,16 @@ local.get $0 local.get $0 i32.load offset=24 - local.tee $4 + local.tee $2 i32.const 1 i32.add i32.store offset=24 - local.get $4 + local.get $2 i32.const 8 i32.mul i32.add - local.set $3 - local.get $3 + local.set $4 + local.get $4 local.get $1 i32.store16 local.get $0 @@ -5959,7 +6059,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $2 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -5967,13 +6067,13 @@ i32.const 4 i32.mul i32.add - local.set $4 - local.get $3 + local.set $2 local.get $4 + local.get $2 i32.load i32.store offset=4 + local.get $2 local.get $4 - local.get $3 i32.store end local.get $0 @@ -6231,11 +6331,35 @@ (local $5 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.3 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 2 + i32.const 1 + i32.eq + drop + i32.const 2 + i32.const 2 + i32.eq + drop + local.get $2 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i64.extend_i32_s + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.3 + end call $~lib/set/Set#find - local.set $2 - local.get $2 + local.set $3 + local.get $3 i32.eqz if i32.const 0 @@ -6243,8 +6367,8 @@ end i32.const 0 drop - local.get $2 - local.get $2 + local.get $3 + local.get $3 i32.load offset=4 i32.const 1 i32.or @@ -6260,16 +6384,16 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $3 - local.get $3 + local.set $4 + local.get $4 i32.const 1 i32.add i32.const 4 - local.tee $4 + local.tee $2 local.get $0 i32.load offset=28 local.tee $5 - local.get $4 + local.get $2 local.get $5 i32.gt_u select @@ -6289,7 +6413,7 @@ end if local.get $0 - local.get $3 + local.get $4 call $~lib/set/Set#rehash end i32.const 1 @@ -6734,76 +6858,6 @@ i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/HASH (param $0 i32) (result i64) - (local $1 i64) - (local $2 i32) - (local $3 i64) - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 4 - i32.le_u - drop - local.get $0 - i32.const 65535 - i32.and - local.set $2 - i64.const 2 - local.set $1 - i64.const 0 - i64.const 2870177450012600261 - i64.add - local.get $1 - i64.add - local.set $3 - local.get $3 - local.get $2 - i64.extend_i32_u - i64.const -7046029288634856825 - i64.mul - i64.xor - local.set $3 - local.get $3 - i64.const 23 - i64.rotl - i64.const -4417276706812531889 - i64.mul - i64.const 1609587929392839161 - i64.add - local.set $3 - local.get $3 - local.get $3 - i64.const 33 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const -4417276706812531889 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 29 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const 1609587929392839161 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 32 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - return - ) (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) @@ -6858,10 +6912,33 @@ i32.const 0 ) (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.0 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 2 + i32.const 1 + i32.eq + drop + i32.const 2 + i32.const 2 + i32.eq + drop + local.get $2 + i32.const 65535 + i32.and + i64.extend_i32_u + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.0 + end call $~lib/set/Set#find i32.const 0 i32.ne @@ -6878,8 +6955,8 @@ (local $10 i32) (local $11 i32) (local $12 i32) - (local $13 i64) - (local $14 i32) + (local $13 i32) + (local $14 i64) local.get $1 i32.const 1 i32.add @@ -6937,24 +7014,44 @@ local.get $11 local.get $12 i32.store16 - local.get $12 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.2 (result i64) + local.get $12 + local.set $13 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 2 + i32.const 1 + i32.eq + drop + i32.const 2 + i32.const 2 + i32.eq + drop + local.get $13 + i64.extend_i32_u + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.2 + end local.get $1 i64.extend_i32_u i64.and - local.set $13 + local.set $14 local.get $3 - local.get $13 + local.get $14 i32.wrap_i64 i32.const 4 i32.mul i32.add - local.set $14 + local.set $13 local.get $11 - local.get $14 + local.get $13 i32.load i32.store offset=4 - local.get $14 + local.get $13 local.get $8 i32.store local.get $8 @@ -6991,10 +7088,10 @@ i64.extend_i32_u i64.store offset=8 local.get $0 - local.tee $14 + local.tee $13 local.get $5 local.tee $9 - local.get $14 + local.get $13 i32.load offset=16 local.tee $11 i32.ne @@ -7020,18 +7117,40 @@ call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) - (local $2 i64) - (local $3 i32) + (local $2 i32) + (local $3 i64) (local $4 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $2 + block $~lib/util/hash/HASH|inlined.1 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 2 + i32.const 1 + i32.eq + drop + i32.const 2 + i32.const 2 + i32.eq + drop + local.get $2 + i32.const 65535 + i32.and + i64.extend_i32_u + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.1 + end + local.set $3 local.get $0 local.get $1 - local.get $2 - call $~lib/set/Set#find - local.set $3 local.get $3 + call $~lib/set/Set#find + local.set $4 + local.get $4 i32.eqz if local.get $0 @@ -7069,16 +7188,16 @@ local.get $0 local.get $0 i32.load offset=24 - local.tee $4 + local.tee $2 i32.const 1 i32.add i32.store offset=24 - local.get $4 + local.get $2 i32.const 8 i32.mul i32.add - local.set $3 - local.get $3 + local.set $4 + local.get $4 local.get $1 i32.store16 local.get $0 @@ -7089,7 +7208,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $2 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -7097,13 +7216,13 @@ i32.const 4 i32.mul i32.add - local.set $4 - local.get $3 + local.set $2 local.get $4 + local.get $2 i32.load i32.store offset=4 + local.get $2 local.get $4 - local.get $3 i32.store end local.get $0 @@ -7361,11 +7480,33 @@ (local $5 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.3 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 2 + i32.const 1 + i32.eq + drop + i32.const 2 + i32.const 2 + i32.eq + drop + local.get $2 + i32.const 65535 + i32.and + i64.extend_i32_u + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.3 + end call $~lib/set/Set#find - local.set $2 - local.get $2 + local.set $3 + local.get $3 i32.eqz if i32.const 0 @@ -7373,8 +7514,8 @@ end i32.const 0 drop - local.get $2 - local.get $2 + local.get $3 + local.get $3 i32.load offset=4 i32.const 1 i32.or @@ -7390,16 +7531,16 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $3 - local.get $3 + local.set $4 + local.get $4 i32.const 1 i32.add i32.const 4 - local.tee $4 + local.tee $2 local.get $0 i32.load offset=28 local.tee $5 - local.get $4 + local.get $2 local.get $5 i32.gt_u select @@ -7419,7 +7560,7 @@ end if local.get $0 - local.get $3 + local.get $4 call $~lib/set/Set#rehash end i32.const 1 @@ -7856,73 +7997,55 @@ i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (func $~lib/util/hash/hash32 (param $0 i64) (result i64) (local $1 i64) - (local $2 i32) - (local $3 i64) - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 4 - i32.le_u - drop - local.get $0 - local.set $2 - i64.const 4 - local.set $1 i64.const 0 i64.const 2870177450012600261 i64.add - local.get $1 + i64.const 4 i64.add - local.set $3 - local.get $3 - local.get $2 - i64.extend_i32_u + local.set $1 + local.get $1 + local.get $0 i64.const -7046029288634856825 i64.mul i64.xor - local.set $3 - local.get $3 + local.set $1 + local.get $1 i64.const 23 i64.rotl i64.const -4417276706812531889 i64.mul i64.const 1609587929392839161 i64.add - local.set $3 - local.get $3 - local.get $3 + local.set $1 + local.get $1 + local.get $1 i64.const 33 i64.shr_u i64.xor - local.set $3 - local.get $3 + local.set $1 + local.get $1 i64.const -4417276706812531889 i64.mul - local.set $3 - local.get $3 - local.get $3 + local.set $1 + local.get $1 + local.get $1 i64.const 29 i64.shr_u i64.xor - local.set $3 - local.get $3 + local.set $1 + local.get $1 i64.const 1609587929392839161 i64.mul - local.set $3 - local.get $3 - local.get $3 + local.set $1 + local.get $1 + local.get $1 i64.const 32 i64.shr_u i64.xor - local.set $3 - local.get $3 - return + local.set $1 + local.get $1 ) (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) @@ -7976,10 +8099,35 @@ i32.const 0 ) (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.0 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 1 + i32.eq + drop + i32.const 4 + i32.const 2 + i32.eq + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $2 + i64.extend_i32_s + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.0 + end call $~lib/set/Set#find i32.const 0 i32.ne @@ -7996,8 +8144,8 @@ (local $10 i32) (local $11 i32) (local $12 i32) - (local $13 i64) - (local $14 i32) + (local $13 i32) + (local $14 i64) local.get $1 i32.const 1 i32.add @@ -8055,24 +8203,48 @@ local.get $11 local.get $12 i32.store - local.get $12 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.2 (result i64) + local.get $12 + local.set $13 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 1 + i32.eq + drop + i32.const 4 + i32.const 2 + i32.eq + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $13 + i64.extend_i32_s + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.2 + end local.get $1 i64.extend_i32_u i64.and - local.set $13 + local.set $14 local.get $3 - local.get $13 + local.get $14 i32.wrap_i64 i32.const 4 i32.mul i32.add - local.set $14 + local.set $13 local.get $11 - local.get $14 + local.get $13 i32.load i32.store offset=4 - local.get $14 + local.get $13 local.get $8 i32.store local.get $8 @@ -8109,10 +8281,10 @@ i64.extend_i32_u i64.store offset=8 local.get $0 - local.tee $14 + local.tee $13 local.get $5 local.tee $9 - local.get $14 + local.get $13 i32.load offset=16 local.tee $11 i32.ne @@ -8138,18 +8310,42 @@ call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) - (local $2 i64) - (local $3 i32) + (local $2 i32) + (local $3 i64) (local $4 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $2 + block $~lib/util/hash/HASH|inlined.1 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 1 + i32.eq + drop + i32.const 4 + i32.const 2 + i32.eq + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $2 + i64.extend_i32_s + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.1 + end + local.set $3 local.get $0 local.get $1 - local.get $2 - call $~lib/set/Set#find - local.set $3 local.get $3 + call $~lib/set/Set#find + local.set $4 + local.get $4 i32.eqz if local.get $0 @@ -8187,16 +8383,16 @@ local.get $0 local.get $0 i32.load offset=24 - local.tee $4 + local.tee $2 i32.const 1 i32.add i32.store offset=24 - local.get $4 + local.get $2 i32.const 8 i32.mul i32.add - local.set $3 - local.get $3 + local.set $4 + local.get $4 local.get $1 i32.store local.get $0 @@ -8207,7 +8403,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $2 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -8215,13 +8411,13 @@ i32.const 4 i32.mul i32.add - local.set $4 - local.get $3 + local.set $2 local.get $4 + local.get $2 i32.load i32.store offset=4 + local.get $2 local.get $4 - local.get $3 i32.store end local.get $0 @@ -8479,11 +8675,35 @@ (local $5 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.3 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 1 + i32.eq + drop + i32.const 4 + i32.const 2 + i32.eq + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $2 + i64.extend_i32_s + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.3 + end call $~lib/set/Set#find - local.set $2 - local.get $2 + local.set $3 + local.get $3 i32.eqz if i32.const 0 @@ -8491,8 +8711,8 @@ end i32.const 0 drop - local.get $2 - local.get $2 + local.get $3 + local.get $3 i32.load offset=4 i32.const 1 i32.or @@ -8508,16 +8728,16 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $3 - local.get $3 + local.set $4 + local.get $4 i32.const 1 i32.add i32.const 4 - local.tee $4 + local.tee $2 local.get $0 i32.load offset=28 local.tee $5 - local.get $4 + local.get $2 local.get $5 i32.gt_u select @@ -8537,7 +8757,7 @@ end if local.get $0 - local.get $3 + local.get $4 call $~lib/set/Set#rehash end i32.const 1 @@ -8962,74 +9182,6 @@ i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/HASH (param $0 i32) (result i64) - (local $1 i64) - (local $2 i32) - (local $3 i64) - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 4 - i32.le_u - drop - local.get $0 - local.set $2 - i64.const 4 - local.set $1 - i64.const 0 - i64.const 2870177450012600261 - i64.add - local.get $1 - i64.add - local.set $3 - local.get $3 - local.get $2 - i64.extend_i32_u - i64.const -7046029288634856825 - i64.mul - i64.xor - local.set $3 - local.get $3 - i64.const 23 - i64.rotl - i64.const -4417276706812531889 - i64.mul - i64.const 1609587929392839161 - i64.add - local.set $3 - local.get $3 - local.get $3 - i64.const 33 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const -4417276706812531889 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 29 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const 1609587929392839161 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 32 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - return - ) (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) @@ -9082,10 +9234,35 @@ i32.const 0 ) (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.0 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 1 + i32.eq + drop + i32.const 4 + i32.const 2 + i32.eq + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $2 + i64.extend_i32_u + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.0 + end call $~lib/set/Set#find i32.const 0 i32.ne @@ -9102,8 +9279,8 @@ (local $10 i32) (local $11 i32) (local $12 i32) - (local $13 i64) - (local $14 i32) + (local $13 i32) + (local $14 i64) local.get $1 i32.const 1 i32.add @@ -9161,24 +9338,48 @@ local.get $11 local.get $12 i32.store - local.get $12 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.2 (result i64) + local.get $12 + local.set $13 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 1 + i32.eq + drop + i32.const 4 + i32.const 2 + i32.eq + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $13 + i64.extend_i32_u + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.2 + end local.get $1 i64.extend_i32_u i64.and - local.set $13 + local.set $14 local.get $3 - local.get $13 + local.get $14 i32.wrap_i64 i32.const 4 i32.mul i32.add - local.set $14 + local.set $13 local.get $11 - local.get $14 + local.get $13 i32.load i32.store offset=4 - local.get $14 + local.get $13 local.get $8 i32.store local.get $8 @@ -9215,10 +9416,10 @@ i64.extend_i32_u i64.store offset=8 local.get $0 - local.tee $14 + local.tee $13 local.get $5 local.tee $9 - local.get $14 + local.get $13 i32.load offset=16 local.tee $11 i32.ne @@ -9244,18 +9445,42 @@ call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) - (local $2 i64) - (local $3 i32) + (local $2 i32) + (local $3 i64) (local $4 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $2 + block $~lib/util/hash/HASH|inlined.1 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 1 + i32.eq + drop + i32.const 4 + i32.const 2 + i32.eq + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $2 + i64.extend_i32_u + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.1 + end + local.set $3 local.get $0 local.get $1 - local.get $2 - call $~lib/set/Set#find - local.set $3 local.get $3 + call $~lib/set/Set#find + local.set $4 + local.get $4 i32.eqz if local.get $0 @@ -9293,16 +9518,16 @@ local.get $0 local.get $0 i32.load offset=24 - local.tee $4 + local.tee $2 i32.const 1 i32.add i32.store offset=24 - local.get $4 + local.get $2 i32.const 8 i32.mul i32.add - local.set $3 - local.get $3 + local.set $4 + local.get $4 local.get $1 i32.store local.get $0 @@ -9313,7 +9538,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $2 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -9321,13 +9546,13 @@ i32.const 4 i32.mul i32.add - local.set $4 - local.get $3 + local.set $2 local.get $4 + local.get $2 i32.load i32.store offset=4 + local.get $2 local.get $4 - local.get $3 i32.store end local.get $0 @@ -9585,11 +9810,35 @@ (local $5 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.3 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 1 + i32.eq + drop + i32.const 4 + i32.const 2 + i32.eq + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $2 + i64.extend_i32_u + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.3 + end call $~lib/set/Set#find - local.set $2 - local.get $2 + local.set $3 + local.get $3 i32.eqz if i32.const 0 @@ -9597,8 +9846,8 @@ end i32.const 0 drop - local.get $2 - local.get $2 + local.get $3 + local.get $3 i32.load offset=4 i32.const 1 i32.or @@ -9614,16 +9863,16 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $3 - local.get $3 + local.set $4 + local.get $4 i32.const 1 i32.add i32.const 4 - local.tee $4 + local.tee $2 local.get $0 i32.load offset=28 local.tee $5 - local.get $4 + local.get $2 local.get $5 i32.gt_u select @@ -9643,7 +9892,7 @@ end if local.get $0 - local.get $3 + local.get $4 call $~lib/set/Set#rehash end i32.const 1 @@ -10068,33 +10317,16 @@ i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/HASH (param $0 i64) (result i64) + (func $~lib/util/hash/hash64 (param $0 i64) (result i64) (local $1 i64) - (local $2 i64) - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 4 - i32.le_u - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $0 - local.set $1 i64.const 0 i64.const 2870177450012600261 i64.add i64.const 8 i64.add - local.set $2 - local.get $2 + local.set $1 local.get $1 + local.get $0 i64.const -4417276706812531889 i64.mul i64.const 31 @@ -10102,43 +10334,42 @@ i64.const -7046029288634856825 i64.mul i64.xor - local.set $2 - local.get $2 + local.set $1 + local.get $1 i64.const 27 i64.rotl i64.const -7046029288634856825 i64.mul i64.const -8796714831421723037 i64.add - local.set $2 - local.get $2 - local.get $2 + local.set $1 + local.get $1 + local.get $1 i64.const 33 i64.shr_u i64.xor - local.set $2 - local.get $2 + local.set $1 + local.get $1 i64.const -4417276706812531889 i64.mul - local.set $2 - local.get $2 - local.get $2 + local.set $1 + local.get $1 + local.get $1 i64.const 29 i64.shr_u i64.xor - local.set $2 - local.get $2 + local.set $1 + local.get $1 i64.const 1609587929392839161 i64.mul - local.set $2 - local.get $2 - local.get $2 + local.set $1 + local.get $1 + local.get $1 i64.const 32 i64.shr_u i64.xor - local.set $2 - local.get $2 - return + local.set $1 + local.get $1 ) (func $~lib/set/Set#find (param $0 i32) (param $1 i64) (param $2 i64) (result i32) (local $3 i32) @@ -10192,10 +10423,38 @@ i32.const 0 ) (func $~lib/set/Set#has (param $0 i32) (param $1 i64) (result i32) + (local $2 i64) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.0 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 8 + i32.const 1 + i32.eq + drop + i32.const 8 + i32.const 2 + i32.eq + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $2 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.0 + end call $~lib/set/Set#find i32.const 0 i32.ne @@ -10271,8 +10530,35 @@ local.get $11 local.get $12 i64.store - local.get $12 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.2 (result i64) + local.get $12 + local.set $13 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 8 + i32.const 1 + i32.eq + drop + i32.const 8 + i32.const 2 + i32.eq + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $13 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.2 + end local.get $1 i64.extend_i32_u i64.and @@ -10355,17 +10641,45 @@ ) (func $~lib/set/Set#add (param $0 i32) (param $1 i64) (result i32) (local $2 i64) - (local $3 i32) + (local $3 i64) (local $4 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $2 + (local $5 i32) + block $~lib/util/hash/HASH|inlined.1 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 8 + i32.const 1 + i32.eq + drop + i32.const 8 + i32.const 2 + i32.eq + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $2 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.1 + end + local.set $3 local.get $0 local.get $1 - local.get $2 - call $~lib/set/Set#find - local.set $3 local.get $3 + call $~lib/set/Set#find + local.set $4 + local.get $4 i32.eqz if local.get $0 @@ -10403,16 +10717,16 @@ local.get $0 local.get $0 i32.load offset=24 - local.tee $4 + local.tee $5 i32.const 1 i32.add i32.store offset=24 - local.get $4 + local.get $5 i32.const 16 i32.mul i32.add - local.set $3 - local.get $3 + local.set $4 + local.get $4 local.get $1 i64.store local.get $0 @@ -10423,7 +10737,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $2 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -10431,13 +10745,13 @@ i32.const 4 i32.mul i32.add - local.set $4 - local.get $3 + local.set $5 local.get $4 + local.get $5 i32.load i32.store offset=8 + local.get $5 local.get $4 - local.get $3 i32.store end local.get $0 @@ -10689,17 +11003,45 @@ local.get $2 ) (func $~lib/set/Set#delete (param $0 i32) (param $1 i64) (result i32) - (local $2 i32) + (local $2 i64) (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.3 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 8 + i32.const 1 + i32.eq + drop + i32.const 8 + i32.const 2 + i32.eq + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $2 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.3 + end call $~lib/set/Set#find - local.set $2 - local.get $2 + local.set $3 + local.get $3 i32.eqz if i32.const 0 @@ -10707,8 +11049,8 @@ end i32.const 0 drop - local.get $2 - local.get $2 + local.get $3 + local.get $3 i32.load offset=8 i32.const 1 i32.or @@ -10724,17 +11066,17 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $3 - local.get $3 + local.set $4 + local.get $4 i32.const 1 i32.add i32.const 4 - local.tee $4 + local.tee $5 local.get $0 i32.load offset=28 - local.tee $5 - local.get $4 + local.tee $6 local.get $5 + local.get $6 i32.gt_u select i32.ge_u @@ -10753,7 +11095,7 @@ end if local.get $0 - local.get $3 + local.get $4 call $~lib/set/Set#rehash end i32.const 1 @@ -11179,78 +11521,6 @@ i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/HASH (param $0 i64) (result i64) - (local $1 i64) - (local $2 i64) - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 4 - i32.le_u - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $0 - local.set $1 - i64.const 0 - i64.const 2870177450012600261 - i64.add - i64.const 8 - i64.add - local.set $2 - local.get $2 - local.get $1 - i64.const -4417276706812531889 - i64.mul - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - local.set $2 - local.get $2 - i64.const 27 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.set $2 - local.get $2 - local.get $2 - i64.const 33 - i64.shr_u - i64.xor - local.set $2 - local.get $2 - i64.const -4417276706812531889 - i64.mul - local.set $2 - local.get $2 - local.get $2 - i64.const 29 - i64.shr_u - i64.xor - local.set $2 - local.get $2 - i64.const 1609587929392839161 - i64.mul - local.set $2 - local.get $2 - local.get $2 - i64.const 32 - i64.shr_u - i64.xor - local.set $2 - local.get $2 - return - ) (func $~lib/set/Set#find (param $0 i32) (param $1 i64) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) @@ -11303,10 +11573,38 @@ i32.const 0 ) (func $~lib/set/Set#has (param $0 i32) (param $1 i64) (result i32) + (local $2 i64) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.0 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 8 + i32.const 1 + i32.eq + drop + i32.const 8 + i32.const 2 + i32.eq + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $2 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.0 + end call $~lib/set/Set#find i32.const 0 i32.ne @@ -11382,8 +11680,35 @@ local.get $11 local.get $12 i64.store - local.get $12 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.2 (result i64) + local.get $12 + local.set $13 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 8 + i32.const 1 + i32.eq + drop + i32.const 8 + i32.const 2 + i32.eq + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $13 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.2 + end local.get $1 i64.extend_i32_u i64.and @@ -11466,17 +11791,45 @@ ) (func $~lib/set/Set#add (param $0 i32) (param $1 i64) (result i32) (local $2 i64) - (local $3 i32) + (local $3 i64) (local $4 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $2 + (local $5 i32) + block $~lib/util/hash/HASH|inlined.1 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 8 + i32.const 1 + i32.eq + drop + i32.const 8 + i32.const 2 + i32.eq + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $2 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.1 + end + local.set $3 local.get $0 local.get $1 - local.get $2 - call $~lib/set/Set#find - local.set $3 local.get $3 + call $~lib/set/Set#find + local.set $4 + local.get $4 i32.eqz if local.get $0 @@ -11514,16 +11867,16 @@ local.get $0 local.get $0 i32.load offset=24 - local.tee $4 + local.tee $5 i32.const 1 i32.add i32.store offset=24 - local.get $4 + local.get $5 i32.const 16 i32.mul i32.add - local.set $3 - local.get $3 + local.set $4 + local.get $4 local.get $1 i64.store local.get $0 @@ -11534,7 +11887,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $2 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -11542,13 +11895,13 @@ i32.const 4 i32.mul i32.add - local.set $4 - local.get $3 + local.set $5 local.get $4 + local.get $5 i32.load i32.store offset=8 + local.get $5 local.get $4 - local.get $3 i32.store end local.get $0 @@ -11800,17 +12153,45 @@ local.get $2 ) (func $~lib/set/Set#delete (param $0 i32) (param $1 i64) (result i32) - (local $2 i32) + (local $2 i64) (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.3 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 8 + i32.const 1 + i32.eq + drop + i32.const 8 + i32.const 2 + i32.eq + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $2 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.3 + end call $~lib/set/Set#find - local.set $2 - local.get $2 + local.set $3 + local.get $3 i32.eqz if i32.const 0 @@ -11818,8 +12199,8 @@ end i32.const 0 drop - local.get $2 - local.get $2 + local.get $3 + local.get $3 i32.load offset=8 i32.const 1 i32.or @@ -11835,17 +12216,17 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $3 - local.get $3 + local.set $4 + local.get $4 i32.const 1 i32.add i32.const 4 - local.tee $4 + local.tee $5 local.get $0 i32.load offset=28 - local.tee $5 - local.get $4 + local.tee $6 local.get $5 + local.get $6 i32.gt_u select i32.ge_u @@ -11864,7 +12245,7 @@ end if local.get $0 - local.get $3 + local.get $4 call $~lib/set/Set#rehash end i32.const 1 @@ -12290,75 +12671,6 @@ i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/HASH (param $0 f32) (result i64) - (local $1 i32) - (local $2 i64) - (local $3 i64) - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $0 - i32.reinterpret_f32 - local.set $1 - i64.const 4 - local.set $2 - i64.const 0 - i64.const 2870177450012600261 - i64.add - local.get $2 - i64.add - local.set $3 - local.get $3 - local.get $1 - i64.extend_i32_u - i64.const -7046029288634856825 - i64.mul - i64.xor - local.set $3 - local.get $3 - i64.const 23 - i64.rotl - i64.const -4417276706812531889 - i64.mul - i64.const 1609587929392839161 - i64.add - local.set $3 - local.get $3 - local.get $3 - i64.const 33 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const -4417276706812531889 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 29 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const 1609587929392839161 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 32 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - return - ) (func $~lib/set/Set#find (param $0 i32) (param $1 f32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) @@ -12411,10 +12723,28 @@ i32.const 0 ) (func $~lib/set/Set#has (param $0 i32) (param $1 f32) (result i32) + (local $2 f32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.0 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $2 + i32.reinterpret_f32 + i64.extend_i32_u + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.0 + end call $~lib/set/Set#find i32.const 0 i32.ne @@ -12431,8 +12761,9 @@ (local $10 i32) (local $11 i32) (local $12 f32) - (local $13 i64) - (local $14 i32) + (local $13 f32) + (local $14 i64) + (local $15 i32) local.get $1 i32.const 1 i32.add @@ -12490,24 +12821,41 @@ local.get $11 local.get $12 f32.store - local.get $12 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.2 (result i64) + local.get $12 + local.set $13 + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $13 + i32.reinterpret_f32 + i64.extend_i32_u + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.2 + end local.get $1 i64.extend_i32_u i64.and - local.set $13 + local.set $14 local.get $3 - local.get $13 + local.get $14 i32.wrap_i64 i32.const 4 i32.mul i32.add - local.set $14 + local.set $15 local.get $11 - local.get $14 + local.get $15 i32.load i32.store offset=4 - local.get $14 + local.get $15 local.get $8 i32.store local.get $8 @@ -12525,19 +12873,19 @@ local.get $0 local.tee $11 local.get $3 - local.tee $14 + local.tee $15 local.get $11 i32.load local.tee $9 i32.ne if - local.get $14 + local.get $15 call $~lib/rt/pure/__retain - local.set $14 + local.set $15 local.get $9 call $~lib/rt/pure/__release end - local.get $14 + local.get $15 i32.store local.get $0 local.get $1 @@ -12546,19 +12894,19 @@ local.get $0 local.tee $9 local.get $5 - local.tee $14 + local.tee $15 local.get $9 i32.load offset=16 local.tee $11 i32.ne if - local.get $14 + local.get $15 call $~lib/rt/pure/__retain - local.set $14 + local.set $15 local.get $11 call $~lib/rt/pure/__release end - local.get $14 + local.get $15 i32.store offset=16 local.get $0 local.get $4 @@ -12573,18 +12921,36 @@ call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (param $0 i32) (param $1 f32) (result i32) - (local $2 i64) - (local $3 i32) + (local $2 f32) + (local $3 i64) (local $4 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $2 + (local $5 i32) + block $~lib/util/hash/HASH|inlined.1 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $2 + i32.reinterpret_f32 + i64.extend_i32_u + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.1 + end + local.set $3 local.get $0 local.get $1 - local.get $2 - call $~lib/set/Set#find - local.set $3 local.get $3 + call $~lib/set/Set#find + local.set $4 + local.get $4 i32.eqz if local.get $0 @@ -12622,16 +12988,16 @@ local.get $0 local.get $0 i32.load offset=24 - local.tee $4 + local.tee $5 i32.const 1 i32.add i32.store offset=24 - local.get $4 + local.get $5 i32.const 8 i32.mul i32.add - local.set $3 - local.get $3 + local.set $4 + local.get $4 local.get $1 f32.store local.get $0 @@ -12642,7 +13008,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $2 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -12650,13 +13016,13 @@ i32.const 4 i32.mul i32.add - local.set $4 - local.get $3 + local.set $5 local.get $4 + local.get $5 i32.load i32.store offset=4 + local.get $5 local.get $4 - local.get $3 i32.store end local.get $0 @@ -12908,17 +13274,35 @@ local.get $2 ) (func $~lib/set/Set#delete (param $0 i32) (param $1 f32) (result i32) - (local $2 i32) + (local $2 f32) (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.3 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $2 + i32.reinterpret_f32 + i64.extend_i32_u + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.3 + end call $~lib/set/Set#find - local.set $2 - local.get $2 + local.set $3 + local.get $3 i32.eqz if i32.const 0 @@ -12926,8 +13310,8 @@ end i32.const 0 drop - local.get $2 - local.get $2 + local.get $3 + local.get $3 i32.load offset=4 i32.const 1 i32.or @@ -12943,17 +13327,17 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $3 - local.get $3 + local.set $4 + local.get $4 i32.const 1 i32.add i32.const 4 - local.tee $4 + local.tee $5 local.get $0 i32.load offset=28 - local.tee $5 - local.get $4 + local.tee $6 local.get $5 + local.get $6 i32.gt_u select i32.ge_u @@ -12972,7 +13356,7 @@ end if local.get $0 - local.get $3 + local.get $4 call $~lib/set/Set#rehash end i32.const 1 @@ -13398,79 +13782,6 @@ i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/HASH (param $0 f64) (result i64) - (local $1 i64) - (local $2 i64) - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $0 - i64.reinterpret_f64 - local.set $1 - i64.const 0 - i64.const 2870177450012600261 - i64.add - i64.const 8 - i64.add - local.set $2 - local.get $2 - local.get $1 - i64.const -4417276706812531889 - i64.mul - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - local.set $2 - local.get $2 - i64.const 27 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.set $2 - local.get $2 - local.get $2 - i64.const 33 - i64.shr_u - i64.xor - local.set $2 - local.get $2 - i64.const -4417276706812531889 - i64.mul - local.set $2 - local.get $2 - local.get $2 - i64.const 29 - i64.shr_u - i64.xor - local.set $2 - local.get $2 - i64.const 1609587929392839161 - i64.mul - local.set $2 - local.get $2 - local.get $2 - i64.const 32 - i64.shr_u - i64.xor - local.set $2 - local.get $2 - return - ) (func $~lib/set/Set#find (param $0 i32) (param $1 f64) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) @@ -13523,10 +13834,31 @@ i32.const 0 ) (func $~lib/set/Set#has (param $0 i32) (param $1 f64) (result i32) + (local $2 f64) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.0 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $2 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.0 + end call $~lib/set/Set#find i32.const 0 i32.ne @@ -13543,8 +13875,9 @@ (local $10 i32) (local $11 i32) (local $12 f64) - (local $13 i64) - (local $14 i32) + (local $13 f64) + (local $14 i64) + (local $15 i32) local.get $1 i32.const 1 i32.add @@ -13602,24 +13935,44 @@ local.get $11 local.get $12 f64.store - local.get $12 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.2 (result i64) + local.get $12 + local.set $13 + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $13 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.2 + end local.get $1 i64.extend_i32_u i64.and - local.set $13 + local.set $14 local.get $3 - local.get $13 + local.get $14 i32.wrap_i64 i32.const 4 i32.mul i32.add - local.set $14 + local.set $15 local.get $11 - local.get $14 + local.get $15 i32.load i32.store offset=8 - local.get $14 + local.get $15 local.get $8 i32.store local.get $8 @@ -13637,19 +13990,19 @@ local.get $0 local.tee $11 local.get $3 - local.tee $14 + local.tee $15 local.get $11 i32.load local.tee $9 i32.ne if - local.get $14 + local.get $15 call $~lib/rt/pure/__retain - local.set $14 + local.set $15 local.get $9 call $~lib/rt/pure/__release end - local.get $14 + local.get $15 i32.store local.get $0 local.get $1 @@ -13658,19 +14011,19 @@ local.get $0 local.tee $9 local.get $5 - local.tee $14 + local.tee $15 local.get $9 i32.load offset=16 local.tee $11 i32.ne if - local.get $14 + local.get $15 call $~lib/rt/pure/__retain - local.set $14 + local.set $15 local.get $11 call $~lib/rt/pure/__release end - local.get $14 + local.get $15 i32.store offset=16 local.get $0 local.get $4 @@ -13685,18 +14038,39 @@ call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (param $0 i32) (param $1 f64) (result i32) - (local $2 i64) - (local $3 i32) + (local $2 f64) + (local $3 i64) (local $4 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $2 + (local $5 i32) + block $~lib/util/hash/HASH|inlined.1 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $2 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.1 + end + local.set $3 local.get $0 local.get $1 - local.get $2 - call $~lib/set/Set#find - local.set $3 local.get $3 + call $~lib/set/Set#find + local.set $4 + local.get $4 i32.eqz if local.get $0 @@ -13734,16 +14108,16 @@ local.get $0 local.get $0 i32.load offset=24 - local.tee $4 + local.tee $5 i32.const 1 i32.add i32.store offset=24 - local.get $4 + local.get $5 i32.const 16 i32.mul i32.add - local.set $3 - local.get $3 + local.set $4 + local.get $4 local.get $1 f64.store local.get $0 @@ -13754,7 +14128,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $2 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -13762,13 +14136,13 @@ i32.const 4 i32.mul i32.add - local.set $4 - local.get $3 + local.set $5 local.get $4 + local.get $5 i32.load i32.store offset=8 + local.get $5 local.get $4 - local.get $3 i32.store end local.get $0 @@ -14020,17 +14394,38 @@ local.get $2 ) (func $~lib/set/Set#delete (param $0 i32) (param $1 f64) (result i32) - (local $2 i32) + (local $2 f64) (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.3 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $2 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.3 + end call $~lib/set/Set#find - local.set $2 - local.get $2 + local.set $3 + local.get $3 i32.eqz if i32.const 0 @@ -14038,8 +14433,8 @@ end i32.const 0 drop - local.get $2 - local.get $2 + local.get $3 + local.get $3 i32.load offset=8 i32.const 1 i32.or @@ -14055,17 +14450,17 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $3 - local.get $3 + local.set $4 + local.get $4 i32.const 1 i32.add i32.const 4 - local.tee $4 + local.tee $5 local.get $0 i32.load offset=28 - local.tee $5 - local.get $4 + local.tee $6 local.get $5 + local.get $6 i32.gt_u select i32.ge_u @@ -14084,7 +14479,7 @@ end if local.get $0 - local.get $3 + local.get $4 call $~lib/set/Set#rehash end i32.const 1 diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index e0856ea99d..f067b1ad8e 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -4,11 +4,12 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) (type $none_=>_i32 (func (result i32))) - (type $i32_=>_i64 (func (param i32) (result i64))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i64_=>_i32 (func (param i32 i32 i64) (result i32))) (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) + (type $i32_=>_i64 (func (param i32) (result i64))) + (type $i64_=>_i64 (func (param i64) (result i64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 1036) "\1c\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\06\00\00\001\002\003") @@ -345,286 +346,286 @@ call $~lib/memory/memory.fill local.get $1 ) - (func $~lib/util/hash/HASH<~lib/string/String> (param $0 i32) (result i64) + (func $~lib/util/hash/hashStr (param $0 i32) (result i64) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i64) (local $5 i64) (local $6 i64) - (local $7 i64) - (local $8 i32) + (local $7 i32) + (local $8 i64) + (local $9 i32) + local.get $0 + i32.eqz + if + i64.const 0 + return + end local.get $0 + i32.const 20 + i32.sub + i32.load offset=16 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl + local.tee $2 + i32.const 32 + i32.ge_s if (result i64) - local.get $0 - i32.const 20 - i32.sub - i32.load offset=16 - i32.const 1 - i32.shr_u - i32.const 1 - i32.shl - local.tee $2 - i32.const 32 - i32.ge_s - if (result i64) - i64.const 6983438078262162902 - local.set $4 - i64.const -4417276706812531889 - local.set $5 - i64.const 7046029288634856825 - local.set $6 - local.get $2 - local.tee $3 - i32.const 32 - i32.sub - local.set $8 - loop $while-continue|0 - local.get $1 - local.get $8 - i32.le_s - if - local.get $4 - local.get $0 - local.get $1 - i32.add - local.tee $2 - i64.load - i64.const -4417276706812531889 - i64.mul - i64.add - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - local.set $4 - local.get $5 - local.get $2 - i64.load offset=8 - i64.const -4417276706812531889 - i64.mul - i64.add - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - local.set $5 - local.get $7 - local.get $2 - i64.load offset=16 - i64.const -4417276706812531889 - i64.mul - i64.add - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - local.set $7 - local.get $6 - local.get $2 - i64.load offset=24 - i64.const -4417276706812531889 - i64.mul - i64.add - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - local.set $6 - local.get $1 - i32.const 32 - i32.add - local.set $1 - br $while-continue|0 - end - end - local.get $8 - local.get $1 - i32.sub - local.set $2 - local.get $3 - i64.extend_i32_s - local.get $4 - i64.const 1 - i64.rotl - local.get $5 - i64.const 7 - i64.rotl - i64.add - local.get $7 - i64.const 12 - i64.rotl - i64.add - local.get $6 - i64.const 18 - i64.rotl - i64.add - local.get $4 - i64.const -4417276706812531889 - i64.mul - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.get $5 - i64.const -4417276706812531889 - i64.mul - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.get $7 - i64.const -4417276706812531889 - i64.mul - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.get $6 - i64.const -4417276706812531889 - i64.mul - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - i64.add - else - local.get $2 - i64.extend_i32_s - i64.const 2870177450012600261 - i64.add - end + i64.const 6983438078262162902 local.set $4 - i32.const 0 - local.set $1 + i64.const -4417276706812531889 + local.set $5 + i64.const 7046029288634856825 + local.set $6 local.get $2 - i32.const 8 + local.tee $3 + i32.const 32 i32.sub - local.set $2 - loop $while-continue|1 - local.get $1 - local.get $2 + local.set $9 + loop $while-continue|0 + local.get $7 + local.get $9 i32.le_s if local.get $4 local.get $0 - local.get $1 + local.get $7 i32.add + local.tee $2 i64.load i64.const -4417276706812531889 i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $4 + local.get $5 + local.get $2 + i64.load offset=8 + i64.const -4417276706812531889 + i64.mul + i64.add i64.const 31 i64.rotl i64.const -7046029288634856825 i64.mul - i64.xor - i64.const 27 + local.set $5 + local.get $8 + local.get $2 + i64.load offset=16 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 i64.rotl i64.const -7046029288634856825 i64.mul - i64.const -8796714831421723037 + local.set $8 + local.get $6 + local.get $2 + i64.load offset=24 + i64.const -4417276706812531889 + i64.mul i64.add - local.set $4 - local.get $1 - i32.const 8 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $6 + local.get $7 + i32.const 32 i32.add - local.set $1 - br $while-continue|1 + local.set $7 + br $while-continue|0 end end + local.get $9 + local.get $7 + i32.sub + local.set $2 + local.get $3 + i64.extend_i32_s + local.get $4 + i64.const 1 + i64.rotl + local.get $5 + i64.const 7 + i64.rotl + i64.add + local.get $8 + i64.const 12 + i64.rotl + i64.add + local.get $6 + i64.const 18 + i64.rotl + i64.add + local.get $4 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.get $5 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.get $8 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.get $6 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + i64.add + else local.get $2 + i64.extend_i32_s + i64.const 2870177450012600261 + i64.add + end + local.set $4 + local.get $2 + i32.const 8 + i32.sub + local.set $2 + loop $while-continue|1 local.get $1 - i32.const 4 - i32.add - i32.ge_s + local.get $2 + i32.le_s if local.get $4 local.get $0 local.get $1 i32.add - i64.load32_u + i64.load + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl i64.const -7046029288634856825 i64.mul i64.xor - i64.const 23 + i64.const 27 i64.rotl - i64.const -4417276706812531889 + i64.const -7046029288634856825 i64.mul - i64.const 1609587929392839161 + i64.const -8796714831421723037 i64.add local.set $4 local.get $1 - i32.const 4 + i32.const 8 i32.add local.set $1 + br $while-continue|1 end - loop $while-continue|2 - local.get $1 - local.get $2 - i32.lt_s - if - local.get $4 - local.get $0 - local.get $1 - i32.add - i64.load8_u - i64.const 2870177450012600261 - i64.mul - i64.add - i64.const 11 - i64.rotl - i64.const -7046029288634856825 - i64.mul - local.set $4 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $while-continue|2 - end - end - local.get $4 + end + local.get $2 + local.get $1 + i32.const 4 + i32.add + i32.ge_s + if local.get $4 - i64.const 33 - i64.shr_u + local.get $0 + local.get $1 + i32.add + i64.load32_u + i64.const -7046029288634856825 + i64.mul i64.xor + i64.const 23 + i64.rotl i64.const -4417276706812531889 i64.mul - local.tee $4 - local.get $4 - i64.const 29 - i64.shr_u - i64.xor i64.const 1609587929392839161 - i64.mul - local.tee $4 - local.get $4 - i64.const 32 - i64.shr_u - i64.xor - else - i64.const 0 + i64.add + local.set $4 + local.get $1 + i32.const 4 + i32.add + local.set $1 + end + loop $while-continue|2 + local.get $1 + local.get $2 + i32.lt_s + if + local.get $4 + local.get $0 + local.get $1 + i32.add + i64.load8_u + i64.const 2870177450012600261 + i64.mul + i64.add + i64.const 11 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $4 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $while-continue|2 + end end + local.get $4 + local.get $4 + i64.const 33 + i64.shr_u + i64.xor + i64.const -4417276706812531889 + i64.mul + local.tee $4 + local.get $4 + i64.const 29 + i64.shr_u + i64.xor + i64.const 1609587929392839161 + i64.mul + local.tee $4 + local.get $4 + i64.const 32 + i64.shr_u + i64.xor ) (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -843,7 +844,7 @@ local.get $2 local.get $4 local.get $7 - call $~lib/util/hash/HASH<~lib/string/String> + call $~lib/util/hash/hashStr local.get $1 i64.extend_i32_u i64.and @@ -902,11 +903,14 @@ (func $~lib/map/Map<~lib/string/String,usize>#set (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i64) - (local $4 i32) - local.get $0 + (local $4 i64) + (local $5 i32) i32.const 1056 - call $~lib/util/hash/HASH<~lib/string/String> + call $~lib/util/hash/hashStr local.tee $3 + local.set $4 + local.get $0 + local.get $3 call $~lib/map/Map<~lib/string/String,usize>#find local.tee $2 if @@ -949,11 +953,11 @@ local.get $0 local.get $0 i32.load offset=24 - local.tee $4 + local.tee $5 i32.const 1 i32.add i32.store offset=24 - local.get $4 + local.get $5 i32.const 12 i32.mul i32.add @@ -972,7 +976,7 @@ local.get $2 local.get $0 i32.load - local.get $3 + local.get $4 local.get $0 i64.load offset=8 i64.and @@ -988,10 +992,8 @@ i32.store end ) - (func $~lib/util/hash/HASH (param $0 i32) (result i64) - (local $1 i64) + (func $~lib/util/hash/hash32 (param $0 i64) (result i64) local.get $0 - i64.extend_i32_u i64.const -7046029288634856825 i64.mul i64.const 2870177450012600265 @@ -1002,22 +1004,22 @@ i64.mul i64.const 1609587929392839161 i64.add - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i64.const 33 i64.shr_u i64.xor i64.const -4417276706812531889 i64.mul - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i64.const 29 i64.shr_u i64.xor i64.const 1609587929392839161 i64.mul - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i64.const 32 i64.shr_u i64.xor @@ -1125,7 +1127,8 @@ local.get $2 local.get $4 local.get $7 - call $~lib/util/hash/HASH + i64.extend_i32_u + call $~lib/util/hash/hash32 local.get $1 i64.extend_i32_u i64.and @@ -1188,7 +1191,8 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i64.extend_i32_u + call $~lib/util/hash/hash32 local.tee $3 call $~lib/map/Map#find local.tee $2 @@ -1283,12 +1287,12 @@ if global.get $~lib/symbol/stringToId i32.const 1056 - call $~lib/util/hash/HASH<~lib/string/String> + call $~lib/util/hash/hashStr call $~lib/map/Map<~lib/string/String,usize>#find if global.get $~lib/symbol/stringToId i32.const 1056 - call $~lib/util/hash/HASH<~lib/string/String> + call $~lib/util/hash/hashStr call $~lib/map/Map<~lib/string/String,usize>#find local.tee $0 i32.eqz @@ -1378,7 +1382,8 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i64.extend_i32_u + call $~lib/util/hash/hash32 call $~lib/map/Map#find i32.const 0 i32.ne @@ -1387,7 +1392,8 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i64.extend_i32_u + call $~lib/util/hash/hash32 call $~lib/map/Map#find local.tee $0 i32.eqz diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index 6976b0279c..fbb28031f3 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -7,9 +7,10 @@ (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i64_=>_i32 (func (param i32 i32 i64) (result i32))) - (type $i32_=>_i64 (func (param i32) (result i64))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) + (type $i32_=>_i64 (func (param i32) (result i64))) + (type $i64_=>_i64 (func (param i64) (result i64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 12) "\1c\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\06\00\00\001\002\003\00\00\00\00\00\00\00") @@ -556,405 +557,393 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/hash/HASH<~lib/string/String> (param $0 i32) (result i64) - (local $1 i32) - (local $2 i64) - (local $3 i32) + (func $~lib/util/hash/hashStr (param $0 i32) (result i64) + (local $1 i64) + (local $2 i32) + (local $3 i64) (local $4 i64) (local $5 i64) (local $6 i64) - (local $7 i64) + (local $7 i32) (local $8 i32) (local $9 i32) - (local $10 i32) + (local $10 i64) (local $11 i64) - (local $12 i64) + (local $12 i32) local.get $0 call $~lib/rt/stub/__retain local.set $0 - i32.const 1 - drop - block $~lib/util/hash/hashStr|inlined.0 (result i64) - local.get $0 - call $~lib/rt/stub/__retain + local.get $0 + i32.const 0 + i32.eq + if + i64.const 0 local.set $1 + local.get $0 + call $~lib/rt/stub/__release local.get $1 - i32.const 0 - i32.eq - if - i64.const 0 - local.set $2 - local.get $1 - call $~lib/rt/stub/__release - local.get $2 - br $~lib/util/hash/hashStr|inlined.0 - end - local.get $1 - call $~lib/string/String#get:length - i32.const 1 - i32.shl - local.set $3 + return + end + local.get $0 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + local.set $2 + i64.const 0 + local.set $3 + local.get $2 + i32.const 32 + i32.ge_s + if i64.const 0 - local.set $2 - local.get $3 - i32.const 32 - i32.ge_s - if - i64.const 0 - i64.const -7046029288634856825 - i64.add - i64.const -4417276706812531889 - i64.add - local.set $4 - i64.const 0 - i64.const -4417276706812531889 - i64.add - local.set $5 - i64.const 0 - local.set $6 - i64.const 0 - i64.const -7046029288634856825 - i64.sub - local.set $7 - local.get $3 - local.set $8 - i32.const 0 - local.set $9 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - loop $while-continue|0 - local.get $9 - local.get $3 - i32.le_s - local.set $10 - local.get $10 - if - local.get $4 - local.set $12 - local.get $1 - local.get $9 - i32.add - i64.load - local.set $11 - local.get $12 - local.get $11 - i64.const -4417276706812531889 - i64.mul - i64.add - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - local.set $4 - local.get $5 - local.set $12 - local.get $1 - local.get $9 - i32.add - i64.load offset=8 - local.set $11 - local.get $12 - local.get $11 - i64.const -4417276706812531889 - i64.mul - i64.add - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - local.set $5 - local.get $6 - local.set $12 - local.get $1 - local.get $9 - i32.add - i64.load offset=16 - local.set $11 - local.get $12 - local.get $11 - i64.const -4417276706812531889 - i64.mul - i64.add - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - local.set $6 - local.get $7 - local.set $12 - local.get $1 - local.get $9 - i32.add - i64.load offset=24 - local.set $11 - local.get $12 - local.get $11 - i64.const -4417276706812531889 - i64.mul - i64.add - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - local.set $7 - local.get $9 - i32.const 32 - i32.add - local.set $9 - br $while-continue|0 - end - end - local.get $4 - i64.const 1 - i64.rotl - local.get $5 - i64.const 7 - i64.rotl - i64.add - local.get $6 - i64.const 12 - i64.rotl - i64.add - local.get $7 - i64.const 18 - i64.rotl - i64.add - local.set $2 - local.get $4 - i64.const -4417276706812531889 - i64.mul - local.set $4 - local.get $5 - i64.const -4417276706812531889 - i64.mul - local.set $5 - local.get $6 - i64.const -4417276706812531889 - i64.mul - local.set $6 - local.get $7 - i64.const -4417276706812531889 - i64.mul - local.set $7 - local.get $2 - local.set $12 - local.get $4 - local.set $11 - local.get $12 - local.get $11 - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.set $2 - local.get $2 - local.set $12 - local.get $5 - local.set $11 - local.get $12 - local.get $11 - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.set $2 - local.get $2 - local.set $12 - local.get $6 - local.set $11 - local.get $12 - local.get $11 - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.set $2 - local.get $2 - local.set $12 - local.get $7 - local.set $11 - local.get $12 - local.get $11 - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.set $2 - local.get $2 - local.get $8 - i64.extend_i32_s - i64.add - local.set $2 - local.get $3 - local.get $9 - i32.sub - local.set $3 - else - local.get $3 - i64.extend_i32_s - i64.const 0 - i64.add - i64.const 2870177450012600261 - i64.add - local.set $2 - end + i64.const -7046029288634856825 + i64.add + i64.const -4417276706812531889 + i64.add + local.set $1 + i64.const 0 + i64.const -4417276706812531889 + i64.add + local.set $4 + i64.const 0 + local.set $5 + i64.const 0 + i64.const -7046029288634856825 + i64.sub + local.set $6 + local.get $2 + local.set $7 i32.const 0 - local.set $9 - local.get $3 - i32.const 8 + local.set $8 + local.get $2 + i32.const 32 i32.sub - local.set $3 - loop $while-continue|1 - local.get $9 - local.get $3 - i32.le_s - local.set $8 + local.set $2 + loop $while-continue|0 local.get $8 + local.get $2 + i32.le_s + local.set $9 + local.get $9 if - local.get $2 local.get $1 - local.get $9 + local.set $11 + local.get $0 + local.get $8 i32.add i64.load + local.set $10 + local.get $11 + local.get $10 i64.const -4417276706812531889 i64.mul + i64.add i64.const 31 i64.rotl i64.const -7046029288634856825 i64.mul - i64.xor - local.set $2 - local.get $2 - i64.const 27 + local.set $1 + local.get $4 + local.set $11 + local.get $0 + local.get $8 + i32.add + i64.load offset=8 + local.set $10 + local.get $11 + local.get $10 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 i64.rotl i64.const -7046029288634856825 i64.mul - i64.const -8796714831421723037 - i64.add - local.set $2 - local.get $9 - i32.const 8 + local.set $4 + local.get $5 + local.set $11 + local.get $0 + local.get $8 i32.add - local.set $9 - br $while-continue|1 - end - end - local.get $9 - i32.const 4 - i32.add - local.get $3 - i32.le_s - if - local.get $2 - local.get $1 - local.get $9 - i32.add - i64.load32_u - i64.const -7046029288634856825 - i64.mul - i64.xor - local.set $2 - local.get $2 - i64.const 23 - i64.rotl - i64.const -4417276706812531889 - i64.mul - i64.const 1609587929392839161 - i64.add - local.set $2 - local.get $9 - i32.const 4 - i32.add - local.set $9 - end - loop $while-continue|2 - local.get $9 - local.get $3 - i32.lt_s - local.set $8 - local.get $8 - if - local.get $2 - local.get $1 - local.get $9 + i64.load offset=16 + local.set $10 + local.get $11 + local.get $10 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $5 + local.get $6 + local.set $11 + local.get $0 + local.get $8 i32.add - i64.load8_u - i64.const 2870177450012600261 + i64.load offset=24 + local.set $10 + local.get $11 + local.get $10 + i64.const -4417276706812531889 i64.mul i64.add - local.set $2 - local.get $2 - i64.const 11 + i64.const 31 i64.rotl i64.const -7046029288634856825 i64.mul - local.set $2 - local.get $9 - i32.const 1 + local.set $6 + local.get $8 + i32.const 32 i32.add - local.set $9 - br $while-continue|2 + local.set $8 + br $while-continue|0 end end - local.get $2 - local.get $2 - i64.const 33 - i64.shr_u - i64.xor - local.set $2 - local.get $2 + local.get $1 + i64.const 1 + i64.rotl + local.get $4 + i64.const 7 + i64.rotl + i64.add + local.get $5 + i64.const 12 + i64.rotl + i64.add + local.get $6 + i64.const 18 + i64.rotl + i64.add + local.set $3 + local.get $1 i64.const -4417276706812531889 i64.mul - local.set $2 - local.get $2 - local.get $2 - i64.const 29 - i64.shr_u + local.set $1 + local.get $4 + i64.const -4417276706812531889 + i64.mul + local.set $4 + local.get $5 + i64.const -4417276706812531889 + i64.mul + local.set $5 + local.get $6 + i64.const -4417276706812531889 + i64.mul + local.set $6 + local.get $3 + local.set $11 + local.get $1 + local.set $10 + local.get $11 + local.get $10 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul i64.xor - local.set $2 - local.get $2 - i64.const 1609587929392839161 + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $3 + local.get $3 + local.set $11 + local.get $4 + local.set $10 + local.get $11 + local.get $10 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $3 + local.get $3 + local.set $11 + local.get $5 + local.set $10 + local.get $11 + local.get $10 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $3 + local.get $3 + local.set $11 + local.get $6 + local.set $10 + local.get $11 + local.get $10 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $3 + local.get $3 + local.get $7 + i64.extend_i32_s + i64.add + local.set $3 + local.get $2 + local.get $8 + i32.sub local.set $2 + else local.get $2 + i64.extend_i32_s + i64.const 0 + i64.add + i64.const 2870177450012600261 + i64.add + local.set $3 + end + i32.const 0 + local.set $12 + local.get $2 + i32.const 8 + i32.sub + local.set $2 + loop $while-continue|1 + local.get $12 local.get $2 - i64.const 32 - i64.shr_u + i32.le_s + local.set $8 + local.get $8 + if + local.get $3 + local.get $0 + local.get $12 + i32.add + i64.load + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $3 + local.get $3 + i64.const 27 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $3 + local.get $12 + i32.const 8 + i32.add + local.set $12 + br $while-continue|1 + end + end + local.get $12 + i32.const 4 + i32.add + local.get $2 + i32.le_s + if + local.get $3 + local.get $0 + local.get $12 + i32.add + i64.load32_u + i64.const -7046029288634856825 + i64.mul i64.xor - local.set $2 + local.set $3 + local.get $3 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $3 + local.get $12 + i32.const 4 + i32.add + local.set $12 + end + loop $while-continue|2 + local.get $12 local.get $2 - local.set $7 - local.get $1 - call $~lib/rt/stub/__release - local.get $7 + i32.lt_s + local.set $8 + local.get $8 + if + local.get $3 + local.get $0 + local.get $12 + i32.add + i64.load8_u + i64.const 2870177450012600261 + i64.mul + i64.add + local.set $3 + local.get $3 + i64.const 11 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $3 + local.get $12 + i32.const 1 + i32.add + local.set $12 + br $while-continue|2 + end end - local.set $2 + local.get $3 + local.get $3 + i64.const 33 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const -4417276706812531889 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 29 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const 1609587929392839161 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 32 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + local.set $6 local.get $0 call $~lib/rt/stub/__release - local.get $2 - return + local.get $6 ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) @@ -1220,13 +1209,26 @@ ) (func $~lib/map/Map<~lib/string/String,usize>#has (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i64) local.get $1 call $~lib/rt/stub/__retain local.set $1 local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH<~lib/string/String> + block $~lib/util/hash/HASH<~lib/string/String>|inlined.0 (result i64) + local.get $1 + call $~lib/rt/stub/__retain + local.set $2 + i32.const 1 + drop + local.get $2 + call $~lib/util/hash/hashStr + local.set $3 + local.get $2 + call $~lib/rt/stub/__release + local.get $3 + br $~lib/util/hash/HASH<~lib/string/String>|inlined.0 + end call $~lib/map/Map<~lib/string/String,usize>#find i32.const 0 i32.ne @@ -1237,17 +1239,30 @@ ) (func $~lib/map/Map<~lib/string/String,usize>#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) + (local $3 i64) + (local $4 i32) local.get $1 call $~lib/rt/stub/__retain local.set $1 local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH<~lib/string/String> + block $~lib/util/hash/HASH<~lib/string/String>|inlined.1 (result i64) + local.get $1 + call $~lib/rt/stub/__retain + local.set $2 + i32.const 1 + drop + local.get $2 + call $~lib/util/hash/hashStr + local.set $3 + local.get $2 + call $~lib/rt/stub/__release + local.get $3 + br $~lib/util/hash/HASH<~lib/string/String>|inlined.1 + end call $~lib/map/Map<~lib/string/String,usize>#find - local.set $2 - local.get $2 + local.set $4 + local.get $4 i32.eqz if i32.const 224 @@ -1257,12 +1272,12 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $4 i32.load offset=4 - local.set $3 + local.set $2 local.get $1 call $~lib/rt/stub/__release - local.get $3 + local.get $2 ) (func $~lib/map/Map<~lib/string/String,usize>#rehash (param $0 i32) (param $1 i32) (local $2 i32) @@ -1277,7 +1292,8 @@ (local $11 i32) (local $12 i32) (local $13 i32) - (local $14 i32) + (local $14 i64) + (local $15 i32) local.get $1 i32.const 1 i32.add @@ -1340,8 +1356,20 @@ local.get $10 i32.load offset=4 i32.store offset=4 - local.get $12 - call $~lib/util/hash/HASH<~lib/string/String> + block $~lib/util/hash/HASH<~lib/string/String>|inlined.3 (result i64) + local.get $12 + call $~lib/rt/stub/__retain + local.set $13 + i32.const 1 + drop + local.get $13 + call $~lib/util/hash/hashStr + local.set $14 + local.get $13 + call $~lib/rt/stub/__release + local.get $14 + br $~lib/util/hash/HASH<~lib/string/String>|inlined.3 + end local.get $1 i64.extend_i32_u i64.and @@ -1352,12 +1380,12 @@ i32.const 4 i32.mul i32.add - local.set $14 + local.set $15 local.get $11 - local.get $14 + local.get $15 i32.load i32.store offset=8 - local.get $14 + local.get $15 local.get $8 i32.store local.get $8 @@ -1398,19 +1426,19 @@ local.get $0 local.tee $13 local.get $5 - local.tee $14 + local.tee $15 local.get $13 i32.load offset=16 local.tee $11 i32.ne if - local.get $14 + local.get $15 call $~lib/rt/stub/__retain - local.set $14 + local.set $15 local.get $11 call $~lib/rt/stub/__release end - local.get $14 + local.get $15 i32.store offset=16 local.get $0 local.get $4 @@ -1425,26 +1453,39 @@ call $~lib/rt/stub/__release ) (func $~lib/map/Map<~lib/string/String,usize>#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i64) - (local $4 i32) - (local $5 i32) + (local $3 i32) + (local $4 i64) + (local $5 i64) (local $6 i32) + (local $7 i32) local.get $1 call $~lib/rt/stub/__retain local.set $1 - local.get $1 - call $~lib/util/hash/HASH<~lib/string/String> - local.set $3 + block $~lib/util/hash/HASH<~lib/string/String>|inlined.2 (result i64) + local.get $1 + call $~lib/rt/stub/__retain + local.set $3 + i32.const 1 + drop + local.get $3 + call $~lib/util/hash/hashStr + local.set $4 + local.get $3 + call $~lib/rt/stub/__release + local.get $4 + br $~lib/util/hash/HASH<~lib/string/String>|inlined.2 + end + local.set $5 local.get $0 local.get $1 - local.get $3 + local.get $5 call $~lib/map/Map<~lib/string/String,usize>#find - local.set $4 - local.get $4 + local.set $6 + local.get $6 if i32.const 0 drop - local.get $4 + local.get $6 local.get $2 i32.store offset=4 else @@ -1481,25 +1522,25 @@ local.get $0 i32.load offset=16 call $~lib/rt/stub/__retain - local.set $5 - local.get $5 + local.set $3 + local.get $3 local.get $0 local.get $0 i32.load offset=24 - local.tee $6 + local.tee $7 i32.const 1 i32.add i32.store offset=24 - local.get $6 + local.get $7 i32.const 12 i32.mul i32.add - local.set $4 - local.get $4 + local.set $6 + local.get $6 local.get $1 call $~lib/rt/stub/__retain i32.store - local.get $4 + local.get $6 local.get $2 i32.store offset=4 local.get $0 @@ -1510,7 +1551,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $3 + local.get $5 local.get $0 i64.load offset=8 i64.and @@ -1518,91 +1559,73 @@ i32.const 4 i32.mul i32.add - local.set $6 - local.get $4 + local.set $7 local.get $6 + local.get $7 i32.load i32.store offset=8 + local.get $7 local.get $6 - local.get $4 i32.store - local.get $5 + local.get $3 call $~lib/rt/stub/__release end local.get $0 call $~lib/rt/stub/__retain - local.set $6 + local.set $7 local.get $1 call $~lib/rt/stub/__release - local.get $6 + local.get $7 ) - (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (func $~lib/util/hash/hash32 (param $0 i64) (result i64) (local $1 i64) - (local $2 i32) - (local $3 i64) - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 4 - i32.le_u - drop - local.get $0 - local.set $2 - i64.const 4 - local.set $1 i64.const 0 i64.const 2870177450012600261 i64.add - local.get $1 + i64.const 4 i64.add - local.set $3 - local.get $3 - local.get $2 - i64.extend_i32_u + local.set $1 + local.get $1 + local.get $0 i64.const -7046029288634856825 i64.mul i64.xor - local.set $3 - local.get $3 + local.set $1 + local.get $1 i64.const 23 i64.rotl i64.const -4417276706812531889 i64.mul i64.const 1609587929392839161 i64.add - local.set $3 - local.get $3 - local.get $3 + local.set $1 + local.get $1 + local.get $1 i64.const 33 i64.shr_u i64.xor - local.set $3 - local.get $3 + local.set $1 + local.get $1 i64.const -4417276706812531889 i64.mul - local.set $3 - local.get $3 - local.get $3 + local.set $1 + local.get $1 + local.get $1 i64.const 29 i64.shr_u i64.xor - local.set $3 - local.get $3 + local.set $1 + local.get $1 i64.const 1609587929392839161 i64.mul - local.set $3 - local.get $3 - local.get $3 + local.set $1 + local.get $1 + local.get $1 i64.const 32 i64.shr_u i64.xor - local.set $3 - local.get $3 - return + local.set $1 + local.get $1 ) (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) @@ -1730,8 +1753,32 @@ local.get $10 i32.load offset=4 i32.store offset=4 - local.get $12 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.1 (result i64) + local.get $12 + local.set $13 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 1 + i32.eq + drop + i32.const 4 + i32.const 2 + i32.eq + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $13 + i64.extend_i32_u + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.1 + end local.get $1 i64.extend_i32_u i64.and @@ -1813,37 +1860,61 @@ call $~lib/rt/stub/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i64) - (local $4 i32) + (local $3 i32) + (local $4 i64) (local $5 i32) (local $6 i32) local.get $2 call $~lib/rt/stub/__retain local.set $2 - local.get $1 - call $~lib/util/hash/HASH - local.set $3 + block $~lib/util/hash/HASH|inlined.0 (result i64) + local.get $1 + local.set $3 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 1 + i32.eq + drop + i32.const 4 + i32.const 2 + i32.eq + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $3 + i64.extend_i32_u + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.0 + end + local.set $4 local.get $0 local.get $1 - local.get $3 - call $~lib/map/Map#find - local.set $4 local.get $4 + call $~lib/map/Map#find + local.set $5 + local.get $5 if i32.const 1 drop - local.get $4 + local.get $5 i32.load offset=4 - local.set $5 + local.set $3 local.get $2 - local.get $5 + local.get $3 i32.ne if - local.get $4 + local.get $5 local.get $2 call $~lib/rt/stub/__retain i32.store offset=4 - local.get $5 + local.get $3 call $~lib/rt/stub/__release end else @@ -1880,8 +1951,8 @@ local.get $0 i32.load offset=16 call $~lib/rt/stub/__retain - local.set $5 - local.get $5 + local.set $3 + local.get $3 local.get $0 local.get $0 i32.load offset=24 @@ -1893,11 +1964,11 @@ i32.const 12 i32.mul i32.add - local.set $4 - local.get $4 + local.set $5 + local.get $5 local.get $1 i32.store - local.get $4 + local.get $5 local.get $2 call $~lib/rt/stub/__retain i32.store offset=4 @@ -1909,7 +1980,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $3 + local.get $4 local.get $0 i64.load offset=8 i64.and @@ -1918,14 +1989,14 @@ i32.mul i32.add local.set $6 - local.get $4 + local.get $5 local.get $6 i32.load i32.store offset=8 local.get $6 - local.get $4 - i32.store local.get $5 + i32.store + local.get $3 call $~lib/rt/stub/__release end local.get $0 @@ -2002,23 +2073,73 @@ local.get $1 ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.2 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 1 + i32.eq + drop + i32.const 4 + i32.const 2 + i32.eq + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $2 + i64.extend_i32_u + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.2 + end call $~lib/map/Map#find i32.const 0 i32.ne ) (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.3 (result i64) + local.get $1 + local.set $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 1 + i32.eq + drop + i32.const 4 + i32.const 2 + i32.eq + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $2 + i64.extend_i32_u + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.3 + end call $~lib/map/Map#find - local.set $2 - local.get $2 + local.set $3 + local.get $3 i32.eqz if i32.const 224 @@ -2028,7 +2149,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.load offset=4 call $~lib/rt/stub/__retain ) From a4c475146d683ab14a97fa3cb10583d7e5546141 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Mon, 21 Dec 2020 23:15:49 +0200 Subject: [PATCH 06/10] Revert "refactor" This reverts commit 09860fd55771150c6ad875eeedb2adc517ef7baa. --- std/assembly/util/hash.ts | 42 +- tests/compiler/std/hash.optimized.wat | 443 +-- tests/compiler/std/hash.untouched.wat | 1607 +++++----- tests/compiler/std/map.optimized.wat | 806 ++--- tests/compiler/std/map.untouched.wat | 3796 +++++++++-------------- tests/compiler/std/set.optimized.wat | 761 ++--- tests/compiler/std/set.untouched.wat | 2411 ++++++-------- tests/compiler/std/symbol.optimized.wat | 504 ++- tests/compiler/std/symbol.untouched.wat | 1047 +++---- 9 files changed, 4741 insertions(+), 6676 deletions(-) diff --git a/std/assembly/util/hash.ts b/std/assembly/util/hash.ts index ab0e8800d3..1869d53c75 100644 --- a/std/assembly/util/hash.ts +++ b/std/assembly/util/hash.ts @@ -1,5 +1,3 @@ -// @ts-ignore: decorator -@inline export function HASH(key: T): u64 { if (isString()) { return hashStr(changetype(key)); @@ -10,9 +8,7 @@ export function HASH(key: T): u64 { if (sizeof() == 4) return hash32(reinterpret(f32(key))); if (sizeof() == 8) return hash64(reinterpret(f64(key))); } else { - if (sizeof() == 1) return hash8(u64(key)); - if (sizeof() == 2) return hash16(u64(key)); - if (sizeof() == 4) return hash32(u64(key)); + if (sizeof() <= 4) return hash32(u32(key), sizeof()); if (sizeof() == 8) return hash64(u64(key)); } return unreachable(); @@ -34,33 +30,11 @@ export function HASH(key: T): u64 { // @ts-ignore: decorator @inline const XXH64_SEED: u64 = 0; -function hash8(key: u64): u64 { - var h: u64 = XXH64_SEED + XXH64_P5 + 1; - h ^= key * XXH64_P1; - h = rotl(h, 23) * XXH64_P2 + XXH64_P3; - h ^= h >> 33; - h *= XXH64_P2; - h ^= h >> 29; - h *= XXH64_P3; - h ^= h >> 32; - return h; -} - -function hash16(key: u64): u64 { - var h: u64 = XXH64_SEED + XXH64_P5 + 2; - h ^= key * XXH64_P1; - h = rotl(h, 23) * XXH64_P2 + XXH64_P3; - h ^= h >> 33; - h *= XXH64_P2; - h ^= h >> 29; - h *= XXH64_P3; - h ^= h >> 32; - return h; -} - -function hash32(key: u64): u64 { - var h: u64 = XXH64_SEED + XXH64_P5 + 4; - h ^= key * XXH64_P1; +// @ts-ignore: decorator +@inline +function hash32(key: u32, len: u64 = 4): u64 { + var h: u64 = XXH64_SEED + XXH64_P5 + len; + h ^= u64(key) * XXH64_P1; h = rotl(h, 23) * XXH64_P2 + XXH64_P3; h ^= h >> 33; h *= XXH64_P2; @@ -70,6 +44,8 @@ function hash32(key: u64): u64 { return h; } +// @ts-ignore: decorator +@inline function hash64(key: u64): u64 { var h: u64 = XXH64_SEED + XXH64_P5 + 8; h ^= rotl(key * XXH64_P2, 31) * XXH64_P1; @@ -94,6 +70,8 @@ function mix2(h: u64, s: u64): u64 { return (h ^ (rotl(s, 31) * XXH64_P1)) * XXH64_P1 + XXH64_P4; } +// @ts-ignore: decorator +@inline function hashStr(key: string): u64 { if (key === null) { return XXH64_SEED; diff --git a/tests/compiler/std/hash.optimized.wat b/tests/compiler/std/hash.optimized.wat index feee5e7279..636afd70f2 100644 --- a/tests/compiler/std/hash.optimized.wat +++ b/tests/compiler/std/hash.optimized.wat @@ -14,290 +14,291 @@ (data (i32.const 1356) ",\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00a\00b\00c\00d\00e\00f\00g\00h\00i") (export "memory" (memory $0)) (start $~start) - (func $~lib/util/hash/hashStr (param $0 i32) + (func $~lib/util/hash/HASH<~lib/string/String|null> (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i64) (local $5 i64) (local $6 i64) - (local $7 i32) - (local $8 i64) - (local $9 i32) + (local $7 i64) + (local $8 i32) local.get $0 - i32.eqz if - return - end - local.get $0 - i32.const 20 - i32.sub - i32.load offset=16 - i32.const 1 - i32.shr_u - i32.const 1 - i32.shl - local.tee $2 - i32.const 32 - i32.ge_s - if (result i64) - i64.const 6983438078262162902 + local.get $0 + i32.const 20 + i32.sub + i32.load offset=16 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl + local.tee $2 + i32.const 32 + i32.ge_s + if (result i64) + i64.const 6983438078262162902 + local.set $4 + i64.const -4417276706812531889 + local.set $5 + i64.const 7046029288634856825 + local.set $6 + local.get $2 + local.tee $3 + i32.const 32 + i32.sub + local.set $8 + loop $while-continue|0 + local.get $1 + local.get $8 + i32.le_s + if + local.get $4 + local.get $0 + local.get $1 + i32.add + local.tee $2 + i64.load + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $4 + local.get $5 + local.get $2 + i64.load offset=8 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $5 + local.get $7 + local.get $2 + i64.load offset=16 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $7 + local.get $6 + local.get $2 + i64.load offset=24 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $6 + local.get $1 + i32.const 32 + i32.add + local.set $1 + br $while-continue|0 + end + end + local.get $8 + local.get $1 + i32.sub + local.set $2 + local.get $3 + i64.extend_i32_s + local.get $4 + i64.const 1 + i64.rotl + local.get $5 + i64.const 7 + i64.rotl + i64.add + local.get $7 + i64.const 12 + i64.rotl + i64.add + local.get $6 + i64.const 18 + i64.rotl + i64.add + local.get $4 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.get $5 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.get $7 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.get $6 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + i64.add + else + local.get $2 + i64.extend_i32_s + i64.const 2870177450012600261 + i64.add + end local.set $4 - i64.const -4417276706812531889 - local.set $5 - i64.const 7046029288634856825 - local.set $6 + i32.const 0 + local.set $1 local.get $2 - local.tee $3 - i32.const 32 + i32.const 8 i32.sub - local.set $9 - loop $while-continue|0 - local.get $7 - local.get $9 + local.set $2 + loop $while-continue|1 + local.get $1 + local.get $2 i32.le_s if local.get $4 local.get $0 - local.get $7 + local.get $1 i32.add - local.tee $2 i64.load i64.const -4417276706812531889 i64.mul - i64.add i64.const 31 i64.rotl i64.const -7046029288634856825 i64.mul - local.set $4 - local.get $5 - local.get $2 - i64.load offset=8 - i64.const -4417276706812531889 - i64.mul - i64.add - i64.const 31 + i64.xor + i64.const 27 i64.rotl i64.const -7046029288634856825 i64.mul - local.set $5 - local.get $8 - local.get $2 - i64.load offset=16 - i64.const -4417276706812531889 - i64.mul + i64.const -8796714831421723037 i64.add - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - local.set $8 - local.get $6 - local.get $2 - i64.load offset=24 - i64.const -4417276706812531889 - i64.mul - i64.add - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - local.set $6 - local.get $7 - i32.const 32 + local.set $4 + local.get $1 + i32.const 8 i32.add - local.set $7 - br $while-continue|0 + local.set $1 + br $while-continue|1 end end - local.get $9 - local.get $7 - i32.sub - local.set $2 - local.get $3 - i64.extend_i32_s - local.get $4 - i64.const 1 - i64.rotl - local.get $5 - i64.const 7 - i64.rotl - i64.add - local.get $8 - i64.const 12 - i64.rotl - i64.add - local.get $6 - i64.const 18 - i64.rotl - i64.add - local.get $4 - i64.const -4417276706812531889 - i64.mul - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.get $5 - i64.const -4417276706812531889 - i64.mul - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.get $8 - i64.const -4417276706812531889 - i64.mul - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.get $6 - i64.const -4417276706812531889 - i64.mul - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - i64.add - else local.get $2 - i64.extend_i32_s - i64.const 2870177450012600261 - i64.add - end - local.set $4 - local.get $2 - i32.const 8 - i32.sub - local.set $2 - loop $while-continue|1 local.get $1 - local.get $2 - i32.le_s + i32.const 4 + i32.add + i32.ge_s if local.get $4 local.get $0 local.get $1 i32.add - i64.load - i64.const -4417276706812531889 - i64.mul - i64.const 31 - i64.rotl + i64.load32_u i64.const -7046029288634856825 i64.mul i64.xor - i64.const 27 + i64.const 23 i64.rotl - i64.const -7046029288634856825 + i64.const -4417276706812531889 i64.mul - i64.const -8796714831421723037 + i64.const 1609587929392839161 i64.add local.set $4 local.get $1 - i32.const 8 + i32.const 4 i32.add local.set $1 - br $while-continue|1 end - end - local.get $2 - local.get $1 - i32.const 4 - i32.add - i32.ge_s - if - local.get $4 - local.get $0 - local.get $1 - i32.add - i64.load32_u - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const 23 - i64.rotl - i64.const -4417276706812531889 - i64.mul - i64.const 1609587929392839161 - i64.add - local.set $4 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - loop $while-continue|2 - local.get $1 - local.get $2 - i32.lt_s - if - local.get $4 - local.get $0 - local.get $1 - i32.add - i64.load8_u - i64.const 2870177450012600261 - i64.mul - i64.add - i64.const 11 - i64.rotl - i64.const -7046029288634856825 - i64.mul - local.set $4 + loop $while-continue|2 local.get $1 - i32.const 1 - i32.add - local.set $1 - br $while-continue|2 + local.get $2 + i32.lt_s + if + local.get $4 + local.get $0 + local.get $1 + i32.add + i64.load8_u + i64.const 2870177450012600261 + i64.mul + i64.add + i64.const 11 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $4 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $while-continue|2 + end end end ) (func $~start - (local $0 i64) + (local $0 f32) + (local $1 i64) + (local $2 f64) i32.const 0 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String|null> i32.const 1056 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String|null> i32.const 1088 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String|null> i32.const 1120 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String|null> i32.const 1152 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String|null> i32.const 1184 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String|null> i32.const 1216 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String|null> i32.const 1248 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String|null> i32.const 1280 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String|null> i32.const 1328 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String|null> i32.const 1376 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String|null> ) ) diff --git a/tests/compiler/std/hash.untouched.wat b/tests/compiler/std/hash.untouched.wat index dae49c2483..879dacfb6e 100644 --- a/tests/compiler/std/hash.untouched.wat +++ b/tests/compiler/std/hash.untouched.wat @@ -1,10 +1,11 @@ (module (type $none_=>_none (func)) (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i64_=>_i64 (func (param i64) (result i64))) + (type $i32_=>_i64 (func (param i32) (result i64))) (type $i32_=>_none (func (param i32))) (type $i64_=>_i32 (func (param i64) (result i32))) - (type $i32_=>_i64 (func (param i32) (result i64))) + (type $f32_=>_i64 (func (param f32) (result i64))) + (type $f64_=>_i64 (func (param f64) (result i64))) (memory $0 1) (data (i32.const 12) "\1c\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 44) "\1c\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00a\00\00\00\00\00\00\00\00\00\00\00") @@ -33,457 +34,906 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/hash/hashStr (param $0 i32) (result i64) - (local $1 i64) - (local $2 i32) - (local $3 i64) + (func $~lib/util/hash/HASH<~lib/string/String|null> (param $0 i32) (result i64) + (local $1 i32) + (local $2 i64) + (local $3 i32) (local $4 i64) (local $5 i64) (local $6 i64) - (local $7 i32) + (local $7 i64) (local $8 i32) (local $9 i32) - (local $10 i64) + (local $10 i32) (local $11 i64) - (local $12 i32) + (local $12 i64) local.get $0 call $~lib/rt/stub/__retain local.set $0 - local.get $0 - i32.const 0 - i32.eq - if - i64.const 0 - local.set $1 - local.get $0 - call $~lib/rt/stub/__release - local.get $1 - return - end - local.get $0 - call $~lib/string/String#get:length i32.const 1 - i32.shl - local.set $2 - i64.const 0 - local.set $3 - local.get $2 - i32.const 32 - i32.ge_s - if - i64.const 0 - i64.const -7046029288634856825 - i64.add - i64.const -4417276706812531889 - i64.add + drop + block $~lib/util/hash/hashStr|inlined.0 (result i64) + local.get $0 + call $~lib/rt/stub/__retain local.set $1 - i64.const 0 - i64.const -4417276706812531889 - i64.add - local.set $4 - i64.const 0 - local.set $5 - i64.const 0 - i64.const -7046029288634856825 - i64.sub - local.set $6 - local.get $2 - local.set $7 + local.get $1 i32.const 0 - local.set $8 - local.get $2 - i32.const 32 - i32.sub - local.set $2 - loop $while-continue|0 - local.get $8 + i32.eq + if + i64.const 0 + local.set $2 + local.get $1 + call $~lib/rt/stub/__release local.get $2 - i32.le_s + br $~lib/util/hash/hashStr|inlined.0 + end + local.get $1 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + local.set $3 + i64.const 0 + local.set $2 + local.get $3 + i32.const 32 + i32.ge_s + if + i64.const 0 + i64.const -7046029288634856825 + i64.add + i64.const -4417276706812531889 + i64.add + local.set $4 + i64.const 0 + i64.const -4417276706812531889 + i64.add + local.set $5 + i64.const 0 + local.set $6 + i64.const 0 + i64.const -7046029288634856825 + i64.sub + local.set $7 + local.get $3 + local.set $8 + i32.const 0 local.set $9 + local.get $3 + i32.const 32 + i32.sub + local.set $3 + loop $while-continue|0 + local.get $9 + local.get $3 + i32.le_s + local.set $10 + local.get $10 + if + local.get $4 + local.set $12 + local.get $1 + local.get $9 + i32.add + i64.load + local.set $11 + local.get $12 + local.get $11 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $4 + local.get $5 + local.set $12 + local.get $1 + local.get $9 + i32.add + i64.load offset=8 + local.set $11 + local.get $12 + local.get $11 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $5 + local.get $6 + local.set $12 + local.get $1 + local.get $9 + i32.add + i64.load offset=16 + local.set $11 + local.get $12 + local.get $11 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $6 + local.get $7 + local.set $12 + local.get $1 + local.get $9 + i32.add + i64.load offset=24 + local.set $11 + local.get $12 + local.get $11 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $7 + local.get $9 + i32.const 32 + i32.add + local.set $9 + br $while-continue|0 + end + end + local.get $4 + i64.const 1 + i64.rotl + local.get $5 + i64.const 7 + i64.rotl + i64.add + local.get $6 + i64.const 12 + i64.rotl + i64.add + local.get $7 + i64.const 18 + i64.rotl + i64.add + local.set $2 + local.get $4 + i64.const -4417276706812531889 + i64.mul + local.set $4 + local.get $5 + i64.const -4417276706812531889 + i64.mul + local.set $5 + local.get $6 + i64.const -4417276706812531889 + i64.mul + local.set $6 + local.get $7 + i64.const -4417276706812531889 + i64.mul + local.set $7 + local.get $2 + local.set $12 + local.get $4 + local.set $11 + local.get $12 + local.get $11 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $2 + local.get $2 + local.set $12 + local.get $5 + local.set $11 + local.get $12 + local.get $11 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $2 + local.get $2 + local.set $12 + local.get $6 + local.set $11 + local.get $12 + local.get $11 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $2 + local.get $2 + local.set $12 + local.get $7 + local.set $11 + local.get $12 + local.get $11 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $2 + local.get $2 + local.get $8 + i64.extend_i32_s + i64.add + local.set $2 + local.get $3 local.get $9 + i32.sub + local.set $3 + else + local.get $3 + i64.extend_i32_s + i64.const 0 + i64.add + i64.const 2870177450012600261 + i64.add + local.set $2 + end + i32.const 0 + local.set $9 + local.get $3 + i32.const 8 + i32.sub + local.set $3 + loop $while-continue|1 + local.get $9 + local.get $3 + i32.le_s + local.set $8 + local.get $8 if + local.get $2 local.get $1 - local.set $11 - local.get $0 - local.get $8 + local.get $9 i32.add i64.load - local.set $10 - local.get $11 - local.get $10 i64.const -4417276706812531889 i64.mul - i64.add i64.const 31 i64.rotl i64.const -7046029288634856825 i64.mul - local.set $1 - local.get $4 - local.set $11 - local.get $0 - local.get $8 - i32.add - i64.load offset=8 - local.set $10 - local.get $11 - local.get $10 - i64.const -4417276706812531889 - i64.mul - i64.add - i64.const 31 + i64.xor + local.set $2 + local.get $2 + i64.const 27 i64.rotl i64.const -7046029288634856825 i64.mul - local.set $4 - local.get $5 - local.set $11 - local.get $0 - local.get $8 - i32.add - i64.load offset=16 - local.set $10 - local.get $11 - local.get $10 - i64.const -4417276706812531889 - i64.mul + i64.const -8796714831421723037 i64.add - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - local.set $5 - local.get $6 - local.set $11 - local.get $0 - local.get $8 + local.set $2 + local.get $9 + i32.const 8 i32.add - i64.load offset=24 - local.set $10 - local.get $11 - local.get $10 - i64.const -4417276706812531889 + local.set $9 + br $while-continue|1 + end + end + local.get $9 + i32.const 4 + i32.add + local.get $3 + i32.le_s + if + local.get $2 + local.get $1 + local.get $9 + i32.add + i64.load32_u + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $2 + local.get $2 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $2 + local.get $9 + i32.const 4 + i32.add + local.set $9 + end + loop $while-continue|2 + local.get $9 + local.get $3 + i32.lt_s + local.set $8 + local.get $8 + if + local.get $2 + local.get $1 + local.get $9 + i32.add + i64.load8_u + i64.const 2870177450012600261 i64.mul i64.add - i64.const 31 + local.set $2 + local.get $2 + i64.const 11 i64.rotl i64.const -7046029288634856825 i64.mul - local.set $6 - local.get $8 - i32.const 32 + local.set $2 + local.get $9 + i32.const 1 i32.add - local.set $8 - br $while-continue|0 + local.set $9 + br $while-continue|2 end end - local.get $1 - i64.const 1 - i64.rotl - local.get $4 - i64.const 7 - i64.rotl - i64.add - local.get $5 - i64.const 12 - i64.rotl - i64.add - local.get $6 - i64.const 18 - i64.rotl - i64.add - local.set $3 - local.get $1 - i64.const -4417276706812531889 - i64.mul - local.set $1 - local.get $4 - i64.const -4417276706812531889 - i64.mul - local.set $4 - local.get $5 - i64.const -4417276706812531889 - i64.mul - local.set $5 - local.get $6 - i64.const -4417276706812531889 - i64.mul - local.set $6 - local.get $3 - local.set $11 - local.get $1 - local.set $10 - local.get $11 - local.get $10 - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.set $3 - local.get $3 - local.set $11 - local.get $4 - local.set $10 - local.get $11 - local.get $10 - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.set $3 - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $11 - local.get $10 - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul + local.get $2 + local.get $2 + i64.const 33 + i64.shr_u i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.set $3 - local.get $3 - local.set $11 - local.get $6 - local.set $10 - local.get $11 - local.get $10 - i64.const 31 - i64.rotl - i64.const -7046029288634856825 + local.set $2 + local.get $2 + i64.const -4417276706812531889 i64.mul + local.set $2 + local.get $2 + local.get $2 + i64.const 29 + i64.shr_u i64.xor - i64.const -7046029288634856825 + local.set $2 + local.get $2 + i64.const 1609587929392839161 i64.mul - i64.const -8796714831421723037 - i64.add - local.set $3 - local.get $3 - local.get $7 - i64.extend_i32_s - i64.add - local.set $3 + local.set $2 local.get $2 - local.get $8 - i32.sub + local.get $2 + i64.const 32 + i64.shr_u + i64.xor local.set $2 - else local.get $2 - i64.extend_i32_s - i64.const 0 - i64.add - i64.const 2870177450012600261 - i64.add - local.set $3 + local.set $7 + local.get $1 + call $~lib/rt/stub/__release + local.get $7 end - i32.const 0 - local.set $12 - local.get $2 - i32.const 8 - i32.sub local.set $2 - loop $while-continue|1 - local.get $12 - local.get $2 - i32.le_s - local.set $8 - local.get $8 - if - local.get $3 - local.get $0 - local.get $12 - i32.add - i64.load + local.get $0 + call $~lib/rt/stub/__release + local.get $2 + return + ) + (func $std/hash/check (param $0 i64) (result i32) + i32.const 1 + ) + (func $~lib/util/hash/HASH<~lib/string/String> (param $0 i32) (result i64) + (local $1 i32) + (local $2 i64) + (local $3 i32) + (local $4 i64) + (local $5 i64) + (local $6 i64) + (local $7 i64) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i64) + (local $12 i64) + local.get $0 + call $~lib/rt/stub/__retain + local.set $0 + i32.const 1 + drop + block $~lib/util/hash/hashStr|inlined.1 (result i64) + local.get $0 + call $~lib/rt/stub/__retain + local.set $1 + local.get $1 + i32.const 0 + i32.eq + if + i64.const 0 + local.set $2 + local.get $1 + call $~lib/rt/stub/__release + local.get $2 + br $~lib/util/hash/hashStr|inlined.1 + end + local.get $1 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + local.set $3 + i64.const 0 + local.set $2 + local.get $3 + i32.const 32 + i32.ge_s + if + i64.const 0 + i64.const -7046029288634856825 + i64.add + i64.const -4417276706812531889 + i64.add + local.set $4 + i64.const 0 + i64.const -4417276706812531889 + i64.add + local.set $5 + i64.const 0 + local.set $6 + i64.const 0 + i64.const -7046029288634856825 + i64.sub + local.set $7 + local.get $3 + local.set $8 + i32.const 0 + local.set $9 + local.get $3 + i32.const 32 + i32.sub + local.set $3 + loop $while-continue|0 + local.get $9 + local.get $3 + i32.le_s + local.set $10 + local.get $10 + if + local.get $4 + local.set $12 + local.get $1 + local.get $9 + i32.add + i64.load + local.set $11 + local.get $12 + local.get $11 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $4 + local.get $5 + local.set $12 + local.get $1 + local.get $9 + i32.add + i64.load offset=8 + local.set $11 + local.get $12 + local.get $11 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $5 + local.get $6 + local.set $12 + local.get $1 + local.get $9 + i32.add + i64.load offset=16 + local.set $11 + local.get $12 + local.get $11 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $6 + local.get $7 + local.set $12 + local.get $1 + local.get $9 + i32.add + i64.load offset=24 + local.set $11 + local.get $12 + local.get $11 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $7 + local.get $9 + i32.const 32 + i32.add + local.set $9 + br $while-continue|0 + end + end + local.get $4 + i64.const 1 + i64.rotl + local.get $5 + i64.const 7 + i64.rotl + i64.add + local.get $6 + i64.const 12 + i64.rotl + i64.add + local.get $7 + i64.const 18 + i64.rotl + i64.add + local.set $2 + local.get $4 + i64.const -4417276706812531889 + i64.mul + local.set $4 + local.get $5 + i64.const -4417276706812531889 + i64.mul + local.set $5 + local.get $6 + i64.const -4417276706812531889 + i64.mul + local.set $6 + local.get $7 i64.const -4417276706812531889 i64.mul + local.set $7 + local.get $2 + local.set $12 + local.get $4 + local.set $11 + local.get $12 + local.get $11 i64.const 31 i64.rotl i64.const -7046029288634856825 i64.mul i64.xor - local.set $3 - local.get $3 - i64.const 27 + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $2 + local.get $2 + local.set $12 + local.get $5 + local.set $11 + local.get $12 + local.get $11 + i64.const 31 i64.rotl i64.const -7046029288634856825 i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul i64.const -8796714831421723037 i64.add - local.set $3 + local.set $2 + local.get $2 + local.set $12 + local.get $6 + local.set $11 local.get $12 - i32.const 8 - i32.add + local.get $11 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $2 + local.get $2 local.set $12 - br $while-continue|1 + local.get $7 + local.set $11 + local.get $12 + local.get $11 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $2 + local.get $2 + local.get $8 + i64.extend_i32_s + i64.add + local.set $2 + local.get $3 + local.get $9 + i32.sub + local.set $3 + else + local.get $3 + i64.extend_i32_s + i64.const 0 + i64.add + i64.const 2870177450012600261 + i64.add + local.set $2 end - end - local.get $12 - i32.const 4 - i32.add - local.get $2 - i32.le_s - if - local.get $3 - local.get $0 - local.get $12 - i32.add - i64.load32_u - i64.const -7046029288634856825 - i64.mul - i64.xor - local.set $3 + i32.const 0 + local.set $9 local.get $3 - i64.const 23 - i64.rotl - i64.const -4417276706812531889 - i64.mul - i64.const 1609587929392839161 - i64.add + i32.const 8 + i32.sub local.set $3 - local.get $12 + loop $while-continue|1 + local.get $9 + local.get $3 + i32.le_s + local.set $8 + local.get $8 + if + local.get $2 + local.get $1 + local.get $9 + i32.add + i64.load + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $2 + local.get $2 + i64.const 27 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $2 + local.get $9 + i32.const 8 + i32.add + local.set $9 + br $while-continue|1 + end + end + local.get $9 i32.const 4 i32.add - local.set $12 - end - loop $while-continue|2 - local.get $12 - local.get $2 - i32.lt_s - local.set $8 - local.get $8 + local.get $3 + i32.le_s if - local.get $3 - local.get $0 - local.get $12 + local.get $2 + local.get $1 + local.get $9 i32.add - i64.load8_u - i64.const 2870177450012600261 + i64.load32_u + i64.const -7046029288634856825 i64.mul - i64.add - local.set $3 - local.get $3 - i64.const 11 + i64.xor + local.set $2 + local.get $2 + i64.const 23 i64.rotl - i64.const -7046029288634856825 + i64.const -4417276706812531889 i64.mul - local.set $3 - local.get $12 - i32.const 1 + i64.const 1609587929392839161 + i64.add + local.set $2 + local.get $9 + i32.const 4 i32.add - local.set $12 - br $while-continue|2 + local.set $9 end + loop $while-continue|2 + local.get $9 + local.get $3 + i32.lt_s + local.set $8 + local.get $8 + if + local.get $2 + local.get $1 + local.get $9 + i32.add + i64.load8_u + i64.const 2870177450012600261 + i64.mul + i64.add + local.set $2 + local.get $2 + i64.const 11 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $2 + local.get $9 + i32.const 1 + i32.add + local.set $9 + br $while-continue|2 + end + end + local.get $2 + local.get $2 + i64.const 33 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + i64.const -4417276706812531889 + i64.mul + local.set $2 + local.get $2 + local.get $2 + i64.const 29 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + i64.const 1609587929392839161 + i64.mul + local.set $2 + local.get $2 + local.get $2 + i64.const 32 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + local.set $7 + local.get $1 + call $~lib/rt/stub/__release + local.get $7 end - local.get $3 - local.get $3 - i64.const 33 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const -4417276706812531889 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 29 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const 1609587929392839161 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 32 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - local.set $6 + local.set $2 local.get $0 call $~lib/rt/stub/__release - local.get $6 + local.get $2 + return ) - (func $std/hash/check (param $0 i64) (result i32) + (func $~lib/util/hash/HASH (param $0 f32) (result i64) + (local $1 i32) + (local $2 i64) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop i32.const 1 - ) - (func $~lib/util/hash/hash32 (param $0 i64) (result i64) - (local $1 i64) + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $0 + i32.reinterpret_f32 + local.set $1 + i64.const 4 + local.set $2 i64.const 0 i64.const 2870177450012600261 i64.add - i64.const 4 + local.get $2 i64.add - local.set $1 + local.set $3 + local.get $3 local.get $1 - local.get $0 + i64.extend_i32_u i64.const -7046029288634856825 i64.mul i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 i64.const 23 i64.rotl i64.const -4417276706812531889 i64.mul i64.const 1609587929392839161 i64.add - local.set $1 - local.get $1 - local.get $1 + local.set $3 + local.get $3 + local.get $3 i64.const 33 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 i64.const -4417276706812531889 i64.mul - local.set $1 - local.get $1 - local.get $1 + local.set $3 + local.get $3 + local.get $3 i64.const 29 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 i64.const 1609587929392839161 i64.mul - local.set $1 - local.get $1 - local.get $1 + local.set $3 + local.get $3 + local.get $3 i64.const 32 i64.shr_u i64.xor + local.set $3 + local.get $3 + return + ) + (func $~lib/util/hash/HASH (param $0 f64) (result i64) + (local $1 i64) + (local $2 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $0 + i64.reinterpret_f64 local.set $1 - local.get $1 - ) - (func $~lib/util/hash/hash64 (param $0 i64) (result i64) - (local $1 i64) i64.const 0 i64.const 2870177450012600261 i64.add i64.const 8 i64.add - local.set $1 + local.set $2 + local.get $2 local.get $1 - local.get $0 i64.const -4417276706812531889 i64.mul i64.const 31 @@ -491,482 +941,135 @@ i64.const -7046029288634856825 i64.mul i64.xor - local.set $1 - local.get $1 + local.set $2 + local.get $2 i64.const 27 i64.rotl i64.const -7046029288634856825 i64.mul i64.const -8796714831421723037 i64.add - local.set $1 - local.get $1 - local.get $1 + local.set $2 + local.get $2 + local.get $2 i64.const 33 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $2 + local.get $2 i64.const -4417276706812531889 i64.mul - local.set $1 - local.get $1 - local.get $1 + local.set $2 + local.get $2 + local.get $2 i64.const 29 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $2 + local.get $2 i64.const 1609587929392839161 i64.mul - local.set $1 - local.get $1 - local.get $1 + local.set $2 + local.get $2 + local.get $2 i64.const 32 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $2 + local.get $2 + return ) (func $start:std/hash - (local $0 i32) - (local $1 i64) - (local $2 f32) - (local $3 f64) - block $~lib/util/hash/HASH<~lib/string/String|null>|inlined.0 (result i64) - i32.const 0 - call $~lib/rt/stub/__retain - local.set $0 - i32.const 1 - drop - local.get $0 - call $~lib/util/hash/hashStr - local.set $1 - local.get $0 - call $~lib/rt/stub/__release - local.get $1 - br $~lib/util/hash/HASH<~lib/string/String|null>|inlined.0 - end + i32.const 0 + call $~lib/util/hash/HASH<~lib/string/String|null> call $std/hash/check drop - block $~lib/util/hash/HASH<~lib/string/String>|inlined.0 (result i64) - i32.const 32 - local.set $0 - i32.const 1 - drop - local.get $0 - call $~lib/util/hash/hashStr - local.set $1 - local.get $0 - call $~lib/rt/stub/__release - local.get $1 - br $~lib/util/hash/HASH<~lib/string/String>|inlined.0 - end + i32.const 32 + call $~lib/util/hash/HASH<~lib/string/String> call $std/hash/check drop - block $~lib/util/hash/HASH<~lib/string/String>|inlined.1 (result i64) - i32.const 64 - local.set $0 - i32.const 1 - drop - local.get $0 - call $~lib/util/hash/hashStr - local.set $1 - local.get $0 - call $~lib/rt/stub/__release - local.get $1 - br $~lib/util/hash/HASH<~lib/string/String>|inlined.1 - end + i32.const 64 + call $~lib/util/hash/HASH<~lib/string/String> call $std/hash/check drop - block $~lib/util/hash/HASH<~lib/string/String>|inlined.2 (result i64) - i32.const 96 - local.set $0 - i32.const 1 - drop - local.get $0 - call $~lib/util/hash/hashStr - local.set $1 - local.get $0 - call $~lib/rt/stub/__release - local.get $1 - br $~lib/util/hash/HASH<~lib/string/String>|inlined.2 - end + i32.const 96 + call $~lib/util/hash/HASH<~lib/string/String> call $std/hash/check drop - block $~lib/util/hash/HASH<~lib/string/String>|inlined.3 (result i64) - i32.const 128 - local.set $0 - i32.const 1 - drop - local.get $0 - call $~lib/util/hash/hashStr - local.set $1 - local.get $0 - call $~lib/rt/stub/__release - local.get $1 - br $~lib/util/hash/HASH<~lib/string/String>|inlined.3 - end + i32.const 128 + call $~lib/util/hash/HASH<~lib/string/String> call $std/hash/check drop - block $~lib/util/hash/HASH<~lib/string/String>|inlined.4 (result i64) - i32.const 160 - local.set $0 - i32.const 1 - drop - local.get $0 - call $~lib/util/hash/hashStr - local.set $1 - local.get $0 - call $~lib/rt/stub/__release - local.get $1 - br $~lib/util/hash/HASH<~lib/string/String>|inlined.4 - end + i32.const 160 + call $~lib/util/hash/HASH<~lib/string/String> call $std/hash/check drop - block $~lib/util/hash/HASH<~lib/string/String>|inlined.5 (result i64) - i32.const 192 - local.set $0 - i32.const 1 - drop - local.get $0 - call $~lib/util/hash/hashStr - local.set $1 - local.get $0 - call $~lib/rt/stub/__release - local.get $1 - br $~lib/util/hash/HASH<~lib/string/String>|inlined.5 - end + i32.const 192 + call $~lib/util/hash/HASH<~lib/string/String> call $std/hash/check drop - block $~lib/util/hash/HASH<~lib/string/String>|inlined.6 (result i64) - i32.const 224 - local.set $0 - i32.const 1 - drop - local.get $0 - call $~lib/util/hash/hashStr - local.set $1 - local.get $0 - call $~lib/rt/stub/__release - local.get $1 - br $~lib/util/hash/HASH<~lib/string/String>|inlined.6 - end + i32.const 224 + call $~lib/util/hash/HASH<~lib/string/String> call $std/hash/check drop - block $~lib/util/hash/HASH<~lib/string/String>|inlined.7 (result i64) - i32.const 256 - local.set $0 - i32.const 1 - drop - local.get $0 - call $~lib/util/hash/hashStr - local.set $1 - local.get $0 - call $~lib/rt/stub/__release - local.get $1 - br $~lib/util/hash/HASH<~lib/string/String>|inlined.7 - end + i32.const 256 + call $~lib/util/hash/HASH<~lib/string/String> call $std/hash/check drop - block $~lib/util/hash/HASH<~lib/string/String>|inlined.8 (result i64) - i32.const 304 - local.set $0 - i32.const 1 - drop - local.get $0 - call $~lib/util/hash/hashStr - local.set $1 - local.get $0 - call $~lib/rt/stub/__release - local.get $1 - br $~lib/util/hash/HASH<~lib/string/String>|inlined.8 - end + i32.const 304 + call $~lib/util/hash/HASH<~lib/string/String> call $std/hash/check drop - block $~lib/util/hash/HASH<~lib/string/String>|inlined.9 (result i64) - i32.const 352 - local.set $0 - i32.const 1 - drop - local.get $0 - call $~lib/util/hash/hashStr - local.set $1 - local.get $0 - call $~lib/rt/stub/__release - local.get $1 - br $~lib/util/hash/HASH<~lib/string/String>|inlined.9 - end + i32.const 352 + call $~lib/util/hash/HASH<~lib/string/String> call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.0 (result i64) - f32.const 0 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - i64.extend_i32_u - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end + f32.const 0 + call $~lib/util/hash/HASH call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.1 (result i64) - f32.const 1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - i64.extend_i32_u - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end + f32.const 1 + call $~lib/util/hash/HASH call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.2 (result i64) - f32.const 1.100000023841858 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - i64.extend_i32_u - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + f32.const 1.100000023841858 + call $~lib/util/hash/HASH call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.3 (result i64) - f32.const 0 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - i64.extend_i32_u - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end + f32.const 0 + call $~lib/util/hash/HASH call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.4 (result i64) - f32.const inf - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - i64.extend_i32_u - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.4 - end + f32.const inf + call $~lib/util/hash/HASH call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.5 (result i64) - f32.const nan:0x400000 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - i64.extend_i32_u - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.5 - end + f32.const nan:0x400000 + call $~lib/util/hash/HASH call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.0 (result i64) - f64.const 0 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.0 - end + f64.const 0 + call $~lib/util/hash/HASH call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.1 (result i64) - f64.const 1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.1 - end + f64.const 1 + call $~lib/util/hash/HASH call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.2 (result i64) - f64.const 1.1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.2 - end + f64.const 1.1 + call $~lib/util/hash/HASH call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.3 (result i64) - f64.const 0 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.3 - end + f64.const 0 + call $~lib/util/hash/HASH call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.4 (result i64) - f64.const inf - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.4 - end + f64.const inf + call $~lib/util/hash/HASH call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.5 (result i64) - f64.const nan:0x8000000000000 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.5 - end + f64.const nan:0x8000000000000 + call $~lib/util/hash/HASH call $std/hash/check drop ) diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index 71f78a91b5..b3db9e9321 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -1,12 +1,12 @@ (module (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_none (func (param i32))) - (type $i64_=>_i64 (func (param i64) (result i64))) + (type $i32_=>_i64 (func (param i32) (result i64))) (type $i32_i32_i64_=>_i32 (func (param i32 i32 i64) (result i32))) (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) (type $i32_i64_i64_=>_i32 (func (param i32 i64 i64) (result i32))) @@ -26,6 +26,9 @@ (type $i32_f64_i64_=>_i32 (func (param i32 f64 i64) (result i32))) (type $i32_f64_f64_=>_i32 (func (param i32 f64 f64) (result i32))) (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) + (type $i64_=>_i64 (func (param i64) (result i64))) + (type $f32_=>_i64 (func (param f32) (result i64))) + (type $f64_=>_i64 (func (param f64) (result i64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 1036) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00(\00\00\00a\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") @@ -1293,8 +1296,14 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/util/hash/hash8 (param $0 i64) (result i64) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) local.get $0 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i64.extend_i32_u i64.const -7046029288634856825 i64.mul i64.const 2870177450012600262 @@ -1305,22 +1314,22 @@ i64.mul i64.const 1609587929392839161 i64.add - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 i64.const 33 i64.shr_u i64.xor i64.const -4417276706812531889 i64.mul - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 i64.const 29 i64.shr_u i64.xor i64.const 1609587929392839161 i64.mul - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 i64.const 32 i64.shr_u i64.xor @@ -1374,12 +1383,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i64.extend_i32_s - call $~lib/util/hash/hash8 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -1444,8 +1448,7 @@ local.get $2 local.get $5 local.get $6 - i64.extend_i32_s - call $~lib/util/hash/hash8 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -1526,12 +1529,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i64.extend_i32_s - call $~lib/util/hash/hash8 + call $~lib/util/hash/HASH local.tee $5 call $~lib/map/Map#find local.tee $3 @@ -1625,12 +1623,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i64.extend_i32_s - call $~lib/util/hash/hash8 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $0 i32.eqz @@ -2508,8 +2501,7 @@ local.get $2 local.get $5 local.get $6 - i64.extend_i32_s - call $~lib/util/hash/hash8 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -2589,12 +2581,7 @@ (local $5 i64) local.get $1 local.tee $3 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i64.extend_i32_s - call $~lib/util/hash/hash8 + call $~lib/util/hash/HASH local.set $5 local.get $0 i32.load @@ -2725,8 +2712,10 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/util/hash/hash32 (param $0 i64) (result i64) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) local.get $0 + i64.extend_i32_u i64.const -7046029288634856825 i64.mul i64.const 2870177450012600265 @@ -2737,22 +2726,22 @@ i64.mul i64.const 1609587929392839161 i64.add - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 i64.const 33 i64.shr_u i64.xor i64.const -4417276706812531889 i64.mul - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 i64.const 29 i64.shr_u i64.xor i64.const 1609587929392839161 i64.mul - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 i64.const 32 i64.shr_u i64.xor @@ -2860,8 +2849,7 @@ local.get $2 local.get $5 local.get $6 - i64.extend_i32_s - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -2942,8 +2930,7 @@ local.get $0 local.get $1 local.get $1 - i64.extend_i32_s - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.tee $5 call $~lib/map/Map#find local.tee $3 @@ -3038,12 +3025,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i64.extend_i32_s - call $~lib/util/hash/hash8 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $1 i32.eqz @@ -3654,14 +3636,47 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) local.get $0 - local.get $1 - local.get $1 i32.const 255 i32.and i64.extend_i32_u - call $~lib/util/hash/hash8 + i64.const -7046029288634856825 + i64.mul + i64.const 2870177450012600262 + i64.xor + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.tee $1 + local.get $1 + i64.const 33 + i64.shr_u + i64.xor + i64.const -4417276706812531889 + i64.mul + local.tee $1 + local.get $1 + i64.const 29 + i64.shr_u + i64.xor + i64.const 1609587929392839161 + i64.mul + local.tee $1 + local.get $1 + i64.const 32 + i64.shr_u + i64.xor + ) + (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -3726,8 +3741,7 @@ local.get $2 local.get $5 local.get $6 - i64.extend_i32_u - call $~lib/util/hash/hash8 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -3808,10 +3822,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 255 - i32.and - i64.extend_i32_u - call $~lib/util/hash/hash8 + call $~lib/util/hash/HASH local.tee $5 call $~lib/map/Map#find local.tee $3 @@ -3905,10 +3916,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 255 - i32.and - i64.extend_i32_u - call $~lib/util/hash/hash8 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $0 i32.eqz @@ -4096,8 +4104,7 @@ local.get $2 local.get $5 local.get $6 - i64.extend_i32_u - call $~lib/util/hash/hash8 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -4177,10 +4184,7 @@ (local $5 i64) local.get $1 local.tee $3 - i32.const 255 - i32.and - i64.extend_i32_u - call $~lib/util/hash/hash8 + call $~lib/util/hash/HASH local.set $5 local.get $0 i32.load @@ -4316,10 +4320,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 255 - i32.and - i64.extend_i32_u - call $~lib/util/hash/hash8 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $1 i32.eqz @@ -4875,8 +4876,14 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/util/hash/hash16 (param $0 i64) (result i64) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) local.get $0 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i64.extend_i32_u i64.const -7046029288634856825 i64.mul i64.const 2870177450012600263 @@ -4887,22 +4894,22 @@ i64.mul i64.const 1609587929392839161 i64.add - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 i64.const 33 i64.shr_u i64.xor i64.const -4417276706812531889 i64.mul - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 i64.const 29 i64.shr_u i64.xor i64.const 1609587929392839161 i64.mul - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 i64.const 32 i64.shr_u i64.xor @@ -4956,12 +4963,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i64.extend_i32_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -5026,8 +5028,7 @@ local.get $2 local.get $5 local.get $6 - i64.extend_i32_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -5108,12 +5109,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i64.extend_i32_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH local.tee $5 call $~lib/map/Map#find local.tee $3 @@ -5207,12 +5203,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i64.extend_i32_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $0 i32.eqz @@ -5454,8 +5445,7 @@ local.get $2 local.get $5 local.get $6 - i64.extend_i32_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -5535,12 +5525,7 @@ (local $5 i64) local.get $1 local.tee $3 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i64.extend_i32_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH local.set $5 local.get $0 i32.load @@ -5676,12 +5661,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i64.extend_i32_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $1 i32.eqz @@ -6261,14 +6241,47 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) local.get $0 - local.get $1 - local.get $1 i32.const 65535 i32.and i64.extend_i32_u - call $~lib/util/hash/hash16 + i64.const -7046029288634856825 + i64.mul + i64.const 2870177450012600263 + i64.xor + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.tee $1 + local.get $1 + i64.const 33 + i64.shr_u + i64.xor + i64.const -4417276706812531889 + i64.mul + local.tee $1 + local.get $1 + i64.const 29 + i64.shr_u + i64.xor + i64.const 1609587929392839161 + i64.mul + local.tee $1 + local.get $1 + i64.const 32 + i64.shr_u + i64.xor + ) + (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -6333,8 +6346,7 @@ local.get $2 local.get $5 local.get $6 - i64.extend_i32_u - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -6415,10 +6427,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 65535 - i32.and - i64.extend_i32_u - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH local.tee $5 call $~lib/map/Map#find local.tee $3 @@ -6512,10 +6521,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 65535 - i32.and - i64.extend_i32_u - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $0 i32.eqz @@ -6707,8 +6713,7 @@ local.get $2 local.get $5 local.get $6 - i64.extend_i32_u - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -6788,10 +6793,7 @@ (local $5 i64) local.get $1 local.tee $3 - i32.const 65535 - i32.and - i64.extend_i32_u - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH local.set $5 local.get $0 i32.load @@ -6927,10 +6929,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 65535 - i32.and - i64.extend_i32_u - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $1 i32.eqz @@ -7492,8 +7491,7 @@ local.get $0 local.get $1 local.get $1 - i64.extend_i32_s - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -7502,8 +7500,7 @@ local.get $0 local.get $1 local.get $1 - i64.extend_i32_s - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $0 i32.eqz @@ -7523,8 +7520,7 @@ local.get $0 local.get $1 local.get $1 - i64.extend_i32_s - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $1 i32.eqz @@ -8041,17 +8037,8 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - local.get $1 - i64.extend_i32_u - call $~lib/util/hash/hash32 - call $~lib/map/Map#find - i32.const 0 - i32.ne - ) - (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) + (func $~lib/map/Map#keys (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8059,264 +8046,10 @@ (local $6 i32) (local $7 i32) (local $8 i32) - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 2 - i32.shl - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $3 - i32.const 3 - i32.shl - i32.const 3 - i32.div_s - local.tee $7 - i32.const 12 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $3 + (local $9 i32) local.get $0 i32.load offset=16 - local.tee $4 - local.get $0 - i32.load offset=24 - i32.const 12 - i32.mul - i32.add - local.set $8 - local.get $3 - local.set $2 - loop $while-continue|0 - local.get $4 - local.get $8 - i32.ne - if - local.get $4 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $2 - local.get $4 - i32.load - local.tee $6 - i32.store - local.get $2 - local.get $4 - i32.load offset=4 - i32.store offset=4 - local.get $2 - local.get $5 - local.get $6 - i64.extend_i32_u - call $~lib/util/hash/hash32 - local.get $1 - i64.extend_i32_u - i64.and - i32.wrap_i64 - i32.const 2 - i32.shl - i32.add - local.tee $6 - i32.load - i32.store offset=8 - local.get $6 - local.get $2 - i32.store - local.get $2 - i32.const 12 - i32.add - local.set $2 - end - local.get $4 - i32.const 12 - i32.add - local.set $4 - br $while-continue|0 - end - end - local.get $5 - local.tee $4 - local.get $0 - i32.load - local.tee $2 - i32.ne - if - local.get $4 - call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - call $~lib/rt/pure/__release - end - local.get $0 - local.get $4 - i32.store - local.get $0 - local.get $1 - i64.extend_i32_u - i64.store offset=8 - local.get $3 - local.tee $1 - local.get $0 - i32.load offset=16 - local.tee $4 - i32.ne - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $4 - call $~lib/rt/pure/__release - end - local.get $0 - local.get $1 - i32.store offset=16 - local.get $0 - local.get $7 - i32.store offset=20 - local.get $0 - local.get $0 - i32.load offset=28 - i32.store offset=24 - local.get $5 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - ) - (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i64) - local.get $0 - local.get $1 - local.get $1 - i64.extend_i32_u - call $~lib/util/hash/hash32 - local.tee $5 - call $~lib/map/Map#find - local.tee $3 - if - local.get $3 - local.get $2 - i32.store offset=4 - else - local.get $0 - i32.load offset=24 - local.get $0 - i32.load offset=20 - i32.eq - if - local.get $0 - local.get $0 - i32.load offset=28 - local.get $0 - i32.load offset=20 - i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s - if (result i64) - local.get $0 - i64.load offset=8 - else - local.get $0 - i64.load offset=8 - i64.const 1 - i64.shl - i64.const 1 - i64.or - end - i32.wrap_i64 - call $~lib/map/Map#rehash - end - local.get $0 - i32.load offset=16 - call $~lib/rt/pure/__retain - local.set $4 - local.get $0 - local.get $0 - i32.load offset=24 - local.tee $3 - i32.const 1 - i32.add - i32.store offset=24 - local.get $4 - local.get $3 - i32.const 12 - i32.mul - i32.add - local.tee $3 - local.get $1 - i32.store - local.get $3 - local.get $2 - i32.store offset=4 - local.get $0 - local.get $0 - i32.load offset=28 - i32.const 1 - i32.add - i32.store offset=28 - local.get $3 - local.get $0 - i32.load - local.get $5 - local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 2 - i32.shl - i32.add - local.tee $1 - i32.load - i32.store offset=8 - local.get $1 - local.get $3 - i32.store - local.get $4 - call $~lib/rt/pure/__release - end - local.get $0 - call $~lib/rt/pure/__retain - ) - (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - local.get $1 - i64.extend_i32_u - call $~lib/util/hash/hash32 - call $~lib/map/Map#find - local.tee $0 - i32.eqz - if - i32.const 1408 - i32.const 1472 - i32.const 105 - i32.const 17 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - ) - (func $~lib/map/Map#keys (param $0 i32) (result i32) - (local $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=16 - local.set $5 + local.set $5 local.get $0 i32.load offset=24 local.tee $8 @@ -8421,67 +8154,6 @@ call $~lib/array/Array#set:length local.get $0 ) - (func $~lib/map/Map#delete (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - local.get $1 - local.get $1 - i64.extend_i32_u - call $~lib/util/hash/hash32 - call $~lib/map/Map#find - local.tee $1 - i32.eqz - if - return - end - local.get $1 - local.get $1 - i32.load offset=8 - i32.const 1 - i32.or - i32.store offset=8 - local.get $0 - local.get $0 - i32.load offset=28 - i32.const 1 - i32.sub - i32.store offset=28 - local.get $0 - i64.load offset=8 - i64.const 1 - i64.shr_u - i32.wrap_i64 - local.tee $2 - i32.const 1 - i32.add - i32.const 4 - local.get $0 - i32.load offset=28 - local.tee $1 - local.get $1 - i32.const 4 - i32.lt_u - select - i32.ge_u - if (result i32) - local.get $0 - i32.load offset=28 - local.get $0 - i32.load offset=20 - i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s - else - i32.const 0 - end - if - local.get $0 - local.get $2 - call $~lib/map/Map#rehash - end - ) (func $std/map/testNumeric (local $0 i32) (local $1 i32) @@ -8522,7 +8194,7 @@ if local.get $0 local.get $1 - call $~lib/map/Map#has + call $~lib/map/Map#has if i32.const 0 i32.const 1360 @@ -8536,11 +8208,11 @@ local.get $1 i32.const 10 i32.add - call $~lib/map/Map#set + call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $0 local.get $1 - call $~lib/map/Map#has + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -8552,7 +8224,7 @@ end local.get $0 local.get $1 - call $~lib/map/Map#get + call $~lib/map/Map#get local.get $1 i32.const 10 i32.add @@ -8593,7 +8265,7 @@ if local.get $0 local.get $1 - call $~lib/map/Map#has + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -8605,7 +8277,7 @@ end local.get $0 local.get $1 - call $~lib/map/Map#get + call $~lib/map/Map#get local.get $1 i32.const 10 i32.add @@ -8623,11 +8295,11 @@ local.get $1 i32.const 20 i32.add - call $~lib/map/Map#set + call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $0 local.get $1 - call $~lib/map/Map#has + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -8639,7 +8311,7 @@ end local.get $0 local.get $1 - call $~lib/map/Map#get + call $~lib/map/Map#get local.get $1 i32.const 20 i32.add @@ -8719,7 +8391,7 @@ local.set $7 local.get $0 local.get $3 - call $~lib/map/Map#has + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -8733,7 +8405,7 @@ local.get $7 i32.const 20 i32.sub - call $~lib/map/Map#has + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -8746,7 +8418,7 @@ local.get $1 local.get $3 local.get $3 - call $~lib/map/Map#set + call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $5 local.get $7 @@ -8796,7 +8468,7 @@ if local.get $0 local.get $2 - call $~lib/map/Map#has + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -8808,7 +8480,7 @@ end local.get $0 local.get $2 - call $~lib/map/Map#get + call $~lib/map/Map#get local.get $2 i32.const 20 i32.add @@ -8823,10 +8495,10 @@ end local.get $0 local.get $2 - call $~lib/map/Map#delete + call $~lib/map/Map#delete local.get $0 local.get $2 - call $~lib/map/Map#has + call $~lib/map/Map#has if i32.const 0 i32.const 1360 @@ -8863,7 +8535,7 @@ if local.get $0 local.get $2 - call $~lib/map/Map#has + call $~lib/map/Map#has if i32.const 0 i32.const 1360 @@ -8877,11 +8549,11 @@ local.get $2 i32.const 10 i32.add - call $~lib/map/Map#set + call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $0 local.get $2 - call $~lib/map/Map#has + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -8893,10 +8565,10 @@ end local.get $0 local.get $2 - call $~lib/map/Map#delete + call $~lib/map/Map#delete local.get $0 local.get $2 - call $~lib/map/Map#has + call $~lib/map/Map#has if i32.const 0 i32.const 1360 @@ -8947,7 +8619,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/util/hash/hash64 (param $0 i64) (result i64) + (func $~lib/util/hash/HASH (param $0 i64) (result i64) local.get $0 i64.const -4417276706812531889 i64.mul @@ -9030,7 +8702,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -9096,7 +8768,7 @@ local.get $2 local.get $5 local.get $8 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -9177,7 +8849,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.tee $5 call $~lib/map/Map#find local.tee $3 @@ -9271,7 +8943,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $0 i32.eqz @@ -9587,7 +9259,7 @@ local.get $2 local.get $5 local.get $8 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -9667,7 +9339,7 @@ (local $5 i64) (local $6 i32) local.get $1 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.set $5 local.get $0 i32.load @@ -9802,7 +9474,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $2 i32.eqz @@ -10953,6 +10625,41 @@ local.get $1 call $~lib/rt/pure/__release ) + (func $~lib/util/hash/HASH (param $0 f32) (result i64) + (local $1 i64) + local.get $0 + i32.reinterpret_f32 + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.const 2870177450012600265 + i64.xor + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.tee $1 + local.get $1 + i64.const 33 + i64.shr_u + i64.xor + i64.const -4417276706812531889 + i64.mul + local.tee $1 + local.get $1 + i64.const 29 + i64.shr_u + i64.xor + i64.const 1609587929392839161 + i64.mul + local.tee $1 + local.get $1 + i64.const 32 + i64.shr_u + i64.xor + ) (func $~lib/map/Map#find (param $0 i32) (param $1 f32) (param $2 i64) (result i32) (local $3 i32) local.get $0 @@ -11000,9 +10707,7 @@ local.get $0 local.get $1 local.get $1 - i32.reinterpret_f32 - i64.extend_i32_u - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -11068,9 +10773,7 @@ local.get $2 local.get $5 local.get $8 - i32.reinterpret_f32 - i64.extend_i32_u - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -11151,9 +10854,7 @@ local.get $0 local.get $1 local.get $1 - i32.reinterpret_f32 - i64.extend_i32_u - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.tee $5 call $~lib/map/Map#find local.tee $3 @@ -11247,9 +10948,7 @@ local.get $0 local.get $1 local.get $1 - i32.reinterpret_f32 - i64.extend_i32_u - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $0 i32.eqz @@ -11476,9 +11175,7 @@ local.get $2 local.get $5 local.get $8 - i32.reinterpret_f32 - i64.extend_i32_u - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -11560,9 +11257,7 @@ local.get $0 local.get $1 local.get $1 - i32.reinterpret_f32 - i64.extend_i32_u - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.tee $5 call $~lib/map/Map#find local.tee $3 @@ -11658,9 +11353,7 @@ local.get $0 local.get $1 local.get $1 - i32.reinterpret_f32 - i64.extend_i32_u - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $2 i32.eqz @@ -12204,6 +11897,44 @@ local.get $1 call $~lib/rt/pure/__release ) + (func $~lib/util/hash/HASH (param $0 f64) (result i64) + (local $1 i64) + local.get $0 + i64.reinterpret_f64 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const 2870177450012600269 + i64.xor + i64.const 27 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.tee $1 + local.get $1 + i64.const 33 + i64.shr_u + i64.xor + i64.const -4417276706812531889 + i64.mul + local.tee $1 + local.get $1 + i64.const 29 + i64.shr_u + i64.xor + i64.const 1609587929392839161 + i64.mul + local.tee $1 + local.get $1 + i64.const 32 + i64.shr_u + i64.xor + ) (func $~lib/map/Map#find (param $0 i32) (param $1 f64) (param $2 i64) (result i32) (local $3 i32) local.get $0 @@ -12251,8 +11982,7 @@ local.get $0 local.get $1 local.get $1 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -12318,8 +12048,7 @@ local.get $2 local.get $5 local.get $8 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -12400,8 +12129,7 @@ local.get $0 local.get $1 local.get $1 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.tee $5 call $~lib/map/Map#find local.tee $3 @@ -12495,8 +12223,7 @@ local.get $0 local.get $1 local.get $1 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $0 i32.eqz @@ -12723,8 +12450,7 @@ local.get $2 local.get $5 local.get $8 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -12804,8 +12530,7 @@ (local $5 i64) (local $6 i32) local.get $1 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.set $5 local.get $0 i32.load @@ -12940,8 +12665,7 @@ local.get $0 local.get $1 local.get $1 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $2 i32.eqz diff --git a/tests/compiler/std/map.untouched.wat b/tests/compiler/std/map.untouched.wat index a1e08900cd..ff966d33b4 100644 --- a/tests/compiler/std/map.untouched.wat +++ b/tests/compiler/std/map.untouched.wat @@ -9,9 +9,9 @@ (type $i32_i32_i64_=>_i32 (func (param i32 i32 i64) (result i32))) (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) (type $i32_i64_i64_=>_i32 (func (param i32 i64 i64) (result i32))) + (type $i32_=>_i64 (func (param i32) (result i64))) (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) - (type $i64_=>_i64 (func (param i64) (result i64))) (type $i32_f32_=>_i32 (func (param i32 f32) (result i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) @@ -19,6 +19,7 @@ (type $i32_i64_i32_=>_i32 (func (param i32 i64 i32) (result i32))) (type $i32_f32_i64_=>_i32 (func (param i32 f32 i64) (result i32))) (type $i32_f64_i64_=>_i32 (func (param i32 f64 i64) (result i32))) + (type $i64_=>_i64 (func (param i64) (result i64))) (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) @@ -26,6 +27,8 @@ (type $i32_f32_f32_=>_i32 (func (param i32 f32 f32) (result i32))) (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) (type $i32_f64_f64_=>_i32 (func (param i32 f64 f64) (result i32))) + (type $f32_=>_i64 (func (param f32) (result i64))) + (type $f64_=>_i64 (func (param f64) (result i64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 12) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00(\00\00\00a\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e\00\00\00\00\00") @@ -1806,55 +1809,77 @@ i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/hash8 (param $0 i64) (result i64) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) (local $1 i64) + (local $2 i32) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + i32.const 4 + i32.le_u + drop + local.get $0 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + local.set $2 + i64.const 1 + local.set $1 i64.const 0 i64.const 2870177450012600261 i64.add - i64.const 1 - i64.add - local.set $1 local.get $1 - local.get $0 + i64.add + local.set $3 + local.get $3 + local.get $2 + i64.extend_i32_u i64.const -7046029288634856825 i64.mul i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 i64.const 23 i64.rotl i64.const -4417276706812531889 i64.mul i64.const 1609587929392839161 i64.add - local.set $1 - local.get $1 - local.get $1 + local.set $3 + local.get $3 + local.get $3 i64.const 33 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 i64.const -4417276706812531889 i64.mul - local.set $1 - local.get $1 - local.get $1 + local.set $3 + local.get $3 + local.get $3 i64.const 29 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 i64.const 1609587929392839161 i64.mul - local.set $1 - local.get $1 - local.get $1 + local.set $3 + local.get $3 + local.get $3 i64.const 32 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 + return ) (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) @@ -1912,31 +1937,10 @@ i32.const 0 ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $2 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i64.extend_i32_s - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -2016,24 +2020,8 @@ local.get $10 i32.load offset=4 i32.store offset=4 - block $~lib/util/hash/HASH|inlined.2 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $13 - i64.extend_i32_s - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -2115,43 +2103,23 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i64) + (local $3 i64) + (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/util/hash/HASH|inlined.1 (result i64) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $3 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i64.extend_i32_s - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i32.store offset=4 else @@ -2188,8 +2156,8 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $3 - local.get $3 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=24 @@ -2201,11 +2169,11 @@ i32.const 12 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i32.store8 - local.get $5 + local.get $4 local.get $2 i32.store offset=4 local.get $0 @@ -2216,7 +2184,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -2225,14 +2193,14 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load i32.store offset=8 local.get $6 - local.get $5 + local.get $4 i32.store - local.get $3 + local.get $5 call $~lib/rt/pure/__release end local.get $0 @@ -2240,34 +2208,13 @@ ) (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $2 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i64.extend_i32_s - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 384 @@ -2277,7 +2224,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=4 ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) @@ -4514,24 +4461,8 @@ local.get $10 i32.load8_s offset=1 i32.store8 offset=1 - block $~lib/util/hash/HASH|inlined.5 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $13 - i64.extend_i32_s - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -4613,43 +4544,23 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i64) + (local $3 i64) + (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/util/hash/HASH|inlined.4 (result i64) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $3 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i64.extend_i32_s - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.4 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i32.store8 offset=1 else @@ -4686,8 +4597,8 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $3 - local.get $3 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=24 @@ -4699,11 +4610,11 @@ i32.const 8 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i32.store8 - local.get $5 + local.get $4 local.get $2 i32.store8 offset=1 local.get $0 @@ -4714,7 +4625,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -4723,68 +4634,86 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load i32.store offset=4 local.get $6 - local.get $5 + local.get $4 i32.store - local.get $3 + local.get $5 call $~lib/rt/pure/__release end local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/util/hash/hash32 (param $0 i64) (result i64) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) (local $1 i64) + (local $2 i32) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 4 + i32.le_u + drop + local.get $0 + local.set $2 + i64.const 4 + local.set $1 i64.const 0 i64.const 2870177450012600261 i64.add - i64.const 4 - i64.add - local.set $1 local.get $1 - local.get $0 + i64.add + local.set $3 + local.get $3 + local.get $2 + i64.extend_i32_u i64.const -7046029288634856825 i64.mul i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 i64.const 23 i64.rotl i64.const -4417276706812531889 i64.mul i64.const 1609587929392839161 i64.add - local.set $1 - local.get $1 - local.get $1 + local.set $3 + local.get $3 + local.get $3 i64.const 33 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 i64.const -4417276706812531889 i64.mul - local.set $1 - local.get $1 - local.get $1 + local.set $3 + local.get $3 + local.get $3 i64.const 29 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 i64.const 1609587929392839161 i64.mul - local.set $1 - local.get $1 - local.get $1 + local.set $3 + local.get $3 + local.get $3 i64.const 32 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 + return ) (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) @@ -4912,32 +4841,8 @@ local.get $10 i32.load offset=4 i32.store offset=4 - block $~lib/util/hash/HASH|inlined.1 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $13 - i64.extend_i32_s - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -5019,47 +4924,23 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i64) + (local $3 i64) + (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/util/hash/HASH|inlined.0 (result i64) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $3 - i64.extend_i32_s - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i32.store offset=4 else @@ -5096,8 +4977,8 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $3 - local.get $3 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=24 @@ -5109,11 +4990,11 @@ i32.const 12 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i32.store - local.get $5 + local.get $4 local.get $2 i32.store offset=4 local.get $0 @@ -5124,7 +5005,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -5133,14 +5014,14 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load i32.store offset=8 local.get $6 - local.get $5 + local.get $4 i32.store - local.get $3 + local.get $5 call $~lib/rt/pure/__release end local.get $0 @@ -5161,31 +5042,11 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $2 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i64.extend_i32_s - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.6 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -5195,8 +5056,8 @@ drop i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=8 i32.const 1 i32.or @@ -5212,16 +5073,16 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=28 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -5241,7 +5102,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/map/Map#rehash end i32.const 1 @@ -5839,6 +5700,76 @@ i32.store offset=28 local.get $0 ) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) + (local $2 i32) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + i32.const 4 + i32.le_u + drop + local.get $0 + i32.const 255 + i32.and + local.set $2 + i64.const 1 + local.set $1 + i64.const 0 + i64.const 2870177450012600261 + i64.add + local.get $1 + i64.add + local.set $3 + local.get $3 + local.get $2 + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $3 + local.get $3 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $3 + local.get $3 + local.get $3 + i64.const 33 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const -4417276706812531889 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 29 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const 1609587929392839161 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 32 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + return + ) (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) @@ -5893,29 +5824,10 @@ i32.const 0 ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $2 - i32.const 255 - i32.and - i64.extend_i32_u - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -5995,24 +5907,8 @@ local.get $10 i32.load offset=4 i32.store offset=4 - block $~lib/util/hash/HASH|inlined.2 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $13 - i64.extend_i32_u - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -6094,41 +5990,23 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i64) + (local $3 i64) + (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/util/hash/HASH|inlined.1 (result i64) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $3 - i32.const 255 - i32.and - i64.extend_i32_u - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i32.store offset=4 else @@ -6165,9 +6043,9 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $3 - local.get $3 - local.get $0 + local.set $5 + local.get $5 + local.get $0 local.get $0 i32.load offset=24 local.tee $6 @@ -6178,11 +6056,11 @@ i32.const 12 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i32.store8 - local.get $5 + local.get $4 local.get $2 i32.store offset=4 local.get $0 @@ -6193,7 +6071,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -6202,14 +6080,14 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load i32.store offset=8 local.get $6 - local.get $5 + local.get $4 i32.store - local.get $3 + local.get $5 call $~lib/rt/pure/__release end local.get $0 @@ -6217,32 +6095,13 @@ ) (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $2 - i32.const 255 - i32.and - i64.extend_i32_u - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 384 @@ -6252,7 +6111,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=4 ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) @@ -6733,24 +6592,8 @@ local.get $10 i32.load8_u offset=1 i32.store8 offset=1 - block $~lib/util/hash/HASH|inlined.5 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $13 - i64.extend_i32_u - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -6832,41 +6675,23 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i64) + (local $3 i64) + (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/util/hash/HASH|inlined.4 (result i64) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $3 - i32.const 255 - i32.and - i64.extend_i32_u - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.4 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i32.store8 offset=1 else @@ -6903,8 +6728,8 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $3 - local.get $3 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=24 @@ -6916,11 +6741,11 @@ i32.const 8 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i32.store8 - local.get $5 + local.get $4 local.get $2 i32.store8 offset=1 local.get $0 @@ -6931,7 +6756,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -6940,14 +6765,14 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load i32.store offset=4 local.get $6 - local.get $5 + local.get $4 i32.store - local.get $3 + local.get $5 call $~lib/rt/pure/__release end local.get $0 @@ -6964,29 +6789,11 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $2 - i32.const 255 - i32.and - i64.extend_i32_u - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.6 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -6996,8 +6803,8 @@ drop i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=8 i32.const 1 i32.or @@ -7013,16 +6820,16 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=28 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -7042,7 +6849,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/map/Map#rehash end i32.const 1 @@ -7618,55 +7425,77 @@ i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/hash16 (param $0 i64) (result i64) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) (local $1 i64) + (local $2 i32) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 2 + i32.const 4 + i32.le_u + drop + local.get $0 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + local.set $2 + i64.const 2 + local.set $1 i64.const 0 i64.const 2870177450012600261 i64.add - i64.const 2 - i64.add - local.set $1 local.get $1 - local.get $0 + i64.add + local.set $3 + local.get $3 + local.get $2 + i64.extend_i32_u i64.const -7046029288634856825 i64.mul i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 i64.const 23 i64.rotl i64.const -4417276706812531889 i64.mul i64.const 1609587929392839161 i64.add - local.set $1 - local.get $1 - local.get $1 + local.set $3 + local.get $3 + local.get $3 i64.const 33 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 i64.const -4417276706812531889 i64.mul - local.set $1 - local.get $1 - local.get $1 + local.set $3 + local.get $3 + local.get $3 i64.const 29 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 i64.const 1609587929392839161 i64.mul - local.set $1 - local.get $1 - local.get $1 + local.set $3 + local.get $3 + local.get $3 i64.const 32 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 + return ) (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) @@ -7724,35 +7553,10 @@ i32.const 0 ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i64.extend_i32_s - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -7832,28 +7636,8 @@ local.get $10 i32.load offset=4 i32.store offset=4 - block $~lib/util/hash/HASH|inlined.2 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $13 - i64.extend_i32_s - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -7935,47 +7719,23 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i64) + (local $3 i64) + (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/util/hash/HASH|inlined.1 (result i64) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop + local.get $1 + call $~lib/util/hash/HASH + local.set $3 + local.get $0 + local.get $1 + local.get $3 + call $~lib/map/Map#find + local.set $4 + local.get $4 + if i32.const 0 drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $3 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i64.extend_i32_s - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $4 - local.get $0 - local.get $1 - local.get $4 - call $~lib/map/Map#find - local.set $5 - local.get $5 - if - i32.const 0 - drop - local.get $5 + local.get $4 local.get $2 i32.store offset=4 else @@ -8012,8 +7772,8 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $3 - local.get $3 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=24 @@ -8025,11 +7785,11 @@ i32.const 12 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i32.store16 - local.get $5 + local.get $4 local.get $2 i32.store offset=4 local.get $0 @@ -8040,7 +7800,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -8049,14 +7809,14 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load i32.store offset=8 local.get $6 - local.get $5 + local.get $4 i32.store - local.get $3 + local.get $5 call $~lib/rt/pure/__release end local.get $0 @@ -8064,38 +7824,13 @@ ) (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i64.extend_i32_s - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 384 @@ -8105,7 +7840,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=4 ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) @@ -8588,28 +8323,8 @@ local.get $10 i32.load16_s offset=2 i32.store16 offset=2 - block $~lib/util/hash/HASH|inlined.5 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $13 - i64.extend_i32_s - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -8691,47 +8406,23 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i64) + (local $3 i64) + (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/util/hash/HASH|inlined.4 (result i64) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $3 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i64.extend_i32_s - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.4 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i32.store16 offset=2 else @@ -8768,8 +8459,8 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $3 - local.get $3 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=24 @@ -8781,11 +8472,11 @@ i32.const 8 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i32.store16 - local.get $5 + local.get $4 local.get $2 i32.store16 offset=2 local.get $0 @@ -8796,7 +8487,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -8805,14 +8496,14 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load i32.store offset=4 local.get $6 - local.get $5 + local.get $4 i32.store - local.get $3 + local.get $5 call $~lib/rt/pure/__release end local.get $0 @@ -8829,35 +8520,11 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i64.extend_i32_s - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.6 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -8867,8 +8534,8 @@ drop i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=8 i32.const 1 i32.or @@ -8884,16 +8551,16 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=28 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -8913,7 +8580,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/map/Map#rehash end i32.const 1 @@ -9511,6 +9178,76 @@ i32.store offset=28 local.get $0 ) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) + (local $2 i32) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 2 + i32.const 4 + i32.le_u + drop + local.get $0 + i32.const 65535 + i32.and + local.set $2 + i64.const 2 + local.set $1 + i64.const 0 + i64.const 2870177450012600261 + i64.add + local.get $1 + i64.add + local.set $3 + local.get $3 + local.get $2 + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $3 + local.get $3 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $3 + local.get $3 + local.get $3 + i64.const 33 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const -4417276706812531889 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 29 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const 1609587929392839161 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 32 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + return + ) (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) @@ -9565,33 +9302,10 @@ i32.const 0 ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $2 - i32.const 65535 - i32.and - i64.extend_i32_u - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -9671,28 +9385,8 @@ local.get $10 i32.load offset=4 i32.store offset=4 - block $~lib/util/hash/HASH|inlined.2 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $13 - i64.extend_i32_u - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -9774,45 +9468,23 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i64) + (local $3 i64) + (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/util/hash/HASH|inlined.1 (result i64) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $3 - i32.const 65535 - i32.and - i64.extend_i32_u - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i32.store offset=4 else @@ -9849,8 +9521,8 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $3 - local.get $3 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=24 @@ -9862,11 +9534,11 @@ i32.const 12 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i32.store16 - local.get $5 + local.get $4 local.get $2 i32.store offset=4 local.get $0 @@ -9877,7 +9549,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -9886,14 +9558,14 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load i32.store offset=8 local.get $6 - local.get $5 + local.get $4 i32.store - local.get $3 + local.get $5 call $~lib/rt/pure/__release end local.get $0 @@ -9901,36 +9573,13 @@ ) (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $2 - i32.const 65535 - i32.and - i64.extend_i32_u - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 384 @@ -9940,7 +9589,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=4 ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) @@ -10421,28 +10070,8 @@ local.get $10 i32.load16_u offset=2 i32.store16 offset=2 - block $~lib/util/hash/HASH|inlined.5 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $13 - i64.extend_i32_u - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -10524,45 +10153,23 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i64) + (local $3 i64) + (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/util/hash/HASH|inlined.4 (result i64) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $3 - i32.const 65535 - i32.and - i64.extend_i32_u - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.4 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i32.store16 offset=2 else @@ -10599,8 +10206,8 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $3 - local.get $3 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=24 @@ -10612,11 +10219,11 @@ i32.const 8 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i32.store16 - local.get $5 + local.get $4 local.get $2 i32.store16 offset=2 local.get $0 @@ -10627,7 +10234,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -10636,14 +10243,14 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load i32.store offset=4 local.get $6 - local.get $5 + local.get $4 i32.store - local.get $3 + local.get $5 call $~lib/rt/pure/__release end local.get $0 @@ -10660,33 +10267,11 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $2 - i32.const 65535 - i32.and - i64.extend_i32_u - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.6 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -10696,8 +10281,8 @@ drop i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=8 i32.const 1 i32.or @@ -10713,16 +10298,16 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=28 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -10742,7 +10327,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/map/Map#rehash end i32.const 1 @@ -11279,73 +10864,23 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.2 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i64.extend_i32_s - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne ) (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i64.extend_i32_s - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 384 @@ -11355,7 +10890,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=4 ) (func $~lib/map/Map#keys (param $0 i32) (result i32) @@ -11499,35 +11034,11 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.4 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i64.extend_i32_s - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.4 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -11537,8 +11048,8 @@ drop i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=8 i32.const 1 i32.or @@ -11554,16 +11065,16 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=28 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -11583,7 +11094,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/map/Map#rehash end i32.const 1 @@ -12135,6 +11646,74 @@ i32.store offset=28 local.get $0 ) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) + (local $2 i32) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 4 + i32.le_u + drop + local.get $0 + local.set $2 + i64.const 4 + local.set $1 + i64.const 0 + i64.const 2870177450012600261 + i64.add + local.get $1 + i64.add + local.set $3 + local.get $3 + local.get $2 + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $3 + local.get $3 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $3 + local.get $3 + local.get $3 + i64.const 33 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const -4417276706812531889 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 29 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const 1609587929392839161 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 32 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + return + ) (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) @@ -12187,35 +11766,10 @@ i32.const 0 ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i64.extend_i32_u - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -12295,32 +11849,8 @@ local.get $10 i32.load offset=4 i32.store offset=4 - block $~lib/util/hash/HASH|inlined.2 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $13 - i64.extend_i32_u - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -12402,47 +11932,23 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i64) + (local $3 i64) + (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/util/hash/HASH|inlined.1 (result i64) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $3 - i64.extend_i32_u - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i32.store offset=4 else @@ -12479,8 +11985,8 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $3 - local.get $3 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=24 @@ -12492,11 +11998,11 @@ i32.const 12 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i32.store - local.get $5 + local.get $4 local.get $2 i32.store offset=4 local.get $0 @@ -12507,7 +12013,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -12516,14 +12022,14 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load i32.store offset=8 local.get $6 - local.get $5 + local.get $4 i32.store - local.get $3 + local.get $5 call $~lib/rt/pure/__release end local.get $0 @@ -12531,38 +12037,13 @@ ) (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i64.extend_i32_u - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 384 @@ -12572,7 +12053,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=4 ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) @@ -13051,32 +12532,8 @@ local.get $10 i32.load offset=4 i32.store offset=4 - block $~lib/util/hash/HASH|inlined.5 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $13 - i64.extend_i32_u - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -13158,47 +12615,23 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i64) + (local $3 i64) + (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/util/hash/HASH|inlined.4 (result i64) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop + local.get $1 + call $~lib/util/hash/HASH + local.set $3 + local.get $0 + local.get $1 + local.get $3 + call $~lib/map/Map#find + local.set $4 + local.get $4 + if i32.const 0 drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $3 - i64.extend_i32_u - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.4 - end - local.set $4 - local.get $0 - local.get $1 - local.get $4 - call $~lib/map/Map#find - local.set $5 - local.get $5 - if - i32.const 0 - drop - local.get $5 + local.get $4 local.get $2 i32.store offset=4 else @@ -13235,8 +12668,8 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $3 - local.get $3 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=24 @@ -13248,11 +12681,11 @@ i32.const 12 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i32.store - local.get $5 + local.get $4 local.get $2 i32.store offset=4 local.get $0 @@ -13263,7 +12696,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -13272,14 +12705,14 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load i32.store offset=8 local.get $6 - local.get $5 + local.get $4 i32.store - local.get $3 + local.get $5 call $~lib/rt/pure/__release end local.get $0 @@ -13296,35 +12729,11 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i64.extend_i32_u - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.6 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -13334,8 +12743,8 @@ drop i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=8 i32.const 1 i32.or @@ -13351,16 +12760,16 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=28 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -13380,7 +12789,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/map/Map#rehash end i32.const 1 @@ -13932,16 +13341,33 @@ i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/hash64 (param $0 i64) (result i64) + (func $~lib/util/hash/HASH (param $0 i64) (result i64) (local $1 i64) + (local $2 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 8 + i32.const 4 + i32.le_u + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $0 + local.set $1 i64.const 0 i64.const 2870177450012600261 i64.add i64.const 8 i64.add - local.set $1 + local.set $2 + local.get $2 local.get $1 - local.get $0 i64.const -4417276706812531889 i64.mul i64.const 31 @@ -13949,42 +13375,43 @@ i64.const -7046029288634856825 i64.mul i64.xor - local.set $1 - local.get $1 + local.set $2 + local.get $2 i64.const 27 i64.rotl i64.const -7046029288634856825 i64.mul i64.const -8796714831421723037 i64.add - local.set $1 - local.get $1 - local.get $1 + local.set $2 + local.get $2 + local.get $2 i64.const 33 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $2 + local.get $2 i64.const -4417276706812531889 i64.mul - local.set $1 - local.get $1 - local.get $1 + local.set $2 + local.get $2 + local.get $2 i64.const 29 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $2 + local.get $2 i64.const 1609587929392839161 i64.mul - local.set $1 - local.get $1 - local.get $1 + local.set $2 + local.get $2 + local.get $2 i64.const 32 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $2 + local.get $2 + return ) (func $~lib/map/Map#find (param $0 i32) (param $1 i64) (param $2 i64) (result i32) (local $3 i32) @@ -14038,38 +13465,10 @@ i32.const 0 ) (func $~lib/map/Map#has (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -14086,9 +13485,8 @@ (local $10 i32) (local $11 i32) (local $12 i64) - (local $13 i64) + (local $13 i32) (local $14 i32) - (local $15 i32) local.get $1 i32.const 1 i32.add @@ -14150,51 +13548,24 @@ local.get $10 i32.load offset=8 i32.store offset=8 - block $~lib/util/hash/HASH|inlined.2 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and i32.wrap_i64 - local.set $14 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load i32.store offset=12 - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -14212,29 +13583,29 @@ local.get $0 local.tee $11 local.get $3 - local.tee $14 + local.tee $13 local.get $11 i32.load local.tee $9 i32.ne if - local.get $14 + local.get $13 call $~lib/rt/pure/__retain - local.set $14 + local.set $13 local.get $9 call $~lib/rt/pure/__release end - local.get $14 + local.get $13 i32.store local.get $0 local.get $1 i64.extend_i32_u i64.store offset=8 local.get $0 - local.tee $15 + local.tee $14 local.get $5 local.tee $9 - local.get $15 + local.get $14 i32.load offset=16 local.tee $11 i32.ne @@ -14261,50 +13632,22 @@ ) (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i64) - (local $4 i64) + (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/util/hash/HASH|inlined.1 (result i64) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i32.store offset=8 else @@ -14341,24 +13684,24 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $6 - local.get $6 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=24 - local.tee $7 + local.tee $6 i32.const 1 i32.add i32.store offset=24 - local.get $7 + local.get $6 i32.const 16 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i64.store - local.get $5 + local.get $4 local.get $2 i32.store offset=8 local.get $0 @@ -14369,7 +13712,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -14377,57 +13720,29 @@ i32.const 4 i32.mul i32.add - local.set $7 - local.get $5 - local.get $7 + local.set $6 + local.get $4 + local.get $6 i32.load i32.store offset=12 - local.get $7 - local.get $5 - i32.store local.get $6 + local.get $4 + i32.store + local.get $5 call $~lib/rt/pure/__release end local.get $0 call $~lib/rt/pure/__retain ) (func $~lib/map/Map#get (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) - (local $3 i32) + (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 384 @@ -14437,7 +13752,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=8 ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) @@ -14853,9 +14168,8 @@ (local $10 i32) (local $11 i32) (local $12 i64) - (local $13 i64) + (local $13 i32) (local $14 i32) - (local $15 i32) local.get $1 i32.const 1 i32.add @@ -14917,51 +14231,24 @@ local.get $10 i64.load offset=8 i64.store offset=8 - block $~lib/util/hash/HASH|inlined.5 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and i32.wrap_i64 - local.set $14 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load i32.store offset=16 - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -14979,29 +14266,29 @@ local.get $0 local.tee $11 local.get $3 - local.tee $14 + local.tee $13 local.get $11 i32.load local.tee $9 i32.ne if - local.get $14 + local.get $13 call $~lib/rt/pure/__retain - local.set $14 + local.set $13 local.get $9 call $~lib/rt/pure/__release end - local.get $14 + local.get $13 i32.store local.get $0 local.get $1 i64.extend_i32_u i64.store offset=8 local.get $0 - local.tee $15 + local.tee $14 local.get $5 local.tee $9 - local.get $15 + local.get $14 i32.load offset=16 local.tee $11 i32.ne @@ -15028,50 +14315,22 @@ ) (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i64) (result i32) (local $3 i64) - (local $4 i64) + (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/util/hash/HASH|inlined.4 (result i64) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.4 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i64.store offset=8 else @@ -15108,24 +14367,24 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $6 - local.get $6 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=24 - local.tee $7 + local.tee $6 i32.const 1 i32.add i32.store offset=24 - local.get $7 + local.get $6 i32.const 24 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i64.store - local.get $5 + local.get $4 local.get $2 i64.store offset=8 local.get $0 @@ -15136,7 +14395,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -15144,15 +14403,15 @@ i32.const 4 i32.mul i32.add - local.set $7 - local.get $5 - local.get $7 + local.set $6 + local.get $4 + local.get $6 i32.load i32.store offset=16 - local.get $7 - local.get $5 - i32.store local.get $6 + local.get $4 + i32.store + local.get $5 call $~lib/rt/pure/__release end local.get $0 @@ -15163,45 +14422,17 @@ i32.load offset=28 ) (func $~lib/map/Map#delete (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.6 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -15211,8 +14442,8 @@ drop i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=12 i32.const 1 i32.or @@ -15228,17 +14459,17 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $5 + local.tee $4 local.get $0 i32.load offset=28 - local.tee $6 + local.tee $5 + local.get $4 local.get $5 - local.get $6 i32.gt_u select i32.ge_u @@ -15257,7 +14488,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/map/Map#rehash end i32.const 1 @@ -15817,90 +15048,134 @@ i32.store offset=28 local.get $0 ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i64) (param $2 i64) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.get $2 - local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - i32.load - local.set $3 - loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 - if - local.get $3 - i32.load offset=12 - local.set $5 - local.get $5 - i32.const 1 - i32.and - i32.eqz - if (result i32) - local.get $3 - i64.load - local.get $1 - i64.eq - else - i32.const 0 - end - if - local.get $3 - return - end - local.get $5 - i32.const 1 - i32.const -1 - i32.xor - i32.and - local.set $3 - br $while-continue|0 - end - end - i32.const 0 - ) - (func $~lib/map/Map#has (param $0 i32) (param $1 i64) (result i32) + (func $~lib/util/hash/HASH (param $0 i64) (result i64) + (local $1 i64) (local $2 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 8 + i32.const 4 + i32.le_u + drop + i32.const 8 + i32.const 8 + i32.eq + drop local.get $0 - local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.0 + local.set $1 + i64.const 0 + i64.const 2870177450012600261 + i64.add + i64.const 8 + i64.add + local.set $2 + local.get $2 + local.get $1 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $2 + local.get $2 + i64.const 27 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $2 + local.get $2 + local.get $2 + i64.const 33 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + i64.const -4417276706812531889 + i64.mul + local.set $2 + local.get $2 + local.get $2 + i64.const 29 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + i64.const 1609587929392839161 + i64.mul + local.set $2 + local.get $2 + local.get $2 + i64.const 32 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + return + ) + (func $~lib/map/Map#find (param $0 i32) (param $1 i64) (param $2 i64) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load + local.get $2 + local.get $0 + i64.load offset=8 + i64.and + i32.wrap_i64 + i32.const 4 + i32.mul + i32.add + i32.load + local.set $3 + loop $while-continue|0 + local.get $3 + local.set $4 + local.get $4 + if + local.get $3 + i32.load offset=12 + local.set $5 + local.get $5 + i32.const 1 + i32.and + i32.eqz + if (result i32) + local.get $3 + i64.load + local.get $1 + i64.eq + else + i32.const 0 + end + if + local.get $3 + return + end + local.get $5 + i32.const 1 + i32.const -1 + i32.xor + i32.and + local.set $3 + br $while-continue|0 + end end + i32.const 0 + ) + (func $~lib/map/Map#has (param $0 i32) (param $1 i64) (result i32) + local.get $0 + local.get $1 + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -15917,9 +15192,8 @@ (local $10 i32) (local $11 i32) (local $12 i64) - (local $13 i64) + (local $13 i32) (local $14 i32) - (local $15 i32) local.get $1 i32.const 1 i32.add @@ -15981,51 +15255,24 @@ local.get $10 i32.load offset=8 i32.store offset=8 - block $~lib/util/hash/HASH|inlined.2 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and i32.wrap_i64 - local.set $14 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load i32.store offset=12 - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -16043,29 +15290,29 @@ local.get $0 local.tee $11 local.get $3 - local.tee $14 + local.tee $13 local.get $11 i32.load local.tee $9 i32.ne if - local.get $14 + local.get $13 call $~lib/rt/pure/__retain - local.set $14 + local.set $13 local.get $9 call $~lib/rt/pure/__release end - local.get $14 + local.get $13 i32.store local.get $0 local.get $1 i64.extend_i32_u i64.store offset=8 local.get $0 - local.tee $15 + local.tee $14 local.get $5 local.tee $9 - local.get $15 + local.get $14 i32.load offset=16 local.tee $11 i32.ne @@ -16092,50 +15339,22 @@ ) (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i64) - (local $4 i64) + (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/util/hash/HASH|inlined.1 (result i64) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i32.store offset=8 else @@ -16172,24 +15391,24 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $6 - local.get $6 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=24 - local.tee $7 + local.tee $6 i32.const 1 i32.add i32.store offset=24 - local.get $7 + local.get $6 i32.const 16 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i64.store - local.get $5 + local.get $4 local.get $2 i32.store offset=8 local.get $0 @@ -16200,7 +15419,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -16208,57 +15427,29 @@ i32.const 4 i32.mul i32.add - local.set $7 - local.get $5 - local.get $7 + local.set $6 + local.get $4 + local.get $6 i32.load i32.store offset=12 - local.get $7 - local.get $5 - i32.store local.get $6 + local.get $4 + i32.store + local.get $5 call $~lib/rt/pure/__release end local.get $0 call $~lib/rt/pure/__retain ) (func $~lib/map/Map#get (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) - (local $3 i32) + (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 384 @@ -16268,7 +15459,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=8 ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) @@ -16684,9 +15875,8 @@ (local $10 i32) (local $11 i32) (local $12 i64) - (local $13 i64) + (local $13 i32) (local $14 i32) - (local $15 i32) local.get $1 i32.const 1 i32.add @@ -16748,51 +15938,24 @@ local.get $10 i64.load offset=8 i64.store offset=8 - block $~lib/util/hash/HASH|inlined.5 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and i32.wrap_i64 - local.set $14 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load i32.store offset=16 - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -16810,29 +15973,29 @@ local.get $0 local.tee $11 local.get $3 - local.tee $14 + local.tee $13 local.get $11 i32.load local.tee $9 i32.ne if - local.get $14 + local.get $13 call $~lib/rt/pure/__retain - local.set $14 + local.set $13 local.get $9 call $~lib/rt/pure/__release end - local.get $14 + local.get $13 i32.store local.get $0 local.get $1 i64.extend_i32_u i64.store offset=8 local.get $0 - local.tee $15 + local.tee $14 local.get $5 local.tee $9 - local.get $15 + local.get $14 i32.load offset=16 local.tee $11 i32.ne @@ -16849,60 +16012,32 @@ local.get $4 i32.store offset=20 local.get $0 - local.get $0 - i32.load offset=28 - i32.store offset=24 - local.get $3 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - ) - (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i64) (result i32) - (local $3 i64) - (local $4 i64) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/hash/HASH|inlined.4 (result i64) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.4 - end - local.set $4 - local.get $0 + local.get $0 + i32.load offset=28 + i32.store offset=24 + local.get $3 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + ) + (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i64) (result i32) + (local $3 i64) + (local $4 i32) + (local $5 i32) + (local $6 i32) local.get $1 - local.get $4 + call $~lib/util/hash/HASH + local.set $3 + local.get $0 + local.get $1 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i64.store offset=8 else @@ -16939,24 +16074,24 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $6 - local.get $6 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=24 - local.tee $7 + local.tee $6 i32.const 1 i32.add i32.store offset=24 - local.get $7 + local.get $6 i32.const 24 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i64.store - local.get $5 + local.get $4 local.get $2 i64.store offset=8 local.get $0 @@ -16967,7 +16102,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -16975,15 +16110,15 @@ i32.const 4 i32.mul i32.add - local.set $7 - local.get $5 - local.get $7 + local.set $6 + local.get $4 + local.get $6 i32.load i32.store offset=16 - local.get $7 - local.get $5 - i32.store local.get $6 + local.get $4 + i32.store + local.get $5 call $~lib/rt/pure/__release end local.get $0 @@ -16994,45 +16129,17 @@ i32.load offset=28 ) (func $~lib/map/Map#delete (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.6 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -17042,8 +16149,8 @@ drop i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=12 i32.const 1 i32.or @@ -17059,17 +16166,17 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $5 + local.tee $4 local.get $0 i32.load offset=28 - local.tee $6 + local.tee $5 + local.get $4 local.get $5 - local.get $6 i32.gt_u select i32.ge_u @@ -17088,7 +16195,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/map/Map#rehash end i32.const 1 @@ -17648,6 +16755,75 @@ i32.store offset=28 local.get $0 ) + (func $~lib/util/hash/HASH (param $0 f32) (result i64) + (local $1 i32) + (local $2 i64) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $0 + i32.reinterpret_f32 + local.set $1 + i64.const 4 + local.set $2 + i64.const 0 + i64.const 2870177450012600261 + i64.add + local.get $2 + i64.add + local.set $3 + local.get $3 + local.get $1 + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $3 + local.get $3 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $3 + local.get $3 + local.get $3 + i64.const 33 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const -4417276706812531889 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 29 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const 1609587929392839161 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 32 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + return + ) (func $~lib/map/Map#find (param $0 i32) (param $1 f32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) @@ -17700,28 +16876,10 @@ i32.const 0 ) (func $~lib/map/Map#has (param $0 i32) (param $1 f32) (result i32) - (local $2 f32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - i64.extend_i32_u - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -17738,9 +16896,8 @@ (local $10 i32) (local $11 i32) (local $12 f32) - (local $13 f32) + (local $13 i32) (local $14 i32) - (local $15 i32) local.get $1 i32.const 1 i32.add @@ -17802,41 +16959,24 @@ local.get $10 i32.load offset=4 i32.store offset=4 - block $~lib/util/hash/HASH|inlined.2 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $13 - i32.reinterpret_f32 - i64.extend_i32_u - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and i32.wrap_i64 - local.set $14 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load i32.store offset=8 - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -17854,29 +16994,29 @@ local.get $0 local.tee $11 local.get $3 - local.tee $14 + local.tee $13 local.get $11 i32.load local.tee $9 i32.ne if - local.get $14 + local.get $13 call $~lib/rt/pure/__retain - local.set $14 + local.set $13 local.get $9 call $~lib/rt/pure/__release end - local.get $14 + local.get $13 i32.store local.get $0 local.get $1 i64.extend_i32_u i64.store offset=8 local.get $0 - local.tee $15 + local.tee $14 local.get $5 local.tee $9 - local.get $15 + local.get $14 i32.load offset=16 local.tee $11 i32.ne @@ -17902,41 +17042,23 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 f32) (param $2 i32) (result i32) - (local $3 f32) - (local $4 i64) + (local $3 i64) + (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/util/hash/HASH|inlined.1 (result i64) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $3 - i32.reinterpret_f32 - i64.extend_i32_u - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i32.store offset=4 else @@ -17973,24 +17095,24 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $6 - local.get $6 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=24 - local.tee $7 + local.tee $6 i32.const 1 i32.add i32.store offset=24 - local.get $7 + local.get $6 i32.const 12 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 f32.store - local.get $5 + local.get $4 local.get $2 i32.store offset=4 local.get $0 @@ -18001,7 +17123,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -18009,47 +17131,29 @@ i32.const 4 i32.mul i32.add - local.set $7 - local.get $5 - local.get $7 + local.set $6 + local.get $4 + local.get $6 i32.load i32.store offset=8 - local.get $7 - local.get $5 - i32.store local.get $6 + local.get $4 + i32.store + local.get $5 call $~lib/rt/pure/__release end local.get $0 call $~lib/rt/pure/__retain ) (func $~lib/map/Map#get (param $0 i32) (param $1 f32) (result i32) - (local $2 f32) - (local $3 i32) + (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - i64.extend_i32_u - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 384 @@ -18059,7 +17163,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=4 ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) @@ -18475,9 +17579,8 @@ (local $10 i32) (local $11 i32) (local $12 f32) - (local $13 f32) + (local $13 i32) (local $14 i32) - (local $15 i32) local.get $1 i32.const 1 i32.add @@ -18539,41 +17642,24 @@ local.get $10 f32.load offset=4 f32.store offset=4 - block $~lib/util/hash/HASH|inlined.5 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $13 - i32.reinterpret_f32 - i64.extend_i32_u - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and i32.wrap_i64 - local.set $14 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load i32.store offset=8 - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -18591,29 +17677,29 @@ local.get $0 local.tee $11 local.get $3 - local.tee $14 + local.tee $13 local.get $11 i32.load local.tee $9 i32.ne if - local.get $14 + local.get $13 call $~lib/rt/pure/__retain - local.set $14 + local.set $13 local.get $9 call $~lib/rt/pure/__release end - local.get $14 + local.get $13 i32.store local.get $0 local.get $1 i64.extend_i32_u i64.store offset=8 local.get $0 - local.tee $15 + local.tee $14 local.get $5 local.tee $9 - local.get $15 + local.get $14 i32.load offset=16 local.tee $11 i32.ne @@ -18639,41 +17725,23 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 f32) (param $2 f32) (result i32) - (local $3 f32) - (local $4 i64) + (local $3 i64) + (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/util/hash/HASH|inlined.4 (result i64) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $3 - i32.reinterpret_f32 - i64.extend_i32_u - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.4 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 f32.store offset=4 else @@ -18710,24 +17778,24 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $6 - local.get $6 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=24 - local.tee $7 + local.tee $6 i32.const 1 i32.add i32.store offset=24 - local.get $7 + local.get $6 i32.const 12 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 f32.store - local.get $5 + local.get $4 local.get $2 f32.store offset=4 local.get $0 @@ -18738,7 +17806,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -18746,15 +17814,15 @@ i32.const 4 i32.mul i32.add - local.set $7 - local.get $5 - local.get $7 + local.set $6 + local.get $4 + local.get $6 i32.load i32.store offset=8 - local.get $7 - local.get $5 - i32.store local.get $6 + local.get $4 + i32.store + local.get $5 call $~lib/rt/pure/__release end local.get $0 @@ -18765,35 +17833,17 @@ i32.load offset=28 ) (func $~lib/map/Map#delete (param $0 i32) (param $1 f32) (result i32) - (local $2 f32) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - i64.extend_i32_u - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.6 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -18803,8 +17853,8 @@ drop i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=8 i32.const 1 i32.or @@ -18820,17 +17870,17 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $5 + local.tee $4 local.get $0 i32.load offset=28 - local.tee $6 + local.tee $5 + local.get $4 local.get $5 - local.get $6 i32.gt_u select i32.ge_u @@ -18849,7 +17899,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/map/Map#rehash end i32.const 1 @@ -19409,6 +18459,79 @@ i32.store offset=28 local.get $0 ) + (func $~lib/util/hash/HASH (param $0 f64) (result i64) + (local $1 i64) + (local $2 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $0 + i64.reinterpret_f64 + local.set $1 + i64.const 0 + i64.const 2870177450012600261 + i64.add + i64.const 8 + i64.add + local.set $2 + local.get $2 + local.get $1 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $2 + local.get $2 + i64.const 27 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $2 + local.get $2 + local.get $2 + i64.const 33 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + i64.const -4417276706812531889 + i64.mul + local.set $2 + local.get $2 + local.get $2 + i64.const 29 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + i64.const 1609587929392839161 + i64.mul + local.set $2 + local.get $2 + local.get $2 + i64.const 32 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + return + ) (func $~lib/map/Map#find (param $0 i32) (param $1 f64) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) @@ -19445,47 +18568,26 @@ else i32.const 0 end - if - local.get $3 - return - end - local.get $5 - i32.const 1 - i32.const -1 - i32.xor - i32.and - local.set $3 - br $while-continue|0 - end - end - i32.const 0 - ) - (func $~lib/map/Map#has (param $0 i32) (param $1 f64) (result i32) - (local $2 f64) - local.get $0 - local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.0 + if + local.get $3 + return + end + local.get $5 + i32.const 1 + i32.const -1 + i32.xor + i32.and + local.set $3 + br $while-continue|0 + end end + i32.const 0 + ) + (func $~lib/map/Map#has (param $0 i32) (param $1 f64) (result i32) + local.get $0 + local.get $1 + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -19502,9 +18604,8 @@ (local $10 i32) (local $11 i32) (local $12 f64) - (local $13 f64) + (local $13 i32) (local $14 i32) - (local $15 i32) local.get $1 i32.const 1 i32.add @@ -19566,44 +18667,24 @@ local.get $10 i32.load offset=8 i32.store offset=8 - block $~lib/util/hash/HASH|inlined.2 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $13 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and i32.wrap_i64 - local.set $14 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load i32.store offset=12 - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -19621,29 +18702,29 @@ local.get $0 local.tee $11 local.get $3 - local.tee $14 + local.tee $13 local.get $11 i32.load local.tee $9 i32.ne if - local.get $14 + local.get $13 call $~lib/rt/pure/__retain - local.set $14 + local.set $13 local.get $9 call $~lib/rt/pure/__release end - local.get $14 + local.get $13 i32.store local.get $0 local.get $1 i64.extend_i32_u i64.store offset=8 local.get $0 - local.tee $15 + local.tee $14 local.get $5 local.tee $9 - local.get $15 + local.get $14 i32.load offset=16 local.tee $11 i32.ne @@ -19669,44 +18750,23 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 f64) (param $2 i32) (result i32) - (local $3 f64) - (local $4 i64) + (local $3 i64) + (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/util/hash/HASH|inlined.1 (result i64) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i32.store offset=8 else @@ -19743,24 +18803,24 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $6 - local.get $6 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=24 - local.tee $7 + local.tee $6 i32.const 1 i32.add i32.store offset=24 - local.get $7 + local.get $6 i32.const 16 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 f64.store - local.get $5 + local.get $4 local.get $2 i32.store offset=8 local.get $0 @@ -19771,7 +18831,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -19779,50 +18839,29 @@ i32.const 4 i32.mul i32.add - local.set $7 - local.get $5 - local.get $7 + local.set $6 + local.get $4 + local.get $6 i32.load i32.store offset=12 - local.get $7 - local.get $5 - i32.store local.get $6 + local.get $4 + i32.store + local.get $5 call $~lib/rt/pure/__release end local.get $0 call $~lib/rt/pure/__retain ) (func $~lib/map/Map#get (param $0 i32) (param $1 f64) (result i32) - (local $2 f64) - (local $3 i32) + (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 384 @@ -19832,7 +18871,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=8 ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) @@ -20248,9 +19287,8 @@ (local $10 i32) (local $11 i32) (local $12 f64) - (local $13 f64) + (local $13 i32) (local $14 i32) - (local $15 i32) local.get $1 i32.const 1 i32.add @@ -20312,44 +19350,24 @@ local.get $10 f64.load offset=8 f64.store offset=8 - block $~lib/util/hash/HASH|inlined.5 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $13 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and i32.wrap_i64 - local.set $14 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load i32.store offset=16 - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -20367,29 +19385,29 @@ local.get $0 local.tee $11 local.get $3 - local.tee $14 + local.tee $13 local.get $11 i32.load local.tee $9 i32.ne if - local.get $14 + local.get $13 call $~lib/rt/pure/__retain - local.set $14 + local.set $13 local.get $9 call $~lib/rt/pure/__release end - local.get $14 + local.get $13 i32.store local.get $0 local.get $1 i64.extend_i32_u i64.store offset=8 local.get $0 - local.tee $15 + local.tee $14 local.get $5 local.tee $9 - local.get $15 + local.get $14 i32.load offset=16 local.tee $11 i32.ne @@ -20415,44 +19433,23 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 f64) (param $2 f64) (result i32) - (local $3 f64) - (local $4 i64) + (local $3 i64) + (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/util/hash/HASH|inlined.4 (result i64) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.4 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 f64.store offset=8 else @@ -20489,24 +19486,24 @@ local.get $0 i32.load offset=16 call $~lib/rt/pure/__retain - local.set $6 - local.get $6 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=24 - local.tee $7 + local.tee $6 i32.const 1 i32.add i32.store offset=24 - local.get $7 + local.get $6 i32.const 24 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 f64.store - local.get $5 + local.get $4 local.get $2 f64.store offset=8 local.get $0 @@ -20517,7 +19514,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -20525,15 +19522,15 @@ i32.const 4 i32.mul i32.add - local.set $7 - local.get $5 - local.get $7 + local.set $6 + local.get $4 + local.get $6 i32.load i32.store offset=16 - local.get $7 - local.get $5 - i32.store local.get $6 + local.get $4 + i32.store + local.get $5 call $~lib/rt/pure/__release end local.get $0 @@ -20544,38 +19541,17 @@ i32.load offset=28 ) (func $~lib/map/Map#delete (param $0 i32) (param $1 f64) (result i32) - (local $2 f64) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.6 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -20585,8 +19561,8 @@ drop i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=12 i32.const 1 i32.or @@ -20602,17 +19578,17 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $5 + local.tee $4 local.get $0 i32.load offset=28 - local.tee $6 + local.tee $5 + local.get $4 local.get $5 - local.get $6 i32.gt_u select i32.ge_u @@ -20631,7 +19607,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/map/Map#rehash end i32.const 1 diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 87384489ac..8f73fa5a09 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -6,7 +6,7 @@ (type $none_=>_i32 (func (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_none (func (param i32))) - (type $i64_=>_i64 (func (param i64) (result i64))) + (type $i32_=>_i64 (func (param i32) (result i64))) (type $i32_i32_i64_=>_i32 (func (param i32 i32 i64) (result i32))) (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) (type $i32_f32_=>_i32 (func (param i32 f32) (result i32))) @@ -21,6 +21,9 @@ (type $i32_f32_i64_=>_i32 (func (param i32 f32 i64) (result i32))) (type $i32_f64_i64_=>_i32 (func (param i32 f64 i64) (result i32))) (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) + (type $i64_=>_i64 (func (param i64) (result i64))) + (type $f32_=>_i64 (func (param f32) (result i64))) + (type $f64_=>_i64 (func (param f64) (result i64))) (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -1316,8 +1319,14 @@ i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/hash8 (param $0 i64) (result i64) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) local.get $0 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i64.extend_i32_u i64.const -7046029288634856825 i64.mul i64.const 2870177450012600262 @@ -1328,22 +1337,22 @@ i64.mul i64.const 1609587929392839161 i64.add - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 i64.const 33 i64.shr_u i64.xor i64.const -4417276706812531889 i64.mul - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 i64.const 29 i64.shr_u i64.xor i64.const 1609587929392839161 i64.mul - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 i64.const 32 i64.shr_u i64.xor @@ -1397,12 +1406,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i64.extend_i32_s - call $~lib/util/hash/hash8 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -1464,8 +1468,7 @@ local.get $2 local.get $5 local.get $4 - i64.extend_i32_s - call $~lib/util/hash/hash8 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -1546,12 +1549,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i64.extend_i32_s - call $~lib/util/hash/hash8 + call $~lib/util/hash/HASH local.tee $3 call $~lib/set/Set#find i32.eqz @@ -2235,12 +2233,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i64.extend_i32_s - call $~lib/util/hash/hash8 + call $~lib/util/hash/HASH call $~lib/set/Set#find local.tee $1 i32.eqz @@ -2673,14 +2666,47 @@ i32.store offset=28 local.get $0 ) - (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) local.get $0 - local.get $1 - local.get $1 i32.const 255 i32.and i64.extend_i32_u - call $~lib/util/hash/hash8 + i64.const -7046029288634856825 + i64.mul + i64.const 2870177450012600262 + i64.xor + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.tee $1 + local.get $1 + i64.const 33 + i64.shr_u + i64.xor + i64.const -4417276706812531889 + i64.mul + local.tee $1 + local.get $1 + i64.const 29 + i64.shr_u + i64.xor + i64.const 1609587929392839161 + i64.mul + local.tee $1 + local.get $1 + i64.const 32 + i64.shr_u + i64.xor + ) + (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -2742,8 +2768,7 @@ local.get $2 local.get $5 local.get $4 - i64.extend_i32_u - call $~lib/util/hash/hash8 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -2824,10 +2849,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 255 - i32.and - i64.extend_i32_u - call $~lib/util/hash/hash8 + call $~lib/util/hash/HASH local.tee $3 call $~lib/set/Set#find i32.eqz @@ -3042,10 +3064,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 255 - i32.and - i64.extend_i32_u - call $~lib/util/hash/hash8 + call $~lib/util/hash/HASH call $~lib/set/Set#find local.tee $1 i32.eqz @@ -3437,8 +3456,14 @@ i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/hash16 (param $0 i64) (result i64) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) local.get $0 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i64.extend_i32_u i64.const -7046029288634856825 i64.mul i64.const 2870177450012600263 @@ -3449,22 +3474,22 @@ i64.mul i64.const 1609587929392839161 i64.add - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 i64.const 33 i64.shr_u i64.xor i64.const -4417276706812531889 i64.mul - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 i64.const 29 i64.shr_u i64.xor i64.const 1609587929392839161 i64.mul - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 i64.const 32 i64.shr_u i64.xor @@ -3518,12 +3543,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i64.extend_i32_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -3585,8 +3605,7 @@ local.get $2 local.get $5 local.get $4 - i64.extend_i32_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -3667,12 +3686,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i64.extend_i32_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH local.tee $3 call $~lib/set/Set#find i32.eqz @@ -3943,12 +3957,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i64.extend_i32_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH call $~lib/set/Set#find local.tee $1 i32.eqz @@ -4348,14 +4357,47 @@ i32.store offset=28 local.get $0 ) - (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) local.get $0 - local.get $1 - local.get $1 i32.const 65535 i32.and i64.extend_i32_u - call $~lib/util/hash/hash16 + i64.const -7046029288634856825 + i64.mul + i64.const 2870177450012600263 + i64.xor + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.tee $1 + local.get $1 + i64.const 33 + i64.shr_u + i64.xor + i64.const -4417276706812531889 + i64.mul + local.tee $1 + local.get $1 + i64.const 29 + i64.shr_u + i64.xor + i64.const 1609587929392839161 + i64.mul + local.tee $1 + local.get $1 + i64.const 32 + i64.shr_u + i64.xor + ) + (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -4417,8 +4459,7 @@ local.get $2 local.get $5 local.get $4 - i64.extend_i32_u - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -4499,10 +4540,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 65535 - i32.and - i64.extend_i32_u - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH local.tee $3 call $~lib/set/Set#find i32.eqz @@ -4723,10 +4761,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 65535 - i32.and - i64.extend_i32_u - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH call $~lib/set/Set#find local.tee $1 i32.eqz @@ -5118,8 +5153,10 @@ i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/hash32 (param $0 i64) (result i64) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) local.get $0 + i64.extend_i32_u i64.const -7046029288634856825 i64.mul i64.const 2870177450012600265 @@ -5130,22 +5167,22 @@ i64.mul i64.const 1609587929392839161 i64.add - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 i64.const 33 i64.shr_u i64.xor i64.const -4417276706812531889 i64.mul - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 i64.const 29 i64.shr_u i64.xor i64.const 1609587929392839161 i64.mul - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 i64.const 32 i64.shr_u i64.xor @@ -5197,8 +5234,7 @@ local.get $0 local.get $1 local.get $1 - i64.extend_i32_s - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -5260,8 +5296,7 @@ local.get $2 local.get $5 local.get $4 - i64.extend_i32_s - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -5342,8 +5377,7 @@ local.get $0 local.get $1 local.get $1 - i64.extend_i32_s - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.tee $3 call $~lib/set/Set#find i32.eqz @@ -5614,8 +5648,7 @@ local.get $0 local.get $1 local.get $1 - i64.extend_i32_s - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/set/Set#find local.tee $1 i32.eqz @@ -5999,17 +6032,8 @@ i32.store offset=28 local.get $0 ) - (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - local.get $1 - i64.extend_i32_u - call $~lib/util/hash/hash32 - call $~lib/set/Set#find - i32.const 0 - i32.ne - ) - (func $~lib/set/Set#rehash (param $0 i32) (param $1 i32) + (func $~lib/set/Set#values (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6017,280 +6041,61 @@ (local $6 i32) (local $7 i32) (local $8 i32) - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 2 - i32.shl - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $3 - i32.const 3 - i32.shl - i32.const 3 - i32.div_s - local.tee $7 - i32.const 3 - i32.shl - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $3 + (local $9 i32) local.get $0 i32.load offset=16 - local.tee $4 + local.set $5 local.get $0 i32.load offset=24 - i32.const 3 + local.tee $8 + local.set $7 + i32.const 16 + i32.const 14 + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain + local.tee $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 + i32.const 0 + i32.store offset=12 + local.get $8 + i32.const 268435455 + i32.gt_u + if + i32.const 1248 + i32.const 1408 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $7 + i32.const 2 i32.shl - i32.add - local.set $8 + local.tee $6 + i32.const 0 + call $~lib/rt/pure/__new + local.tee $3 + local.get $6 + call $~lib/memory/memory.fill local.get $3 local.set $2 - loop $while-continue|0 - local.get $4 - local.get $8 - i32.ne - if - local.get $4 - local.tee $6 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $2 - local.get $6 - i32.load - local.tee $4 - i32.store - local.get $2 - local.get $5 - local.get $4 - i64.extend_i32_u - call $~lib/util/hash/hash32 - local.get $1 - i64.extend_i32_u - i64.and - i32.wrap_i64 - i32.const 2 - i32.shl - i32.add - local.tee $4 - i32.load - i32.store offset=4 - local.get $4 - local.get $2 - i32.store - local.get $2 - i32.const 8 - i32.add - local.set $2 - end - local.get $6 - i32.const 8 - i32.add - local.set $4 - br $while-continue|0 - end - end - local.get $5 - local.tee $2 - local.get $0 - i32.load - local.tee $4 - i32.ne - if - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 - local.get $4 - call $~lib/rt/pure/__release - end - local.get $0 - local.get $2 - i32.store - local.get $0 - local.get $1 - i64.extend_i32_u - i64.store offset=8 - local.get $3 - local.tee $1 - local.get $0 - i32.load offset=16 - local.tee $2 - i32.ne - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $2 - call $~lib/rt/pure/__release - end - local.get $0 - local.get $1 - i32.store offset=16 - local.get $0 - local.get $7 - i32.store offset=20 - local.get $0 - local.get $0 - i32.load offset=28 - i32.store offset=24 - local.get $5 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - ) - (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i64) - (local $4 i32) - local.get $0 - local.get $1 - local.get $1 - i64.extend_i32_u - call $~lib/util/hash/hash32 - local.tee $3 - call $~lib/set/Set#find - i32.eqz - if - local.get $0 - i32.load offset=24 - local.get $0 - i32.load offset=20 - i32.eq - if - local.get $0 - local.get $0 - i32.load offset=28 - local.get $0 - i32.load offset=20 - i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s - if (result i64) - local.get $0 - i64.load offset=8 - else - local.get $0 - i64.load offset=8 - i64.const 1 - i64.shl - i64.const 1 - i64.or - end - i32.wrap_i64 - call $~lib/set/Set#rehash - end - local.get $0 - i32.load offset=16 - local.get $0 - local.get $0 - i32.load offset=24 - local.tee $4 - i32.const 1 - i32.add - i32.store offset=24 - local.get $4 - i32.const 3 - i32.shl - i32.add - local.tee $2 - local.get $1 - i32.store - local.get $0 - local.get $0 - i32.load offset=28 - i32.const 1 - i32.add - i32.store offset=28 - local.get $2 - local.get $0 - i32.load - local.get $3 - local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 2 - i32.shl - i32.add - local.tee $1 - i32.load - i32.store offset=4 - local.get $1 - local.get $2 - i32.store - end - local.get $0 - call $~lib/rt/pure/__retain - ) - (func $~lib/set/Set#values (param $0 i32) (result i32) - (local $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=16 - local.set $5 - local.get $0 - i32.load offset=24 - local.tee $8 - local.set $7 - i32.const 16 - i32.const 14 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.tee $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 - i32.const 0 - i32.store offset=12 - local.get $8 - i32.const 268435455 - i32.gt_u - if - i32.const 1248 - i32.const 1408 - i32.const 57 - i32.const 60 - call $~lib/builtins/abort - unreachable - end - local.get $7 - i32.const 2 - i32.shl - local.tee $6 - i32.const 0 - call $~lib/rt/pure/__new - local.tee $3 - local.get $6 - call $~lib/memory/memory.fill - local.get $3 - local.set $2 - local.get $3 - local.get $0 - i32.load - local.tee $4 - i32.ne - if - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 + local.get $3 + local.get $0 + i32.load + local.tee $4 + i32.ne + if + local.get $2 + call $~lib/rt/pure/__retain + local.set $2 local.get $4 call $~lib/rt/pure/__release end @@ -6344,67 +6149,6 @@ call $~lib/array/Array#set:length local.get $0 ) - (func $~lib/set/Set#delete (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - local.get $1 - local.get $1 - i64.extend_i32_u - call $~lib/util/hash/hash32 - call $~lib/set/Set#find - local.tee $1 - i32.eqz - if - return - end - local.get $1 - local.get $1 - i32.load offset=4 - i32.const 1 - i32.or - i32.store offset=4 - local.get $0 - local.get $0 - i32.load offset=28 - i32.const 1 - i32.sub - i32.store offset=28 - local.get $0 - i64.load offset=8 - i64.const 1 - i64.shr_u - i32.wrap_i64 - local.tee $2 - i32.const 1 - i32.add - i32.const 4 - local.get $0 - i32.load offset=28 - local.tee $1 - local.get $1 - i32.const 4 - i32.lt_u - select - i32.ge_u - if (result i32) - local.get $0 - i32.load offset=28 - local.get $0 - i32.load offset=20 - i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s - else - i32.const 0 - end - if - local.get $0 - local.get $2 - call $~lib/set/Set#rehash - end - ) (func $std/set/testNumeric (local $0 i32) (local $1 i32) @@ -6419,7 +6163,7 @@ if local.get $0 local.get $2 - call $~lib/set/Set#has + call $~lib/set/Set#has if i32.const 0 i32.const 1360 @@ -6430,11 +6174,11 @@ end local.get $0 local.get $2 - call $~lib/set/Set#add + call $~lib/set/Set#add call $~lib/rt/pure/__release local.get $0 local.get $2 - call $~lib/set/Set#has + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -6472,7 +6216,7 @@ if local.get $0 local.get $2 - call $~lib/set/Set#has + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -6484,11 +6228,11 @@ end local.get $0 local.get $2 - call $~lib/set/Set#add + call $~lib/set/Set#add call $~lib/rt/pure/__release local.get $0 local.get $2 - call $~lib/set/Set#has + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -6532,7 +6276,7 @@ local.get $2 local.get $1 call $~lib/array/Array#__get - call $~lib/set/Set#has + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -6546,7 +6290,7 @@ local.get $2 local.get $1 call $~lib/array/Array#__get - call $~lib/set/Set#add + call $~lib/set/Set#add call $~lib/rt/pure/__release local.get $1 i32.const 1 @@ -6577,7 +6321,7 @@ if local.get $0 local.get $1 - call $~lib/set/Set#has + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -6589,10 +6333,10 @@ end local.get $0 local.get $1 - call $~lib/set/Set#delete + call $~lib/set/Set#delete local.get $0 local.get $1 - call $~lib/set/Set#has + call $~lib/set/Set#has if i32.const 0 i32.const 1360 @@ -6629,7 +6373,7 @@ if local.get $0 local.get $1 - call $~lib/set/Set#has + call $~lib/set/Set#has if i32.const 0 i32.const 1360 @@ -6640,11 +6384,11 @@ end local.get $0 local.get $1 - call $~lib/set/Set#add + call $~lib/set/Set#add call $~lib/rt/pure/__release local.get $0 local.get $1 - call $~lib/set/Set#has + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -6656,10 +6400,10 @@ end local.get $0 local.get $1 - call $~lib/set/Set#delete + call $~lib/set/Set#delete local.get $0 local.get $1 - call $~lib/set/Set#has + call $~lib/set/Set#has if i32.const 0 i32.const 1360 @@ -6734,7 +6478,7 @@ i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/hash64 (param $0 i64) (result i64) + (func $~lib/util/hash/HASH (param $0 i64) (result i64) local.get $0 i64.const -4417276706812531889 i64.mul @@ -6817,7 +6561,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -6880,7 +6624,7 @@ local.get $2 local.get $6 local.get $9 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -6961,7 +6705,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.tee $4 call $~lib/set/Set#find i32.eqz @@ -7233,7 +6977,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH call $~lib/set/Set#find local.tee $2 i32.eqz @@ -8098,6 +7842,41 @@ i32.store offset=28 local.get $0 ) + (func $~lib/util/hash/HASH (param $0 f32) (result i64) + (local $1 i64) + local.get $0 + i32.reinterpret_f32 + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.const 2870177450012600265 + i64.xor + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.tee $1 + local.get $1 + i64.const 33 + i64.shr_u + i64.xor + i64.const -4417276706812531889 + i64.mul + local.tee $1 + local.get $1 + i64.const 29 + i64.shr_u + i64.xor + i64.const 1609587929392839161 + i64.mul + local.tee $1 + local.get $1 + i64.const 32 + i64.shr_u + i64.xor + ) (func $~lib/set/Set#find (param $0 i32) (param $1 f32) (param $2 i64) (result i32) (local $3 i32) local.get $0 @@ -8145,9 +7924,7 @@ local.get $0 local.get $1 local.get $1 - i32.reinterpret_f32 - i64.extend_i32_u - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -8210,9 +7987,7 @@ local.get $2 local.get $6 local.get $9 - i32.reinterpret_f32 - i64.extend_i32_u - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -8293,9 +8068,7 @@ local.get $0 local.get $1 local.get $1 - i32.reinterpret_f32 - i64.extend_i32_u - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.tee $4 call $~lib/set/Set#find i32.eqz @@ -8551,9 +8324,7 @@ local.get $0 local.get $1 local.get $1 - i32.reinterpret_f32 - i64.extend_i32_u - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/set/Set#find local.tee $2 i32.eqz @@ -8938,6 +8709,44 @@ i32.store offset=28 local.get $0 ) + (func $~lib/util/hash/HASH (param $0 f64) (result i64) + (local $1 i64) + local.get $0 + i64.reinterpret_f64 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const 2870177450012600269 + i64.xor + i64.const 27 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.tee $1 + local.get $1 + i64.const 33 + i64.shr_u + i64.xor + i64.const -4417276706812531889 + i64.mul + local.tee $1 + local.get $1 + i64.const 29 + i64.shr_u + i64.xor + i64.const 1609587929392839161 + i64.mul + local.tee $1 + local.get $1 + i64.const 32 + i64.shr_u + i64.xor + ) (func $~lib/set/Set#find (param $0 i32) (param $1 f64) (param $2 i64) (result i32) (local $3 i32) local.get $0 @@ -8985,8 +8794,7 @@ local.get $0 local.get $1 local.get $1 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -9049,8 +8857,7 @@ local.get $2 local.get $6 local.get $9 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -9131,8 +8938,7 @@ local.get $0 local.get $1 local.get $1 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.tee $4 call $~lib/set/Set#find i32.eqz @@ -9388,8 +9194,7 @@ local.get $0 local.get $1 local.get $1 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH call $~lib/set/Set#find local.tee $2 i32.eqz diff --git a/tests/compiler/std/set.untouched.wat b/tests/compiler/std/set.untouched.wat index 10fc4c0012..d6979646f5 100644 --- a/tests/compiler/std/set.untouched.wat +++ b/tests/compiler/std/set.untouched.wat @@ -7,20 +7,23 @@ (type $none_=>_none (func)) (type $i32_i32_i64_=>_i32 (func (param i32 i32 i64) (result i32))) (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) + (type $i32_=>_i64 (func (param i32) (result i64))) (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) - (type $i64_=>_i64 (func (param i64) (result i64))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_f32_=>_i32 (func (param i32 f32) (result i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) (type $i32_i32_f64_=>_none (func (param i32 i32 f64))) (type $i32_i64_i64_=>_i32 (func (param i32 i64 i64) (result i32))) + (type $i64_=>_i64 (func (param i64) (result i64))) (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_f32_i64_=>_i32 (func (param i32 f32 i64) (result i32))) (type $i32_f64_i64_=>_i32 (func (param i32 f64 i64) (result i32))) + (type $f32_=>_i64 (func (param f32) (result i64))) + (type $f64_=>_i64 (func (param f64) (result i64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 12) "<\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00(\00\00\00a\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e\00\00\00\00\00") @@ -1799,55 +1802,77 @@ i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/hash8 (param $0 i64) (result i64) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) (local $1 i64) + (local $2 i32) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + i32.const 4 + i32.le_u + drop + local.get $0 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + local.set $2 + i64.const 1 + local.set $1 i64.const 0 i64.const 2870177450012600261 i64.add - i64.const 1 - i64.add - local.set $1 local.get $1 - local.get $0 + i64.add + local.set $3 + local.get $3 + local.get $2 + i64.extend_i32_u i64.const -7046029288634856825 i64.mul i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 i64.const 23 i64.rotl i64.const -4417276706812531889 i64.mul i64.const 1609587929392839161 i64.add - local.set $1 - local.get $1 - local.get $1 + local.set $3 + local.get $3 + local.get $3 i64.const 33 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 i64.const -4417276706812531889 i64.mul - local.set $1 - local.get $1 - local.get $1 + local.set $3 + local.get $3 + local.get $3 i64.const 29 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 i64.const 1609587929392839161 i64.mul - local.set $1 - local.get $1 - local.get $1 + local.set $3 + local.get $3 + local.get $3 i64.const 32 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 + return ) (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) @@ -1905,31 +1930,10 @@ i32.const 0 ) (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $2 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i64.extend_i32_s - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -1946,8 +1950,8 @@ (local $10 i32) (local $11 i32) (local $12 i32) - (local $13 i32) - (local $14 i64) + (local $13 i64) + (local $14 i32) local.get $1 i32.const 1 i32.add @@ -2005,40 +2009,24 @@ local.get $11 local.get $12 i32.store8 - block $~lib/util/hash/HASH|inlined.2 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $13 - i64.extend_i32_s - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and - local.set $14 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.wrap_i64 i32.const 4 i32.mul i32.add - local.set $13 + local.set $14 local.get $11 - local.get $13 + local.get $14 i32.load i32.store offset=4 - local.get $13 + local.get $14 local.get $8 i32.store local.get $8 @@ -2075,10 +2063,10 @@ i64.extend_i32_u i64.store offset=8 local.get $0 - local.tee $13 + local.tee $14 local.get $5 local.tee $9 - local.get $13 + local.get $14 i32.load offset=16 local.tee $11 i32.ne @@ -2104,38 +2092,18 @@ call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i64) + (local $2 i64) + (local $3 i32) (local $4 i32) - block $~lib/util/hash/HASH|inlined.1 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $2 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i64.extend_i32_s - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 + local.get $1 + call $~lib/util/hash/HASH + local.set $2 local.get $0 local.get $1 - local.get $3 + local.get $2 call $~lib/set/Set#find - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if local.get $0 @@ -2173,16 +2141,16 @@ local.get $0 local.get $0 i32.load offset=24 - local.tee $2 + local.tee $4 i32.const 1 i32.add i32.store offset=24 - local.get $2 + local.get $4 i32.const 8 i32.mul i32.add - local.set $4 - local.get $4 + local.set $3 + local.get $3 local.get $1 i32.store8 local.get $0 @@ -2193,7 +2161,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $3 + local.get $2 local.get $0 i64.load offset=8 i64.and @@ -2201,13 +2169,13 @@ i32.const 4 i32.mul i32.add - local.set $2 + local.set $4 + local.get $3 local.get $4 - local.get $2 i32.load i32.store offset=4 - local.get $2 local.get $4 + local.get $3 i32.store end local.get $0 @@ -4007,31 +3975,11 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $2 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i64.extend_i32_s - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -4039,8 +3987,8 @@ end i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=4 i32.const 1 i32.or @@ -4056,16 +4004,16 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=28 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -4085,7 +4033,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/set/Set#rehash end i32.const 1 @@ -4530,6 +4478,76 @@ i32.store offset=28 local.get $0 ) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) + (local $2 i32) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + i32.const 4 + i32.le_u + drop + local.get $0 + i32.const 255 + i32.and + local.set $2 + i64.const 1 + local.set $1 + i64.const 0 + i64.const 2870177450012600261 + i64.add + local.get $1 + i64.add + local.set $3 + local.get $3 + local.get $2 + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $3 + local.get $3 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $3 + local.get $3 + local.get $3 + i64.const 33 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const -4417276706812531889 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 29 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const 1609587929392839161 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 32 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + return + ) (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) @@ -4584,29 +4602,10 @@ i32.const 0 ) (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $2 - i32.const 255 - i32.and - i64.extend_i32_u - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -4623,8 +4622,8 @@ (local $10 i32) (local $11 i32) (local $12 i32) - (local $13 i32) - (local $14 i64) + (local $13 i64) + (local $14 i32) local.get $1 i32.const 1 i32.add @@ -4682,40 +4681,24 @@ local.get $11 local.get $12 i32.store8 - block $~lib/util/hash/HASH|inlined.2 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $13 - i64.extend_i32_u - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and - local.set $14 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.wrap_i64 i32.const 4 i32.mul i32.add - local.set $13 + local.set $14 local.get $11 - local.get $13 + local.get $14 i32.load i32.store offset=4 - local.get $13 + local.get $14 local.get $8 i32.store local.get $8 @@ -4752,10 +4735,10 @@ i64.extend_i32_u i64.store offset=8 local.get $0 - local.tee $13 + local.tee $14 local.get $5 local.tee $9 - local.get $13 + local.get $14 i32.load offset=16 local.tee $11 i32.ne @@ -4781,36 +4764,18 @@ call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i64) + (local $2 i64) + (local $3 i32) (local $4 i32) - block $~lib/util/hash/HASH|inlined.1 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $2 - i32.const 255 - i32.and - i64.extend_i32_u - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 + local.get $1 + call $~lib/util/hash/HASH + local.set $2 local.get $0 local.get $1 - local.get $3 + local.get $2 call $~lib/set/Set#find - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if local.get $0 @@ -4848,16 +4813,16 @@ local.get $0 local.get $0 i32.load offset=24 - local.tee $2 + local.tee $4 i32.const 1 i32.add i32.store offset=24 - local.get $2 + local.get $4 i32.const 8 i32.mul i32.add - local.set $4 - local.get $4 + local.set $3 + local.get $3 local.get $1 i32.store8 local.get $0 @@ -4868,7 +4833,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $3 + local.get $2 local.get $0 i64.load offset=8 i64.and @@ -4876,13 +4841,13 @@ i32.const 4 i32.mul i32.add - local.set $2 + local.set $4 + local.get $3 local.get $4 - local.get $2 i32.load i32.store offset=4 - local.get $2 local.get $4 + local.get $3 i32.store end local.get $0 @@ -5140,29 +5105,11 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $2 - i32.const 255 - i32.and - i64.extend_i32_u - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -5170,8 +5117,8 @@ end i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=4 i32.const 1 i32.or @@ -5187,16 +5134,16 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=28 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -5216,7 +5163,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/set/Set#rehash end i32.const 1 @@ -5653,55 +5600,77 @@ i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/hash16 (param $0 i64) (result i64) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) (local $1 i64) + (local $2 i32) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 2 + i32.const 4 + i32.le_u + drop + local.get $0 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + local.set $2 + i64.const 2 + local.set $1 i64.const 0 i64.const 2870177450012600261 i64.add - i64.const 2 - i64.add - local.set $1 local.get $1 - local.get $0 + i64.add + local.set $3 + local.get $3 + local.get $2 + i64.extend_i32_u i64.const -7046029288634856825 i64.mul i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 i64.const 23 i64.rotl i64.const -4417276706812531889 i64.mul i64.const 1609587929392839161 i64.add - local.set $1 - local.get $1 - local.get $1 + local.set $3 + local.get $3 + local.get $3 i64.const 33 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 i64.const -4417276706812531889 i64.mul - local.set $1 - local.get $1 - local.get $1 + local.set $3 + local.get $3 + local.get $3 i64.const 29 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 i64.const 1609587929392839161 i64.mul - local.set $1 - local.get $1 - local.get $1 + local.set $3 + local.get $3 + local.get $3 i64.const 32 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 + return ) (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) @@ -5759,35 +5728,10 @@ i32.const 0 ) (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i64.extend_i32_s - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -5804,8 +5748,8 @@ (local $10 i32) (local $11 i32) (local $12 i32) - (local $13 i32) - (local $14 i64) + (local $13 i64) + (local $14 i32) local.get $1 i32.const 1 i32.add @@ -5863,44 +5807,24 @@ local.get $11 local.get $12 i32.store16 - block $~lib/util/hash/HASH|inlined.2 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $13 - i64.extend_i32_s - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and - local.set $14 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.wrap_i64 i32.const 4 i32.mul i32.add - local.set $13 + local.set $14 local.get $11 - local.get $13 + local.get $14 i32.load i32.store offset=4 - local.get $13 + local.get $14 local.get $8 i32.store local.get $8 @@ -5937,10 +5861,10 @@ i64.extend_i32_u i64.store offset=8 local.get $0 - local.tee $13 + local.tee $14 local.get $5 local.tee $9 - local.get $13 + local.get $14 i32.load offset=16 local.tee $11 i32.ne @@ -5966,42 +5890,18 @@ call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i64) + (local $2 i64) + (local $3 i32) (local $4 i32) - block $~lib/util/hash/HASH|inlined.1 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i64.extend_i32_s - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 + local.get $1 + call $~lib/util/hash/HASH + local.set $2 local.get $0 local.get $1 - local.get $3 + local.get $2 call $~lib/set/Set#find - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if local.get $0 @@ -6039,16 +5939,16 @@ local.get $0 local.get $0 i32.load offset=24 - local.tee $2 + local.tee $4 i32.const 1 i32.add i32.store offset=24 - local.get $2 + local.get $4 i32.const 8 i32.mul i32.add - local.set $4 - local.get $4 + local.set $3 + local.get $3 local.get $1 i32.store16 local.get $0 @@ -6059,7 +5959,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $3 + local.get $2 local.get $0 i64.load offset=8 i64.and @@ -6067,13 +5967,13 @@ i32.const 4 i32.mul i32.add - local.set $2 + local.set $4 + local.get $3 local.get $4 - local.get $2 i32.load i32.store offset=4 - local.get $2 local.get $4 + local.get $3 i32.store end local.get $0 @@ -6331,35 +6231,11 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i64.extend_i32_s - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -6367,8 +6243,8 @@ end i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=4 i32.const 1 i32.or @@ -6384,16 +6260,16 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=28 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -6413,7 +6289,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/set/Set#rehash end i32.const 1 @@ -6858,6 +6734,76 @@ i32.store offset=28 local.get $0 ) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) + (local $2 i32) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 2 + i32.const 4 + i32.le_u + drop + local.get $0 + i32.const 65535 + i32.and + local.set $2 + i64.const 2 + local.set $1 + i64.const 0 + i64.const 2870177450012600261 + i64.add + local.get $1 + i64.add + local.set $3 + local.get $3 + local.get $2 + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $3 + local.get $3 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $3 + local.get $3 + local.get $3 + i64.const 33 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const -4417276706812531889 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 29 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const 1609587929392839161 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 32 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + return + ) (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) @@ -6912,33 +6858,10 @@ i32.const 0 ) (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $2 - i32.const 65535 - i32.and - i64.extend_i32_u - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -6955,8 +6878,8 @@ (local $10 i32) (local $11 i32) (local $12 i32) - (local $13 i32) - (local $14 i64) + (local $13 i64) + (local $14 i32) local.get $1 i32.const 1 i32.add @@ -7014,44 +6937,24 @@ local.get $11 local.get $12 i32.store16 - block $~lib/util/hash/HASH|inlined.2 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $13 - i64.extend_i32_u - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and - local.set $14 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.wrap_i64 i32.const 4 i32.mul i32.add - local.set $13 + local.set $14 local.get $11 - local.get $13 + local.get $14 i32.load i32.store offset=4 - local.get $13 + local.get $14 local.get $8 i32.store local.get $8 @@ -7088,10 +6991,10 @@ i64.extend_i32_u i64.store offset=8 local.get $0 - local.tee $13 + local.tee $14 local.get $5 local.tee $9 - local.get $13 + local.get $14 i32.load offset=16 local.tee $11 i32.ne @@ -7117,40 +7020,18 @@ call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i64) + (local $2 i64) + (local $3 i32) (local $4 i32) - block $~lib/util/hash/HASH|inlined.1 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $2 - i32.const 65535 - i32.and - i64.extend_i32_u - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 + local.get $1 + call $~lib/util/hash/HASH + local.set $2 local.get $0 local.get $1 - local.get $3 + local.get $2 call $~lib/set/Set#find - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if local.get $0 @@ -7188,16 +7069,16 @@ local.get $0 local.get $0 i32.load offset=24 - local.tee $2 + local.tee $4 i32.const 1 i32.add i32.store offset=24 - local.get $2 + local.get $4 i32.const 8 i32.mul i32.add - local.set $4 - local.get $4 + local.set $3 + local.get $3 local.get $1 i32.store16 local.get $0 @@ -7208,7 +7089,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $3 + local.get $2 local.get $0 i64.load offset=8 i64.and @@ -7216,13 +7097,13 @@ i32.const 4 i32.mul i32.add - local.set $2 + local.set $4 + local.get $3 local.get $4 - local.get $2 i32.load i32.store offset=4 - local.get $2 local.get $4 + local.get $3 i32.store end local.get $0 @@ -7480,33 +7361,11 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $2 - i32.const 65535 - i32.and - i64.extend_i32_u - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -7514,8 +7373,8 @@ end i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=4 i32.const 1 i32.or @@ -7531,16 +7390,16 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=28 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -7560,7 +7419,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/set/Set#rehash end i32.const 1 @@ -7997,55 +7856,73 @@ i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/hash32 (param $0 i64) (result i64) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) (local $1 i64) + (local $2 i32) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 4 + i32.le_u + drop + local.get $0 + local.set $2 + i64.const 4 + local.set $1 i64.const 0 i64.const 2870177450012600261 i64.add - i64.const 4 - i64.add - local.set $1 local.get $1 - local.get $0 + i64.add + local.set $3 + local.get $3 + local.get $2 + i64.extend_i32_u i64.const -7046029288634856825 i64.mul i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 i64.const 23 i64.rotl i64.const -4417276706812531889 i64.mul i64.const 1609587929392839161 i64.add - local.set $1 - local.get $1 - local.get $1 + local.set $3 + local.get $3 + local.get $3 i64.const 33 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 i64.const -4417276706812531889 i64.mul - local.set $1 - local.get $1 - local.get $1 + local.set $3 + local.get $3 + local.get $3 i64.const 29 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 i64.const 1609587929392839161 i64.mul - local.set $1 - local.get $1 - local.get $1 + local.set $3 + local.get $3 + local.get $3 i64.const 32 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 + return ) (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) @@ -8099,35 +7976,10 @@ i32.const 0 ) (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i64.extend_i32_s - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -8144,8 +7996,8 @@ (local $10 i32) (local $11 i32) (local $12 i32) - (local $13 i32) - (local $14 i64) + (local $13 i64) + (local $14 i32) local.get $1 i32.const 1 i32.add @@ -8203,48 +8055,24 @@ local.get $11 local.get $12 i32.store - block $~lib/util/hash/HASH|inlined.2 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $13 - i64.extend_i32_s - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and - local.set $14 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.wrap_i64 i32.const 4 i32.mul i32.add - local.set $13 + local.set $14 local.get $11 - local.get $13 + local.get $14 i32.load i32.store offset=4 - local.get $13 + local.get $14 local.get $8 i32.store local.get $8 @@ -8281,10 +8109,10 @@ i64.extend_i32_u i64.store offset=8 local.get $0 - local.tee $13 + local.tee $14 local.get $5 local.tee $9 - local.get $13 + local.get $14 i32.load offset=16 local.tee $11 i32.ne @@ -8310,42 +8138,18 @@ call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i64) + (local $2 i64) + (local $3 i32) (local $4 i32) - block $~lib/util/hash/HASH|inlined.1 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i64.extend_i32_s - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 + local.get $1 + call $~lib/util/hash/HASH + local.set $2 local.get $0 local.get $1 - local.get $3 + local.get $2 call $~lib/set/Set#find - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if local.get $0 @@ -8383,16 +8187,16 @@ local.get $0 local.get $0 i32.load offset=24 - local.tee $2 + local.tee $4 i32.const 1 i32.add i32.store offset=24 - local.get $2 + local.get $4 i32.const 8 i32.mul i32.add - local.set $4 - local.get $4 + local.set $3 + local.get $3 local.get $1 i32.store local.get $0 @@ -8403,7 +8207,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $3 + local.get $2 local.get $0 i64.load offset=8 i64.and @@ -8411,13 +8215,13 @@ i32.const 4 i32.mul i32.add - local.set $2 + local.set $4 + local.get $3 local.get $4 - local.get $2 i32.load i32.store offset=4 - local.get $2 local.get $4 + local.get $3 i32.store end local.get $0 @@ -8675,35 +8479,11 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i64.extend_i32_s - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -8711,8 +8491,8 @@ end i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=4 i32.const 1 i32.or @@ -8728,16 +8508,16 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=28 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -8757,7 +8537,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/set/Set#rehash end i32.const 1 @@ -9182,25 +8962,93 @@ i32.store offset=28 local.get $0 ) - (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) + (local $2 i32) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 4 + i32.le_u + drop local.get $0 - i32.load + local.set $2 + i64.const 4 + local.set $1 + i64.const 0 + i64.const 2870177450012600261 + i64.add + local.get $1 + i64.add + local.set $3 + local.get $3 local.get $2 - local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - i32.load + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.xor local.set $3 - loop $while-continue|0 - local.get $3 - local.set $4 + local.get $3 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $3 + local.get $3 + local.get $3 + i64.const 33 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const -4417276706812531889 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 29 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const 1609587929392839161 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 32 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + return + ) + (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load + local.get $2 + local.get $0 + i64.load offset=8 + i64.and + i32.wrap_i64 + i32.const 4 + i32.mul + i32.add + i32.load + local.set $3 + loop $while-continue|0 + local.get $3 + local.set $4 local.get $4 if local.get $3 @@ -9234,35 +9082,10 @@ i32.const 0 ) (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i64.extend_i32_u - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -9279,8 +9102,8 @@ (local $10 i32) (local $11 i32) (local $12 i32) - (local $13 i32) - (local $14 i64) + (local $13 i64) + (local $14 i32) local.get $1 i32.const 1 i32.add @@ -9338,48 +9161,24 @@ local.get $11 local.get $12 i32.store - block $~lib/util/hash/HASH|inlined.2 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $13 - i64.extend_i32_u - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and - local.set $14 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.wrap_i64 i32.const 4 i32.mul i32.add - local.set $13 + local.set $14 local.get $11 - local.get $13 + local.get $14 i32.load i32.store offset=4 - local.get $13 + local.get $14 local.get $8 i32.store local.get $8 @@ -9416,10 +9215,10 @@ i64.extend_i32_u i64.store offset=8 local.get $0 - local.tee $13 + local.tee $14 local.get $5 local.tee $9 - local.get $13 + local.get $14 i32.load offset=16 local.tee $11 i32.ne @@ -9445,42 +9244,18 @@ call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i64) + (local $2 i64) + (local $3 i32) (local $4 i32) - block $~lib/util/hash/HASH|inlined.1 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i64.extend_i32_u - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 + local.get $1 + call $~lib/util/hash/HASH + local.set $2 local.get $0 local.get $1 - local.get $3 + local.get $2 call $~lib/set/Set#find - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if local.get $0 @@ -9518,16 +9293,16 @@ local.get $0 local.get $0 i32.load offset=24 - local.tee $2 + local.tee $4 i32.const 1 i32.add i32.store offset=24 - local.get $2 + local.get $4 i32.const 8 i32.mul i32.add - local.set $4 - local.get $4 + local.set $3 + local.get $3 local.get $1 i32.store local.get $0 @@ -9538,7 +9313,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $3 + local.get $2 local.get $0 i64.load offset=8 i64.and @@ -9546,13 +9321,13 @@ i32.const 4 i32.mul i32.add - local.set $2 + local.set $4 + local.get $3 local.get $4 - local.get $2 i32.load i32.store offset=4 - local.get $2 local.get $4 + local.get $3 i32.store end local.get $0 @@ -9810,35 +9585,11 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i64.extend_i32_u - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -9846,8 +9597,8 @@ end i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=4 i32.const 1 i32.or @@ -9863,16 +9614,16 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=28 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -9892,7 +9643,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/set/Set#rehash end i32.const 1 @@ -10317,16 +10068,33 @@ i32.store offset=28 local.get $0 ) - (func $~lib/util/hash/hash64 (param $0 i64) (result i64) + (func $~lib/util/hash/HASH (param $0 i64) (result i64) (local $1 i64) + (local $2 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 8 + i32.const 4 + i32.le_u + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $0 + local.set $1 i64.const 0 i64.const 2870177450012600261 i64.add i64.const 8 i64.add - local.set $1 + local.set $2 + local.get $2 local.get $1 - local.get $0 i64.const -4417276706812531889 i64.mul i64.const 31 @@ -10334,42 +10102,43 @@ i64.const -7046029288634856825 i64.mul i64.xor - local.set $1 - local.get $1 + local.set $2 + local.get $2 i64.const 27 i64.rotl i64.const -7046029288634856825 i64.mul i64.const -8796714831421723037 i64.add - local.set $1 - local.get $1 - local.get $1 + local.set $2 + local.get $2 + local.get $2 i64.const 33 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $2 + local.get $2 i64.const -4417276706812531889 i64.mul - local.set $1 - local.get $1 - local.get $1 + local.set $2 + local.get $2 + local.get $2 i64.const 29 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $2 + local.get $2 i64.const 1609587929392839161 i64.mul - local.set $1 - local.get $1 - local.get $1 + local.set $2 + local.get $2 + local.get $2 i64.const 32 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $2 + local.get $2 + return ) (func $~lib/set/Set#find (param $0 i32) (param $1 i64) (param $2 i64) (result i32) (local $3 i32) @@ -10423,38 +10192,10 @@ i32.const 0 ) (func $~lib/set/Set#has (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -10530,35 +10271,8 @@ local.get $11 local.get $12 i64.store - block $~lib/util/hash/HASH|inlined.2 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -10641,45 +10355,17 @@ ) (func $~lib/set/Set#add (param $0 i32) (param $1 i64) (result i32) (local $2 i64) - (local $3 i64) + (local $3 i32) (local $4 i32) - (local $5 i32) - block $~lib/util/hash/HASH|inlined.1 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 + local.get $1 + call $~lib/util/hash/HASH + local.set $2 local.get $0 local.get $1 - local.get $3 + local.get $2 call $~lib/set/Set#find - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if local.get $0 @@ -10717,16 +10403,16 @@ local.get $0 local.get $0 i32.load offset=24 - local.tee $5 + local.tee $4 i32.const 1 i32.add i32.store offset=24 - local.get $5 + local.get $4 i32.const 16 i32.mul i32.add - local.set $4 - local.get $4 + local.set $3 + local.get $3 local.get $1 i64.store local.get $0 @@ -10737,7 +10423,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $3 + local.get $2 local.get $0 i64.load offset=8 i64.and @@ -10745,13 +10431,13 @@ i32.const 4 i32.mul i32.add - local.set $5 + local.set $4 + local.get $3 local.get $4 - local.get $5 i32.load i32.store offset=8 - local.get $5 local.get $4 + local.get $3 i32.store end local.get $0 @@ -11003,45 +10689,17 @@ local.get $2 ) (func $~lib/set/Set#delete (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -11049,8 +10707,8 @@ end i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=8 i32.const 1 i32.or @@ -11066,17 +10724,17 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $5 + local.tee $4 local.get $0 i32.load offset=28 - local.tee $6 + local.tee $5 + local.get $4 local.get $5 - local.get $6 i32.gt_u select i32.ge_u @@ -11095,7 +10753,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/set/Set#rehash end i32.const 1 @@ -11521,6 +11179,78 @@ i32.store offset=28 local.get $0 ) + (func $~lib/util/hash/HASH (param $0 i64) (result i64) + (local $1 i64) + (local $2 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 8 + i32.const 4 + i32.le_u + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $0 + local.set $1 + i64.const 0 + i64.const 2870177450012600261 + i64.add + i64.const 8 + i64.add + local.set $2 + local.get $2 + local.get $1 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $2 + local.get $2 + i64.const 27 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $2 + local.get $2 + local.get $2 + i64.const 33 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + i64.const -4417276706812531889 + i64.mul + local.set $2 + local.get $2 + local.get $2 + i64.const 29 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + i64.const 1609587929392839161 + i64.mul + local.set $2 + local.get $2 + local.get $2 + i64.const 32 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + return + ) (func $~lib/set/Set#find (param $0 i32) (param $1 i64) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) @@ -11573,38 +11303,10 @@ i32.const 0 ) (func $~lib/set/Set#has (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -11680,35 +11382,8 @@ local.get $11 local.get $12 i64.store - block $~lib/util/hash/HASH|inlined.2 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -11791,45 +11466,17 @@ ) (func $~lib/set/Set#add (param $0 i32) (param $1 i64) (result i32) (local $2 i64) - (local $3 i64) + (local $3 i32) (local $4 i32) - (local $5 i32) - block $~lib/util/hash/HASH|inlined.1 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 + local.get $1 + call $~lib/util/hash/HASH + local.set $2 local.get $0 local.get $1 - local.get $3 + local.get $2 call $~lib/set/Set#find - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if local.get $0 @@ -11867,16 +11514,16 @@ local.get $0 local.get $0 i32.load offset=24 - local.tee $5 + local.tee $4 i32.const 1 i32.add i32.store offset=24 - local.get $5 + local.get $4 i32.const 16 i32.mul i32.add - local.set $4 - local.get $4 + local.set $3 + local.get $3 local.get $1 i64.store local.get $0 @@ -11887,7 +11534,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $3 + local.get $2 local.get $0 i64.load offset=8 i64.and @@ -11895,13 +11542,13 @@ i32.const 4 i32.mul i32.add - local.set $5 + local.set $4 + local.get $3 local.get $4 - local.get $5 i32.load i32.store offset=8 - local.get $5 local.get $4 + local.get $3 i32.store end local.get $0 @@ -12153,45 +11800,17 @@ local.get $2 ) (func $~lib/set/Set#delete (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -12199,8 +11818,8 @@ end i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=8 i32.const 1 i32.or @@ -12216,17 +11835,17 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $5 + local.tee $4 local.get $0 i32.load offset=28 - local.tee $6 + local.tee $5 + local.get $4 local.get $5 - local.get $6 i32.gt_u select i32.ge_u @@ -12245,7 +11864,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/set/Set#rehash end i32.const 1 @@ -12671,6 +12290,75 @@ i32.store offset=28 local.get $0 ) + (func $~lib/util/hash/HASH (param $0 f32) (result i64) + (local $1 i32) + (local $2 i64) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $0 + i32.reinterpret_f32 + local.set $1 + i64.const 4 + local.set $2 + i64.const 0 + i64.const 2870177450012600261 + i64.add + local.get $2 + i64.add + local.set $3 + local.get $3 + local.get $1 + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $3 + local.get $3 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $3 + local.get $3 + local.get $3 + i64.const 33 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const -4417276706812531889 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 29 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const 1609587929392839161 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 32 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + return + ) (func $~lib/set/Set#find (param $0 i32) (param $1 f32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) @@ -12723,28 +12411,10 @@ i32.const 0 ) (func $~lib/set/Set#has (param $0 i32) (param $1 f32) (result i32) - (local $2 f32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - i64.extend_i32_u - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -12761,9 +12431,8 @@ (local $10 i32) (local $11 i32) (local $12 f32) - (local $13 f32) - (local $14 i64) - (local $15 i32) + (local $13 i64) + (local $14 i32) local.get $1 i32.const 1 i32.add @@ -12821,41 +12490,24 @@ local.get $11 local.get $12 f32.store - block $~lib/util/hash/HASH|inlined.2 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $13 - i32.reinterpret_f32 - i64.extend_i32_u - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and - local.set $14 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.wrap_i64 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load i32.store offset=4 - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -12873,19 +12525,19 @@ local.get $0 local.tee $11 local.get $3 - local.tee $15 + local.tee $14 local.get $11 i32.load local.tee $9 i32.ne if - local.get $15 + local.get $14 call $~lib/rt/pure/__retain - local.set $15 + local.set $14 local.get $9 call $~lib/rt/pure/__release end - local.get $15 + local.get $14 i32.store local.get $0 local.get $1 @@ -12894,19 +12546,19 @@ local.get $0 local.tee $9 local.get $5 - local.tee $15 + local.tee $14 local.get $9 i32.load offset=16 local.tee $11 i32.ne if - local.get $15 + local.get $14 call $~lib/rt/pure/__retain - local.set $15 + local.set $14 local.get $11 call $~lib/rt/pure/__release end - local.get $15 + local.get $14 i32.store offset=16 local.get $0 local.get $4 @@ -12921,36 +12573,18 @@ call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (param $0 i32) (param $1 f32) (result i32) - (local $2 f32) - (local $3 i64) + (local $2 i64) + (local $3 i32) (local $4 i32) - (local $5 i32) - block $~lib/util/hash/HASH|inlined.1 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - i64.extend_i32_u - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 + local.get $1 + call $~lib/util/hash/HASH + local.set $2 local.get $0 local.get $1 - local.get $3 + local.get $2 call $~lib/set/Set#find - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if local.get $0 @@ -12988,16 +12622,16 @@ local.get $0 local.get $0 i32.load offset=24 - local.tee $5 + local.tee $4 i32.const 1 i32.add i32.store offset=24 - local.get $5 + local.get $4 i32.const 8 i32.mul i32.add - local.set $4 - local.get $4 + local.set $3 + local.get $3 local.get $1 f32.store local.get $0 @@ -13008,7 +12642,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $3 + local.get $2 local.get $0 i64.load offset=8 i64.and @@ -13016,13 +12650,13 @@ i32.const 4 i32.mul i32.add - local.set $5 + local.set $4 + local.get $3 local.get $4 - local.get $5 i32.load i32.store offset=4 - local.get $5 local.get $4 + local.get $3 i32.store end local.get $0 @@ -13274,35 +12908,17 @@ local.get $2 ) (func $~lib/set/Set#delete (param $0 i32) (param $1 f32) (result i32) - (local $2 f32) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - i64.extend_i32_u - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -13310,8 +12926,8 @@ end i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=4 i32.const 1 i32.or @@ -13327,17 +12943,17 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $5 + local.tee $4 local.get $0 i32.load offset=28 - local.tee $6 + local.tee $5 + local.get $4 local.get $5 - local.get $6 i32.gt_u select i32.ge_u @@ -13356,7 +12972,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/set/Set#rehash end i32.const 1 @@ -13782,6 +13398,79 @@ i32.store offset=28 local.get $0 ) + (func $~lib/util/hash/HASH (param $0 f64) (result i64) + (local $1 i64) + (local $2 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $0 + i64.reinterpret_f64 + local.set $1 + i64.const 0 + i64.const 2870177450012600261 + i64.add + i64.const 8 + i64.add + local.set $2 + local.get $2 + local.get $1 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $2 + local.get $2 + i64.const 27 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $2 + local.get $2 + local.get $2 + i64.const 33 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + i64.const -4417276706812531889 + i64.mul + local.set $2 + local.get $2 + local.get $2 + i64.const 29 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + i64.const 1609587929392839161 + i64.mul + local.set $2 + local.get $2 + local.get $2 + i64.const 32 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + return + ) (func $~lib/set/Set#find (param $0 i32) (param $1 f64) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) @@ -13834,31 +13523,10 @@ i32.const 0 ) (func $~lib/set/Set#has (param $0 i32) (param $1 f64) (result i32) - (local $2 f64) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -13875,9 +13543,8 @@ (local $10 i32) (local $11 i32) (local $12 f64) - (local $13 f64) - (local $14 i64) - (local $15 i32) + (local $13 i64) + (local $14 i32) local.get $1 i32.const 1 i32.add @@ -13935,44 +13602,24 @@ local.get $11 local.get $12 f64.store - block $~lib/util/hash/HASH|inlined.2 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $13 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and - local.set $14 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.wrap_i64 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load i32.store offset=8 - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -13990,19 +13637,19 @@ local.get $0 local.tee $11 local.get $3 - local.tee $15 + local.tee $14 local.get $11 i32.load local.tee $9 i32.ne if - local.get $15 + local.get $14 call $~lib/rt/pure/__retain - local.set $15 + local.set $14 local.get $9 call $~lib/rt/pure/__release end - local.get $15 + local.get $14 i32.store local.get $0 local.get $1 @@ -14011,19 +13658,19 @@ local.get $0 local.tee $9 local.get $5 - local.tee $15 + local.tee $14 local.get $9 i32.load offset=16 local.tee $11 i32.ne if - local.get $15 + local.get $14 call $~lib/rt/pure/__retain - local.set $15 + local.set $14 local.get $11 call $~lib/rt/pure/__release end - local.get $15 + local.get $14 i32.store offset=16 local.get $0 local.get $4 @@ -14038,39 +13685,18 @@ call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (param $0 i32) (param $1 f64) (result i32) - (local $2 f64) - (local $3 i64) + (local $2 i64) + (local $3 i32) (local $4 i32) - (local $5 i32) - block $~lib/util/hash/HASH|inlined.1 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 + local.get $1 + call $~lib/util/hash/HASH + local.set $2 local.get $0 local.get $1 - local.get $3 + local.get $2 call $~lib/set/Set#find - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if local.get $0 @@ -14108,16 +13734,16 @@ local.get $0 local.get $0 i32.load offset=24 - local.tee $5 + local.tee $4 i32.const 1 i32.add i32.store offset=24 - local.get $5 + local.get $4 i32.const 16 i32.mul i32.add - local.set $4 - local.get $4 + local.set $3 + local.get $3 local.get $1 f64.store local.get $0 @@ -14128,7 +13754,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $3 + local.get $2 local.get $0 i64.load offset=8 i64.and @@ -14136,13 +13762,13 @@ i32.const 4 i32.mul i32.add - local.set $5 + local.set $4 + local.get $3 local.get $4 - local.get $5 i32.load i32.store offset=8 - local.get $5 local.get $4 + local.get $3 i32.store end local.get $0 @@ -14394,38 +14020,17 @@ local.get $2 ) (func $~lib/set/Set#delete (param $0 i32) (param $1 f64) (result i32) - (local $2 f64) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -14433,8 +14038,8 @@ end i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=8 i32.const 1 i32.or @@ -14450,17 +14055,17 @@ i64.const 1 i64.shr_u i32.wrap_i64 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $5 + local.tee $4 local.get $0 i32.load offset=28 - local.tee $6 + local.tee $5 + local.get $4 local.get $5 - local.get $6 i32.gt_u select i32.ge_u @@ -14479,7 +14084,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/set/Set#rehash end i32.const 1 diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index f067b1ad8e..e0856ea99d 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -4,12 +4,11 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i64 (func (param i32) (result i64))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i64_=>_i32 (func (param i32 i32 i64) (result i32))) (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) - (type $i32_=>_i64 (func (param i32) (result i64))) - (type $i64_=>_i64 (func (param i64) (result i64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 1036) "\1c\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\06\00\00\001\002\003") @@ -346,286 +345,286 @@ call $~lib/memory/memory.fill local.get $1 ) - (func $~lib/util/hash/hashStr (param $0 i32) (result i64) + (func $~lib/util/hash/HASH<~lib/string/String> (param $0 i32) (result i64) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i64) (local $5 i64) (local $6 i64) - (local $7 i32) - (local $8 i64) - (local $9 i32) - local.get $0 - i32.eqz - if - i64.const 0 - return - end + (local $7 i64) + (local $8 i32) local.get $0 - i32.const 20 - i32.sub - i32.load offset=16 - i32.const 1 - i32.shr_u - i32.const 1 - i32.shl - local.tee $2 - i32.const 32 - i32.ge_s if (result i64) - i64.const 6983438078262162902 + local.get $0 + i32.const 20 + i32.sub + i32.load offset=16 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl + local.tee $2 + i32.const 32 + i32.ge_s + if (result i64) + i64.const 6983438078262162902 + local.set $4 + i64.const -4417276706812531889 + local.set $5 + i64.const 7046029288634856825 + local.set $6 + local.get $2 + local.tee $3 + i32.const 32 + i32.sub + local.set $8 + loop $while-continue|0 + local.get $1 + local.get $8 + i32.le_s + if + local.get $4 + local.get $0 + local.get $1 + i32.add + local.tee $2 + i64.load + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $4 + local.get $5 + local.get $2 + i64.load offset=8 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $5 + local.get $7 + local.get $2 + i64.load offset=16 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $7 + local.get $6 + local.get $2 + i64.load offset=24 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $6 + local.get $1 + i32.const 32 + i32.add + local.set $1 + br $while-continue|0 + end + end + local.get $8 + local.get $1 + i32.sub + local.set $2 + local.get $3 + i64.extend_i32_s + local.get $4 + i64.const 1 + i64.rotl + local.get $5 + i64.const 7 + i64.rotl + i64.add + local.get $7 + i64.const 12 + i64.rotl + i64.add + local.get $6 + i64.const 18 + i64.rotl + i64.add + local.get $4 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.get $5 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.get $7 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.get $6 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + i64.add + else + local.get $2 + i64.extend_i32_s + i64.const 2870177450012600261 + i64.add + end local.set $4 - i64.const -4417276706812531889 - local.set $5 - i64.const 7046029288634856825 - local.set $6 + i32.const 0 + local.set $1 local.get $2 - local.tee $3 - i32.const 32 + i32.const 8 i32.sub - local.set $9 - loop $while-continue|0 - local.get $7 - local.get $9 + local.set $2 + loop $while-continue|1 + local.get $1 + local.get $2 i32.le_s if local.get $4 local.get $0 - local.get $7 + local.get $1 i32.add - local.tee $2 i64.load i64.const -4417276706812531889 i64.mul - i64.add - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - local.set $4 - local.get $5 - local.get $2 - i64.load offset=8 - i64.const -4417276706812531889 - i64.mul - i64.add i64.const 31 i64.rotl i64.const -7046029288634856825 i64.mul - local.set $5 - local.get $8 - local.get $2 - i64.load offset=16 - i64.const -4417276706812531889 - i64.mul - i64.add - i64.const 31 + i64.xor + i64.const 27 i64.rotl i64.const -7046029288634856825 i64.mul - local.set $8 - local.get $6 - local.get $2 - i64.load offset=24 - i64.const -4417276706812531889 - i64.mul + i64.const -8796714831421723037 i64.add - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - local.set $6 - local.get $7 - i32.const 32 + local.set $4 + local.get $1 + i32.const 8 i32.add - local.set $7 - br $while-continue|0 + local.set $1 + br $while-continue|1 end end - local.get $9 - local.get $7 - i32.sub - local.set $2 - local.get $3 - i64.extend_i32_s - local.get $4 - i64.const 1 - i64.rotl - local.get $5 - i64.const 7 - i64.rotl - i64.add - local.get $8 - i64.const 12 - i64.rotl - i64.add - local.get $6 - i64.const 18 - i64.rotl - i64.add - local.get $4 - i64.const -4417276706812531889 - i64.mul - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.get $5 - i64.const -4417276706812531889 - i64.mul - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.get $8 - i64.const -4417276706812531889 - i64.mul - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.get $6 - i64.const -4417276706812531889 - i64.mul - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - i64.add - else local.get $2 - i64.extend_i32_s - i64.const 2870177450012600261 - i64.add - end - local.set $4 - local.get $2 - i32.const 8 - i32.sub - local.set $2 - loop $while-continue|1 local.get $1 - local.get $2 - i32.le_s + i32.const 4 + i32.add + i32.ge_s if local.get $4 local.get $0 local.get $1 i32.add - i64.load - i64.const -4417276706812531889 - i64.mul - i64.const 31 - i64.rotl + i64.load32_u i64.const -7046029288634856825 i64.mul i64.xor - i64.const 27 + i64.const 23 i64.rotl - i64.const -7046029288634856825 + i64.const -4417276706812531889 i64.mul - i64.const -8796714831421723037 + i64.const 1609587929392839161 i64.add local.set $4 local.get $1 - i32.const 8 + i32.const 4 i32.add local.set $1 - br $while-continue|1 end - end - local.get $2 - local.get $1 - i32.const 4 - i32.add - i32.ge_s - if + loop $while-continue|2 + local.get $1 + local.get $2 + i32.lt_s + if + local.get $4 + local.get $0 + local.get $1 + i32.add + i64.load8_u + i64.const 2870177450012600261 + i64.mul + i64.add + i64.const 11 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $4 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $while-continue|2 + end + end local.get $4 - local.get $0 - local.get $1 - i32.add - i64.load32_u - i64.const -7046029288634856825 - i64.mul + local.get $4 + i64.const 33 + i64.shr_u i64.xor - i64.const 23 - i64.rotl i64.const -4417276706812531889 i64.mul + local.tee $4 + local.get $4 + i64.const 29 + i64.shr_u + i64.xor i64.const 1609587929392839161 - i64.add - local.set $4 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - loop $while-continue|2 - local.get $1 - local.get $2 - i32.lt_s - if - local.get $4 - local.get $0 - local.get $1 - i32.add - i64.load8_u - i64.const 2870177450012600261 - i64.mul - i64.add - i64.const 11 - i64.rotl - i64.const -7046029288634856825 - i64.mul - local.set $4 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $while-continue|2 - end + i64.mul + local.tee $4 + local.get $4 + i64.const 32 + i64.shr_u + i64.xor + else + i64.const 0 end - local.get $4 - local.get $4 - i64.const 33 - i64.shr_u - i64.xor - i64.const -4417276706812531889 - i64.mul - local.tee $4 - local.get $4 - i64.const 29 - i64.shr_u - i64.xor - i64.const 1609587929392839161 - i64.mul - local.tee $4 - local.get $4 - i64.const 32 - i64.shr_u - i64.xor ) (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -844,7 +843,7 @@ local.get $2 local.get $4 local.get $7 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String> local.get $1 i64.extend_i32_u i64.and @@ -903,14 +902,11 @@ (func $~lib/map/Map<~lib/string/String,usize>#set (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i64) - (local $4 i64) - (local $5 i32) + (local $4 i32) + local.get $0 i32.const 1056 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String> local.tee $3 - local.set $4 - local.get $0 - local.get $3 call $~lib/map/Map<~lib/string/String,usize>#find local.tee $2 if @@ -953,11 +949,11 @@ local.get $0 local.get $0 i32.load offset=24 - local.tee $5 + local.tee $4 i32.const 1 i32.add i32.store offset=24 - local.get $5 + local.get $4 i32.const 12 i32.mul i32.add @@ -976,7 +972,7 @@ local.get $2 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -992,8 +988,10 @@ i32.store end ) - (func $~lib/util/hash/hash32 (param $0 i64) (result i64) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) local.get $0 + i64.extend_i32_u i64.const -7046029288634856825 i64.mul i64.const 2870177450012600265 @@ -1004,22 +1002,22 @@ i64.mul i64.const 1609587929392839161 i64.add - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 i64.const 33 i64.shr_u i64.xor i64.const -4417276706812531889 i64.mul - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 i64.const 29 i64.shr_u i64.xor i64.const 1609587929392839161 i64.mul - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 i64.const 32 i64.shr_u i64.xor @@ -1127,8 +1125,7 @@ local.get $2 local.get $4 local.get $7 - i64.extend_i32_u - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -1191,8 +1188,7 @@ local.get $0 local.get $1 local.get $1 - i64.extend_i32_u - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.tee $3 call $~lib/map/Map#find local.tee $2 @@ -1287,12 +1283,12 @@ if global.get $~lib/symbol/stringToId i32.const 1056 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String> call $~lib/map/Map<~lib/string/String,usize>#find if global.get $~lib/symbol/stringToId i32.const 1056 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String> call $~lib/map/Map<~lib/string/String,usize>#find local.tee $0 i32.eqz @@ -1382,8 +1378,7 @@ local.get $0 local.get $1 local.get $1 - i64.extend_i32_u - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -1392,8 +1387,7 @@ local.get $0 local.get $1 local.get $1 - i64.extend_i32_u - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $0 i32.eqz diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index fbb28031f3..6976b0279c 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -7,10 +7,9 @@ (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i64_=>_i32 (func (param i32 i32 i64) (result i32))) + (type $i32_=>_i64 (func (param i32) (result i64))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) - (type $i32_=>_i64 (func (param i32) (result i64))) - (type $i64_=>_i64 (func (param i64) (result i64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 12) "\1c\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\06\00\00\001\002\003\00\00\00\00\00\00\00") @@ -557,393 +556,405 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/hash/hashStr (param $0 i32) (result i64) - (local $1 i64) - (local $2 i32) - (local $3 i64) + (func $~lib/util/hash/HASH<~lib/string/String> (param $0 i32) (result i64) + (local $1 i32) + (local $2 i64) + (local $3 i32) (local $4 i64) (local $5 i64) (local $6 i64) - (local $7 i32) + (local $7 i64) (local $8 i32) (local $9 i32) - (local $10 i64) + (local $10 i32) (local $11 i64) - (local $12 i32) + (local $12 i64) local.get $0 call $~lib/rt/stub/__retain local.set $0 - local.get $0 - i32.const 0 - i32.eq - if - i64.const 0 - local.set $1 - local.get $0 - call $~lib/rt/stub/__release - local.get $1 - return - end - local.get $0 - call $~lib/string/String#get:length i32.const 1 - i32.shl - local.set $2 - i64.const 0 - local.set $3 - local.get $2 - i32.const 32 - i32.ge_s - if - i64.const 0 - i64.const -7046029288634856825 - i64.add - i64.const -4417276706812531889 - i64.add + drop + block $~lib/util/hash/hashStr|inlined.0 (result i64) + local.get $0 + call $~lib/rt/stub/__retain local.set $1 - i64.const 0 - i64.const -4417276706812531889 - i64.add - local.set $4 - i64.const 0 - local.set $5 - i64.const 0 - i64.const -7046029288634856825 - i64.sub - local.set $6 - local.get $2 - local.set $7 + local.get $1 i32.const 0 - local.set $8 - local.get $2 - i32.const 32 - i32.sub - local.set $2 - loop $while-continue|0 - local.get $8 + i32.eq + if + i64.const 0 + local.set $2 + local.get $1 + call $~lib/rt/stub/__release local.get $2 - i32.le_s + br $~lib/util/hash/hashStr|inlined.0 + end + local.get $1 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + local.set $3 + i64.const 0 + local.set $2 + local.get $3 + i32.const 32 + i32.ge_s + if + i64.const 0 + i64.const -7046029288634856825 + i64.add + i64.const -4417276706812531889 + i64.add + local.set $4 + i64.const 0 + i64.const -4417276706812531889 + i64.add + local.set $5 + i64.const 0 + local.set $6 + i64.const 0 + i64.const -7046029288634856825 + i64.sub + local.set $7 + local.get $3 + local.set $8 + i32.const 0 local.set $9 + local.get $3 + i32.const 32 + i32.sub + local.set $3 + loop $while-continue|0 + local.get $9 + local.get $3 + i32.le_s + local.set $10 + local.get $10 + if + local.get $4 + local.set $12 + local.get $1 + local.get $9 + i32.add + i64.load + local.set $11 + local.get $12 + local.get $11 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $4 + local.get $5 + local.set $12 + local.get $1 + local.get $9 + i32.add + i64.load offset=8 + local.set $11 + local.get $12 + local.get $11 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $5 + local.get $6 + local.set $12 + local.get $1 + local.get $9 + i32.add + i64.load offset=16 + local.set $11 + local.get $12 + local.get $11 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $6 + local.get $7 + local.set $12 + local.get $1 + local.get $9 + i32.add + i64.load offset=24 + local.set $11 + local.get $12 + local.get $11 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $7 + local.get $9 + i32.const 32 + i32.add + local.set $9 + br $while-continue|0 + end + end + local.get $4 + i64.const 1 + i64.rotl + local.get $5 + i64.const 7 + i64.rotl + i64.add + local.get $6 + i64.const 12 + i64.rotl + i64.add + local.get $7 + i64.const 18 + i64.rotl + i64.add + local.set $2 + local.get $4 + i64.const -4417276706812531889 + i64.mul + local.set $4 + local.get $5 + i64.const -4417276706812531889 + i64.mul + local.set $5 + local.get $6 + i64.const -4417276706812531889 + i64.mul + local.set $6 + local.get $7 + i64.const -4417276706812531889 + i64.mul + local.set $7 + local.get $2 + local.set $12 + local.get $4 + local.set $11 + local.get $12 + local.get $11 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $2 + local.get $2 + local.set $12 + local.get $5 + local.set $11 + local.get $12 + local.get $11 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $2 + local.get $2 + local.set $12 + local.get $6 + local.set $11 + local.get $12 + local.get $11 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $2 + local.get $2 + local.set $12 + local.get $7 + local.set $11 + local.get $12 + local.get $11 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $2 + local.get $2 + local.get $8 + i64.extend_i32_s + i64.add + local.set $2 + local.get $3 + local.get $9 + i32.sub + local.set $3 + else + local.get $3 + i64.extend_i32_s + i64.const 0 + i64.add + i64.const 2870177450012600261 + i64.add + local.set $2 + end + i32.const 0 + local.set $9 + local.get $3 + i32.const 8 + i32.sub + local.set $3 + loop $while-continue|1 local.get $9 + local.get $3 + i32.le_s + local.set $8 + local.get $8 if + local.get $2 local.get $1 - local.set $11 - local.get $0 - local.get $8 + local.get $9 i32.add i64.load - local.set $10 - local.get $11 - local.get $10 i64.const -4417276706812531889 i64.mul - i64.add i64.const 31 i64.rotl i64.const -7046029288634856825 i64.mul - local.set $1 - local.get $4 - local.set $11 - local.get $0 - local.get $8 - i32.add - i64.load offset=8 - local.set $10 - local.get $11 - local.get $10 - i64.const -4417276706812531889 - i64.mul - i64.add - i64.const 31 + i64.xor + local.set $2 + local.get $2 + i64.const 27 i64.rotl i64.const -7046029288634856825 i64.mul - local.set $4 - local.get $5 - local.set $11 - local.get $0 - local.get $8 - i32.add - i64.load offset=16 - local.set $10 - local.get $11 - local.get $10 - i64.const -4417276706812531889 - i64.mul + i64.const -8796714831421723037 i64.add - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - local.set $5 - local.get $6 - local.set $11 - local.get $0 - local.get $8 - i32.add - i64.load offset=24 - local.set $10 - local.get $11 - local.get $10 - i64.const -4417276706812531889 - i64.mul - i64.add - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - local.set $6 - local.get $8 - i32.const 32 + local.set $2 + local.get $9 + i32.const 8 i32.add - local.set $8 - br $while-continue|0 + local.set $9 + br $while-continue|1 end end - local.get $1 - i64.const 1 - i64.rotl - local.get $4 - i64.const 7 - i64.rotl - i64.add - local.get $5 - i64.const 12 - i64.rotl - i64.add - local.get $6 - i64.const 18 - i64.rotl - i64.add - local.set $3 - local.get $1 - i64.const -4417276706812531889 - i64.mul - local.set $1 - local.get $4 - i64.const -4417276706812531889 - i64.mul - local.set $4 - local.get $5 - i64.const -4417276706812531889 - i64.mul - local.set $5 - local.get $6 - i64.const -4417276706812531889 - i64.mul - local.set $6 - local.get $3 - local.set $11 - local.get $1 - local.set $10 - local.get $11 - local.get $10 - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.set $3 - local.get $3 - local.set $11 - local.get $4 - local.set $10 - local.get $11 - local.get $10 - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.set $3 - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $11 - local.get $10 - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.set $3 - local.get $3 - local.set $11 - local.get $6 - local.set $10 - local.get $11 - local.get $10 - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.set $3 + local.get $9 + i32.const 4 + i32.add local.get $3 - local.get $7 - i64.extend_i32_s - i64.add - local.set $3 - local.get $2 - local.get $8 - i32.sub - local.set $2 - else - local.get $2 - i64.extend_i32_s - i64.const 0 - i64.add - i64.const 2870177450012600261 - i64.add - local.set $3 - end - i32.const 0 - local.set $12 - local.get $2 - i32.const 8 - i32.sub - local.set $2 - loop $while-continue|1 - local.get $12 - local.get $2 i32.le_s - local.set $8 - local.get $8 if - local.get $3 - local.get $0 - local.get $12 + local.get $2 + local.get $1 + local.get $9 i32.add - i64.load - i64.const -4417276706812531889 - i64.mul - i64.const 31 - i64.rotl + i64.load32_u i64.const -7046029288634856825 i64.mul i64.xor - local.set $3 - local.get $3 - i64.const 27 + local.set $2 + local.get $2 + i64.const 23 i64.rotl - i64.const -7046029288634856825 + i64.const -4417276706812531889 i64.mul - i64.const -8796714831421723037 + i64.const 1609587929392839161 i64.add - local.set $3 - local.get $12 - i32.const 8 + local.set $2 + local.get $9 + i32.const 4 i32.add - local.set $12 - br $while-continue|1 + local.set $9 end - end - local.get $12 - i32.const 4 - i32.add - local.get $2 - i32.le_s - if - local.get $3 - local.get $0 - local.get $12 - i32.add - i64.load32_u - i64.const -7046029288634856825 - i64.mul + loop $while-continue|2 + local.get $9 + local.get $3 + i32.lt_s + local.set $8 + local.get $8 + if + local.get $2 + local.get $1 + local.get $9 + i32.add + i64.load8_u + i64.const 2870177450012600261 + i64.mul + i64.add + local.set $2 + local.get $2 + i64.const 11 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $2 + local.get $9 + i32.const 1 + i32.add + local.set $9 + br $while-continue|2 + end + end + local.get $2 + local.get $2 + i64.const 33 + i64.shr_u i64.xor - local.set $3 - local.get $3 - i64.const 23 - i64.rotl + local.set $2 + local.get $2 i64.const -4417276706812531889 i64.mul + local.set $2 + local.get $2 + local.get $2 + i64.const 29 + i64.shr_u + i64.xor + local.set $2 + local.get $2 i64.const 1609587929392839161 - i64.add - local.set $3 - local.get $12 - i32.const 4 - i32.add - local.set $12 - end - loop $while-continue|2 - local.get $12 + i64.mul + local.set $2 local.get $2 - i32.lt_s - local.set $8 - local.get $8 - if - local.get $3 - local.get $0 - local.get $12 - i32.add - i64.load8_u - i64.const 2870177450012600261 - i64.mul - i64.add - local.set $3 - local.get $3 - i64.const 11 - i64.rotl - i64.const -7046029288634856825 - i64.mul - local.set $3 - local.get $12 - i32.const 1 - i32.add - local.set $12 - br $while-continue|2 - end + local.get $2 + i64.const 32 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + local.set $7 + local.get $1 + call $~lib/rt/stub/__release + local.get $7 end - local.get $3 - local.get $3 - i64.const 33 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const -4417276706812531889 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 29 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const 1609587929392839161 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 32 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - local.set $6 + local.set $2 local.get $0 call $~lib/rt/stub/__release - local.get $6 + local.get $2 + return ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) @@ -1209,26 +1220,13 @@ ) (func $~lib/map/Map<~lib/string/String,usize>#has (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i64) local.get $1 call $~lib/rt/stub/__retain local.set $1 local.get $0 local.get $1 - block $~lib/util/hash/HASH<~lib/string/String>|inlined.0 (result i64) - local.get $1 - call $~lib/rt/stub/__retain - local.set $2 - i32.const 1 - drop - local.get $2 - call $~lib/util/hash/hashStr - local.set $3 - local.get $2 - call $~lib/rt/stub/__release - local.get $3 - br $~lib/util/hash/HASH<~lib/string/String>|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH<~lib/string/String> call $~lib/map/Map<~lib/string/String,usize>#find i32.const 0 i32.ne @@ -1239,30 +1237,17 @@ ) (func $~lib/map/Map<~lib/string/String,usize>#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i64) - (local $4 i32) + (local $3 i32) local.get $1 call $~lib/rt/stub/__retain local.set $1 local.get $0 local.get $1 - block $~lib/util/hash/HASH<~lib/string/String>|inlined.1 (result i64) - local.get $1 - call $~lib/rt/stub/__retain - local.set $2 - i32.const 1 - drop - local.get $2 - call $~lib/util/hash/hashStr - local.set $3 - local.get $2 - call $~lib/rt/stub/__release - local.get $3 - br $~lib/util/hash/HASH<~lib/string/String>|inlined.1 - end + local.get $1 + call $~lib/util/hash/HASH<~lib/string/String> call $~lib/map/Map<~lib/string/String,usize>#find - local.set $4 - local.get $4 + local.set $2 + local.get $2 i32.eqz if i32.const 224 @@ -1272,12 +1257,12 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $2 i32.load offset=4 - local.set $2 + local.set $3 local.get $1 call $~lib/rt/stub/__release - local.get $2 + local.get $3 ) (func $~lib/map/Map<~lib/string/String,usize>#rehash (param $0 i32) (param $1 i32) (local $2 i32) @@ -1292,8 +1277,7 @@ (local $11 i32) (local $12 i32) (local $13 i32) - (local $14 i64) - (local $15 i32) + (local $14 i32) local.get $1 i32.const 1 i32.add @@ -1356,20 +1340,8 @@ local.get $10 i32.load offset=4 i32.store offset=4 - block $~lib/util/hash/HASH<~lib/string/String>|inlined.3 (result i64) - local.get $12 - call $~lib/rt/stub/__retain - local.set $13 - i32.const 1 - drop - local.get $13 - call $~lib/util/hash/hashStr - local.set $14 - local.get $13 - call $~lib/rt/stub/__release - local.get $14 - br $~lib/util/hash/HASH<~lib/string/String>|inlined.3 - end + local.get $12 + call $~lib/util/hash/HASH<~lib/string/String> local.get $1 i64.extend_i32_u i64.and @@ -1380,12 +1352,12 @@ i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load i32.store offset=8 - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -1426,19 +1398,19 @@ local.get $0 local.tee $13 local.get $5 - local.tee $15 + local.tee $14 local.get $13 i32.load offset=16 local.tee $11 i32.ne if - local.get $15 + local.get $14 call $~lib/rt/stub/__retain - local.set $15 + local.set $14 local.get $11 call $~lib/rt/stub/__release end - local.get $15 + local.get $14 i32.store offset=16 local.get $0 local.get $4 @@ -1453,39 +1425,26 @@ call $~lib/rt/stub/__release ) (func $~lib/map/Map<~lib/string/String,usize>#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i64) - (local $5 i64) + (local $3 i64) + (local $4 i32) + (local $5 i32) (local $6 i32) - (local $7 i32) local.get $1 call $~lib/rt/stub/__retain local.set $1 - block $~lib/util/hash/HASH<~lib/string/String>|inlined.2 (result i64) - local.get $1 - call $~lib/rt/stub/__retain - local.set $3 - i32.const 1 - drop - local.get $3 - call $~lib/util/hash/hashStr - local.set $4 - local.get $3 - call $~lib/rt/stub/__release - local.get $4 - br $~lib/util/hash/HASH<~lib/string/String>|inlined.2 - end - local.set $5 + local.get $1 + call $~lib/util/hash/HASH<~lib/string/String> + local.set $3 local.get $0 local.get $1 - local.get $5 + local.get $3 call $~lib/map/Map<~lib/string/String,usize>#find - local.set $6 - local.get $6 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $6 + local.get $4 local.get $2 i32.store offset=4 else @@ -1522,25 +1481,25 @@ local.get $0 i32.load offset=16 call $~lib/rt/stub/__retain - local.set $3 - local.get $3 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=24 - local.tee $7 + local.tee $6 i32.const 1 i32.add i32.store offset=24 - local.get $7 + local.get $6 i32.const 12 i32.mul i32.add - local.set $6 - local.get $6 + local.set $4 + local.get $4 local.get $1 call $~lib/rt/stub/__retain i32.store - local.get $6 + local.get $4 local.get $2 i32.store offset=4 local.get $0 @@ -1551,7 +1510,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $5 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -1559,73 +1518,91 @@ i32.const 4 i32.mul i32.add - local.set $7 + local.set $6 + local.get $4 local.get $6 - local.get $7 i32.load i32.store offset=8 - local.get $7 local.get $6 + local.get $4 i32.store - local.get $3 + local.get $5 call $~lib/rt/stub/__release end local.get $0 call $~lib/rt/stub/__retain - local.set $7 + local.set $6 local.get $1 call $~lib/rt/stub/__release - local.get $7 + local.get $6 ) - (func $~lib/util/hash/hash32 (param $0 i64) (result i64) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) (local $1 i64) + (local $2 i32) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 4 + i32.le_u + drop + local.get $0 + local.set $2 + i64.const 4 + local.set $1 i64.const 0 i64.const 2870177450012600261 i64.add - i64.const 4 - i64.add - local.set $1 local.get $1 - local.get $0 + i64.add + local.set $3 + local.get $3 + local.get $2 + i64.extend_i32_u i64.const -7046029288634856825 i64.mul i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 i64.const 23 i64.rotl i64.const -4417276706812531889 i64.mul i64.const 1609587929392839161 i64.add - local.set $1 - local.get $1 - local.get $1 + local.set $3 + local.get $3 + local.get $3 i64.const 33 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 i64.const -4417276706812531889 i64.mul - local.set $1 - local.get $1 - local.get $1 + local.set $3 + local.get $3 + local.get $3 i64.const 29 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 i64.const 1609587929392839161 i64.mul - local.set $1 - local.get $1 - local.get $1 + local.set $3 + local.get $3 + local.get $3 i64.const 32 i64.shr_u i64.xor - local.set $1 - local.get $1 + local.set $3 + local.get $3 + return ) (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) @@ -1753,32 +1730,8 @@ local.get $10 i32.load offset=4 i32.store offset=4 - block $~lib/util/hash/HASH|inlined.1 (result i64) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $13 - i64.extend_i32_u - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -1860,61 +1813,37 @@ call $~lib/rt/stub/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i64) + (local $3 i64) + (local $4 i32) (local $5 i32) (local $6 i32) local.get $2 call $~lib/rt/stub/__retain local.set $2 - block $~lib/util/hash/HASH|inlined.0 (result i64) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $3 - i64.extend_i32_u - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 1 drop - local.get $5 + local.get $4 i32.load offset=4 - local.set $3 + local.set $5 local.get $2 - local.get $3 + local.get $5 i32.ne if - local.get $5 + local.get $4 local.get $2 call $~lib/rt/stub/__retain i32.store offset=4 - local.get $3 + local.get $5 call $~lib/rt/stub/__release end else @@ -1951,8 +1880,8 @@ local.get $0 i32.load offset=16 call $~lib/rt/stub/__retain - local.set $3 - local.get $3 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=24 @@ -1964,11 +1893,11 @@ i32.const 12 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i32.store - local.get $5 + local.get $4 local.get $2 call $~lib/rt/stub/__retain i32.store offset=4 @@ -1980,7 +1909,7 @@ i32.store offset=28 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -1989,14 +1918,14 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load i32.store offset=8 local.get $6 - local.get $5 + local.get $4 i32.store - local.get $3 + local.get $5 call $~lib/rt/stub/__release end local.get $0 @@ -2073,73 +2002,23 @@ local.get $1 ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.2 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i64.extend_i32_u - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne ) (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i64) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i64.extend_i32_u - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 224 @@ -2149,7 +2028,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=4 call $~lib/rt/stub/__retain ) From c19da8635559befb316a7f68ed50bbabd010cdba Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Fri, 5 Feb 2021 23:28:18 +0200 Subject: [PATCH 07/10] update --- tests/compiler/std/hash.optimized.wat | 177 +- tests/compiler/std/hash.untouched.wat | 1274 +- tests/compiler/std/map.optimized.wat | 1752 +- tests/compiler/std/map.untouched.wat | 25951 +++++++--------------- tests/compiler/std/set.optimized.wat | 1241 +- tests/compiler/std/set.untouched.wat | 14498 ++++-------- tests/compiler/std/symbol.optimized.wat | 281 +- tests/compiler/std/symbol.untouched.wat | 973 +- 8 files changed, 16630 insertions(+), 29517 deletions(-) diff --git a/tests/compiler/std/hash.optimized.wat b/tests/compiler/std/hash.optimized.wat index 86b869d1b5..6bcd6f2476 100644 --- a/tests/compiler/std/hash.optimized.wat +++ b/tests/compiler/std/hash.optimized.wat @@ -12,92 +12,62 @@ (data (i32.const 1112) "\01\00\00\00\04\00\00\00a\00b") (data (i32.const 1132) "\1c") (data (i32.const 1144) "\01\00\00\00\06\00\00\00a\00b\00c") - (global $~lib/memory/__stack_pointer (mut i32) (i32.const 17548)) + (data (i32.const 1164) "\1c") + (data (i32.const 1176) "\01\00\00\00\08\00\00\00a\00b\00c\00d") + (data (i32.const 1196) "\1c") + (data (i32.const 1208) "\01\00\00\00\n\00\00\00a\00b\00c\00d\00e") + (data (i32.const 1228) "\1c") + (data (i32.const 1240) "\01\00\00\00\0c\00\00\00a\00b\00c\00d\00e\00f") + (data (i32.const 1260) ",") + (data (i32.const 1272) "\01\00\00\00\0e\00\00\00a\00b\00c\00d\00e\00f\00g") + (data (i32.const 1308) ",") + (data (i32.const 1320) "\01\00\00\00\10\00\00\00a\00b\00c\00d\00e\00f\00g\00h") + (data (i32.const 1356) ",") + (data (i32.const 1368) "\01\00\00\00\12\00\00\00a\00b\00c\00d\00e\00f\00g\00h\00i") + (global $~lib/memory/__stack_pointer (mut i32) (i32.const 17788)) (export "memory" (memory $0)) (start $~start) (func $~start - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - i32.const 0 - call $~lib/util/hash/hashStr - global.get $~lib/memory/__stack_pointer - i32.const 1056 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - i32.const 1056 - i32.store - i32.const 1056 - call $~lib/util/hash/hashStr - global.get $~lib/memory/__stack_pointer - i32.const 1088 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - i32.const 1088 - i32.store - i32.const 1088 - call $~lib/util/hash/hashStr - global.get $~lib/memory/__stack_pointer - i32.const 1120 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - i32.const 1120 - i32.store - i32.const 1120 - call $~lib/util/hash/hashStr - global.get $~lib/memory/__stack_pointer - i32.const 1152 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - i32.const 1152 - i32.store - i32.const 1152 - call $~lib/util/hash/hashStr - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer + call $start:std/hash ) (func $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 1164 + i32.const 1404 i32.lt_s if - i32.const 17568 - i32.const 17616 + i32.const 17808 + i32.const 17856 i32.const 1 i32.const 1 call $~lib/builtins/abort unreachable end ) - (func $~lib/util/hash/hashStr (param $0 i32) + (func $~lib/util/hash/HASH<~lib/string/String|null> (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i64) + (local $5 i64) + (local $6 i64) + (local $7 i64) + (local $8 i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + local.get $0 i32.store - i32.const -2128831035 - local.set $2 local.get $0 if global.get $~lib/memory/__stack_pointer local.get $0 - i32.store + i32.store offset=4 local.get $0 i32.const 20 i32.sub @@ -211,8 +181,8 @@ i64.xor i64.const -7046029288634856825 i64.mul - i64.const -8796714831421723037 - i64.add + i64.const 8796714831421723037 + i64.sub local.get $5 i64.const -4417276706812531889 i64.mul @@ -223,8 +193,8 @@ i64.xor i64.const -7046029288634856825 i64.mul - i64.const -8796714831421723037 - i64.add + i64.const 8796714831421723037 + i64.sub local.get $7 i64.const -4417276706812531889 i64.mul @@ -235,8 +205,8 @@ i64.xor i64.const -7046029288634856825 i64.mul - i64.const -8796714831421723037 - i64.add + i64.const 8796714831421723037 + i64.sub local.get $6 i64.const -4417276706812531889 i64.mul @@ -247,8 +217,8 @@ i64.xor i64.const -7046029288634856825 i64.mul - i64.const -8796714831421723037 - i64.add + i64.const 8796714831421723037 + i64.sub i64.add else local.get $2 @@ -284,8 +254,8 @@ i64.rotl i64.const -7046029288634856825 i64.mul - i64.const -8796714831421723037 - i64.add + i64.const 8796714831421723037 + i64.sub local.set $4 local.get $1 i32.const 8 @@ -347,6 +317,75 @@ end end global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $start:std/hash + (local $0 f32) + (local $1 i64) + (local $2 f64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + i32.const 0 + call $~lib/util/hash/HASH<~lib/string/String|null> + global.get $~lib/memory/__stack_pointer + i32.const 1056 + i32.store + i32.const 1056 + call $~lib/util/hash/HASH<~lib/string/String|null> + global.get $~lib/memory/__stack_pointer + i32.const 1088 + i32.store + i32.const 1088 + call $~lib/util/hash/HASH<~lib/string/String|null> + global.get $~lib/memory/__stack_pointer + i32.const 1120 + i32.store + i32.const 1120 + call $~lib/util/hash/HASH<~lib/string/String|null> + global.get $~lib/memory/__stack_pointer + i32.const 1152 + i32.store + i32.const 1152 + call $~lib/util/hash/HASH<~lib/string/String|null> + global.get $~lib/memory/__stack_pointer + i32.const 1184 + i32.store + i32.const 1184 + call $~lib/util/hash/HASH<~lib/string/String|null> + global.get $~lib/memory/__stack_pointer + i32.const 1216 + i32.store + i32.const 1216 + call $~lib/util/hash/HASH<~lib/string/String|null> + global.get $~lib/memory/__stack_pointer + i32.const 1248 + i32.store + i32.const 1248 + call $~lib/util/hash/HASH<~lib/string/String|null> + global.get $~lib/memory/__stack_pointer + i32.const 1280 + i32.store + i32.const 1280 + call $~lib/util/hash/HASH<~lib/string/String|null> + global.get $~lib/memory/__stack_pointer + i32.const 1328 + i32.store + i32.const 1328 + call $~lib/util/hash/HASH<~lib/string/String|null> + global.get $~lib/memory/__stack_pointer + i32.const 1376 + i32.store + i32.const 1376 + call $~lib/util/hash/HASH<~lib/string/String|null> + global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer diff --git a/tests/compiler/std/hash.untouched.wat b/tests/compiler/std/hash.untouched.wat index f336befe78..38bc76e58b 100644 --- a/tests/compiler/std/hash.untouched.wat +++ b/tests/compiler/std/hash.untouched.wat @@ -1,19 +1,27 @@ (module (type $none_=>_none (func)) - (type $i32_=>_i32 (func (param i32) (result i32))) - (type $none_=>_none (func)) + (type $i32_=>_i64 (func (param i32) (result i64))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $i64_=>_i32 (func (param i64) (result i32))) + (type $f32_=>_i64 (func (param f32) (result i64))) + (type $f64_=>_i64 (func (param f64) (result i64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 12) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 44) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00a\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 76) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00a\00b\00\00\00\00\00\00\00\00\00") (data (i32.const 108) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00a\00b\00c\00\00\00\00\00\00\00") + (data (i32.const 140) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00a\00b\00c\00d\00\00\00\00\00") + (data (i32.const 172) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00a\00b\00c\00d\00e\00\00\00") + (data (i32.const 204) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00a\00b\00c\00d\00e\00f\00") + (data (i32.const 236) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00a\00b\00c\00d\00e\00f\00g\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 284) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00a\00b\00c\00d\00e\00f\00g\00h\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 332) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00a\00b\00c\00d\00e\00f\00g\00h\00i\00\00\00\00\00\00\00\00\00\00\00") (table $0 1 funcref) - (global $~lib/memory/__data_end i32 (i32.const 140)) - (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16524)) - (global $~lib/memory/__heap_base i32 (i32.const 16524)) + (global $~lib/memory/__data_end i32 (i32.const 380)) + (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16764)) + (global $~lib/memory/__heap_base i32 (i32.const 16764)) (export "memory" (memory $0)) (start $~start) (func $~lib/string/String#get:length (param $0 i32) (result i32) @@ -24,13 +32,171 @@ i32.const 1 i32.shr_u ) - (func $std/hash/check (param $0 i32) (result i32) + (func $std/hash/check (param $0 i64) (result i32) i32.const 1 ) - (func $~lib/util/hash/HASH<~lib/string/String> (param $0 i32) (result i64) + (func $~lib/util/hash/HASH (param $0 f32) (result i64) (local $1 i32) (local $2 i64) - (local $3 i32) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $0 + i32.reinterpret_f32 + local.set $1 + i64.const 4 + local.set $2 + i64.const 0 + i64.const 2870177450012600261 + i64.add + local.get $2 + i64.add + local.set $3 + local.get $3 + local.get $1 + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $3 + local.get $3 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $3 + local.get $3 + local.get $3 + i64.const 33 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const -4417276706812531889 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 29 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const 1609587929392839161 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 32 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + return + ) + (func $~lib/util/hash/HASH (param $0 f64) (result i64) + (local $1 i64) + (local $2 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $0 + i64.reinterpret_f64 + local.set $1 + i64.const 0 + i64.const 2870177450012600261 + i64.add + i64.const 8 + i64.add + local.set $2 + local.get $2 + local.get $1 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $2 + local.get $2 + i64.const 27 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $2 + local.get $2 + local.get $2 + i64.const 33 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + i64.const -4417276706812531889 + i64.mul + local.set $2 + local.get $2 + local.get $2 + i64.const 29 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + i64.const 1609587929392839161 + i64.mul + local.set $2 + local.get $2 + local.get $2 + i64.const 32 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + return + ) + (func $~start + call $start:std/hash + ) + (func $~stack_check + global.get $~lib/memory/__stack_pointer + global.get $~lib/memory/__data_end + i32.lt_s + if + i32.const 16784 + i32.const 16832 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/util/hash/HASH<~lib/string/String|null> (param $0 i32) (result i64) + (local $1 i32) + (local $2 i32) + (local $3 i64) (local $4 i64) (local $5 i64) (local $6 i64) @@ -40,34 +206,43 @@ (local $10 i32) (local $11 i64) (local $12 i64) - local.get $0 - call $~lib/rt/stub/__retain - local.set $0 + (local $13 i32) + (local $14 i64) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store i32.const 1 drop - block $~lib/util/hash/hashStr|inlined.1 (result i64) + block $~lib/util/hash/hashStr|inlined.0 (result i64) + global.get $~lib/memory/__stack_pointer local.get $0 - call $~lib/rt/stub/__retain - local.set $1 + local.tee $1 + i32.store local.get $1 i32.const 0 i32.eq if i64.const 0 - local.set $2 - local.get $1 - call $~lib/rt/stub/__release - local.get $2 - br $~lib/util/hash/hashStr|inlined.1 + br $~lib/util/hash/hashStr|inlined.0 end local.get $1 + local.set $13 + global.get $~lib/memory/__stack_pointer + local.get $13 + i32.store offset=4 + local.get $13 call $~lib/string/String#get:length i32.const 1 i32.shl - local.set $3 - i64.const 0 local.set $2 - local.get $3 + i64.const 0 + local.set $3 + local.get $2 i32.const 32 i32.ge_s if @@ -87,17 +262,17 @@ i64.const -7046029288634856825 i64.sub local.set $7 - local.get $3 + local.get $2 local.set $8 i32.const 0 local.set $9 - local.get $3 + local.get $2 i32.const 32 i32.sub - local.set $3 + local.set $2 loop $while-continue|0 local.get $9 - local.get $3 + local.get $2 i32.le_s local.set $10 local.get $10 @@ -192,7 +367,7 @@ i64.const 18 i64.rotl i64.add - local.set $2 + local.set $3 local.get $4 i64.const -4417276706812531889 i64.mul @@ -209,7 +384,7 @@ i64.const -4417276706812531889 i64.mul local.set $7 - local.get $2 + local.get $3 local.set $12 local.get $4 local.set $11 @@ -224,8 +399,8 @@ i64.mul i64.const -8796714831421723037 i64.add - local.set $2 - local.get $2 + local.set $3 + local.get $3 local.set $12 local.get $5 local.set $11 @@ -240,8 +415,8 @@ i64.mul i64.const -8796714831421723037 i64.add - local.set $2 - local.get $2 + local.set $3 + local.get $3 local.set $12 local.get $6 local.set $11 @@ -256,8 +431,8 @@ i64.mul i64.const -8796714831421723037 i64.add - local.set $2 - local.get $2 + local.set $3 + local.get $3 local.set $12 local.get $7 local.set $11 @@ -272,39 +447,39 @@ i64.mul i64.const -8796714831421723037 i64.add - local.set $2 - local.get $2 + local.set $3 + local.get $3 local.get $8 i64.extend_i32_s i64.add - local.set $2 - local.get $3 + local.set $3 + local.get $2 local.get $9 i32.sub - local.set $3 + local.set $2 else - local.get $3 + local.get $2 i64.extend_i32_s i64.const 0 i64.add i64.const 2870177450012600261 i64.add - local.set $2 + local.set $3 end i32.const 0 local.set $9 - local.get $3 + local.get $2 i32.const 8 i32.sub - local.set $3 + local.set $2 loop $while-continue|1 local.get $9 - local.get $3 + local.get $2 i32.le_s local.set $8 local.get $8 if - local.get $2 + local.get $3 local.get $1 local.get $9 i32.add @@ -316,15 +491,15 @@ i64.const -7046029288634856825 i64.mul i64.xor - local.set $2 - local.get $2 + local.set $3 + local.get $3 i64.const 27 i64.rotl i64.const -7046029288634856825 i64.mul i64.const -8796714831421723037 i64.add - local.set $2 + local.set $3 local.get $9 i32.const 8 i32.add @@ -335,10 +510,10 @@ local.get $9 i32.const 4 i32.add - local.get $3 + local.get $2 i32.le_s if - local.get $2 + local.get $3 local.get $1 local.get $9 i32.add @@ -346,15 +521,15 @@ i64.const -7046029288634856825 i64.mul i64.xor - local.set $2 - local.get $2 + local.set $3 + local.get $3 i64.const 23 i64.rotl i64.const -4417276706812531889 i64.mul i64.const 1609587929392839161 i64.add - local.set $2 + local.set $3 local.get $9 i32.const 4 i32.add @@ -362,12 +537,12 @@ end loop $while-continue|2 local.get $9 - local.get $3 + local.get $2 i32.lt_s local.set $8 local.get $8 if - local.get $2 + local.get $3 local.get $1 local.get $9 i32.add @@ -375,13 +550,13 @@ i64.const 2870177450012600261 i64.mul i64.add - local.set $2 - local.get $2 + local.set $3 + local.get $3 i64.const 11 i64.rotl i64.const -7046029288634856825 i64.mul - local.set $2 + local.set $3 local.get $9 i32.const 1 i32.add @@ -389,560 +564,603 @@ br $while-continue|2 end end - local.get $2 - local.get $2 + local.get $3 + local.get $3 i64.const 33 i64.shr_u i64.xor - local.set $2 - local.get $2 + local.set $3 + local.get $3 i64.const -4417276706812531889 i64.mul - local.set $2 - local.get $2 - local.get $2 - i64.const 29 - i64.shr_u + local.set $3 + local.get $3 + local.get $3 + i64.const 29 + i64.shr_u i64.xor - local.set $2 - local.get $2 + local.set $3 + local.get $3 i64.const 1609587929392839161 i64.mul - local.set $2 - local.get $2 - local.get $2 + local.set $3 + local.get $3 + local.get $3 i64.const 32 i64.shr_u i64.xor - local.set $2 - local.get $2 - local.set $7 - local.get $1 - call $~lib/rt/stub/__release - local.get $7 + local.set $3 + local.get $3 end - local.set $2 - local.get $0 - call $~lib/rt/stub/__release - local.get $2 - return - ) - (func $~lib/util/hash/HASH (param $0 f32) (result i64) - (local $1 i32) - (local $2 i64) - (local $3 i64) - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $0 - i32.reinterpret_f32 - local.set $1 - i64.const 4 - local.set $2 - i64.const 0 - i64.const 2870177450012600261 - i64.add - local.get $2 - i64.add - local.set $3 - local.get $3 - local.get $1 - i64.extend_i32_u - i64.const -7046029288634856825 - i64.mul - i64.xor - local.set $3 - local.get $3 - i64.const 23 - i64.rotl - i64.const -4417276706812531889 - i64.mul - i64.const 1609587929392839161 - i64.add - local.set $3 - local.get $3 - local.get $3 - i64.const 33 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const -4417276706812531889 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 29 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const 1609587929392839161 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 32 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - return - ) - (func $~start - call $start:std/hash - ) - (func $~stack_check + local.set $14 global.get $~lib/memory/__stack_pointer - global.get $~lib/memory/__data_end - i32.lt_s - if - i32.const 16544 - i32.const 16592 - i32.const 1 - i32.const 1 - call $~lib/builtins/abort - unreachable - end + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $14 + return ) - (func $~lib/util/hash/hashStr (param $0 i32) (result i32) + (func $~lib/util/hash/HASH<~lib/string/String> (param $0 i32) (result i64) (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (local $3 i64) + (local $4 i64) + (local $5 i64) + (local $6 i64) + (local $7 i64) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i64) + (local $12 i64) + (local $13 i32) + (local $14 i64) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - i32.const -2128831035 - local.set $1 - local.get $0 - i32.const 0 - i32.ne - if - i32.const 0 - local.set $2 - local.get $0 - local.set $5 + i64.const 0 + i64.store + i32.const 1 + drop + block $~lib/util/hash/hashStr|inlined.1 (result i64) global.get $~lib/memory/__stack_pointer - local.get $5 + local.get $0 + local.tee $1 i32.store - local.get $5 + local.get $1 + i32.const 0 + i32.eq + if + i64.const 0 + br $~lib/util/hash/hashStr|inlined.1 + end + local.get $1 + local.set $13 + global.get $~lib/memory/__stack_pointer + local.get $13 + i32.store offset=4 + local.get $13 call $~lib/string/String#get:length i32.const 1 i32.shl + local.set $2 + i64.const 0 local.set $3 - loop $for-loop|0 + local.get $2 + i32.const 32 + i32.ge_s + if + i64.const 0 + i64.const -7046029288634856825 + i64.add + i64.const -4417276706812531889 + i64.add + local.set $4 + i64.const 0 + i64.const -4417276706812531889 + i64.add + local.set $5 + i64.const 0 + local.set $6 + i64.const 0 + i64.const -7046029288634856825 + i64.sub + local.set $7 local.get $2 - local.get $3 - i32.lt_u + local.set $8 + i32.const 0 + local.set $9 + local.get $2 + i32.const 32 + i32.sub + local.set $2 + loop $while-continue|0 + local.get $9 + local.get $2 + i32.le_s + local.set $10 + local.get $10 + if + local.get $4 + local.set $12 + local.get $1 + local.get $9 + i32.add + i64.load + local.set $11 + local.get $12 + local.get $11 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $4 + local.get $5 + local.set $12 + local.get $1 + local.get $9 + i32.add + i64.load offset=8 + local.set $11 + local.get $12 + local.get $11 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $5 + local.get $6 + local.set $12 + local.get $1 + local.get $9 + i32.add + i64.load offset=16 + local.set $11 + local.get $12 + local.get $11 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $6 + local.get $7 + local.set $12 + local.get $1 + local.get $9 + i32.add + i64.load offset=24 + local.set $11 + local.get $12 + local.get $11 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $7 + local.get $9 + i32.const 32 + i32.add + local.set $9 + br $while-continue|0 + end + end + local.get $4 + i64.const 1 + i64.rotl + local.get $5 + i64.const 7 + i64.rotl + i64.add + local.get $6 + i64.const 12 + i64.rotl + i64.add + local.get $7 + i64.const 18 + i64.rotl + i64.add + local.set $3 + local.get $4 + i64.const -4417276706812531889 + i64.mul local.set $4 + local.get $5 + i64.const -4417276706812531889 + i64.mul + local.set $5 + local.get $6 + i64.const -4417276706812531889 + i64.mul + local.set $6 + local.get $7 + i64.const -4417276706812531889 + i64.mul + local.set $7 + local.get $3 + local.set $12 local.get $4 + local.set $11 + local.get $12 + local.get $11 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $3 + local.get $3 + local.set $12 + local.get $5 + local.set $11 + local.get $12 + local.get $11 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $3 + local.get $3 + local.set $12 + local.get $6 + local.set $11 + local.get $12 + local.get $11 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $3 + local.get $3 + local.set $12 + local.get $7 + local.set $11 + local.get $12 + local.get $11 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $3 + local.get $3 + local.get $8 + i64.extend_i32_s + i64.add + local.set $3 + local.get $2 + local.get $9 + i32.sub + local.set $2 + else + local.get $2 + i64.extend_i32_s + i64.const 0 + i64.add + i64.const 2870177450012600261 + i64.add + local.set $3 + end + i32.const 0 + local.set $9 + local.get $2 + i32.const 8 + i32.sub + local.set $2 + loop $while-continue|1 + local.get $9 + local.get $2 + i32.le_s + local.set $8 + local.get $8 if + local.get $3 local.get $1 - local.get $0 - local.get $2 + local.get $9 i32.add - i32.load8_u - i32.xor - i32.const 16777619 - i32.mul - local.set $1 - local.get $2 + i64.load + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $3 + local.get $3 + i64.const 27 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $3 + local.get $9 + i32.const 8 + i32.add + local.set $9 + br $while-continue|1 + end + end + local.get $9 + i32.const 4 + i32.add + local.get $2 + i32.le_s + if + local.get $3 + local.get $1 + local.get $9 + i32.add + i64.load32_u + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $3 + local.get $3 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $3 + local.get $9 + i32.const 4 + i32.add + local.set $9 + end + loop $while-continue|2 + local.get $9 + local.get $2 + i32.lt_s + local.set $8 + local.get $8 + if + local.get $3 + local.get $1 + local.get $9 + i32.add + i64.load8_u + i64.const 2870177450012600261 + i64.mul + i64.add + local.set $3 + local.get $3 + i64.const 11 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $3 + local.get $9 i32.const 1 i32.add - local.set $2 - br $for-loop|0 + local.set $9 + br $while-continue|2 end end + local.get $3 + local.get $3 + i64.const 33 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const -4417276706812531889 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 29 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const 1609587929392839161 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 32 + i64.shr_u + i64.xor + local.set $3 + local.get $3 end - local.get $1 - local.set $5 + local.set $14 global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $5 + local.get $14 + return ) (func $start:std/hash (local $0 i32) - (local $1 f32) - (local $2 f64) - (local $3 i32) global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - block $~lib/util/hash/HASH<~lib/string/String|null>|inlined.0 (result i32) - i32.const 0 - local.set $0 - i32.const 1 - drop - local.get $0 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - call $~lib/util/hash/hashStr - br $~lib/util/hash/HASH<~lib/string/String|null>|inlined.0 - end + i32.const 0 + i32.store + i32.const 0 + call $~lib/util/hash/HASH<~lib/string/String|null> call $std/hash/check drop - block $~lib/util/hash/HASH<~lib/string/String>|inlined.0 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 32 - local.tee $0 - i32.store offset=4 - i32.const 1 - drop - local.get $0 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - call $~lib/util/hash/hashStr - br $~lib/util/hash/HASH<~lib/string/String>|inlined.0 - end + i32.const 32 + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $~lib/util/hash/HASH<~lib/string/String> call $std/hash/check drop - block $~lib/util/hash/HASH<~lib/string/String>|inlined.1 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 64 - local.tee $0 - i32.store offset=4 - i32.const 1 - drop - local.get $0 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - call $~lib/util/hash/hashStr - br $~lib/util/hash/HASH<~lib/string/String>|inlined.1 - end + i32.const 64 + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $~lib/util/hash/HASH<~lib/string/String> call $std/hash/check drop - block $~lib/util/hash/HASH<~lib/string/String>|inlined.2 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 96 - local.tee $0 - i32.store offset=4 - i32.const 1 - drop - local.get $0 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - call $~lib/util/hash/hashStr - br $~lib/util/hash/HASH<~lib/string/String>|inlined.2 - end + i32.const 96 + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $~lib/util/hash/HASH<~lib/string/String> call $std/hash/check drop - block $~lib/util/hash/HASH<~lib/string/String>|inlined.3 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 128 - local.tee $0 - i32.store offset=4 - i32.const 1 - drop - local.get $0 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - call $~lib/util/hash/hashStr - br $~lib/util/hash/HASH<~lib/string/String>|inlined.3 - end + i32.const 128 + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $~lib/util/hash/HASH<~lib/string/String> call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.0 (result i32) - f32.const 0 - local.set $1 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $1 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end + i32.const 160 + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $~lib/util/hash/HASH<~lib/string/String> call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.1 (result i32) - f32.const 1 - local.set $1 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $1 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end + i32.const 192 + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $~lib/util/hash/HASH<~lib/string/String> call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.2 (result i32) - f32.const 1.100000023841858 - local.set $1 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $1 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + i32.const 224 + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $~lib/util/hash/HASH<~lib/string/String> call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.3 (result i32) - f32.const 0 - local.set $1 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $1 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end + i32.const 256 + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $~lib/util/hash/HASH<~lib/string/String> call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.4 (result i32) - f32.const inf - local.set $1 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $1 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.4 - end + i32.const 304 + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $~lib/util/hash/HASH<~lib/string/String> call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.5 (result i32) - f32.const nan:0x400000 - local.set $1 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $1 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.5 - end + i32.const 352 + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $~lib/util/hash/HASH<~lib/string/String> call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.0 (result i32) - f64.const 0 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.0 - end + f32.const 0 + call $~lib/util/hash/HASH call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.1 (result i32) - f64.const 1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.1 - end + f32.const 1 + call $~lib/util/hash/HASH call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.2 (result i32) - f64.const 1.1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.2 - end + f32.const 1.100000023841858 + call $~lib/util/hash/HASH call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.3 (result i32) - f64.const 0 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.3 - end + f32.const 0 + call $~lib/util/hash/HASH call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.4 (result i32) - f64.const inf - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.4 - end + f32.const inf + call $~lib/util/hash/HASH call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.5 (result i32) - f64.const nan:0x8000000000000 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.5 - end + f32.const nan:0x400000 + call $~lib/util/hash/HASH + call $std/hash/check + drop + f64.const 0 + call $~lib/util/hash/HASH + call $std/hash/check + drop + f64.const 1 + call $~lib/util/hash/HASH + call $std/hash/check + drop + f64.const 1.1 + call $~lib/util/hash/HASH + call $std/hash/check + drop + f64.const 0 + call $~lib/util/hash/HASH + call $std/hash/check + drop + f64.const inf + call $~lib/util/hash/HASH + call $std/hash/check + drop + f64.const nan:0x8000000000000 + call $~lib/util/hash/HASH call $std/hash/check drop global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 4 i32.add global.set $~lib/memory/__stack_pointer ) diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index a76f153d91..b9ed5ff757 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -1,17 +1,18 @@ (module (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_=>_none (func (param i32))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_=>_i64 (func (param i32) (result i64))) + (type $i32_i32_i64_=>_i32 (func (param i32 i32 i64) (result i32))) (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) (type $i32_i64_=>_none (func (param i32 i64))) (type $i32_i64_i32_=>_none (func (param i32 i64 i32))) (type $i32_i64_i64_=>_none (func (param i32 i64 i64))) (type $none_=>_i32 (func (result i32))) - (type $i32_i64_i32_=>_i32 (func (param i32 i64 i32) (result i32))) + (type $i32_i64_i64_=>_i32 (func (param i32 i64 i64) (result i32))) (type $i32_f32_=>_i32 (func (param i32 f32) (result i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) @@ -22,9 +23,11 @@ (type $i32_f64_=>_none (func (param i32 f64))) (type $i32_f64_i32_=>_none (func (param i32 f64 i32))) (type $i32_f64_f64_=>_none (func (param i32 f64 f64))) - (type $i64_=>_i32 (func (param i64) (result i32))) - (type $i32_f32_i32_=>_i32 (func (param i32 f32 i32) (result i32))) - (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) + (type $i32_f32_i64_=>_i32 (func (param i32 f32 i64) (result i32))) + (type $i32_f64_i64_=>_i32 (func (param i32 f64 i64) (result i32))) + (type $i64_=>_i64 (func (param i64) (result i64))) + (type $f32_=>_i64 (func (param f32) (result i64))) + (type $f64_=>_i64 (func (param f64) (result i64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 1036) "<") @@ -1823,12 +1826,13 @@ (func $~lib/map/Map#set:entries (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $1 call $~lib/rt/itcms/__link ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) local.get $0 i32.const 24 i32.shl @@ -1949,7 +1953,7 @@ local.tee $3 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $8 local.get $0 i32.load offset=24 @@ -1981,13 +1985,12 @@ i32.store offset=4 local.get $2 local.get $6 - local.get $1 local.get $7 - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - i32.and + call $~lib/util/hash/HASH + local.get $1 + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -2014,17 +2017,18 @@ call $~lib/map/Map#set:buckets local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.get $3 call $~lib/map/Map#set:entries local.get $0 local.get $5 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add @@ -2378,10 +2382,10 @@ local.tee $3 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $8 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 3 i32.shl i32.add @@ -2410,13 +2414,12 @@ i32.store8 offset=1 local.get $2 local.get $6 - local.get $1 local.get $7 - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - i32.and + call $~lib/util/hash/HASH + local.get $1 + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -2443,60 +2446,66 @@ call $~lib/map/Map#set:buckets local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.get $3 call $~lib/map/Map#set:entries local.get $0 local.get $5 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/util/hash/hash32 (param $0 i32) (result i32) - local.get $0 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - local.get $0 - i32.const 8 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.get $0 - i32.const 16 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) local.get $0 - i32.const 24 - i32.shr_u - i32.xor - i32.const 16777619 - i32.mul + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.const 2870177450012600265 + i64.xor + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.tee $1 + local.get $1 + i64.const 33 + i64.shr_u + i64.xor + i64.const -4417276706812531889 + i64.mul + local.tee $1 + local.get $1 + i64.const 29 + i64.shr_u + i64.xor + i64.const 1609587929392839161 + i64.mul + local.tee $1 + local.get $1 + i64.const 32 + i64.shr_u + i64.xor ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (local $3 i32) local.get $0 i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -2507,7 +2516,7 @@ if local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 i32.const 1 i32.and if (result i32) @@ -2522,7 +2531,7 @@ local.get $0 return end - local.get $2 + local.get $3 i32.const -2 i32.and local.set $0 @@ -2570,10 +2579,10 @@ local.tee $3 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $8 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 12 i32.mul i32.add @@ -2603,9 +2612,11 @@ local.get $2 local.get $6 local.get $7 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -2632,17 +2643,18 @@ call $~lib/map/Map#set:buckets local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.get $3 call $~lib/map/Map#set:entries local.get $0 local.get $5 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add @@ -2654,21 +2666,57 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets local.get $0 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $0 i32.const 48 call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:entries local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 + ) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) + local.get $0 + i32.const 255 + i32.and + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.const 2870177450012600262 + i64.xor + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.tee $1 + local.get $1 + i64.const 33 + i64.shr_u + i64.xor + i64.const -4417276706812531889 + i64.mul + local.tee $1 + local.get $1 + i64.const 29 + i64.shr_u + i64.xor + i64.const 1609587929392839161 + i64.mul + local.tee $1 + local.get $1 + i64.const 32 + i64.shr_u + i64.xor ) (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) (local $2 i32) @@ -2709,10 +2757,10 @@ local.tee $3 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $8 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 12 i32.mul i32.add @@ -2741,13 +2789,12 @@ i32.store offset=4 local.get $2 local.get $6 - local.get $1 local.get $7 - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - i32.and + call $~lib/util/hash/HASH + local.get $1 + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -2774,17 +2821,18 @@ call $~lib/map/Map#set:buckets local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.get $3 call $~lib/map/Map#set:entries local.get $0 local.get $5 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add @@ -2829,10 +2877,10 @@ local.tee $3 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $8 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 3 i32.shl i32.add @@ -2861,13 +2909,12 @@ i32.store8 offset=1 local.get $2 local.get $6 - local.get $1 local.get $7 - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - i32.and + call $~lib/util/hash/HASH + local.get $1 + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -2894,44 +2941,70 @@ call $~lib/map/Map#set:buckets local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.get $3 call $~lib/map/Map#set:entries local.get $0 local.get $5 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/util/hash/hash16 (param $0 i32) (result i32) - local.get $0 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) local.get $0 - i32.const 8 - i32.shr_u - i32.xor - i32.const 16777619 - i32.mul + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.const 2870177450012600263 + i64.xor + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.tee $1 + local.get $1 + i64.const 33 + i64.shr_u + i64.xor + i64.const -4417276706812531889 + i64.mul + local.tee $1 + local.get $1 + i64.const 29 + i64.shr_u + i64.xor + i64.const 1609587929392839161 + i64.mul + local.tee $1 + local.get $1 + i64.const 32 + i64.shr_u + i64.xor ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (local $3 i32) local.get $0 i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -2942,7 +3015,7 @@ if local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 i32.const 1 i32.and if (result i32) @@ -2959,7 +3032,7 @@ local.get $0 return end - local.get $2 + local.get $3 i32.const -2 i32.and local.set $0 @@ -3007,10 +3080,10 @@ local.tee $3 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $8 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 12 i32.mul i32.add @@ -3040,9 +3113,11 @@ local.get $2 local.get $6 local.get $7 - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -3069,17 +3144,18 @@ call $~lib/map/Map#set:buckets local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.get $3 call $~lib/map/Map#set:entries local.get $0 local.get $5 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add @@ -3133,10 +3209,10 @@ local.tee $3 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $8 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 3 i32.shl i32.add @@ -3166,9 +3242,11 @@ local.get $2 local.get $6 local.get $7 - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -3195,22 +3273,59 @@ call $~lib/map/Map#set:buckets local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.get $3 call $~lib/map/Map#set:entries local.get $0 local.get $5 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer ) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) + local.get $0 + i32.const 65535 + i32.and + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.const 2870177450012600263 + i64.xor + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.tee $1 + local.get $1 + i64.const 33 + i64.shr_u + i64.xor + i64.const -4417276706812531889 + i64.mul + local.tee $1 + local.get $1 + i64.const 29 + i64.shr_u + i64.xor + i64.const 1609587929392839161 + i64.mul + local.tee $1 + local.get $1 + i64.const 32 + i64.shr_u + i64.xor + ) (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -3250,10 +3365,10 @@ local.tee $3 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $8 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 12 i32.mul i32.add @@ -3283,9 +3398,11 @@ local.get $2 local.get $6 local.get $7 - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -3312,17 +3429,18 @@ call $~lib/map/Map#set:buckets local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.get $3 call $~lib/map/Map#set:entries local.get $0 local.get $5 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add @@ -3367,7 +3485,7 @@ local.tee $3 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $8 local.get $0 i32.load offset=24 @@ -3400,9 +3518,11 @@ local.get $2 local.get $6 local.get $7 - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -3429,29 +3549,32 @@ call $~lib/map/Map#set:buckets local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.get $3 call $~lib/map/Map#set:entries local.get $0 local.get $5 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (local $3 i32) local.get $0 i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -3462,7 +3585,7 @@ if local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 i32.const 1 i32.and if (result i32) @@ -3477,7 +3600,7 @@ local.get $0 return end - local.get $2 + local.get $3 i32.const -2 i32.and local.set $0 @@ -3525,10 +3648,10 @@ local.tee $3 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $8 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 12 i32.mul i32.add @@ -3558,9 +3681,11 @@ local.get $2 local.get $6 local.get $7 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -3587,17 +3712,18 @@ call $~lib/map/Map#set:buckets local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.get $3 call $~lib/map/Map#set:entries local.get $0 local.get $5 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add @@ -3642,10 +3768,10 @@ local.tee $3 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $8 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 12 i32.mul i32.add @@ -3675,9 +3801,11 @@ local.get $2 local.get $6 local.get $7 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -3704,95 +3832,68 @@ call $~lib/map/Map#set:buckets local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.get $3 call $~lib/map/Map#set:entries local.get $0 local.get $5 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/util/hash/hash64 (param $0 i64) (result i32) - (local $1 i32) + (func $~lib/util/hash/HASH (param $0 i64) (result i64) local.get $0 - i32.wrap_i64 - local.tee $1 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - local.get $1 - i32.const 8 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.get $1 - i32.const 16 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.get $1 - i32.const 24 - i32.shr_u - i32.xor - i32.const 16777619 - i32.mul + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const 2870177450012600269 + i64.xor + i64.const 27 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const 8796714831421723037 + i64.sub + local.tee $0 + local.get $0 + i64.const 33 + i64.shr_u + i64.xor + i64.const -4417276706812531889 + i64.mul + local.tee $0 + local.get $0 + i64.const 29 + i64.shr_u + i64.xor + i64.const 1609587929392839161 + i64.mul + local.tee $0 local.get $0 i64.const 32 i64.shr_u - i32.wrap_i64 - local.tee $1 - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.get $1 - i32.const 8 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.get $1 - i32.const 16 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.get $1 - i32.const 24 - i32.shr_u - i32.xor - i32.const 16777619 - i32.mul + i64.xor ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 i64) (param $2 i64) (result i32) + (local $3 i32) local.get $0 i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -3803,7 +3904,7 @@ if local.get $0 i32.load offset=12 - local.tee $2 + local.tee $3 i32.const 1 i32.and if (result i32) @@ -3818,7 +3919,7 @@ local.get $0 return end - local.get $2 + local.get $3 i32.const -2 i32.and local.set $0 @@ -3867,10 +3968,10 @@ local.tee $3 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $9 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 4 i32.shl i32.add @@ -3900,9 +4001,11 @@ local.get $2 local.get $8 local.get $5 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -3929,17 +4032,18 @@ call $~lib/map/Map#set:buckets local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.get $3 call $~lib/map/Map#set:entries local.get $0 local.get $7 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add @@ -3994,10 +4098,10 @@ local.tee $3 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $9 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 24 i32.mul i32.add @@ -4027,9 +4131,11 @@ local.get $2 local.get $8 local.get $5 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -4056,17 +4162,18 @@ call $~lib/map/Map#set:buckets local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.get $3 call $~lib/map/Map#set:entries local.get $0 local.get $7 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add @@ -4078,29 +4185,31 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets local.get $0 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $0 i32.const 64 call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:entries local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 i64) (param $2 i64) (result i32) + (local $3 i32) local.get $0 i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -4111,7 +4220,7 @@ if local.get $0 i32.load offset=12 - local.tee $2 + local.tee $3 i32.const 1 i32.and if (result i32) @@ -4126,7 +4235,7 @@ local.get $0 return end - local.get $2 + local.get $3 i32.const -2 i32.and local.set $0 @@ -4175,10 +4284,10 @@ local.tee $3 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $9 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 4 i32.shl i32.add @@ -4208,9 +4317,11 @@ local.get $2 local.get $8 local.get $5 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -4237,17 +4348,18 @@ call $~lib/map/Map#set:buckets local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.get $3 call $~lib/map/Map#set:entries local.get $0 local.get $7 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add @@ -4293,10 +4405,10 @@ local.tee $3 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $9 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 24 i32.mul i32.add @@ -4326,9 +4438,11 @@ local.get $2 local.get $8 local.get $5 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -4355,23 +4469,60 @@ call $~lib/map/Map#set:buckets local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.get $3 call $~lib/map/Map#set:entries local.get $0 local.get $7 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/map/Map#find (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/util/hash/HASH (param $0 f32) (result i64) + (local $1 i64) + local.get $0 + i32.reinterpret_f32 + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.const 2870177450012600265 + i64.xor + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.tee $1 + local.get $1 + i64.const 33 + i64.shr_u + i64.xor + i64.const -4417276706812531889 + i64.mul + local.tee $1 + local.get $1 + i64.const 29 + i64.shr_u + i64.xor + i64.const 1609587929392839161 + i64.mul + local.tee $1 + local.get $1 + i64.const 32 + i64.shr_u + i64.xor + ) + (func $~lib/map/Map#find (param $0 i32) (param $1 f32) (param $2 i64) (result i32) + (local $3 i32) local.get $0 i32.load local.get $2 @@ -4453,7 +4604,7 @@ local.tee $3 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $9 local.get $0 i32.load offset=24 @@ -4486,8 +4637,7 @@ local.get $2 local.get $8 local.get $5 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -4518,17 +4668,18 @@ call $~lib/map/Map#set:buckets local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.get $3 call $~lib/map/Map#set:entries local.get $0 local.get $7 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add @@ -4574,10 +4725,10 @@ local.tee $3 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $9 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 12 i32.mul i32.add @@ -4607,10 +4758,11 @@ local.get $2 local.get $8 local.get $5 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -4637,29 +4789,70 @@ call $~lib/map/Map#set:buckets local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.get $3 call $~lib/map/Map#set:entries local.get $0 local.get $7 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/map/Map#find (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/util/hash/HASH (param $0 f64) (result i64) + (local $1 i64) + local.get $0 + i64.reinterpret_f64 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const 2870177450012600269 + i64.xor + i64.const 27 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const 8796714831421723037 + i64.sub + local.tee $1 + local.get $1 + i64.const 33 + i64.shr_u + i64.xor + i64.const -4417276706812531889 + i64.mul + local.tee $1 + local.get $1 + i64.const 29 + i64.shr_u + i64.xor + i64.const 1609587929392839161 + i64.mul + local.tee $1 + local.get $1 + i64.const 32 + i64.shr_u + i64.xor + ) + (func $~lib/map/Map#find (param $0 i32) (param $1 f64) (param $2 i64) (result i32) + (local $3 i32) local.get $0 i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -4670,7 +4863,7 @@ if local.get $0 i32.load offset=12 - local.tee $2 + local.tee $3 i32.const 1 i32.and if (result i32) @@ -4685,7 +4878,7 @@ local.get $0 return end - local.get $2 + local.get $3 i32.const -2 i32.and local.set $0 @@ -4734,10 +4927,10 @@ local.tee $3 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $9 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 4 i32.shl i32.add @@ -4767,10 +4960,11 @@ local.get $2 local.get $8 local.get $5 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -4797,17 +4991,18 @@ call $~lib/map/Map#set:buckets local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.get $3 call $~lib/map/Map#set:entries local.get $0 local.get $7 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add @@ -4853,10 +5048,10 @@ local.tee $3 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $9 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 24 i32.mul i32.add @@ -4886,10 +5081,11 @@ local.get $2 local.get $8 local.get $5 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -4916,17 +5112,18 @@ call $~lib/map/Map#set:buckets local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.get $3 call $~lib/map/Map#set:entries local.get $0 local.get $7 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add @@ -4964,7 +5161,7 @@ i32.load call $~lib/rt/itcms/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/itcms/__visit return end @@ -5054,14 +5251,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -5072,7 +5262,7 @@ ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - (local $4 i32) + (local $4 i64) (local $5 i32) global.get $~lib/memory/__stack_pointer i32.const 8 @@ -5082,23 +5272,15 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store + local.get $1 + call $~lib/util/hash/HASH + local.set $4 global.get $~lib/memory/__stack_pointer local.get $0 i32.store - local.get $1 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - local.tee $3 - local.set $4 local.get $0 local.get $1 - local.get $3 + local.get $4 call $~lib/map/Map#find local.tee $3 if @@ -5107,9 +5289,9 @@ i32.store offset=4 else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if global.get $~lib/memory/__stack_pointer @@ -5117,39 +5299,40 @@ i32.store local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map#rehash end global.get $~lib/memory/__stack_pointer local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $3 i32.store offset=4 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $5 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $3 local.get $5 i32.const 12 @@ -5163,17 +5346,18 @@ i32.store offset=4 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $3 local.get $0 i32.load local.get $4 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -5204,14 +5388,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $0 i32.eqz @@ -5297,11 +5474,11 @@ i64.const 0 i64.store local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $5 global.get $~lib/memory/__stack_pointer local.get $0 - i32.load offset=16 + i32.load offset=24 local.set $0 global.get $~lib/memory/__stack_pointer i32.const 8 @@ -5483,11 +5660,11 @@ i64.const 0 i64.store local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $3 global.get $~lib/memory/__stack_pointer local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $4 call $~lib/array/Array#constructor local.tee $0 @@ -5543,7 +5720,7 @@ (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) + (local $5 i64) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -5552,25 +5729,21 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store + local.get $1 + call $~lib/util/hash/HASH + local.set $5 global.get $~lib/memory/__stack_pointer local.get $0 i32.store + local.get $1 + local.set $3 local.get $0 i32.load - local.get $1 - local.tee $3 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - local.tee $5 + local.get $5 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -5613,9 +5786,9 @@ i32.store8 offset=1 else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if global.get $~lib/memory/__stack_pointer @@ -5623,39 +5796,40 @@ i32.store local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map#rehash end global.get $~lib/memory/__stack_pointer local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $1 i32.store offset=4 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $4 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $1 local.get $4 i32.const 3 @@ -5669,17 +5843,18 @@ i32.store8 offset=1 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $1 local.get $0 i32.load local.get $5 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -5697,7 +5872,7 @@ ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - (local $4 i32) + (local $4 i64) (local $5 i32) global.get $~lib/memory/__stack_pointer i32.const 8 @@ -5708,7 +5883,7 @@ i64.const 0 i64.store local.get $1 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.set $4 global.get $~lib/memory/__stack_pointer local.get $0 @@ -5734,6 +5909,8 @@ i32.store local.get $0 local.get $0 + i32.load offset=28 + local.get $0 i32.load offset=20 i32.const 3 i32.mul @@ -5756,16 +5933,16 @@ end global.get $~lib/memory/__stack_pointer local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $3 i32.store offset=4 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $5 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $3 local.get $5 i32.const 12 @@ -5921,7 +6098,7 @@ i32.const 0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 3 call $~lib/rt/itcms/__new local.tee $0 @@ -5945,7 +6122,7 @@ i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -6036,7 +6213,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -6156,7 +6333,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -6193,7 +6370,7 @@ i32.const 0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 6 call $~lib/rt/itcms/__new local.tee $1 @@ -6217,7 +6394,7 @@ i32.store offset=24 local.get $1 i32.const 0 - i32.store offset=20 + i32.store offset=28 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -6325,7 +6502,7 @@ local.get $1 i32.store offset=4 local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -6340,7 +6517,7 @@ local.get $4 i32.store offset=4 local.get $4 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -6430,7 +6607,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -6525,7 +6702,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -6545,7 +6722,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 if i32.const 0 i32.const 1568 @@ -6559,42 +6736,6 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/util/hash/HASH (param $0 i32) (result i64) - (local $1 i64) - local.get $0 - i32.const 255 - i32.and - i64.extend_i32_u - i64.const -7046029288634856825 - i64.mul - i64.const 2870177450012600262 - i64.xor - i64.const 23 - i64.rotl - i64.const -4417276706812531889 - i64.mul - i64.const 1609587929392839161 - i64.add - local.tee $1 - local.get $1 - i64.const 33 - i64.shr_u - i64.xor - i64.const -4417276706812531889 - i64.mul - local.tee $1 - local.get $1 - i64.const 29 - i64.shr_u - i64.xor - i64.const 1609587929392839161 - i64.mul - local.tee $1 - local.get $1 - i64.const 32 - i64.shr_u - i64.xor - ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) global.get $~lib/memory/__stack_pointer i32.const 4 @@ -6621,7 +6762,7 @@ ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - (local $4 i32) + (local $4 i64) (local $5 i32) global.get $~lib/memory/__stack_pointer i32.const 8 @@ -6631,23 +6772,15 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store + local.get $1 + call $~lib/util/hash/HASH + local.set $4 global.get $~lib/memory/__stack_pointer local.get $0 i32.store - local.get $1 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - local.tee $3 - local.set $4 local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH - local.tee $5 + local.get $4 call $~lib/map/Map#find local.tee $3 if @@ -6666,6 +6799,8 @@ i32.store local.get $0 local.get $0 + i32.load offset=28 + local.get $0 i32.load offset=20 i32.const 3 i32.mul @@ -6688,16 +6823,16 @@ end global.get $~lib/memory/__stack_pointer local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $3 i32.store offset=4 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $5 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $3 local.get $5 i32.const 12 @@ -6788,11 +6923,11 @@ i64.const 0 i64.store local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $5 global.get $~lib/memory/__stack_pointer local.get $0 - i32.load offset=16 + i32.load offset=24 local.set $0 global.get $~lib/memory/__stack_pointer i32.const 8 @@ -6909,7 +7044,7 @@ (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) + (local $5 i64) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -6918,15 +7053,14 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store + local.get $1 + call $~lib/util/hash/HASH + local.set $5 global.get $~lib/memory/__stack_pointer local.get $0 i32.store - local.get $0 - i32.load local.get $1 - local.tee $3 - call $~lib/util/hash/HASH - local.set $5 + local.set $3 local.get $0 i32.load local.get $5 @@ -6986,6 +7120,8 @@ i32.store local.get $0 local.get $0 + i32.load offset=28 + local.get $0 i32.load offset=20 i32.const 3 i32.mul @@ -7008,16 +7144,16 @@ end global.get $~lib/memory/__stack_pointer local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $1 i32.store offset=4 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $4 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $1 local.get $4 i32.const 3 @@ -7173,7 +7309,7 @@ i32.const 0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 8 call $~lib/rt/itcms/__new local.tee $0 @@ -7197,7 +7333,7 @@ i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -7282,7 +7418,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -7394,7 +7530,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -7431,7 +7567,7 @@ i32.const 0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 10 call $~lib/rt/itcms/__new local.tee $1 @@ -7455,7 +7591,7 @@ i32.store offset=24 local.get $1 i32.const 0 - i32.store offset=20 + i32.store offset=28 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -7563,7 +7699,7 @@ local.get $1 i32.store offset=4 local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -7578,7 +7714,7 @@ local.get $4 i32.store offset=4 local.get $4 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -7664,7 +7800,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -7755,7 +7891,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -7775,7 +7911,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 if i32.const 0 i32.const 1568 @@ -7815,7 +7951,7 @@ ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - (local $4 i32) + (local $4 i64) (local $5 i32) global.get $~lib/memory/__stack_pointer i32.const 8 @@ -7826,11 +7962,7 @@ i64.const 0 i64.store local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH local.set $4 global.get $~lib/memory/__stack_pointer local.get $0 @@ -7856,6 +7988,8 @@ i32.store local.get $0 local.get $0 + i32.load offset=28 + local.get $0 i32.load offset=20 i32.const 3 i32.mul @@ -7878,16 +8012,16 @@ end global.get $~lib/memory/__stack_pointer local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $3 i32.store offset=4 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $5 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $3 local.get $5 i32.const 12 @@ -8033,7 +8167,7 @@ i64.const 0 i64.store local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 global.get $~lib/memory/__stack_pointer local.get $0 @@ -8158,7 +8292,7 @@ (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) + (local $5 i64) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -8168,11 +8302,7 @@ i64.const 0 i64.store local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH local.set $5 global.get $~lib/memory/__stack_pointer local.get $0 @@ -8238,6 +8368,8 @@ i32.store local.get $0 local.get $0 + i32.load offset=28 + local.get $0 i32.load offset=20 i32.const 3 i32.mul @@ -8260,16 +8392,16 @@ end global.get $~lib/memory/__stack_pointer local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $1 i32.store offset=4 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $4 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $1 local.get $4 i32.const 3 @@ -8425,7 +8557,7 @@ i32.const 0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 11 call $~lib/rt/itcms/__new local.tee $0 @@ -8449,7 +8581,7 @@ i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -8540,7 +8672,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -8660,7 +8792,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -8697,7 +8829,7 @@ i32.const 0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 13 call $~lib/rt/itcms/__new local.tee $1 @@ -8721,7 +8853,7 @@ i32.store offset=24 local.get $1 i32.const 0 - i32.store offset=20 + i32.store offset=28 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -8831,7 +8963,7 @@ local.get $1 i32.store offset=4 local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -8846,7 +8978,7 @@ local.get $4 i32.store offset=4 local.get $4 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -8936,7 +9068,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -9031,7 +9163,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -9051,7 +9183,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 if i32.const 0 i32.const 1568 @@ -9065,42 +9197,6 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/util/hash/HASH (param $0 i32) (result i64) - (local $1 i64) - local.get $0 - i32.const 65535 - i32.and - i64.extend_i32_u - i64.const -7046029288634856825 - i64.mul - i64.const 2870177450012600263 - i64.xor - i64.const 23 - i64.rotl - i64.const -4417276706812531889 - i64.mul - i64.const 1609587929392839161 - i64.add - local.tee $1 - local.get $1 - i64.const 33 - i64.shr_u - i64.xor - i64.const -4417276706812531889 - i64.mul - local.tee $1 - local.get $1 - i64.const 29 - i64.shr_u - i64.xor - i64.const 1609587929392839161 - i64.mul - local.tee $1 - local.get $1 - i64.const 32 - i64.shr_u - i64.xor - ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) global.get $~lib/memory/__stack_pointer i32.const 4 @@ -9127,7 +9223,7 @@ ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - (local $4 i32) + (local $4 i64) (local $5 i32) global.get $~lib/memory/__stack_pointer i32.const 8 @@ -9138,9 +9234,7 @@ i64.const 0 i64.store local.get $1 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH local.set $4 global.get $~lib/memory/__stack_pointer local.get $0 @@ -9166,6 +9260,8 @@ i32.store local.get $0 local.get $0 + i32.load offset=28 + local.get $0 i32.load offset=20 i32.const 3 i32.mul @@ -9188,16 +9284,16 @@ end global.get $~lib/memory/__stack_pointer local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $3 i32.store offset=4 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $5 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $3 local.get $5 i32.const 12 @@ -9290,7 +9386,7 @@ i64.const 0 i64.store local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 global.get $~lib/memory/__stack_pointer local.get $0 @@ -9415,7 +9511,7 @@ (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) + (local $5 i64) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -9425,9 +9521,7 @@ i64.const 0 i64.store local.get $1 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH local.set $5 global.get $~lib/memory/__stack_pointer local.get $0 @@ -9493,6 +9587,8 @@ i32.store local.get $0 local.get $0 + i32.load offset=28 + local.get $0 i32.load offset=20 i32.const 3 i32.mul @@ -9515,16 +9611,16 @@ end global.get $~lib/memory/__stack_pointer local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $1 i32.store offset=4 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $4 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $1 local.get $4 i32.const 3 @@ -9680,7 +9776,7 @@ i32.const 0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 14 call $~lib/rt/itcms/__new local.tee $0 @@ -9704,7 +9800,7 @@ i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -9789,7 +9885,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -9901,7 +9997,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -9938,7 +10034,7 @@ i32.const 0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 16 call $~lib/rt/itcms/__new local.tee $1 @@ -9962,7 +10058,7 @@ i32.store offset=24 local.get $1 i32.const 0 - i32.store offset=20 + i32.store offset=28 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -10072,7 +10168,7 @@ local.get $1 i32.store offset=4 local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -10087,7 +10183,7 @@ local.get $4 i32.store offset=4 local.get $4 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -10173,7 +10269,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -10264,7 +10360,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -10284,7 +10380,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 if i32.const 0 i32.const 1568 @@ -10538,7 +10634,7 @@ local.get $1 i32.store offset=4 local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -10642,7 +10738,7 @@ local.get $1 i32.store offset=4 local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -10666,11 +10762,11 @@ i64.const 0 i64.store local.get $1 - i32.load offset=8 + i32.load offset=16 local.set $6 global.get $~lib/memory/__stack_pointer local.get $1 - i32.load offset=16 + i32.load offset=24 local.tee $7 call $~lib/array/Array#constructor local.tee $2 @@ -10822,7 +10918,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -10837,7 +10933,7 @@ local.get $4 i32.store offset=4 local.get $4 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -10919,7 +11015,7 @@ local.get $1 i32.store offset=4 local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -11006,7 +11102,7 @@ local.get $1 i32.store offset=4 local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -11026,7 +11122,7 @@ local.get $1 i32.store offset=4 local.get $1 - i32.load offset=20 + i32.load offset=28 if i32.const 0 i32.const 1568 @@ -11055,7 +11151,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -11066,7 +11162,7 @@ ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - (local $4 i32) + (local $4 i64) (local $5 i32) global.get $~lib/memory/__stack_pointer i32.const 8 @@ -11077,7 +11173,7 @@ i64.const 0 i64.store local.get $1 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.set $4 global.get $~lib/memory/__stack_pointer local.get $0 @@ -11093,9 +11189,9 @@ i32.store offset=4 else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if global.get $~lib/memory/__stack_pointer @@ -11103,39 +11199,40 @@ i32.store local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map#rehash end global.get $~lib/memory/__stack_pointer local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $3 i32.store offset=4 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $5 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $3 local.get $5 i32.const 12 @@ -11149,17 +11246,18 @@ i32.store offset=4 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $3 local.get $0 i32.load local.get $4 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -11190,7 +11288,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $0 i32.eqz @@ -11227,7 +11325,7 @@ i64.const 0 i64.store local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 global.get $~lib/memory/__stack_pointer local.get $0 @@ -11351,7 +11449,7 @@ ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - (local $4 i32) + (local $4 i64) (local $5 i32) global.get $~lib/memory/__stack_pointer i32.const 8 @@ -11362,7 +11460,7 @@ i64.const 0 i64.store local.get $1 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.set $4 global.get $~lib/memory/__stack_pointer local.get $0 @@ -11378,9 +11476,9 @@ i32.store offset=4 else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if global.get $~lib/memory/__stack_pointer @@ -11388,39 +11486,40 @@ i32.store local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map#rehash end global.get $~lib/memory/__stack_pointer local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $3 i32.store offset=4 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $5 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $3 local.get $5 i32.const 12 @@ -11434,17 +11533,18 @@ i32.store offset=4 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $3 local.get $0 i32.load local.get $4 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -11476,7 +11576,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $1 i32.eqz @@ -11495,20 +11595,21 @@ i32.store offset=8 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.sub - i32.store offset=20 + i32.store offset=28 local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 local.tee $2 i32.const 1 i32.add i32.const 4 local.get $0 - i32.load offset=20 + i32.load offset=28 local.tee $1 local.get $1 i32.const 4 @@ -11517,9 +11618,9 @@ i32.ge_u if (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 @@ -11574,7 +11675,7 @@ i32.const 0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 17 call $~lib/rt/itcms/__new local.tee $0 @@ -11598,7 +11699,7 @@ i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -11677,7 +11778,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -11781,7 +11882,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -11818,7 +11919,7 @@ i32.const 0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 19 call $~lib/rt/itcms/__new local.tee $1 @@ -11842,7 +11943,7 @@ i32.store offset=24 local.get $1 i32.const 0 - i32.store offset=20 + i32.store offset=28 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -11952,7 +12053,7 @@ local.get $1 i32.store offset=4 local.get $1 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -11967,7 +12068,7 @@ local.get $4 i32.store offset=4 local.get $4 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -12049,7 +12150,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -12136,7 +12237,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -12156,7 +12257,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 if i32.const 0 i32.const 1568 @@ -12196,7 +12297,7 @@ ) (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) - (local $4 i32) + (local $4 i64) (local $5 i32) global.get $~lib/memory/__stack_pointer i32.const 8 @@ -12207,7 +12308,7 @@ i64.const 0 i64.store local.get $1 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.set $4 global.get $~lib/memory/__stack_pointer local.get $0 @@ -12233,6 +12334,8 @@ i32.store local.get $0 local.get $0 + i32.load offset=28 + local.get $0 i32.load offset=20 i32.const 3 i32.mul @@ -12255,16 +12358,16 @@ end global.get $~lib/memory/__stack_pointer local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $3 i32.store offset=4 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $5 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $3 local.get $5 i32.const 4 @@ -12410,7 +12513,7 @@ i64.const 0 i64.store local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 global.get $~lib/memory/__stack_pointer local.get $0 @@ -12607,7 +12710,7 @@ (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i64) (local $3 i32) (local $4 i32) - (local $5 i32) + (local $5 i64) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -12617,7 +12720,7 @@ i64.const 0 i64.store local.get $1 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.set $5 global.get $~lib/memory/__stack_pointer local.get $0 @@ -12626,8 +12729,9 @@ i32.load local.get $5 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -12678,6 +12782,8 @@ i32.store local.get $0 local.get $0 + i32.load offset=28 + local.get $0 i32.load offset=20 i32.const 3 i32.mul @@ -12700,16 +12806,16 @@ end global.get $~lib/memory/__stack_pointer local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $3 i32.store offset=4 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $4 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $3 local.get $4 i32.const 24 @@ -12866,7 +12972,7 @@ i32.const 0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 20 call $~lib/rt/itcms/__new local.tee $0 @@ -12876,21 +12982,21 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets local.get $0 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $0 i32.const 64 call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:entries local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -12971,7 +13077,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -13078,7 +13184,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -13115,7 +13221,7 @@ i32.const 0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 22 call $~lib/rt/itcms/__new local.tee $2 @@ -13139,7 +13245,7 @@ i32.store offset=24 local.get $2 i32.const 0 - i32.store offset=20 + i32.store offset=28 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -13250,7 +13356,7 @@ local.get $2 i32.store offset=4 local.get $2 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -13265,7 +13371,7 @@ local.get $3 i32.store offset=4 local.get $3 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -13348,7 +13454,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -13436,7 +13542,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -13456,7 +13562,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 if i32.const 0 i32.const 1568 @@ -13485,7 +13591,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -13496,7 +13602,7 @@ ) (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) - (local $4 i32) + (local $4 i64) (local $5 i32) global.get $~lib/memory/__stack_pointer i32.const 8 @@ -13507,7 +13613,7 @@ i64.const 0 i64.store local.get $1 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.set $4 global.get $~lib/memory/__stack_pointer local.get $0 @@ -13523,9 +13629,9 @@ i32.store offset=8 else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if global.get $~lib/memory/__stack_pointer @@ -13533,39 +13639,40 @@ i32.store local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map#rehash end global.get $~lib/memory/__stack_pointer local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $3 i32.store offset=4 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $5 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $3 local.get $5 i32.const 4 @@ -13579,17 +13686,18 @@ i32.store offset=8 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $3 local.get $0 i32.load local.get $4 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -13620,7 +13728,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $0 i32.eqz @@ -13657,7 +13765,7 @@ i64.const 0 i64.store local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 global.get $~lib/memory/__stack_pointer local.get $0 @@ -13782,7 +13890,7 @@ (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i64) (local $3 i32) (local $4 i32) - (local $5 i32) + (local $5 i64) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -13792,7 +13900,7 @@ i64.const 0 i64.store local.get $1 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.set $5 global.get $~lib/memory/__stack_pointer local.get $0 @@ -13801,8 +13909,9 @@ i32.load local.get $5 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -13843,9 +13952,9 @@ i64.store offset=8 else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if global.get $~lib/memory/__stack_pointer @@ -13853,39 +13962,40 @@ i32.store local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map#rehash end global.get $~lib/memory/__stack_pointer local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $3 i32.store offset=4 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $4 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $3 local.get $4 i32.const 24 @@ -13899,17 +14009,18 @@ i64.store offset=8 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $3 local.get $0 i32.load local.get $5 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -13942,7 +14053,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $2 i32.eqz @@ -13961,20 +14072,21 @@ i32.store offset=12 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.sub - i32.store offset=20 + i32.store offset=28 local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 local.tee $3 i32.const 1 i32.add i32.const 4 local.get $0 - i32.load offset=20 + i32.load offset=28 local.tee $2 local.get $2 i32.const 4 @@ -13983,9 +14095,9 @@ i32.ge_u if (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 @@ -14040,7 +14152,7 @@ i32.const 0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 23 call $~lib/rt/itcms/__new local.tee $0 @@ -14050,21 +14162,21 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets local.get $0 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $0 i32.const 64 call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:entries local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -14145,7 +14257,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -14252,7 +14364,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -14289,7 +14401,7 @@ i32.const 0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 25 call $~lib/rt/itcms/__new local.tee $2 @@ -14313,7 +14425,7 @@ i32.store offset=24 local.get $2 i32.const 0 - i32.store offset=20 + i32.store offset=28 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -14424,7 +14536,7 @@ local.get $2 i32.store offset=4 local.get $2 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -14439,7 +14551,7 @@ local.get $3 i32.store offset=4 local.get $3 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -14522,7 +14634,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -14610,7 +14722,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -14630,7 +14742,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 if i32.const 0 i32.const 1568 @@ -14670,7 +14782,7 @@ ) (func $~lib/map/Map#set (param $0 i32) (param $1 f32) (param $2 i32) (local $3 i32) - (local $4 i32) + (local $4 i64) (local $5 i32) global.get $~lib/memory/__stack_pointer i32.const 8 @@ -14681,8 +14793,7 @@ i64.const 0 i64.store local.get $1 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.set $4 global.get $~lib/memory/__stack_pointer local.get $0 @@ -14708,6 +14819,8 @@ i32.store local.get $0 local.get $0 + i32.load offset=28 + local.get $0 i32.load offset=20 i32.const 3 i32.mul @@ -14730,16 +14843,16 @@ end global.get $~lib/memory/__stack_pointer local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $3 i32.store offset=4 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $5 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $3 local.get $5 i32.const 12 @@ -14837,7 +14950,7 @@ local.set $6 global.get $~lib/memory/__stack_pointer local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $8 local.set $2 global.get $~lib/memory/__stack_pointer @@ -15005,7 +15118,7 @@ ) (func $~lib/map/Map#set (param $0 i32) (param $1 f32) (param $2 f32) (local $3 i32) - (local $4 i32) + (local $4 i64) (local $5 i32) global.get $~lib/memory/__stack_pointer i32.const 8 @@ -15016,8 +15129,7 @@ i64.const 0 i64.store local.get $1 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.set $4 global.get $~lib/memory/__stack_pointer local.get $0 @@ -15043,6 +15155,8 @@ i32.store local.get $0 local.get $0 + i32.load offset=28 + local.get $0 i32.load offset=20 i32.const 3 i32.mul @@ -15065,16 +15179,16 @@ end global.get $~lib/memory/__stack_pointer local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $3 i32.store offset=4 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $5 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $3 local.get $5 i32.const 12 @@ -15095,7 +15209,7 @@ local.get $3 local.get $0 i32.load - local.get $5 + local.get $4 local.get $0 i64.load offset=8 i64.and @@ -15231,7 +15345,7 @@ i32.const 0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 26 call $~lib/rt/itcms/__new local.tee $0 @@ -15241,21 +15355,21 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets local.get $0 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $0 i32.const 48 call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:entries local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -15336,7 +15450,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -15443,7 +15557,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -15480,7 +15594,7 @@ i32.const 0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 28 call $~lib/rt/itcms/__new local.tee $2 @@ -15504,7 +15618,7 @@ i32.store offset=24 local.get $2 i32.const 0 - i32.store offset=20 + i32.store offset=28 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -15615,7 +15729,7 @@ local.get $2 i32.store offset=4 local.get $2 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -15630,7 +15744,7 @@ local.get $3 i32.store offset=4 local.get $3 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -15713,7 +15827,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -15801,7 +15915,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -15821,7 +15935,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 if i32.const 0 i32.const 1568 @@ -15861,7 +15975,7 @@ ) (func $~lib/map/Map#set (param $0 i32) (param $1 f64) (param $2 i32) (local $3 i32) - (local $4 i32) + (local $4 i64) (local $5 i32) global.get $~lib/memory/__stack_pointer i32.const 8 @@ -15872,8 +15986,7 @@ i64.const 0 i64.store local.get $1 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.set $4 global.get $~lib/memory/__stack_pointer local.get $0 @@ -15899,6 +16012,8 @@ i32.store local.get $0 local.get $0 + i32.load offset=28 + local.get $0 i32.load offset=20 i32.const 3 i32.mul @@ -15921,16 +16036,16 @@ end global.get $~lib/memory/__stack_pointer local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $3 i32.store offset=4 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $5 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $3 local.get $5 i32.const 4 @@ -16028,7 +16143,7 @@ local.set $6 global.get $~lib/memory/__stack_pointer local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $8 local.set $2 global.get $~lib/memory/__stack_pointer @@ -16197,7 +16312,7 @@ (func $~lib/map/Map#set (param $0 i32) (param $1 f64) (param $2 f64) (local $3 i32) (local $4 i32) - (local $5 i32) + (local $5 i64) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -16207,8 +16322,7 @@ i64.const 0 i64.store local.get $1 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.set $5 global.get $~lib/memory/__stack_pointer local.get $0 @@ -16270,6 +16384,8 @@ i32.store local.get $0 local.get $0 + i32.load offset=28 + local.get $0 i32.load offset=20 i32.const 3 i32.mul @@ -16292,16 +16408,16 @@ end global.get $~lib/memory/__stack_pointer local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $3 i32.store offset=4 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $4 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $3 local.get $4 i32.const 24 @@ -16458,7 +16574,7 @@ i32.const 0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 29 call $~lib/rt/itcms/__new local.tee $0 @@ -16468,21 +16584,21 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets local.get $0 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $0 i32.const 64 call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:entries local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -16563,7 +16679,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -16670,7 +16786,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -16707,7 +16823,7 @@ i32.const 0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 31 call $~lib/rt/itcms/__new local.tee $2 @@ -16731,7 +16847,7 @@ i32.store offset=24 local.get $2 i32.const 0 - i32.store offset=20 + i32.store offset=28 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -16842,7 +16958,7 @@ local.get $2 i32.store offset=4 local.get $2 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -16857,7 +16973,7 @@ local.get $3 i32.store offset=4 local.get $3 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -16940,7 +17056,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -17028,7 +17144,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -17048,7 +17164,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 if i32.const 0 i32.const 1568 @@ -17180,7 +17296,7 @@ i32.const 0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 7 call $~lib/rt/itcms/__new local.tee $0 @@ -17190,21 +17306,21 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets local.get $0 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $0 i32.const 48 call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:entries local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add diff --git a/tests/compiler/std/map.untouched.wat b/tests/compiler/std/map.untouched.wat index 42a7f0971c..7c2f82c2ef 100644 --- a/tests/compiler/std/map.untouched.wat +++ b/tests/compiler/std/map.untouched.wat @@ -2,15 +2,12 @@ (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i64_=>_none (func (param i32 i64))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_none (func (param i32))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $none_=>_none (func)) -<<<<<<< HEAD + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i64_=>_i32 (func (param i32 i32 i64) (result i32))) -======= - (type $i32_i64_=>_none (func (param i32 i64))) ->>>>>>> master (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) (type $i32_i64_i64_=>_i32 (func (param i32 i64 i64) (result i32))) (type $i32_=>_i64 (func (param i32) (result i64))) @@ -21,32 +18,21 @@ (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) (type $i32_i32_f64_=>_none (func (param i32 i32 f64))) -<<<<<<< HEAD (type $i32_i64_i32_=>_i32 (func (param i32 i64 i32) (result i32))) (type $i32_f32_i64_=>_i32 (func (param i32 f32 i64) (result i32))) (type $i32_f64_i64_=>_i32 (func (param i32 f64 i64) (result i32))) (type $i64_=>_i64 (func (param i64) (result i64))) - (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) - (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) - (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $i32_f32_i32_=>_i32 (func (param i32 f32 i32) (result i32))) -======= - (type $i32_i64_i64_=>_i32 (func (param i32 i64 i64) (result i32))) (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) - (type $i64_=>_i32 (func (param i64) (result i32))) ->>>>>>> master + (type $i32_f32_i32_=>_i32 (func (param i32 f32 i32) (result i32))) (type $i32_f32_f32_=>_i32 (func (param i32 f32 f32) (result i32))) (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) (type $i32_f64_f64_=>_i32 (func (param i32 f64 f64) (result i32))) -<<<<<<< HEAD (type $f32_=>_i64 (func (param f32) (result i64))) (type $f64_=>_i64 (func (param f64) (result i64))) -======= (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) ->>>>>>> master (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 12) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e\00\00\00\00\00") @@ -1669,201 +1655,8 @@ call $~lib/builtins/abort unreachable end -<<<<<<< HEAD - local.get $1 - i32.const 0 - call $~lib/rt/pure/__new - local.set $2 - local.get $2 - i32.const 0 - local.get $1 - call $~lib/memory/memory.fill - local.get $2 - call $~lib/rt/pure/__retain - local.set $3 - local.get $0 - call $~lib/rt/pure/__release - local.get $3 - ) - (func $~lib/map/Map#constructor (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 32 - i32.const 3 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.set $0 - end - local.get $0 - i32.const 0 - i32.const 4 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store - local.get $0 - i64.const 4 - i64.const 1 - i64.sub - i64.store offset=8 - local.get $0 - i32.const 0 - i32.const 4 - i32.const 12 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $0 - i32.const 0 - i32.store offset=28 - local.get $0 - ) - (func $~lib/util/hash/HASH (param $0 i32) (result i64) - (local $1 i64) - (local $2 i32) - (local $3 i64) - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 4 - i32.le_u - drop - local.get $0 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - local.set $2 - i64.const 1 - local.set $1 - i64.const 0 - i64.const 2870177450012600261 - i64.add - local.get $1 - i64.add - local.set $3 - local.get $3 - local.get $2 - i64.extend_i32_u - i64.const -7046029288634856825 - i64.mul - i64.xor - local.set $3 - local.get $3 - i64.const 23 - i64.rotl - i64.const -4417276706812531889 - i64.mul - i64.const 1609587929392839161 - i64.add - local.set $3 - local.get $3 - local.get $3 - i64.const 33 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const -4417276706812531889 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 29 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const 1609587929392839161 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 32 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - return - ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.get $2 - local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - i32.load - local.set $3 - loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 - if - local.get $3 - i32.load offset=8 - local.set $5 - local.get $5 - i32.const 1 - i32.and - i32.eqz - if (result i32) - local.get $3 - i32.load8_s - local.get $1 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i32.eq - else - i32.const 0 - end - if - local.get $3 - return - end - local.get $5 - i32.const 1 - i32.const -1 - i32.xor - i32.and - local.set $3 - br $while-continue|0 - end - end - i32.const 0 - ) - (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - local.get $1 - call $~lib/util/hash/HASH - call $~lib/map/Map#find - i32.const 0 - i32.ne -======= local.get $0 call $~lib/rt/tlsf/computeSize ->>>>>>> master ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -1875,148 +1668,58 @@ (local $8 i32) (local $9 i32) local.get $1 -<<<<<<< HEAD + i32.const 256 + i32.lt_u + if + i32.const 0 + local.set $2 + local.get $1 + i32.const 4 + i32.shr_u + local.set $3 + else + local.get $1 + i32.const 536870910 + i32.lt_u + if (result i32) + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.add + i32.const 1 + i32.sub + else + local.get $1 + end + local.set $4 + i32.const 31 + local.get $4 + i32.clz + i32.sub + local.set $2 + local.get $4 + local.get $2 + i32.const 4 + i32.sub + i32.shr_u + i32.const 1 + i32.const 4 + i32.shl + i32.xor + local.set $3 + local.get $2 + i32.const 8 + i32.const 1 + i32.sub + i32.sub + local.set $2 + end i32.const 1 - i32.add - local.set $2 - i32.const 0 - local.get $2 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $3 - local.get $2 - i32.const 8 - i32.mul - i32.const 3 - i32.div_s - local.set $4 - i32.const 0 - local.get $4 - i32.const 12 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $0 - i32.load offset=16 - local.set $6 - local.get $6 - local.get $0 - i32.load offset=24 - i32.const 12 - i32.mul - i32.add - local.set $7 - local.get $5 - local.set $8 - loop $while-continue|0 - local.get $6 - local.get $7 - i32.ne - local.set $9 - local.get $9 - if - local.get $6 - local.set $10 - local.get $10 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $8 - local.set $11 - local.get $10 - i32.load8_s - local.set $12 - local.get $11 - local.get $12 - i32.store8 - local.get $11 - local.get $10 - i32.load offset=4 - i32.store offset=4 - local.get $12 - call $~lib/util/hash/HASH - local.get $1 - i64.extend_i32_u - i64.and - i32.wrap_i64 - local.set $13 - local.get $3 - local.get $13 - i32.const 4 - i32.mul - i32.add - local.set $14 - local.get $11 - local.get $14 - i32.load - i32.store offset=8 - local.get $14 - local.get $8 - i32.store - local.get $8 - i32.const 12 - i32.add - local.set $8 - end - local.get $6 - i32.const 12 -======= - i32.const 256 - i32.lt_u - if - i32.const 0 - local.set $2 - local.get $1 - i32.const 4 - i32.shr_u - local.set $3 - else - local.get $1 - i32.const 536870910 - i32.lt_u - if (result i32) - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl ->>>>>>> master - i32.add - i32.const 1 - i32.sub - else - local.get $1 - end - local.set $4 - i32.const 31 - local.get $4 - i32.clz - i32.sub - local.set $2 - local.get $4 - local.get $2 - i32.const 4 - i32.sub - i32.shr_u - i32.const 1 - i32.const 4 - i32.shl - i32.xor - local.set $3 - local.get $2 - i32.const 8 - i32.const 1 - i32.sub - i32.sub - local.set $2 - end - i32.const 1 - drop + drop local.get $2 i32.const 23 i32.lt_u @@ -2027,57 +1730,6 @@ else i32.const 0 end -<<<<<<< HEAD - local.get $12 - i32.store - local.get $0 - local.get $1 - i64.extend_i32_u - i64.store offset=8 - local.get $0 - local.tee $13 - local.get $5 - local.tee $14 - local.get $13 - i32.load offset=16 - local.tee $11 - i32.ne - if - local.get $14 - call $~lib/rt/pure/__retain - local.set $14 - local.get $11 - call $~lib/rt/pure/__release - end - local.get $14 - i32.store offset=16 - local.get $0 - local.get $4 - i32.store offset=20 - local.get $0 - local.get $0 - i32.load offset=28 - i32.store offset=24 - local.get $3 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - ) - (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i64) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $3 - local.get $0 - local.get $1 - local.get $3 - call $~lib/map/Map#find - local.set $4 - local.get $4 -======= i32.eqz if i32.const 0 @@ -2108,23 +1760,10 @@ local.set $7 local.get $6 i32.eqz ->>>>>>> master if local.get $0 i32.load i32.const 0 -<<<<<<< HEAD - drop - local.get $4 - local.get $2 - i32.store offset=4 - else - local.get $0 - i32.load offset=24 - local.get $0 - i32.load offset=20 - i32.eq -======= i32.const -1 i32.xor local.get $2 @@ -2135,7 +1774,6 @@ local.set $5 local.get $5 i32.eqz ->>>>>>> master if i32.const 0 local.set $7 @@ -2167,29 +1805,6 @@ unreachable end local.get $0 -<<<<<<< HEAD - i32.load offset=28 - local.get $0 - i32.load offset=20 - i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s - if (result i64) - local.get $0 - i64.load offset=8 - else - local.get $0 - i64.load offset=8 - i64.const 1 - i64.shl - i64.const 1 - i64.or - end - i32.wrap_i64 - call $~lib/map/Map#rehash -======= local.set $9 local.get $2 local.set $8 @@ -2207,47 +1822,9 @@ i32.add i32.load offset=96 local.set $7 ->>>>>>> master end else local.get $0 -<<<<<<< HEAD - i32.load offset=16 - call $~lib/rt/pure/__retain - local.set $5 - local.get $5 - local.get $0 - local.get $0 - i32.load offset=24 - local.tee $6 - i32.const 1 - i32.add - i32.store offset=24 - local.get $6 - i32.const 12 - i32.mul - i32.add - local.set $4 - local.get $4 - local.get $1 - i32.store8 - local.get $4 - local.get $2 - i32.store offset=4 - local.get $0 - local.get $0 - i32.load offset=28 - i32.const 1 - i32.add - i32.store offset=28 - local.get $0 - i32.load - local.get $3 - local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 -======= local.set $9 local.get $2 local.set $8 @@ -2256,44 +1833,20 @@ local.set $4 local.get $9 local.get $8 ->>>>>>> master i32.const 4 i32.shl local.get $4 i32.add -<<<<<<< HEAD - local.set $6 - local.get $4 - local.get $6 - i32.load - i32.store offset=8 - local.get $6 - local.get $4 - i32.store - local.get $5 - call $~lib/rt/pure/__release -======= i32.const 2 i32.shl i32.add i32.load offset=96 local.set $7 ->>>>>>> master end local.get $7 ) (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) (local $2 i32) -<<<<<<< HEAD - local.get $0 - local.get $1 - local.get $1 - call $~lib/util/hash/HASH - call $~lib/map/Map#find - local.set $2 - local.get $2 - i32.eqz -======= (local $3 i32) (local $4 i32) (local $5 i32) @@ -2357,7 +1910,6 @@ memory.grow i32.const 0 i32.lt_s ->>>>>>> master if local.get $4 memory.grow @@ -2367,14 +1919,6 @@ unreachable end end -<<<<<<< HEAD - local.get $2 - i32.load offset=4 - ) - (func $~lib/map/Map#get:size (param $0 i32) (result i32) - local.get $0 - i32.load offset=28 -======= memory.size local.set $7 local.get $0 @@ -2386,7 +1930,6 @@ i32.shl call $~lib/rt/tlsf/addMemory drop ->>>>>>> master ) (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -2916,15 +2459,15 @@ i32.const 0 call $~lib/rt/itcms/__link ) - (func $~lib/map/Map#set:bucketsMask (param $0 i32) (param $1 i32) + (func $~lib/map/Map#set:bucketsMask (param $0 i32) (param $1 i64) local.get $0 local.get $1 - i32.store offset=4 + i64.store offset=8 ) (func $~lib/map/Map#set:entries (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $1 i32.const 0 @@ -2933,26 +2476,91 @@ (func $~lib/map/Map#set:entriesCapacity (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=12 + i32.store offset=20 ) (func $~lib/map/Map#set:entriesOffset (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=16 + i32.store offset=24 ) (func $~lib/map/Map#set:entriesCount (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=20 + i32.store offset=28 ) - (func $~lib/util/hash/hash8 (param $0 i32) (result i32) - i32.const -2128831035 + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) + (local $2 i32) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + i32.const 4 + i32.le_u + drop local.get $0 - i32.xor - i32.const 16777619 - i32.mul + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + local.set $2 + i64.const 1 + local.set $1 + i64.const 0 + i64.const 2870177450012600261 + i64.add + local.get $1 + i64.add + local.set $3 + local.get $3 + local.get $2 + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $3 + local.get $3 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $3 + local.get $3 + local.get $3 + i64.const 33 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const -4417276706812531889 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 29 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const 1609587929392839161 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 32 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + return ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2960,8 +2568,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -3070,11 +2679,11 @@ local.tee $5 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 12 i32.mul i32.add @@ -3108,25 +2717,12 @@ local.get $10 i32.load offset=4 call $~lib/map/MapEntry#set:value - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 local.set $13 local.get $3 local.get $13 @@ -3158,6 +2754,7 @@ call $~lib/map/Map#set:buckets local.get $0 local.get $1 + i64.extend_i32_u call $~lib/map/Map#set:bucketsMask local.get $0 local.get $5 @@ -3167,7 +2764,7 @@ call $~lib/map/Map#set:entriesCapacity local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 call $~lib/map/Map#set:entriesOffset global.get $~lib/memory/__stack_pointer i32.const 8 @@ -3176,7 +2773,7 @@ ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) local.get $0 @@ -4641,15 +4238,15 @@ i32.const 0 call $~lib/rt/itcms/__link ) - (func $~lib/map/Map#set:bucketsMask (param $0 i32) (param $1 i32) + (func $~lib/map/Map#set:bucketsMask (param $0 i32) (param $1 i64) local.get $0 local.get $1 - i32.store offset=4 + i64.store offset=8 ) (func $~lib/map/Map#set:entries (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $1 i32.const 0 @@ -4658,17 +4255,17 @@ (func $~lib/map/Map#set:entriesCapacity (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=12 + i32.store offset=20 ) (func $~lib/map/Map#set:entriesOffset (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=16 + i32.store offset=24 ) (func $~lib/map/Map#set:entriesCount (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=20 + i32.store offset=28 ) (func $~lib/map/Map#set:buckets (param $0 i32) (param $1 i32) local.get $0 @@ -4679,15 +4276,15 @@ i32.const 0 call $~lib/rt/itcms/__link ) - (func $~lib/map/Map#set:bucketsMask (param $0 i32) (param $1 i32) + (func $~lib/map/Map#set:bucketsMask (param $0 i32) (param $1 i64) local.get $0 local.get $1 - i32.store offset=4 + i64.store offset=8 ) (func $~lib/map/Map#set:entries (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $1 i32.const 0 @@ -4696,17 +4293,17 @@ (func $~lib/map/Map#set:entriesCapacity (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=12 + i32.store offset=20 ) (func $~lib/map/Map#set:entriesOffset (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=16 + i32.store offset=24 ) (func $~lib/map/Map#set:entriesCount (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=20 + i32.store offset=28 ) (func $~lib/array/Array#get:length (param $0 i32) (result i32) local.get $0 @@ -4764,7 +4361,7 @@ drop local.get $2 ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4772,8 +4369,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -4882,11 +4480,11 @@ local.tee $5 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 8 i32.mul i32.add @@ -4920,25 +4518,12 @@ local.get $10 i32.load8_s offset=1 call $~lib/map/MapEntry#set:value - block $~lib/util/hash/HASH|inlined.5 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 local.set $13 local.get $3 local.get $13 @@ -4970,6 +4555,7 @@ call $~lib/map/Map#set:buckets local.get $0 local.get $1 + i64.extend_i32_u call $~lib/map/Map#set:bucketsMask local.get $0 local.get $5 @@ -4979,56 +4565,82 @@ call $~lib/map/Map#set:entriesCapacity local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 call $~lib/map/Map#set:entriesOffset global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/util/hash/hash32 (param $0 i32) (result i32) - (local $1 i32) - i32.const -2128831035 - local.set $1 - local.get $1 - local.get $0 - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $1 - local.get $1 - local.get $0 - i32.const 8 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $1 - local.get $1 - local.get $0 - i32.const 16 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $1 - local.get $1 + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) + (local $2 i32) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 4 + i32.le_u + drop local.get $0 - i32.const 24 - i32.shr_u - i32.xor - i32.const 16777619 - i32.mul + local.set $2 + i64.const 4 local.set $1 + i64.const 0 + i64.const 2870177450012600261 + i64.add local.get $1 + i64.add + local.set $3 + local.get $3 + local.get $2 + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $3 + local.get $3 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $3 + local.get $3 + local.get $3 + i64.const 33 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const -4417276706812531889 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 29 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const 1609587929392839161 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 32 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + return ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5036,8 +4648,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -5142,11 +4755,11 @@ local.tee $5 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 12 i32.mul i32.add @@ -5180,33 +4793,12 @@ local.get $10 i32.load offset=4 call $~lib/map/MapEntry#set:value - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 local.set $13 local.get $3 local.get $13 @@ -5238,6 +4830,7 @@ call $~lib/map/Map#set:buckets local.get $0 local.get $1 + i64.extend_i32_u call $~lib/map/Map#set:bucketsMask local.get $0 local.get $5 @@ -5247,7 +4840,7 @@ call $~lib/map/Map#set:entriesCapacity local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 call $~lib/map/Map#set:entriesOffset global.get $~lib/memory/__stack_pointer i32.const 8 @@ -5256,11 +4849,11 @@ ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/map/Map#clear (param $0 i32) local.get $0 @@ -5271,9 +4864,9 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/map/Map#set:bucketsMask local.get $0 i32.const 0 @@ -5301,15 +4894,15 @@ i32.const 0 call $~lib/rt/itcms/__link ) - (func $~lib/map/Map#set:bucketsMask (param $0 i32) (param $1 i32) + (func $~lib/map/Map#set:bucketsMask (param $0 i32) (param $1 i64) local.get $0 local.get $1 - i32.store offset=4 + i64.store offset=8 ) (func $~lib/map/Map#set:entries (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $1 i32.const 0 @@ -5318,19 +4911,89 @@ (func $~lib/map/Map#set:entriesCapacity (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=12 + i32.store offset=20 ) (func $~lib/map/Map#set:entriesOffset (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=16 + i32.store offset=24 ) (func $~lib/map/Map#set:entriesCount (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=20 + i32.store offset=28 + ) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) + (local $2 i32) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + i32.const 4 + i32.le_u + drop + local.get $0 + i32.const 255 + i32.and + local.set $2 + i64.const 1 + local.set $1 + i64.const 0 + i64.const 2870177450012600261 + i64.add + local.get $1 + i64.add + local.set $3 + local.get $3 + local.get $2 + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $3 + local.get $3 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $3 + local.get $3 + local.get $3 + i64.const 33 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const -4417276706812531889 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 29 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const 1609587929392839161 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 32 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + return ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5338,8 +5001,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -5446,11 +5110,11 @@ local.tee $5 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 12 i32.mul i32.add @@ -5484,25 +5148,12 @@ local.get $10 i32.load offset=4 call $~lib/map/MapEntry#set:value - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 local.set $13 local.get $3 local.get $13 @@ -5534,6 +5185,7 @@ call $~lib/map/Map#set:buckets local.get $0 local.get $1 + i64.extend_i32_u call $~lib/map/Map#set:bucketsMask local.get $0 local.get $5 @@ -5543,7 +5195,7 @@ call $~lib/map/Map#set:entriesCapacity local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 call $~lib/map/Map#set:entriesOffset global.get $~lib/memory/__stack_pointer i32.const 8 @@ -5552,7 +5204,7 @@ ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) local.get $0 @@ -5608,15 +5260,15 @@ i32.const 0 call $~lib/rt/itcms/__link ) - (func $~lib/map/Map#set:bucketsMask (param $0 i32) (param $1 i32) + (func $~lib/map/Map#set:bucketsMask (param $0 i32) (param $1 i64) local.get $0 local.get $1 - i32.store offset=4 + i64.store offset=8 ) (func $~lib/map/Map#set:entries (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $1 i32.const 0 @@ -5625,17 +5277,17 @@ (func $~lib/map/Map#set:entriesCapacity (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=12 + i32.store offset=20 ) (func $~lib/map/Map#set:entriesOffset (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=16 + i32.store offset=24 ) (func $~lib/map/Map#set:entriesCount (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=20 + i32.store offset=28 ) (func $~lib/array/Array#get:length (param $0 i32) (result i32) local.get $0 @@ -5667,7 +5319,7 @@ drop local.get $2 ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5675,8 +5327,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -5783,11 +5436,11 @@ local.tee $5 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 8 i32.mul i32.add @@ -5821,25 +5474,12 @@ local.get $10 i32.load8_u offset=1 call $~lib/map/MapEntry#set:value - block $~lib/util/hash/HASH|inlined.5 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 local.set $13 local.get $3 local.get $13 @@ -5871,6 +5511,7 @@ call $~lib/map/Map#set:buckets local.get $0 local.get $1 + i64.extend_i32_u call $~lib/map/Map#set:bucketsMask local.get $0 local.get $5 @@ -5880,7 +5521,7 @@ call $~lib/map/Map#set:entriesCapacity local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 call $~lib/map/Map#set:entriesOffset global.get $~lib/memory/__stack_pointer i32.const 8 @@ -5889,7 +5530,7 @@ ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/map/Map#clear (param $0 i32) local.get $0 @@ -5900,9 +5541,9 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/map/Map#set:bucketsMask local.get $0 i32.const 0 @@ -5930,15 +5571,15 @@ i32.const 0 call $~lib/rt/itcms/__link ) - (func $~lib/map/Map#set:bucketsMask (param $0 i32) (param $1 i32) + (func $~lib/map/Map#set:bucketsMask (param $0 i32) (param $1 i64) local.get $0 local.get $1 - i32.store offset=4 + i64.store offset=8 ) (func $~lib/map/Map#set:entries (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $1 i32.const 0 @@ -5947,67 +5588,118 @@ (func $~lib/map/Map#set:entriesCapacity (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=12 + i32.store offset=20 ) (func $~lib/map/Map#set:entriesOffset (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=16 + i32.store offset=24 ) (func $~lib/map/Map#set:entriesCount (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=20 + i32.store offset=28 ) - (func $~lib/util/hash/hash16 (param $0 i32) (result i32) - (local $1 i32) - i32.const -2128831035 - local.set $1 - local.get $1 - local.get $0 - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $1 - local.get $1 + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) + (local $2 i32) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 2 + i32.const 4 + i32.le_u + drop local.get $0 - i32.const 8 - i32.shr_u - i32.xor - i32.const 16777619 - i32.mul + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + local.set $2 + i64.const 2 local.set $1 + i64.const 0 + i64.const 2870177450012600261 + i64.add local.get $1 - ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load + i64.add + local.set $3 + local.get $3 local.get $2 - local.get $0 - i32.load offset=4 - i32.and - i32.const 4 - i32.mul - i32.add - i32.load + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.xor local.set $3 - loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 - if - local.get $3 - i32.load offset=8 - local.set $5 - local.get $5 - i32.const 1 - i32.and - i32.eqz + local.get $3 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $3 + local.get $3 + local.get $3 + i64.const 33 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const -4417276706812531889 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 29 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const 1609587929392839161 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 32 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + return + ) + (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load + local.get $2 + local.get $0 + i64.load offset=8 + i64.and + i32.wrap_i64 + i32.const 4 + i32.mul + i32.add + i32.load + local.set $3 + loop $while-continue|0 + local.get $3 + local.set $4 + local.get $4 + if + local.get $3 + i32.load offset=8 + local.set $5 + local.get $5 + i32.const 1 + i32.and + i32.eqz if (result i32) local.get $3 i32.load16_s @@ -6099,11 +5791,11 @@ local.tee $5 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 12 i32.mul i32.add @@ -6137,29 +5829,12 @@ local.get $10 i32.load offset=4 call $~lib/map/MapEntry#set:value - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 local.set $13 local.get $3 local.get $13 @@ -6191,6 +5866,7 @@ call $~lib/map/Map#set:buckets local.get $0 local.get $1 + i64.extend_i32_u call $~lib/map/Map#set:bucketsMask local.get $0 local.get $5 @@ -6200,7 +5876,7 @@ call $~lib/map/Map#set:entriesCapacity local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 call $~lib/map/Map#set:entriesOffset global.get $~lib/memory/__stack_pointer i32.const 8 @@ -6209,7 +5885,7 @@ ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) local.get $0 @@ -6265,15 +5941,15 @@ i32.const 0 call $~lib/rt/itcms/__link ) - (func $~lib/map/Map#set:bucketsMask (param $0 i32) (param $1 i32) + (func $~lib/map/Map#set:bucketsMask (param $0 i32) (param $1 i64) local.get $0 local.get $1 - i32.store offset=4 + i64.store offset=8 ) (func $~lib/map/Map#set:entries (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $1 i32.const 0 @@ -6282,17 +5958,17 @@ (func $~lib/map/Map#set:entriesCapacity (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=12 + i32.store offset=20 ) (func $~lib/map/Map#set:entriesOffset (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=16 + i32.store offset=24 ) (func $~lib/map/Map#set:entriesCount (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=20 + i32.store offset=28 ) (func $~lib/array/Array#get:length (param $0 i32) (result i32) local.get $0 @@ -6324,7 +6000,7 @@ drop local.get $2 ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6332,8 +6008,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -6442,11 +6119,11 @@ local.tee $5 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 8 i32.mul i32.add @@ -6480,29 +6157,12 @@ local.get $10 i32.load16_s offset=2 call $~lib/map/MapEntry#set:value - block $~lib/util/hash/HASH|inlined.5 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 local.set $13 local.get $3 local.get $13 @@ -6534,6 +6194,7 @@ call $~lib/map/Map#set:buckets local.get $0 local.get $1 + i64.extend_i32_u call $~lib/map/Map#set:bucketsMask local.get $0 local.get $5 @@ -6543,7 +6204,7 @@ call $~lib/map/Map#set:entriesCapacity local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 call $~lib/map/Map#set:entriesOffset global.get $~lib/memory/__stack_pointer i32.const 8 @@ -6552,7 +6213,7 @@ ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/map/Map#clear (param $0 i32) local.get $0 @@ -6563,9 +6224,9 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/map/Map#set:bucketsMask local.get $0 i32.const 0 @@ -6593,15 +6254,15 @@ i32.const 0 call $~lib/rt/itcms/__link ) - (func $~lib/map/Map#set:bucketsMask (param $0 i32) (param $1 i32) + (func $~lib/map/Map#set:bucketsMask (param $0 i32) (param $1 i64) local.get $0 local.get $1 - i32.store offset=4 + i64.store offset=8 ) (func $~lib/map/Map#set:entries (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $1 i32.const 0 @@ -6610,19 +6271,89 @@ (func $~lib/map/Map#set:entriesCapacity (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=12 + i32.store offset=20 ) (func $~lib/map/Map#set:entriesOffset (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=16 + i32.store offset=24 ) (func $~lib/map/Map#set:entriesCount (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=20 + i32.store offset=28 + ) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) + (local $2 i32) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 2 + i32.const 4 + i32.le_u + drop + local.get $0 + i32.const 65535 + i32.and + local.set $2 + i64.const 2 + local.set $1 + i64.const 0 + i64.const 2870177450012600261 + i64.add + local.get $1 + i64.add + local.set $3 + local.get $3 + local.get $2 + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $3 + local.get $3 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $3 + local.get $3 + local.get $3 + i64.const 33 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const -4417276706812531889 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 29 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const 1609587929392839161 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 32 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + return ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6630,8 +6361,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -6738,11 +6470,11 @@ local.tee $5 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 12 i32.mul i32.add @@ -6776,29 +6508,12 @@ local.get $10 i32.load offset=4 call $~lib/map/MapEntry#set:value - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 local.set $13 local.get $3 local.get $13 @@ -6830,6 +6545,7 @@ call $~lib/map/Map#set:buckets local.get $0 local.get $1 + i64.extend_i32_u call $~lib/map/Map#set:bucketsMask local.get $0 local.get $5 @@ -6839,7 +6555,7 @@ call $~lib/map/Map#set:entriesCapacity local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 call $~lib/map/Map#set:entriesOffset global.get $~lib/memory/__stack_pointer i32.const 8 @@ -6848,7 +6564,7 @@ ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) local.get $0 @@ -6904,15 +6620,15 @@ i32.const 0 call $~lib/rt/itcms/__link ) - (func $~lib/map/Map#set:bucketsMask (param $0 i32) (param $1 i32) + (func $~lib/map/Map#set:bucketsMask (param $0 i32) (param $1 i64) local.get $0 local.get $1 - i32.store offset=4 + i64.store offset=8 ) (func $~lib/map/Map#set:entries (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $1 i32.const 0 @@ -6921,17 +6637,17 @@ (func $~lib/map/Map#set:entriesCapacity (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=12 + i32.store offset=20 ) (func $~lib/map/Map#set:entriesOffset (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=16 + i32.store offset=24 ) (func $~lib/map/Map#set:entriesCount (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=20 + i32.store offset=28 ) (func $~lib/array/Array#get:length (param $0 i32) (result i32) local.get $0 @@ -6963,7 +6679,7 @@ drop local.get $2 ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6971,9 +6687,10 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and - i32.const 4 + i64.load offset=8 + i64.and + i32.wrap_i64 + i32.const 4 i32.mul i32.add i32.load @@ -7079,11 +6796,11 @@ local.tee $5 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 8 i32.mul i32.add @@ -7117,29 +6834,12 @@ local.get $10 i32.load16_u offset=2 call $~lib/map/MapEntry#set:value - block $~lib/util/hash/HASH|inlined.5 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 local.set $13 local.get $3 local.get $13 @@ -7171,6 +6871,7 @@ call $~lib/map/Map#set:buckets local.get $0 local.get $1 + i64.extend_i32_u call $~lib/map/Map#set:bucketsMask local.get $0 local.get $5 @@ -7180,7 +6881,7 @@ call $~lib/map/Map#set:entriesCapacity local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 call $~lib/map/Map#set:entriesOffset global.get $~lib/memory/__stack_pointer i32.const 8 @@ -7189,7 +6890,7 @@ ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/map/Map#clear (param $0 i32) local.get $0 @@ -7200,9 +6901,9 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/map/Map#set:bucketsMask local.get $0 i32.const 0 @@ -7234,9 +6935,9 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/map/Map#set:bucketsMask local.get $0 i32.const 0 @@ -7264,15 +6965,15 @@ i32.const 0 call $~lib/rt/itcms/__link ) - (func $~lib/map/Map#set:bucketsMask (param $0 i32) (param $1 i32) + (func $~lib/map/Map#set:bucketsMask (param $0 i32) (param $1 i64) local.get $0 local.get $1 - i32.store offset=4 + i64.store offset=8 ) (func $~lib/map/Map#set:entries (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $1 i32.const 0 @@ -7281,19 +6982,87 @@ (func $~lib/map/Map#set:entriesCapacity (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=12 + i32.store offset=20 ) (func $~lib/map/Map#set:entriesOffset (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=16 + i32.store offset=24 ) (func $~lib/map/Map#set:entriesCount (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=20 + i32.store offset=28 + ) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) + (local $2 i32) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 4 + i32.le_u + drop + local.get $0 + local.set $2 + i64.const 4 + local.set $1 + i64.const 0 + i64.const 2870177450012600261 + i64.add + local.get $1 + i64.add + local.set $3 + local.get $3 + local.get $2 + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $3 + local.get $3 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $3 + local.get $3 + local.get $3 + i64.const 33 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const -4417276706812531889 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 29 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const 1609587929392839161 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 32 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + return ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7301,8 +7070,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -7407,11 +7177,11 @@ local.tee $5 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 12 i32.mul i32.add @@ -7445,33 +7215,12 @@ local.get $10 i32.load offset=4 call $~lib/map/MapEntry#set:value - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 local.set $13 local.get $3 local.get $13 @@ -7503,6 +7252,7 @@ call $~lib/map/Map#set:buckets local.get $0 local.get $1 + i64.extend_i32_u call $~lib/map/Map#set:bucketsMask local.get $0 local.get $5 @@ -7512,7 +7262,7 @@ call $~lib/map/Map#set:entriesCapacity local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 call $~lib/map/Map#set:entriesOffset global.get $~lib/memory/__stack_pointer i32.const 8 @@ -7521,7 +7271,7 @@ ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) local.get $0 @@ -7577,15 +7327,15 @@ i32.const 0 call $~lib/rt/itcms/__link ) - (func $~lib/map/Map#set:bucketsMask (param $0 i32) (param $1 i32) + (func $~lib/map/Map#set:bucketsMask (param $0 i32) (param $1 i64) local.get $0 local.get $1 - i32.store offset=4 + i64.store offset=8 ) (func $~lib/map/Map#set:entries (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $1 i32.const 0 @@ -7594,17 +7344,17 @@ (func $~lib/map/Map#set:entriesCapacity (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=12 + i32.store offset=20 ) (func $~lib/map/Map#set:entriesOffset (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=16 + i32.store offset=24 ) (func $~lib/map/Map#set:entriesCount (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=20 + i32.store offset=28 ) (func $~lib/array/Array#get:length (param $0 i32) (result i32) local.get $0 @@ -7636,7 +7386,7 @@ drop local.get $2 ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7644,8 +7394,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -7750,11 +7501,11 @@ local.tee $5 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 12 i32.mul i32.add @@ -7788,33 +7539,12 @@ local.get $10 i32.load offset=4 call $~lib/map/MapEntry#set:value - block $~lib/util/hash/HASH|inlined.5 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 local.set $13 local.get $3 local.get $13 @@ -7846,6 +7576,7 @@ call $~lib/map/Map#set:buckets local.get $0 local.get $1 + i64.extend_i32_u call $~lib/map/Map#set:bucketsMask local.get $0 local.get $5 @@ -7855,7 +7586,7 @@ call $~lib/map/Map#set:entriesCapacity local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 call $~lib/map/Map#set:entriesOffset global.get $~lib/memory/__stack_pointer i32.const 8 @@ -7864,7 +7595,7 @@ ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/map/Map#clear (param $0 i32) local.get $0 @@ -7875,9 +7606,9 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/map/Map#set:bucketsMask local.get $0 i32.const 0 @@ -7905,15 +7636,15 @@ i32.const 0 call $~lib/rt/itcms/__link ) - (func $~lib/map/Map#set:bucketsMask (param $0 i32) (param $1 i32) + (func $~lib/map/Map#set:bucketsMask (param $0 i32) (param $1 i64) local.get $0 local.get $1 - i32.store offset=4 + i64.store offset=8 ) (func $~lib/map/Map#set:entries (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $1 i32.const 0 @@ -7922,107 +7653,91 @@ (func $~lib/map/Map#set:entriesCapacity (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=12 + i32.store offset=20 ) (func $~lib/map/Map#set:entriesOffset (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=16 + i32.store offset=24 ) (func $~lib/map/Map#set:entriesCount (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=20 + i32.store offset=28 ) - (func $~lib/util/hash/hash64 (param $0 i64) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) + (func $~lib/util/hash/HASH (param $0 i64) (result i64) + (local $1 i64) + (local $2 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 8 + i32.const 4 + i32.le_u + drop + i32.const 8 + i32.const 8 + i32.eq + drop local.get $0 - i32.wrap_i64 local.set $1 - local.get $0 - i64.const 32 - i64.shr_u - i32.wrap_i64 + i64.const 0 + i64.const 2870177450012600261 + i64.add + i64.const 8 + i64.add local.set $2 - i32.const -2128831035 - local.set $3 - local.get $3 - local.get $1 - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 - local.get $1 - i32.const 8 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 + local.get $2 local.get $1 - i32.const 16 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 - local.get $1 - i32.const 24 - i32.shr_u - i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $2 local.get $2 - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 + i64.const 27 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $2 local.get $2 - i32.const 8 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 local.get $2 - i32.const 16 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 + i64.const 33 + i64.shr_u + i64.xor + local.set $2 local.get $2 - i32.const 24 - i32.shr_u - i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 + i64.const -4417276706812531889 + i64.mul + local.set $2 + local.get $2 + local.get $2 + i64.const 29 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + i64.const 1609587929392839161 + i64.mul + local.set $2 + local.get $2 + local.get $2 + i64.const 32 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + return ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 i64) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -8030,8 +7745,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -8099,9 +7815,8 @@ (local $10 i32) (local $11 i32) (local $12 i64) - (local $13 i64) + (local $13 i32) (local $14 i32) - (local $15 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -8137,11 +7852,11 @@ local.tee $5 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 16 i32.mul i32.add @@ -8175,49 +7890,24 @@ local.get $10 i32.load offset=8 call $~lib/map/MapEntry#set:value - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 - i32.and - local.set $14 + i64.extend_i32_u + i64.and + i32.wrap_i64 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load call $~lib/map/MapEntry#set:taggedNext - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -8237,6 +7927,7 @@ call $~lib/map/Map#set:buckets local.get $0 local.get $1 + i64.extend_i32_u call $~lib/map/Map#set:bucketsMask local.get $0 local.get $5 @@ -8246,7 +7937,7 @@ call $~lib/map/Map#set:entriesCapacity local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 call $~lib/map/Map#set:entriesOffset global.get $~lib/memory/__stack_pointer i32.const 8 @@ -8255,7 +7946,7 @@ ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) local.get $0 @@ -8311,15 +8002,15 @@ i32.const 0 call $~lib/rt/itcms/__link ) - (func $~lib/map/Map#set:bucketsMask (param $0 i32) (param $1 i32) + (func $~lib/map/Map#set:bucketsMask (param $0 i32) (param $1 i64) local.get $0 local.get $1 - i32.store offset=4 + i64.store offset=8 ) (func $~lib/map/Map#set:entries (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $1 i32.const 0 @@ -8328,17 +8019,17 @@ (func $~lib/map/Map#set:entriesCapacity (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=12 + i32.store offset=20 ) (func $~lib/map/Map#set:entriesOffset (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=16 + i32.store offset=24 ) (func $~lib/map/Map#set:entriesCount (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=20 + i32.store offset=28 ) (func $~lib/array/Array#get:length (param $0 i32) (result i32) local.get $0 @@ -8370,7 +8061,7 @@ drop local.get $2 ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 i64) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -8378,8 +8069,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -8447,9 +8139,8 @@ (local $10 i32) (local $11 i32) (local $12 i64) - (local $13 i64) + (local $13 i32) (local $14 i32) - (local $15 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -8485,11 +8176,11 @@ local.tee $5 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 24 i32.mul i32.add @@ -8523,49 +8214,24 @@ local.get $10 i64.load offset=8 call $~lib/map/MapEntry#set:value - block $~lib/util/hash/HASH|inlined.5 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 - i32.and - local.set $14 + i64.extend_i32_u + i64.and + i32.wrap_i64 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load call $~lib/map/MapEntry#set:taggedNext - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -8585,6 +8251,7 @@ call $~lib/map/Map#set:buckets local.get $0 local.get $1 + i64.extend_i32_u call $~lib/map/Map#set:bucketsMask local.get $0 local.get $5 @@ -8594,7 +8261,7 @@ call $~lib/map/Map#set:entriesCapacity local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 call $~lib/map/Map#set:entriesOffset global.get $~lib/memory/__stack_pointer i32.const 8 @@ -8603,7 +8270,7 @@ ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/map/Map#clear (param $0 i32) local.get $0 @@ -8614,9 +8281,9 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/map/Map#set:bucketsMask local.get $0 i32.const 0 @@ -8644,15 +8311,15 @@ i32.const 0 call $~lib/rt/itcms/__link ) - (func $~lib/map/Map#set:bucketsMask (param $0 i32) (param $1 i32) + (func $~lib/map/Map#set:bucketsMask (param $0 i32) (param $1 i64) local.get $0 local.get $1 - i32.store offset=4 + i64.store offset=8 ) (func $~lib/map/Map#set:entries (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $1 i32.const 0 @@ -8661,58 +8328,131 @@ (func $~lib/map/Map#set:entriesCapacity (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=12 + i32.store offset=20 ) (func $~lib/map/Map#set:entriesOffset (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=16 + i32.store offset=24 ) (func $~lib/map/Map#set:entriesCount (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=20 + i32.store offset=28 ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i64) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/util/hash/HASH (param $0 i64) (result i64) + (local $1 i64) + (local $2 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 8 + i32.const 4 + i32.le_u + drop + i32.const 8 + i32.const 8 + i32.eq + drop local.get $0 - i32.load + local.set $1 + i64.const 0 + i64.const 2870177450012600261 + i64.add + i64.const 8 + i64.add + local.set $2 local.get $2 - local.get $0 - i32.load offset=4 - i32.and - i32.const 4 - i32.mul - i32.add - i32.load - local.set $3 - loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 - if - local.get $3 - i32.load offset=12 - local.set $5 - local.get $5 - i32.const 1 - i32.and - i32.eqz - if (result i32) - local.get $3 - i64.load - local.get $1 - i64.eq - else - i32.const 0 - end - if - local.get $3 - return - end - local.get $5 + local.get $1 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $2 + local.get $2 + i64.const 27 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $2 + local.get $2 + local.get $2 + i64.const 33 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + i64.const -4417276706812531889 + i64.mul + local.set $2 + local.get $2 + local.get $2 + i64.const 29 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + i64.const 1609587929392839161 + i64.mul + local.set $2 + local.get $2 + local.get $2 + i64.const 32 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + return + ) + (func $~lib/map/Map#find (param $0 i32) (param $1 i64) (param $2 i64) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load + local.get $2 + local.get $0 + i64.load offset=8 + i64.and + i32.wrap_i64 + i32.const 4 + i32.mul + i32.add + i32.load + local.set $3 + loop $while-continue|0 + local.get $3 + local.set $4 + local.get $4 + if + local.get $3 + i32.load offset=12 + local.set $5 + local.get $5 + i32.const 1 + i32.and + i32.eqz + if (result i32) + local.get $3 + i64.load + local.get $1 + i64.eq + else + i32.const 0 + end + if + local.get $3 + return + end + local.get $5 i32.const 1 i32.const -1 i32.xor @@ -8750,9 +8490,8 @@ (local $10 i32) (local $11 i32) (local $12 i64) - (local $13 i64) + (local $13 i32) (local $14 i32) - (local $15 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -8788,11 +8527,11 @@ local.tee $5 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 16 i32.mul i32.add @@ -8826,49 +8565,24 @@ local.get $10 i32.load offset=8 call $~lib/map/MapEntry#set:value - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 - i32.and - local.set $14 + i64.extend_i32_u + i64.and + i32.wrap_i64 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load call $~lib/map/MapEntry#set:taggedNext - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -8888,6 +8602,7 @@ call $~lib/map/Map#set:buckets local.get $0 local.get $1 + i64.extend_i32_u call $~lib/map/Map#set:bucketsMask local.get $0 local.get $5 @@ -8897,7 +8612,7 @@ call $~lib/map/Map#set:entriesCapacity local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 call $~lib/map/Map#set:entriesOffset global.get $~lib/memory/__stack_pointer i32.const 8 @@ -8906,7 +8621,7 @@ ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) local.get $0 @@ -8962,15 +8677,15 @@ i32.const 0 call $~lib/rt/itcms/__link ) - (func $~lib/map/Map#set:bucketsMask (param $0 i32) (param $1 i32) + (func $~lib/map/Map#set:bucketsMask (param $0 i32) (param $1 i64) local.get $0 local.get $1 - i32.store offset=4 + i64.store offset=8 ) (func $~lib/map/Map#set:entries (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $1 i32.const 0 @@ -8979,17 +8694,17 @@ (func $~lib/map/Map#set:entriesCapacity (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=12 + i32.store offset=20 ) (func $~lib/map/Map#set:entriesOffset (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=16 + i32.store offset=24 ) (func $~lib/map/Map#set:entriesCount (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=20 + i32.store offset=28 ) (func $~lib/array/Array#get:length (param $0 i32) (result i32) local.get $0 @@ -9021,7 +8736,7 @@ drop local.get $2 ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 i64) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -9029,8 +8744,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -9098,9 +8814,8 @@ (local $10 i32) (local $11 i32) (local $12 i64) - (local $13 i64) + (local $13 i32) (local $14 i32) - (local $15 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -9136,11 +8851,11 @@ local.tee $5 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 24 i32.mul i32.add @@ -9174,49 +8889,24 @@ local.get $10 i64.load offset=8 call $~lib/map/MapEntry#set:value - block $~lib/util/hash/HASH|inlined.5 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 - i32.and - local.set $14 + i64.extend_i32_u + i64.and + i32.wrap_i64 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load call $~lib/map/MapEntry#set:taggedNext - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -9236,6 +8926,7 @@ call $~lib/map/Map#set:buckets local.get $0 local.get $1 + i64.extend_i32_u call $~lib/map/Map#set:bucketsMask local.get $0 local.get $5 @@ -9245,7 +8936,7 @@ call $~lib/map/Map#set:entriesCapacity local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 call $~lib/map/Map#set:entriesOffset global.get $~lib/memory/__stack_pointer i32.const 8 @@ -9254,7 +8945,7 @@ ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/map/Map#clear (param $0 i32) local.get $0 @@ -9265,9 +8956,9 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/map/Map#set:bucketsMask local.get $0 i32.const 0 @@ -9295,15 +8986,15 @@ i32.const 0 call $~lib/rt/itcms/__link ) - (func $~lib/map/Map#set:bucketsMask (param $0 i32) (param $1 i32) + (func $~lib/map/Map#set:bucketsMask (param $0 i32) (param $1 i64) local.get $0 local.get $1 - i32.store offset=4 + i64.store offset=8 ) (func $~lib/map/Map#set:entries (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $1 i32.const 0 @@ -9312,63 +9003,133 @@ (func $~lib/map/Map#set:entriesCapacity (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=12 + i32.store offset=20 ) (func $~lib/map/Map#set:entriesOffset (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=16 + i32.store offset=24 ) (func $~lib/map/Map#set:entriesCount (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=20 + i32.store offset=28 ) - (func $~lib/map/Map#find (param $0 i32) (param $1 f32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/util/hash/HASH (param $0 f32) (result i64) + (local $1 i32) + (local $2 i64) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 4 + i32.const 4 + i32.eq + drop local.get $0 - i32.load + i32.reinterpret_f32 + local.set $1 + i64.const 4 + local.set $2 + i64.const 0 + i64.const 2870177450012600261 + i64.add local.get $2 - local.get $0 - i32.load offset=4 - i32.and - i32.const 4 - i32.mul - i32.add - i32.load + i64.add local.set $3 - loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 - if - local.get $3 - i32.load offset=8 - local.set $5 - local.get $5 - i32.const 1 - i32.and - i32.eqz - if (result i32) - local.get $3 - f32.load - local.get $1 - f32.eq - else - i32.const 0 - end - if - local.get $3 - return - end - local.get $5 - i32.const 1 - i32.const -1 - i32.xor - i32.and - local.set $3 + local.get $3 + local.get $1 + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $3 + local.get $3 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $3 + local.get $3 + local.get $3 + i64.const 33 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const -4417276706812531889 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 29 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const 1609587929392839161 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 32 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + return + ) + (func $~lib/map/Map#find (param $0 i32) (param $1 f32) (param $2 i64) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load + local.get $2 + local.get $0 + i64.load offset=8 + i64.and + i32.wrap_i64 + i32.const 4 + i32.mul + i32.add + i32.load + local.set $3 + loop $while-continue|0 + local.get $3 + local.set $4 + local.get $4 + if + local.get $3 + i32.load offset=8 + local.set $5 + local.get $5 + i32.const 1 + i32.and + i32.eqz + if (result i32) + local.get $3 + f32.load + local.get $1 + f32.eq + else + i32.const 0 + end + if + local.get $3 + return + end + local.get $5 + i32.const 1 + i32.const -1 + i32.xor + i32.and + local.set $3 br $while-continue|0 end end @@ -9401,9 +9162,8 @@ (local $10 i32) (local $11 i32) (local $12 f32) - (local $13 f32) + (local $13 i32) (local $14 i32) - (local $15 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -9439,11 +9199,11 @@ local.tee $5 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 12 i32.mul i32.add @@ -9477,38 +9237,24 @@ local.get $10 i32.load offset=4 call $~lib/map/MapEntry#set:value - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $13 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 - i32.and - local.set $14 + i64.extend_i32_u + i64.and + i32.wrap_i64 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load call $~lib/map/MapEntry#set:taggedNext - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -9528,6 +9274,7 @@ call $~lib/map/Map#set:buckets local.get $0 local.get $1 + i64.extend_i32_u call $~lib/map/Map#set:bucketsMask local.get $0 local.get $5 @@ -9537,7 +9284,7 @@ call $~lib/map/Map#set:entriesCapacity local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 call $~lib/map/Map#set:entriesOffset global.get $~lib/memory/__stack_pointer i32.const 8 @@ -9546,7 +9293,7 @@ ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) local.get $0 @@ -9602,15 +9349,15 @@ i32.const 0 call $~lib/rt/itcms/__link ) - (func $~lib/map/Map#set:bucketsMask (param $0 i32) (param $1 i32) + (func $~lib/map/Map#set:bucketsMask (param $0 i32) (param $1 i64) local.get $0 local.get $1 - i32.store offset=4 + i64.store offset=8 ) (func $~lib/map/Map#set:entries (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $1 i32.const 0 @@ -9619,17 +9366,17 @@ (func $~lib/map/Map#set:entriesCapacity (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=12 + i32.store offset=20 ) (func $~lib/map/Map#set:entriesOffset (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=16 + i32.store offset=24 ) (func $~lib/map/Map#set:entriesCount (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=20 + i32.store offset=28 ) (func $~lib/array/Array#get:length (param $0 i32) (result i32) local.get $0 @@ -9661,7 +9408,7 @@ drop local.get $2 ) - (func $~lib/map/Map#find (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 f32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -9669,8 +9416,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -9738,9 +9486,8 @@ (local $10 i32) (local $11 i32) (local $12 f32) - (local $13 f32) + (local $13 i32) (local $14 i32) - (local $15 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -9776,11 +9523,11 @@ local.tee $5 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 12 i32.mul i32.add @@ -9814,38 +9561,24 @@ local.get $10 f32.load offset=4 call $~lib/map/MapEntry#set:value - block $~lib/util/hash/HASH|inlined.5 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $13 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 - i32.and - local.set $14 + i64.extend_i32_u + i64.and + i32.wrap_i64 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load call $~lib/map/MapEntry#set:taggedNext - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -9865,6 +9598,7 @@ call $~lib/map/Map#set:buckets local.get $0 local.get $1 + i64.extend_i32_u call $~lib/map/Map#set:bucketsMask local.get $0 local.get $5 @@ -9874,7 +9608,7 @@ call $~lib/map/Map#set:entriesCapacity local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 call $~lib/map/Map#set:entriesOffset global.get $~lib/memory/__stack_pointer i32.const 8 @@ -9883,7 +9617,7 @@ ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/map/Map#clear (param $0 i32) local.get $0 @@ -9894,9 +9628,9 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/map/Map#set:bucketsMask local.get $0 i32.const 0 @@ -9924,15 +9658,15 @@ i32.const 0 call $~lib/rt/itcms/__link ) - (func $~lib/map/Map#set:bucketsMask (param $0 i32) (param $1 i32) + (func $~lib/map/Map#set:bucketsMask (param $0 i32) (param $1 i64) local.get $0 local.get $1 - i32.store offset=4 + i64.store offset=8 ) (func $~lib/map/Map#set:entries (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $1 i32.const 0 @@ -9941,19 +9675,92 @@ (func $~lib/map/Map#set:entriesCapacity (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=12 + i32.store offset=20 ) (func $~lib/map/Map#set:entriesOffset (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=16 + i32.store offset=24 ) (func $~lib/map/Map#set:entriesCount (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=20 + i32.store offset=28 + ) + (func $~lib/util/hash/HASH (param $0 f64) (result i64) + (local $1 i64) + (local $2 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $0 + i64.reinterpret_f64 + local.set $1 + i64.const 0 + i64.const 2870177450012600261 + i64.add + i64.const 8 + i64.add + local.set $2 + local.get $2 + local.get $1 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $2 + local.get $2 + i64.const 27 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $2 + local.get $2 + local.get $2 + i64.const 33 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + i64.const -4417276706812531889 + i64.mul + local.set $2 + local.get $2 + local.get $2 + i64.const 29 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + i64.const 1609587929392839161 + i64.mul + local.set $2 + local.get $2 + local.get $2 + i64.const 32 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + return ) - (func $~lib/map/Map#find (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 f64) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -9961,10 +9768,11 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and - i32.const 4 - i32.mul + i64.load offset=8 + i64.and + i32.wrap_i64 + i32.const 4 + i32.mul i32.add i32.load local.set $3 @@ -10030,9 +9838,8 @@ (local $10 i32) (local $11 i32) (local $12 f64) - (local $13 f64) + (local $13 i32) (local $14 i32) - (local $15 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -10068,11 +9875,11 @@ local.tee $5 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 16 i32.mul i32.add @@ -10106,42 +9913,24 @@ local.get $10 i32.load offset=8 call $~lib/map/MapEntry#set:value - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $13 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 - i32.and - local.set $14 + i64.extend_i32_u + i64.and + i32.wrap_i64 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load call $~lib/map/MapEntry#set:taggedNext - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -10161,6 +9950,7 @@ call $~lib/map/Map#set:buckets local.get $0 local.get $1 + i64.extend_i32_u call $~lib/map/Map#set:bucketsMask local.get $0 local.get $5 @@ -10170,7 +9960,7 @@ call $~lib/map/Map#set:entriesCapacity local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 call $~lib/map/Map#set:entriesOffset global.get $~lib/memory/__stack_pointer i32.const 8 @@ -10179,7 +9969,7 @@ ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) local.get $0 @@ -10235,15 +10025,15 @@ i32.const 0 call $~lib/rt/itcms/__link ) - (func $~lib/map/Map#set:bucketsMask (param $0 i32) (param $1 i32) + (func $~lib/map/Map#set:bucketsMask (param $0 i32) (param $1 i64) local.get $0 local.get $1 - i32.store offset=4 + i64.store offset=8 ) (func $~lib/map/Map#set:entries (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $1 i32.const 0 @@ -10252,17 +10042,17 @@ (func $~lib/map/Map#set:entriesCapacity (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=12 + i32.store offset=20 ) (func $~lib/map/Map#set:entriesOffset (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=16 + i32.store offset=24 ) (func $~lib/map/Map#set:entriesCount (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=20 + i32.store offset=28 ) (func $~lib/array/Array#get:length (param $0 i32) (result i32) local.get $0 @@ -10294,7 +10084,7 @@ drop local.get $2 ) - (func $~lib/map/Map#find (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 f64) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -10302,8 +10092,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -10371,9 +10162,8 @@ (local $10 i32) (local $11 i32) (local $12 f64) - (local $13 f64) + (local $13 i32) (local $14 i32) - (local $15 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -10409,11 +10199,11 @@ local.tee $5 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 24 i32.mul i32.add @@ -10447,42 +10237,24 @@ local.get $10 f64.load offset=8 call $~lib/map/MapEntry#set:value - block $~lib/util/hash/HASH|inlined.5 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $13 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 - i32.and - local.set $14 + i64.extend_i32_u + i64.and + i32.wrap_i64 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load call $~lib/map/MapEntry#set:taggedNext - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -10502,6 +10274,7 @@ call $~lib/map/Map#set:buckets local.get $0 local.get $1 + i64.extend_i32_u call $~lib/map/Map#set:bucketsMask local.get $0 local.get $5 @@ -10511,7 +10284,7 @@ call $~lib/map/Map#set:entriesCapacity local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 call $~lib/map/Map#set:entriesOffset global.get $~lib/memory/__stack_pointer i32.const 8 @@ -10520,7 +10293,7 @@ ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/map/Map#clear (param $0 i32) local.get $0 @@ -10531,9 +10304,9 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/map/Map#set:bucketsMask local.get $0 i32.const 0 @@ -10662,7 +10435,7 @@ local.get $1 call $~lib/rt/itcms/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 if (result i32) @@ -10713,7 +10486,7 @@ local.get $1 call $~lib/rt/itcms/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 if (result i32) @@ -10738,7 +10511,7 @@ local.get $1 call $~lib/rt/itcms/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 if (result i32) @@ -10763,7 +10536,7 @@ local.get $1 call $~lib/rt/itcms/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 if (result i32) @@ -10801,7 +10574,7 @@ local.get $1 call $~lib/rt/itcms/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 if (result i32) @@ -10826,7 +10599,7 @@ local.get $1 call $~lib/rt/itcms/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 if (result i32) @@ -10860,18 +10633,11 @@ (func $~lib/map/Map#__visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 -<<<<<<< HEAD - i32.load offset=16 - local.set $1 - local.get $0 - i32.load offset=24 -======= i32.load local.get $1 call $~lib/rt/itcms/__visit local.get $0 - i32.load offset=8 ->>>>>>> master + i32.load offset=16 local.set $2 i32.const 0 if (result i32) @@ -10896,7 +10662,7 @@ local.get $1 call $~lib/rt/itcms/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 if (result i32) @@ -10934,7 +10700,7 @@ local.get $1 call $~lib/rt/itcms/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 if (result i32) @@ -10959,7 +10725,7 @@ local.get $1 call $~lib/rt/itcms/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 if (result i32) @@ -10997,7 +10763,7 @@ local.get $1 call $~lib/rt/itcms/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 if (result i32) @@ -11022,7 +10788,7 @@ local.get $1 call $~lib/rt/itcms/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 if (result i32) @@ -11056,18 +10822,11 @@ (func $~lib/map/Map#__visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 -<<<<<<< HEAD - i32.load offset=16 - local.set $1 - local.get $0 - i32.load offset=24 -======= i32.load local.get $1 call $~lib/rt/itcms/__visit local.get $0 - i32.load offset=8 ->>>>>>> master + i32.load offset=16 local.set $2 i32.const 0 if (result i32) @@ -11080,20 +10839,7 @@ local.get $1 call $~lib/rt/itcms/__visit ) -<<<<<<< HEAD - (func $~lib/map/Map#constructor (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 32 - i32.const 6 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.set $0 - end -======= (func $~lib/map/Map~visit (param $0 i32) (param $1 i32) ->>>>>>> master local.get $0 local.get $1 call $~lib/map/Map#__visit @@ -11101,30 +10847,13 @@ (func $~lib/map/Map#__visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 -<<<<<<< HEAD - i64.const 4 - i64.const 1 - i64.sub - i64.store offset=8 -======= i32.load local.get $1 call $~lib/rt/itcms/__visit ->>>>>>> master local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 -<<<<<<< HEAD - i32.const 4 - i32.const 8 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 -======= if (result i32) i32.const 1 else @@ -11136,19 +10865,12 @@ call $~lib/rt/itcms/__visit ) (func $~lib/map/Map~visit (param $0 i32) (param $1 i32) ->>>>>>> master local.get $0 local.get $1 call $~lib/map/Map#__visit ) (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) i32.const 0 -<<<<<<< HEAD - i32.store offset=24 - local.get $0 - i32.const 0 - i32.store offset=28 -======= drop local.get $0 i32.load @@ -11156,7 +10878,6 @@ call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) ->>>>>>> master local.get $0 local.get $1 call $~lib/array/Array#__visit @@ -11164,46 +10885,13 @@ (func $~lib/map/Map#__visit (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 -<<<<<<< HEAD - i32.eqz - if - i32.const 32 - i32.const 7 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.set $0 - end -======= i32.load local.get $1 call $~lib/rt/itcms/__visit ->>>>>>> master local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 -<<<<<<< HEAD - i32.const 4 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store - local.get $0 - i64.const 4 - i64.const 1 - i64.sub - i64.store offset=8 - local.get $0 - i32.const 0 - i32.const 4 - i32.const 12 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 -======= if (result i32) i32.const 1 else @@ -11225,14 +10913,10 @@ i32.load local.get $1 call $~lib/rt/itcms/__visit ->>>>>>> master local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 -<<<<<<< HEAD - i32.store offset=24 -======= if (result i32) i32.const 1 else @@ -11244,18 +10928,13 @@ call $~lib/rt/itcms/__visit ) (func $~lib/map/Map~visit (param $0 i32) (param $1 i32) ->>>>>>> master local.get $0 local.get $1 call $~lib/map/Map#__visit ) (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) i32.const 0 -<<<<<<< HEAD - i32.store offset=28 -======= drop ->>>>>>> master local.get $0 i32.load local.get $1 @@ -11273,7 +10952,7 @@ local.get $1 call $~lib/rt/itcms/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 if (result i32) @@ -11298,7 +10977,7 @@ local.get $1 call $~lib/rt/itcms/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 if (result i32) @@ -11336,7 +11015,7 @@ local.get $1 call $~lib/rt/itcms/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 if (result i32) @@ -11349,39 +11028,6 @@ local.get $1 call $~lib/rt/itcms/__visit ) -<<<<<<< HEAD - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.get $2 - local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - i32.load - local.set $3 - loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 - if - local.get $3 - i32.load offset=4 - local.set $5 - local.get $5 - i32.const 1 - i32.and - i32.eqz - if (result i32) - local.get $3 - i32.load8_s -======= (func $~lib/map/Map~visit (param $0 i32) (param $1 i32) local.get $0 local.get $1 @@ -11567,7 +11213,6 @@ return end local.get $0 ->>>>>>> master local.get $1 call $~lib/map/Map~visit return @@ -11602,7 +11247,6 @@ ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -11610,165 +11254,28 @@ call $~stack_check global.get $~lib/memory/__stack_pointer i32.const 0 -<<<<<<< HEAD - local.get $4 - i32.const 8 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $0 - i32.load offset=16 - local.set $6 - local.get $6 + i32.store local.get $0 - i32.load offset=24 - i32.const 8 - i32.mul - i32.add - local.set $7 - local.get $5 - local.set $8 - loop $while-continue|0 - local.get $6 - local.get $7 - i32.ne - local.set $9 - local.get $9 - if - local.get $6 - local.set $10 - local.get $10 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $8 - local.set $11 - local.get $10 - i32.load8_s - local.set $12 - local.get $11 - local.get $12 - i32.store8 - local.get $11 - local.get $10 - i32.load8_s offset=1 - i32.store8 offset=1 - local.get $12 - call $~lib/util/hash/HASH - local.get $1 - i64.extend_i32_u - i64.and - i32.wrap_i64 - local.set $13 - local.get $3 - local.get $13 - i32.const 4 - i32.mul - i32.add - local.set $14 - local.get $11 - local.get $14 - i32.load - i32.store offset=4 - local.get $14 - local.get $8 - i32.store - local.get $8 - i32.const 8 - i32.add - local.set $8 - end - local.get $6 - i32.const 8 - i32.add - local.set $6 - br $while-continue|0 - end - end -======= - i32.store ->>>>>>> master - local.get $0 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - local.get $1 -<<<<<<< HEAD - i64.extend_i32_u - i64.store offset=8 - local.get $0 - local.tee $13 - local.get $5 - local.tee $14 - local.get $13 - i32.load offset=16 - local.tee $11 - i32.ne - if - local.get $14 - call $~lib/rt/pure/__retain - local.set $14 - local.get $11 - call $~lib/rt/pure/__release - end - local.get $14 - i32.store offset=16 - local.get $0 - local.get $4 - i32.store offset=20 - local.get $0 - local.get $0 - i32.load offset=28 - i32.store offset=24 -======= - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $2 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.0 - end - call $~lib/map/Map#find - i32.const 0 - i32.ne - local.set $3 - global.get $~lib/memory/__stack_pointer - i32.const 4 + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store + local.get $2 + local.get $1 + local.get $1 + call $~lib/util/hash/HASH + call $~lib/map/Map#find + i32.const 0 + i32.ne + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 4 i32.add global.set $~lib/memory/__stack_pointer ->>>>>>> master - local.get $3 + local.get $2 ) -<<<<<<< HEAD - (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i64) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $3 -======= (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) + (local $3 i64) (local $4 i32) (local $5 i32) (local $6 i32) @@ -11781,29 +11288,9 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $3 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $4 ->>>>>>> master + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.set $7 global.get $~lib/memory/__stack_pointer @@ -11811,23 +11298,12 @@ i32.store local.get $7 local.get $1 -<<<<<<< HEAD local.get $3 - call $~lib/map/Map#find + call $~lib/map/Map#find local.set $4 local.get $4 if - i32.const 0 - drop local.get $4 -======= - local.get $4 - call $~lib/map/Map#find - local.set $5 - local.get $5 - if - local.get $5 ->>>>>>> master local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 @@ -11865,37 +11341,22 @@ i64.const 1 i64.or end -<<<<<<< HEAD i32.wrap_i64 - call $~lib/map/Map#rehash -======= call $~lib/map/Map#rehash ->>>>>>> master end global.get $~lib/memory/__stack_pointer local.get $0 -<<<<<<< HEAD i32.load offset=16 - call $~lib/rt/pure/__retain - local.set $5 - local.get $5 -======= - i32.load offset=8 - local.tee $3 + local.tee $5 i32.store offset=4 - local.get $3 ->>>>>>> master + local.get $5 local.get $0 local.get $0 i32.load offset=24 local.tee $6 i32.const 1 i32.add -<<<<<<< HEAD - i32.store offset=24 -======= call $~lib/map/Map#set:entriesOffset ->>>>>>> master local.get $6 i32.const 12 i32.mul @@ -11903,15 +11364,10 @@ local.set $4 local.get $4 local.get $1 -<<<<<<< HEAD - i32.store8 - local.get $4 -======= call $~lib/map/MapEntry#set:key i32.const 0 drop - local.get $5 ->>>>>>> master + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 @@ -11921,11 +11377,7 @@ i32.load offset=28 i32.const 1 i32.add -<<<<<<< HEAD - i32.store offset=28 -======= call $~lib/map/Map#set:entriesCount ->>>>>>> master local.get $0 i32.load local.get $3 @@ -11944,11 +11396,6 @@ local.get $6 local.get $4 i32.store -<<<<<<< HEAD - local.get $5 - call $~lib/rt/pure/__release -======= ->>>>>>> master end local.get $0 local.set $7 @@ -11958,81 +11405,49 @@ global.set $~lib/memory/__stack_pointer local.get $7 ) -<<<<<<< HEAD - (func $~lib/util/hash/HASH (param $0 i32) (result i64) - (local $1 i64) + (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i64) - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 + (local $3 i32) + global.get $~lib/memory/__stack_pointer i32.const 4 - i32.le_u - drop + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store local.get $0 - local.set $2 - i64.const 4 - local.set $1 - i64.const 0 - i64.const 2870177450012600261 - i64.add - local.get $1 - i64.add - local.set $3 - local.get $3 - local.get $2 - i64.extend_i32_u - i64.const -7046029288634856825 - i64.mul - i64.xor - local.set $3 - local.get $3 - i64.const 23 - i64.rotl - i64.const -4417276706812531889 - i64.mul - i64.const 1609587929392839161 - i64.add - local.set $3 - local.get $3 - local.get $3 - i64.const 33 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const -4417276706812531889 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 29 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const 1609587929392839161 - i64.mul local.set $3 + global.get $~lib/memory/__stack_pointer local.get $3 + i32.store local.get $3 - i64.const 32 - i64.shr_u - i64.xor + local.get $1 + local.get $1 + call $~lib/util/hash/HASH + call $~lib/map/Map#find + local.set $2 + local.get $2 + i32.eqz + if + i32.const 592 + i32.const 656 + i32.const 105 + i32.const 17 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.load offset=4 local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer local.get $3 - return ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) -======= - (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - (local $4 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -12041,66 +11456,7 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store - local.get $0 - local.set $4 - global.get $~lib/memory/__stack_pointer - local.get $4 - i32.store - local.get $4 - local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $2 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.3 - end - call $~lib/map/Map#find - local.set $3 - local.get $3 - i32.eqz - if - i32.const 592 - i32.const 656 - i32.const 105 - i32.const 17 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.load offset=4 - local.set $4 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $4 - ) - (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - local.get $1 + local.get $1 local.get $0 i32.load offset=12 i32.ge_u @@ -12145,7 +11501,6 @@ (func $~lib/map/Map#keys (param $0 i32) (result i32) (local $1 i32) (local $2 i32) ->>>>>>> master (local $3 i32) (local $4 i32) (local $5 i32) @@ -12162,24 +11517,10 @@ i64.const 0 i64.store local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $1 local.get $0 -<<<<<<< HEAD - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - i32.load - local.set $3 - loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 -======= - i32.load offset=16 + i32.load offset=24 local.set $2 global.get $~lib/memory/__stack_pointer i32.const 0 @@ -12197,7 +11538,6 @@ i32.lt_s local.set $6 local.get $6 ->>>>>>> master if local.get $1 local.get $5 @@ -12321,10 +11661,10 @@ i64.const 0 i64.store local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $1 local.get $0 - i32.load offset=16 + i32.load offset=24 local.set $2 global.get $~lib/memory/__stack_pointer i32.const 0 @@ -12336,27 +11676,11 @@ local.set $4 i32.const 0 local.set $5 -<<<<<<< HEAD - local.get $0 - i32.load offset=16 - local.set $6 - local.get $6 - local.get $0 - i32.load offset=24 - i32.const 12 - i32.mul - i32.add - local.set $7 - local.get $5 - local.set $8 - loop $while-continue|0 -======= loop $for-loop|0 local.get $5 local.get $2 i32.lt_s local.set $6 ->>>>>>> master local.get $6 if local.get $1 @@ -12371,28 +11695,6 @@ i32.and i32.eqz if -<<<<<<< HEAD - local.get $8 - local.set $11 - local.get $10 - i32.load - local.set $12 - local.get $11 - local.get $12 - i32.store - local.get $11 - local.get $10 - i32.load offset=4 - i32.store offset=4 - local.get $12 - call $~lib/util/hash/HASH - local.get $1 - i64.extend_i32_u - i64.and - i32.wrap_i64 - local.set $13 -======= ->>>>>>> master local.get $3 local.set $9 global.get $~lib/memory/__stack_pointer @@ -12433,7 +11735,7 @@ local.get $9 ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) + (local $3 i64) (local $4 i32) (local $5 i32) (local $6 i32) @@ -12446,28 +11748,9 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $~lib/util/hash/HASH|inlined.4 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $3 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.4 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.set $7 global.get $~lib/memory/__stack_pointer @@ -12475,34 +11758,21 @@ i32.store local.get $7 local.get $1 -<<<<<<< HEAD - i64.extend_i32_u - i64.store offset=8 - local.get $0 - local.tee $13 - local.get $5 - local.tee $14 - local.get $13 - i32.load offset=16 - local.tee $11 - i32.ne -======= - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 ->>>>>>> master + local.set $4 + local.get $4 if - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 drop else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 @@ -12512,36 +11782,37 @@ i32.store local.get $7 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map#rehash end global.get $~lib/memory/__stack_pointer local.get $0 - i32.load offset=8 - local.tee $3 + i32.load offset=16 + local.tee $5 i32.store offset=4 - local.get $3 + local.get $5 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $6 i32.const 1 i32.add @@ -12550,56 +11821,42 @@ i32.const 8 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 call $~lib/map/MapEntry#set:key i32.const 0 drop - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 drop local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add call $~lib/map/Map#set:entriesCount local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load call $~lib/map/MapEntry#set:taggedNext local.get $6 - local.get $5 + local.get $4 i32.store end -<<<<<<< HEAD - local.get $14 - i32.store offset=16 - local.get $0 - local.get $4 - i32.store offset=20 - local.get $0 - local.get $0 - i32.load offset=28 - i32.store offset=24 - local.get $3 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release -======= local.get $0 local.set $7 global.get $~lib/memory/__stack_pointer @@ -12607,18 +11864,12 @@ i32.add global.set $~lib/memory/__stack_pointer local.get $7 ->>>>>>> master ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i64) (local $4 i32) (local $5 i32) (local $6 i32) -<<<<<<< HEAD - local.get $1 - call $~lib/util/hash/HASH - local.set $3 -======= (local $7 i32) global.get $~lib/memory/__stack_pointer i32.const 8 @@ -12628,33 +11879,9 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $3 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end - local.set $4 ->>>>>>> master + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.set $7 global.get $~lib/memory/__stack_pointer @@ -12667,13 +11894,7 @@ local.set $4 local.get $4 if -<<<<<<< HEAD - i32.const 0 - drop local.get $4 -======= - local.get $5 ->>>>>>> master local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 @@ -12716,28 +11937,17 @@ end global.get $~lib/memory/__stack_pointer local.get $0 -<<<<<<< HEAD i32.load offset=16 - call $~lib/rt/pure/__retain - local.set $5 - local.get $5 -======= - i32.load offset=8 - local.tee $3 + local.tee $5 i32.store offset=4 - local.get $3 ->>>>>>> master + local.get $5 local.get $0 local.get $0 i32.load offset=24 local.tee $6 i32.const 1 i32.add -<<<<<<< HEAD - i32.store offset=24 -======= call $~lib/map/Map#set:entriesOffset ->>>>>>> master local.get $6 i32.const 12 i32.mul @@ -12745,15 +11955,10 @@ local.set $4 local.get $4 local.get $1 -<<<<<<< HEAD - i32.store - local.get $4 -======= call $~lib/map/MapEntry#set:key i32.const 0 drop - local.get $5 ->>>>>>> master + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 @@ -12763,11 +11968,7 @@ i32.load offset=28 i32.const 1 i32.add -<<<<<<< HEAD - i32.store offset=28 -======= call $~lib/map/Map#set:entriesCount ->>>>>>> master local.get $0 i32.load local.get $3 @@ -12786,30 +11987,14 @@ local.get $6 local.get $4 i32.store -<<<<<<< HEAD - local.get $5 - call $~lib/rt/pure/__release end local.get $0 - call $~lib/rt/pure/__retain - ) - (func $~lib/map/Map#get:size (param $0 i32) (result i32) - local.get $0 - i32.load offset=28 - ) - (func $~lib/map/Map#get:size (param $0 i32) (result i32) - local.get $0 - i32.load offset=28 -======= - end - local.get $0 - local.set $7 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $7 ->>>>>>> master + local.set $7 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $7 ) (func $~lib/map/Map#delete (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -12848,17 +12033,8 @@ local.get $6 return end -<<<<<<< HEAD - i32.const 0 - drop - i32.const 0 - drop local.get $2 local.get $2 -======= - local.get $3 - local.get $3 ->>>>>>> master i32.load offset=8 i32.const 1 i32.or @@ -12868,11 +12044,7 @@ i32.load offset=28 i32.const 1 i32.sub -<<<<<<< HEAD - i32.store offset=28 -======= call $~lib/map/Map#set:entriesCount ->>>>>>> master local.get $0 i64.load offset=8 i64.const 1 @@ -12907,62 +12079,12 @@ end if local.get $0 -<<<<<<< HEAD - local.get $3 - call $~lib/map/Map#rehash - end - i32.const 1 - ) - (func $~lib/map/Map#clear (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - local.tee $1 - i32.const 0 - i32.const 4 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $2 - local.get $1 - i32.load - call $~lib/rt/pure/__release - local.get $2 - i32.store - local.get $0 - i64.const 4 - i64.const 1 - i64.sub - i64.store offset=8 - local.get $0 - local.tee $2 - i32.const 0 - i32.const 4 - i32.const 12 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 - local.get $2 - i32.load offset=16 - call $~lib/rt/pure/__release - local.get $1 - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $0 - i32.const 0 - i32.store offset=28 -======= local.set $6 global.get $~lib/memory/__stack_pointer local.get $6 i32.store local.get $6 - local.get $4 + local.get $3 call $~lib/map/Map#rehash end i32.const 1 @@ -12972,7 +12094,6 @@ i32.add global.set $~lib/memory/__stack_pointer local.get $6 ->>>>>>> master ) (func $std/map/testNumeric (local $0 i32) @@ -13470,28 +12591,37 @@ i32.shr_s i32.add i32.eq -<<<<<<< HEAD i32.eqz if i32.const 0 - i32.const 336 + i32.const 544 i32.const 42 i32.const 5 call $~lib/builtins/abort unreachable end local.get $0 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 local.get $7 call $~lib/map/Map#delete drop local.get $0 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 local.get $7 call $~lib/map/Map#has i32.eqz i32.eqz if i32.const 0 - i32.const 336 + i32.const 544 i32.const 44 i32.const 5 call $~lib/builtins/abort @@ -13505,13 +12635,18 @@ end end local.get $0 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 call $~lib/map/Map#get:size i32.const 50 i32.eq i32.eqz if i32.const 0 - i32.const 336 + i32.const 544 i32.const 46 i32.const 3 call $~lib/builtins/abort @@ -13531,19 +12666,29 @@ local.get $9 if local.get $0 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 local.get $7 call $~lib/map/Map#has i32.eqz i32.eqz if i32.const 0 - i32.const 336 + i32.const 544 i32.const 50 i32.const 5 call $~lib/builtins/abort unreachable end local.get $0 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 local.get $7 i32.const 10 local.get $7 @@ -13553,31 +12698,46 @@ i32.shr_s i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + drop local.get $0 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 local.get $7 call $~lib/map/Map#has i32.eqz if i32.const 0 - i32.const 336 + i32.const 544 i32.const 52 i32.const 5 call $~lib/builtins/abort unreachable end local.get $0 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 local.get $7 call $~lib/map/Map#delete drop local.get $0 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 local.get $7 call $~lib/map/Map#has i32.eqz i32.eqz if i32.const 0 - i32.const 336 + i32.const 544 i32.const 54 i32.const 5 call $~lib/builtins/abort @@ -13591,515 +12751,255 @@ end end local.get $0 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 call $~lib/map/Map#get:size i32.const 50 i32.eq i32.eqz if i32.const 0 - i32.const 336 + i32.const 544 i32.const 56 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 call $~lib/map/Map#clear local.get $0 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 call $~lib/map/Map#get:size i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 336 + i32.const 544 i32.const 60 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release + global.get $~lib/memory/__stack_pointer + i32.const 24 + i32.add + global.set $~lib/memory/__stack_pointer ) - (func $~lib/map/Map#constructor (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 32 - i32.const 8 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.set $0 - end - local.get $0 - i32.const 0 - i32.const 4 + (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 i32.store local.get $0 - i64.const 4 - i64.const 1 - i64.sub - i64.store offset=8 - local.get $0 + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store + local.get $2 + local.get $1 + local.get $1 + call $~lib/util/hash/HASH + call $~lib/map/Map#find i32.const 0 + i32.ne + local.set $2 + global.get $~lib/memory/__stack_pointer i32.const 4 - i32.const 12 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $0 - i32.const 0 - i32.store offset=28 - local.get $0 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 ) - (func $~lib/util/hash/HASH (param $0 i32) (result i64) - (local $1 i64) - (local $2 i32) + (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i64) - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 4 - i32.le_u - drop - local.get $0 - i32.const 255 - i32.and - local.set $2 - i64.const 1 - local.set $1 + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer i64.const 0 - i64.const 2870177450012600261 - i64.add + i64.store local.get $1 - i64.add - local.set $3 - local.get $3 - local.get $2 - i64.extend_i32_u - i64.const -7046029288634856825 - i64.mul - i64.xor - local.set $3 - local.get $3 - i64.const 23 - i64.rotl - i64.const -4417276706812531889 - i64.mul - i64.const 1609587929392839161 - i64.add + call $~lib/util/hash/HASH local.set $3 + local.get $0 + local.set $7 + global.get $~lib/memory/__stack_pointer + local.get $7 + i32.store + local.get $7 + local.get $1 local.get $3 - local.get $3 - i64.const 33 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const -4417276706812531889 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 29 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const 1609587929392839161 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 32 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - return - ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.get $2 - local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - i32.load - local.set $3 - loop $while-continue|0 - local.get $3 - local.set $4 + call $~lib/map/Map#find + local.set $4 + local.get $4 + if local.get $4 + local.get $2 + call $~lib/map/MapEntry#set:value + i32.const 0 + drop + else + local.get $0 + i32.load offset=24 + local.get $0 + i32.load offset=20 + i32.eq if - local.get $3 - i32.load offset=8 - local.set $5 - local.get $5 - i32.const 1 - i32.and -======= ->>>>>>> master - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 42 - i32.const 5 - call $~lib/builtins/abort - unreachable - end local.get $0 - local.set $11 + local.set $7 global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 local.get $7 - call $~lib/map/Map#delete - drop - local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 + i32.store local.get $7 - call $~lib/map/Map#has - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 44 - i32.const 5 - call $~lib/builtins/abort - unreachable + local.get $0 + i32.load offset=28 + local.get $0 + i32.load offset=20 + i32.const 3 + i32.mul + i32.const 4 + i32.div_s + i32.lt_s + if (result i64) + local.get $0 + i64.load offset=8 + else + local.get $0 + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end - local.get $7 - i32.const 1 - i32.add - local.set $7 - br $for-loop|6 + i32.wrap_i64 + call $~lib/map/Map#rehash end + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.load offset=16 + local.tee $5 + i32.store offset=4 + local.get $5 + local.get $0 + local.get $0 + i32.load offset=24 + local.tee $6 + i32.const 1 + i32.add + call $~lib/map/Map#set:entriesOffset + local.get $6 + i32.const 12 + i32.mul + i32.add + local.set $4 + local.get $4 + local.get $1 + call $~lib/map/MapEntry#set:key + i32.const 0 + drop + local.get $4 + local.get $2 + call $~lib/map/MapEntry#set:value + i32.const 0 + drop + local.get $0 + local.get $0 + i32.load offset=28 + i32.const 1 + i32.add + call $~lib/map/Map#set:entriesCount + local.get $0 + i32.load + local.get $3 + local.get $0 + i64.load offset=8 + i64.and + i32.wrap_i64 + i32.const 4 + i32.mul + i32.add + local.set $6 + local.get $4 + local.get $6 + i32.load + call $~lib/map/MapEntry#set:taggedNext + local.get $6 + local.get $4 + i32.store end -<<<<<<< HEAD - i32.const 0 - ) - (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) local.get $0 - local.get $1 - local.get $1 - call $~lib/util/hash/HASH - call $~lib/map/Map#find - i32.const 0 - i32.ne + local.set $7 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $7 ) - (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) + (func $~lib/map/Map#get (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 $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - local.get $1 - i32.const 1 - i32.add - local.set $2 - i32.const 0 - local.get $2 + global.get $~lib/memory/__stack_pointer i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $3 - local.get $2 - i32.const 8 - i32.mul - i32.const 3 - i32.div_s - local.set $4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $4 - i32.const 12 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $0 - i32.load offset=16 - local.set $6 - local.get $6 - local.get $0 - i32.load offset=24 - i32.const 12 - i32.mul - i32.add -======= + i32.store local.get $0 - local.set $11 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - call $~lib/map/Map#get:size - i32.const 50 - i32.eq + local.get $3 + i32.store + local.get $3 + local.get $1 + local.get $1 + call $~lib/util/hash/HASH + call $~lib/map/Map#find + local.set $2 + local.get $2 i32.eqz if - i32.const 0 - i32.const 544 - i32.const 46 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 0 ->>>>>>> master - local.set $7 - loop $for-loop|8 - local.get $7 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i32.const 50 - i32.lt_s - local.set $9 - local.get $9 - if - local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - local.get $7 - call $~lib/map/Map#has - i32.eqz - i32.eqz - if -<<<<<<< HEAD - local.get $8 - local.set $11 - local.get $10 - i32.load8_u - local.set $12 - local.get $11 - local.get $12 - i32.store8 - local.get $11 - local.get $10 - i32.load offset=4 - i32.store offset=4 - local.get $12 - call $~lib/util/hash/HASH - local.get $1 - i64.extend_i32_u - i64.and - i32.wrap_i64 - local.set $13 - local.get $3 - local.get $13 - i32.const 4 - i32.mul - i32.add - local.set $14 - local.get $11 - local.get $14 - i32.load - i32.store offset=8 - local.get $14 - local.get $8 - i32.store - local.get $8 - i32.const 12 - i32.add - local.set $8 -======= - i32.const 0 - i32.const 544 - i32.const 50 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - local.get $7 - i32.const 10 - local.get $7 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i32.add - call $~lib/map/Map#set - drop - local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - local.get $7 - call $~lib/map/Map#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 52 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - local.get $7 - call $~lib/map/Map#delete - drop - local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - local.get $7 - call $~lib/map/Map#has - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 54 - i32.const 5 - call $~lib/builtins/abort - unreachable ->>>>>>> master - end - local.get $7 - i32.const 1 - i32.add - local.set $7 - br $for-loop|8 - end - end - local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - call $~lib/map/Map#get:size - i32.const 50 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 56 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 -<<<<<<< HEAD - local.get $1 - i64.extend_i32_u - i64.store offset=8 - local.get $0 - local.tee $13 - local.get $5 - local.tee $14 - local.get $13 - i32.load offset=16 - local.tee $11 - i32.ne -======= - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - call $~lib/map/Map#clear - local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - call $~lib/map/Map#get:size - i32.const 0 - i32.eq - i32.eqz ->>>>>>> master - if - i32.const 0 - i32.const 544 - i32.const 60 - i32.const 3 + i32.const 592 + i32.const 656 + i32.const 105 + i32.const 17 call $~lib/builtins/abort unreachable end -<<<<<<< HEAD - local.get $14 - i32.store offset=16 - local.get $0 - local.get $4 - i32.store offset=20 - local.get $0 - local.get $0 - i32.load offset=28 - i32.store offset=24 -======= + local.get $2 + i32.load offset=4 + local.set $3 global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 4 i32.add global.set $~lib/memory/__stack_pointer + local.get $3 ) - (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 4 @@ -14109,321 +13009,35 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store - local.get $0 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) + local.get $0 + i32.load offset=12 + i32.ge_u + if local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop i32.const 0 - drop + i32.lt_s + if + i32.const 224 + i32.const 704 + i32.const 108 + i32.const 22 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 i32.const 1 + i32.add + i32.const 0 + call $~lib/array/ensureSize + local.get $0 + local.get $1 i32.const 1 - i32.eq - drop - local.get $2 - i32.const 255 - i32.and - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.0 + i32.add + call $~lib/array/Array#set:length_ end - call $~lib/map/Map#find - i32.const 0 - i32.ne - local.set $3 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer ->>>>>>> master - local.get $3 - ) - (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i64) - (local $4 i32) - (local $5 i32) - (local $6 i32) -<<<<<<< HEAD - local.get $1 - call $~lib/util/hash/HASH - local.set $3 -======= - (local $7 i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $3 - i32.const 255 - i32.and - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $4 ->>>>>>> master - local.get $0 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store - local.get $7 - local.get $1 - local.get $3 - call $~lib/map/Map#find - local.set $4 - local.get $4 - if -<<<<<<< HEAD - i32.const 0 - drop - local.get $4 -======= - local.get $5 ->>>>>>> master - local.get $2 - call $~lib/map/MapEntry#set:value - i32.const 0 - drop - else - local.get $0 - i32.load offset=24 - local.get $0 - i32.load offset=20 - i32.eq - if - local.get $0 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store - local.get $7 - local.get $0 - i32.load offset=28 - local.get $0 - i32.load offset=20 - i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s - if (result i64) - local.get $0 - i64.load offset=8 - else - local.get $0 - i64.load offset=8 - i64.const 1 - i64.shl - i64.const 1 - i64.or - end - i32.wrap_i64 - call $~lib/map/Map#rehash - end - global.get $~lib/memory/__stack_pointer - local.get $0 -<<<<<<< HEAD - i32.load offset=16 - call $~lib/rt/pure/__retain - local.set $5 - local.get $5 -======= - i32.load offset=8 - local.tee $3 - i32.store offset=4 - local.get $3 ->>>>>>> master - local.get $0 - local.get $0 - i32.load offset=24 - local.tee $6 - i32.const 1 - i32.add -<<<<<<< HEAD - i32.store offset=24 -======= - call $~lib/map/Map#set:entriesOffset ->>>>>>> master - local.get $6 - i32.const 12 - i32.mul - i32.add - local.set $4 - local.get $4 - local.get $1 -<<<<<<< HEAD - i32.store8 - local.get $4 -======= - call $~lib/map/MapEntry#set:key - i32.const 0 - drop - local.get $5 ->>>>>>> master - local.get $2 - call $~lib/map/MapEntry#set:value - i32.const 0 - drop - local.get $0 - local.get $0 - i32.load offset=28 - i32.const 1 - i32.add -<<<<<<< HEAD - i32.store offset=28 -======= - call $~lib/map/Map#set:entriesCount ->>>>>>> master - local.get $0 - i32.load - local.get $3 - local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - local.set $6 - local.get $4 - local.get $6 - i32.load - call $~lib/map/MapEntry#set:taggedNext - local.get $6 - local.get $4 - i32.store -<<<<<<< HEAD - local.get $5 - call $~lib/rt/pure/__release -======= ->>>>>>> master - end - local.get $0 - local.set $7 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $7 - ) - (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) -<<<<<<< HEAD -======= - (local $3 i32) - (local $4 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store ->>>>>>> master - local.get $0 - local.set $4 - global.get $~lib/memory/__stack_pointer - local.get $4 - i32.store - local.get $4 - local.get $1 - local.get $1 - call $~lib/util/hash/HASH - call $~lib/map/Map#find - local.set $2 - local.get $2 - i32.eqz - if - i32.const 592 - i32.const 656 - i32.const 105 - i32.const 17 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.load offset=4 - local.set $4 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $4 - ) -<<<<<<< HEAD - (func $~lib/map/Map#get:size (param $0 i32) (result i32) - local.get $0 - i32.load offset=28 - ) - (func $~lib/array/Array#constructor (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) -======= - (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i32) ->>>>>>> master - (local $3 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u - if - local.get $1 - i32.const 0 - i32.lt_s - if - i32.const 224 - i32.const 704 - i32.const 108 - i32.const 22 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.const 0 - call $~lib/array/ensureSize - local.get $0 - local.get $1 - i32.const 1 - i32.add - call $~lib/array/Array#set:length_ - end - local.get $0 + local.get $0 local.set $3 global.get $~lib/memory/__stack_pointer local.get $3 @@ -14578,12 +13192,16 @@ local.set $7 local.get $7 i32.load offset=8 -<<<<<<< HEAD i32.const 1 i32.and i32.eqz if local.get $3 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 local.get $4 local.tee $8 i32.const 1 @@ -14602,293 +13220,6 @@ end end local.get $3 - local.get $4 - call $~lib/array/Array#set:length - local.get $3 - ) - (func $~lib/map/Map#constructor (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 32 - i32.const 10 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.set $0 - end - local.get $0 - i32.const 0 - i32.const 4 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store - local.get $0 - i64.const 4 - i64.const 1 - i64.sub - i64.store offset=8 - local.get $0 - i32.const 0 - i32.const 4 - i32.const 8 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $0 - i32.const 0 - i32.store offset=28 - local.get $0 - ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 - i32.load offset=12 - ) - (func $~lib/array/Array#__uget (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 0 - i32.shl - i32.add - i32.load8_u - ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u - if - i32.const 544 - i32.const 496 - i32.const 104 - i32.const 42 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - call $~lib/array/Array#__uget - local.set $2 - i32.const 0 - drop - local.get $2 - ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.get $2 - local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - i32.load - local.set $3 - loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 - if - local.get $3 - i32.load offset=4 - local.set $5 - local.get $5 - i32.const 1 - i32.and - i32.eqz - if (result i32) - local.get $3 - i32.load8_u - local.get $1 - i32.const 255 - i32.and - i32.eq - else - i32.const 0 - end - if - local.get $3 - return - end - local.get $5 - i32.const 1 - i32.const -1 - i32.xor - i32.and - local.set $3 - br $while-continue|0 - end - end - i32.const 0 - ) - (func $~lib/map/Map#rehash (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 $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - local.get $1 - i32.const 1 - i32.add - local.set $2 - i32.const 0 - local.get $2 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $3 - local.get $2 - i32.const 8 - i32.mul - i32.const 3 - i32.div_s - local.set $4 - i32.const 0 - local.get $4 - i32.const 8 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $0 - i32.load offset=16 - local.set $6 - local.get $6 - local.get $0 - i32.load offset=24 - i32.const 8 - i32.mul - i32.add - local.set $7 - local.get $5 - local.set $8 - loop $while-continue|0 - local.get $6 - local.get $7 - i32.ne - local.set $9 - local.get $9 - if - local.get $6 - local.set $10 - local.get $10 - i32.load offset=4 -======= ->>>>>>> master - i32.const 1 - i32.and - i32.eqz - if -<<<<<<< HEAD - local.get $8 - local.set $11 - local.get $10 - i32.load8_u - local.set $12 - local.get $11 - local.get $12 - i32.store8 - local.get $11 - local.get $10 - i32.load8_u offset=1 - i32.store8 offset=1 - local.get $12 - call $~lib/util/hash/HASH - local.get $1 - i64.extend_i32_u - i64.and - i32.wrap_i64 - local.set $13 -======= ->>>>>>> master - local.get $3 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $4 - local.tee $8 - i32.const 1 - i32.add - local.set $4 - local.get $8 - local.get $7 - i32.load offset=4 - call $~lib/array/Array#__set - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end - local.get $3 -<<<<<<< HEAD - local.tee $12 - local.get $11 - i32.load - local.tee $9 - i32.ne - if - local.get $12 - call $~lib/rt/pure/__retain - local.set $12 - local.get $9 - call $~lib/rt/pure/__release - end - local.get $12 - i32.store - local.get $0 - local.get $1 - i64.extend_i32_u - i64.store offset=8 - local.get $0 - local.tee $13 - local.get $5 - local.tee $14 - local.get $13 - i32.load offset=16 - local.tee $11 - i32.ne - if - local.get $14 - call $~lib/rt/pure/__retain - local.set $14 - local.get $11 - call $~lib/rt/pure/__release - end - local.get $14 - i32.store offset=16 - local.get $0 - local.get $4 - i32.store offset=20 - local.get $0 - local.get $0 - i32.load offset=28 - i32.store offset=24 -======= local.set $9 global.get $~lib/memory/__stack_pointer local.get $9 @@ -14896,7 +13227,6 @@ local.get $9 local.get $4 call $~lib/array/Array#set:length ->>>>>>> master local.get $3 local.set $9 global.get $~lib/memory/__stack_pointer @@ -14910,11 +13240,6 @@ (local $4 i32) (local $5 i32) (local $6 i32) -<<<<<<< HEAD - local.get $1 - call $~lib/util/hash/HASH - local.set $3 -======= (local $7 i32) global.get $~lib/memory/__stack_pointer i32.const 8 @@ -14924,27 +13249,9 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $~lib/util/hash/HASH|inlined.4 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $3 - i32.const 255 - i32.and - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.4 - end - local.set $4 ->>>>>>> master + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.set $7 global.get $~lib/memory/__stack_pointer @@ -14957,13 +13264,7 @@ local.set $4 local.get $4 if -<<<<<<< HEAD - i32.const 0 - drop local.get $4 -======= - local.get $5 ->>>>>>> master local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 @@ -15006,28 +13307,17 @@ end global.get $~lib/memory/__stack_pointer local.get $0 -<<<<<<< HEAD i32.load offset=16 - call $~lib/rt/pure/__retain - local.set $5 - local.get $5 -======= - i32.load offset=8 - local.tee $3 + local.tee $5 i32.store offset=4 - local.get $3 ->>>>>>> master + local.get $5 local.get $0 local.get $0 i32.load offset=24 local.tee $6 i32.const 1 i32.add -<<<<<<< HEAD - i32.store offset=24 -======= call $~lib/map/Map#set:entriesOffset ->>>>>>> master local.get $6 i32.const 8 i32.mul @@ -15035,15 +13325,10 @@ local.set $4 local.get $4 local.get $1 -<<<<<<< HEAD - i32.store8 - local.get $4 -======= call $~lib/map/MapEntry#set:key i32.const 0 drop - local.get $5 ->>>>>>> master + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 @@ -15053,11 +13338,7 @@ i32.load offset=28 i32.const 1 i32.add -<<<<<<< HEAD - i32.store offset=28 -======= call $~lib/map/Map#set:entriesCount ->>>>>>> master local.get $0 i32.load local.get $3 @@ -15076,17 +13357,6 @@ local.get $6 local.get $4 i32.store -<<<<<<< HEAD - local.get $5 - call $~lib/rt/pure/__release - end - local.get $0 - call $~lib/rt/pure/__retain - ) - (func $~lib/map/Map#get:size (param $0 i32) (result i32) - local.get $0 - i32.load offset=28 -======= end local.get $0 local.set $7 @@ -15095,7 +13365,6 @@ i32.add global.set $~lib/memory/__stack_pointer local.get $7 ->>>>>>> master ) (func $~lib/map/Map#delete (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -15134,17 +13403,8 @@ local.get $6 return end -<<<<<<< HEAD - i32.const 0 - drop - i32.const 0 - drop local.get $2 local.get $2 -======= - local.get $3 - local.get $3 ->>>>>>> master i32.load offset=8 i32.const 1 i32.or @@ -15154,11 +13414,7 @@ i32.load offset=28 i32.const 1 i32.sub -<<<<<<< HEAD - i32.store offset=28 -======= call $~lib/map/Map#set:entriesCount ->>>>>>> master local.get $0 i64.load offset=8 i64.const 1 @@ -15193,62 +13449,12 @@ end if local.get $0 -<<<<<<< HEAD - local.get $3 - call $~lib/map/Map#rehash - end - i32.const 1 - ) - (func $~lib/map/Map#clear (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - local.tee $1 - i32.const 0 - i32.const 4 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $2 - local.get $1 - i32.load - call $~lib/rt/pure/__release - local.get $2 - i32.store - local.get $0 - i64.const 4 - i64.const 1 - i64.sub - i64.store offset=8 - local.get $0 - local.tee $2 - i32.const 0 - i32.const 4 - i32.const 12 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 - local.get $2 - i32.load offset=16 - call $~lib/rt/pure/__release - local.get $1 - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $0 - i32.const 0 - i32.store offset=28 -======= local.set $6 global.get $~lib/memory/__stack_pointer local.get $6 i32.store local.get $6 - local.get $4 + local.get $3 call $~lib/map/Map#rehash end i32.const 1 @@ -15258,7 +13464,6 @@ i32.add global.set $~lib/memory/__stack_pointer local.get $6 ->>>>>>> master ) (func $std/map/testNumeric (local $0 i32) @@ -15829,47 +14034,58 @@ unreachable end local.get $0 -<<<<<<< HEAD -======= local.set $11 global.get $~lib/memory/__stack_pointer local.get $11 i32.store offset=4 local.get $11 ->>>>>>> master local.get $7 i32.const 10 local.get $7 i32.const 255 -<<<<<<< HEAD i32.and i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + drop local.get $0 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 local.get $7 call $~lib/map/Map#has i32.eqz if i32.const 0 - i32.const 336 + i32.const 544 i32.const 52 i32.const 5 call $~lib/builtins/abort unreachable end local.get $0 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 local.get $7 call $~lib/map/Map#delete drop local.get $0 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 local.get $7 call $~lib/map/Map#has i32.eqz i32.eqz if i32.const 0 - i32.const 336 + i32.const 544 i32.const 54 i32.const 5 call $~lib/builtins/abort @@ -15883,290 +14099,214 @@ end end local.get $0 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 call $~lib/map/Map#get:size i32.const 50 i32.eq i32.eqz if i32.const 0 - i32.const 336 + i32.const 544 i32.const 56 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 call $~lib/map/Map#clear local.get $0 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 call $~lib/map/Map#get:size i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 336 + i32.const 544 i32.const 60 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release + global.get $~lib/memory/__stack_pointer + i32.const 24 + i32.add + global.set $~lib/memory/__stack_pointer ) - (func $~lib/map/Map#constructor (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 32 - i32.const 11 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.set $0 - end - local.get $0 - i32.const 0 - i32.const 4 + (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 i32.store local.get $0 - i64.const 4 - i64.const 1 - i64.sub - i64.store offset=8 - local.get $0 + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store + local.get $2 + local.get $1 + local.get $1 + call $~lib/util/hash/HASH + call $~lib/map/Map#find i32.const 0 + i32.ne + local.set $2 + global.get $~lib/memory/__stack_pointer i32.const 4 - i32.const 12 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $0 - i32.const 0 - i32.store offset=28 - local.get $0 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 ) - (func $~lib/util/hash/HASH (param $0 i32) (result i64) - (local $1 i64) - (local $2 i32) + (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i64) - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 4 - i32.le_u - drop - local.get $0 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - local.set $2 - i64.const 2 - local.set $1 + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer i64.const 0 - i64.const 2870177450012600261 - i64.add + i64.store local.get $1 - i64.add - local.set $3 - local.get $3 - local.get $2 - i64.extend_i32_u - i64.const -7046029288634856825 - i64.mul - i64.xor - local.set $3 - local.get $3 - i64.const 23 - i64.rotl - i64.const -4417276706812531889 - i64.mul - i64.const 1609587929392839161 - i64.add + call $~lib/util/hash/HASH local.set $3 + local.get $0 + local.set $7 + global.get $~lib/memory/__stack_pointer + local.get $7 + i32.store + local.get $7 + local.get $1 local.get $3 - local.get $3 - i64.const 33 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const -4417276706812531889 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 29 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const 1609587929392839161 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 32 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - return - ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.get $2 - local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - i32.load - local.set $3 - loop $while-continue|0 - local.get $3 - local.set $4 + call $~lib/map/Map#find + local.set $4 + local.get $4 + if local.get $4 + local.get $2 + call $~lib/map/MapEntry#set:value + i32.const 0 + drop + else + local.get $0 + i32.load offset=24 + local.get $0 + i32.load offset=20 + i32.eq if - local.get $3 - i32.load offset=8 - local.set $5 - local.get $5 - i32.const 1 -======= ->>>>>>> master - i32.and - i32.add - call $~lib/map/Map#set - drop local.get $0 - local.set $11 + local.set $7 global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 local.get $7 - call $~lib/map/Map#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 52 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 + i32.store local.get $7 - call $~lib/map/Map#delete - drop local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - local.get $7 - call $~lib/map/Map#has - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 54 - i32.const 5 - call $~lib/builtins/abort - unreachable + i32.load offset=28 + local.get $0 + i32.load offset=20 + i32.const 3 + i32.mul + i32.const 4 + i32.div_s + i32.lt_s + if (result i64) + local.get $0 + i64.load offset=8 + else + local.get $0 + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end - local.get $7 - i32.const 1 - i32.add - local.set $7 - br $for-loop|8 + i32.wrap_i64 + call $~lib/map/Map#rehash end - end - local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - call $~lib/map/Map#get:size - i32.const 50 - i32.eq - i32.eqz - if + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.load offset=16 + local.tee $5 + i32.store offset=4 + local.get $5 + local.get $0 + local.get $0 + i32.load offset=24 + local.tee $6 + i32.const 1 + i32.add + call $~lib/map/Map#set:entriesOffset + local.get $6 + i32.const 12 + i32.mul + i32.add + local.set $4 + local.get $4 + local.get $1 + call $~lib/map/MapEntry#set:key i32.const 0 - i32.const 544 - i32.const 56 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - call $~lib/map/Map#clear - local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - call $~lib/map/Map#get:size - i32.const 0 - i32.eq - i32.eqz - if + drop + local.get $4 + local.get $2 + call $~lib/map/MapEntry#set:value i32.const 0 - i32.const 544 - i32.const 60 - i32.const 3 - call $~lib/builtins/abort - unreachable + drop + local.get $0 + local.get $0 + i32.load offset=28 + i32.const 1 + i32.add + call $~lib/map/Map#set:entriesCount + local.get $0 + i32.load + local.get $3 + local.get $0 + i64.load offset=8 + i64.and + i32.wrap_i64 + i32.const 4 + i32.mul + i32.add + local.set $6 + local.get $4 + local.get $6 + i32.load + call $~lib/map/MapEntry#set:taggedNext + local.get $6 + local.get $4 + i32.store end + local.get $0 + local.set $7 global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer + local.get $7 ) - (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) -<<<<<<< HEAD -======= + (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) global.get $~lib/memory/__stack_pointer @@ -16177,7 +14317,6 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store ->>>>>>> master local.get $0 local.set $3 global.get $~lib/memory/__stack_pointer @@ -16185,213 +14324,91 @@ i32.store local.get $3 local.get $1 -<<<<<<< HEAD local.get $1 call $~lib/util/hash/HASH call $~lib/map/Map#find - i32.const 0 - i32.ne - ) - (func $~lib/map/Map#rehash (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 $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - local.get $1 - i32.const 1 - i32.add local.set $2 - i32.const 0 local.get $2 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $3 + i32.eqz + if + i32.const 592 + i32.const 656 + i32.const 105 + i32.const 17 + call $~lib/builtins/abort + unreachable + end local.get $2 - i32.const 8 - i32.mul - i32.const 3 - i32.div_s - local.set $4 - i32.const 0 - local.get $4 - i32.const 12 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $0 - i32.load offset=16 - local.set $6 - local.get $6 - local.get $0 - i32.load offset=24 - i32.const 12 - i32.mul + i32.load offset=4 + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 4 i32.add - local.set $7 - local.get $5 - local.set $8 - loop $while-continue|0 - local.get $6 - local.get $7 - i32.ne - local.set $9 - local.get $9 - if - local.get $6 - local.set $10 - local.get $10 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $8 - local.set $11 - local.get $10 - i32.load16_s - local.set $12 - local.get $11 - local.get $12 - i32.store16 - local.get $11 - local.get $10 - i32.load offset=4 - i32.store offset=4 - local.get $12 - call $~lib/util/hash/HASH - local.get $1 - i64.extend_i32_u - i64.and - i32.wrap_i64 - local.set $13 - local.get $3 - local.get $13 - i32.const 4 - i32.mul - i32.add - local.set $14 - local.get $11 - local.get $14 - i32.load - i32.store offset=8 - local.get $14 - local.get $8 - i32.store - local.get $8 - i32.const 12 - i32.add - local.set $8 - end - local.get $6 - i32.const 12 - i32.add - local.set $6 - br $while-continue|0 - end - end - local.get $0 - local.tee $11 + global.set $~lib/memory/__stack_pointer local.get $3 - local.tee $12 - local.get $11 - i32.load - local.tee $9 - i32.ne - if - local.get $12 - call $~lib/rt/pure/__retain - local.set $12 - local.get $9 - call $~lib/rt/pure/__release - end - local.get $12 + ) + (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 i32.store - local.get $0 local.get $1 - i64.extend_i32_u - i64.store offset=8 local.get $0 - local.tee $13 - local.get $5 - local.tee $14 - local.get $13 - i32.load offset=16 - local.tee $11 - i32.ne + i32.load offset=12 + i32.ge_u if - local.get $14 - call $~lib/rt/pure/__retain - local.set $14 - local.get $11 - call $~lib/rt/pure/__release - end - local.get $14 - i32.store offset=16 - local.get $0 - local.get $4 - i32.store offset=20 - local.get $0 - local.get $0 - i32.load offset=28 - i32.store offset=24 -======= - block $~lib/util/hash/HASH|inlined.0 (result i32) local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop i32.const 0 - drop - i32.const 2 + i32.lt_s + if + i32.const 224 + i32.const 704 + i32.const 108 + i32.const 22 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.0 + i32.add + i32.const 1 + call $~lib/array/ensureSize + local.get $0 + local.get $1 + i32.const 1 + i32.add + call $~lib/array/Array#set:length_ end - call $~lib/map/Map#find - i32.const 0 - i32.ne + local.get $0 local.set $3 global.get $~lib/memory/__stack_pointer + local.get $3 + i32.store + local.get $3 + local.get $1 + local.get $2 + call $~lib/array/Array#__uset + global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer ->>>>>>> master - local.get $3 ) - (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i64) + (func $~lib/map/Map#keys (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) -<<<<<<< HEAD - local.get $1 - call $~lib/util/hash/HASH - local.set $3 -======= (local $7 i32) + (local $8 i32) + (local $9 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -16400,68 +14417,218 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $3 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $4 ->>>>>>> master local.get $0 - local.set $7 + i32.load offset=16 + local.set $1 + local.get $0 + i32.load offset=24 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $7 + i32.const 0 + local.get $2 + call $~lib/array/Array#constructor + local.tee $3 i32.store - local.get $7 - local.get $1 - local.get $3 - call $~lib/map/Map#find + i32.const 0 local.set $4 - local.get $4 - if -<<<<<<< HEAD - i32.const 0 - drop - local.get $4 -======= + i32.const 0 + local.set $5 + loop $for-loop|0 local.get $5 ->>>>>>> master local.get $2 - call $~lib/map/MapEntry#set:value - i32.const 0 - drop - else - local.get $0 - i32.load offset=24 - local.get $0 - i32.load offset=20 - i32.eq + i32.lt_s + local.set $6 + local.get $6 if - local.get $0 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store + local.get $1 + local.get $5 + i32.const 12 + i32.mul + i32.add + local.set $7 + local.get $7 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $3 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $4 + local.tee $8 + i32.const 1 + i32.add + local.set $4 + local.get $8 + local.get $7 + i32.load16_s + call $~lib/array/Array#__set + end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|0 + end + end + local.get $3 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $4 + call $~lib/array/Array#set:length + local.get $3 + local.set $9 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $9 + ) + (func $~lib/map/Map#values (param $0 i32) (result i32) + (local $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) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + local.get $0 + i32.load offset=16 + local.set $1 + local.get $0 + i32.load offset=24 + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 0 + local.get $2 + call $~lib/array/Array#constructor + local.tee $3 + i32.store + i32.const 0 + local.set $4 + i32.const 0 + local.set $5 + loop $for-loop|0 + local.get $5 + local.get $2 + i32.lt_s + local.set $6 + local.get $6 + if + local.get $1 + local.get $5 + i32.const 12 + i32.mul + i32.add + local.set $7 + local.get $7 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $3 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $4 + local.tee $8 + i32.const 1 + i32.add + local.set $4 + local.get $8 + local.get $7 + i32.load offset=4 + call $~lib/array/Array#__set + end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|0 + end + end + local.get $3 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $4 + call $~lib/array/Array#set:length + local.get $3 + local.set $9 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $9 + ) + (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i64) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + local.get $1 + call $~lib/util/hash/HASH + local.set $3 + local.get $0 + local.set $7 + global.get $~lib/memory/__stack_pointer + local.get $7 + i32.store + local.get $7 + local.get $1 + local.get $3 + call $~lib/map/Map#find + local.set $4 + local.get $4 + if + local.get $4 + local.get $2 + call $~lib/map/MapEntry#set:value + i32.const 0 + drop + else + local.get $0 + i32.load offset=24 + local.get $0 + i32.load offset=20 + i32.eq + if + local.get $0 + local.set $7 + global.get $~lib/memory/__stack_pointer + local.get $7 + i32.store local.get $7 local.get $0 i32.load offset=28 @@ -16484,50 +14651,34 @@ i64.or end i32.wrap_i64 - call $~lib/map/Map#rehash + call $~lib/map/Map#rehash end global.get $~lib/memory/__stack_pointer local.get $0 -<<<<<<< HEAD i32.load offset=16 - call $~lib/rt/pure/__retain - local.set $5 - local.get $5 -======= - i32.load offset=8 - local.tee $3 + local.tee $5 i32.store offset=4 - local.get $3 ->>>>>>> master + local.get $5 local.get $0 local.get $0 i32.load offset=24 local.tee $6 i32.const 1 i32.add -<<<<<<< HEAD - i32.store offset=24 -======= - call $~lib/map/Map#set:entriesOffset ->>>>>>> master + call $~lib/map/Map#set:entriesOffset local.get $6 - i32.const 12 + i32.const 8 i32.mul i32.add local.set $4 local.get $4 local.get $1 -<<<<<<< HEAD - i32.store16 - local.get $4 -======= - call $~lib/map/MapEntry#set:key + call $~lib/map/MapEntry#set:key i32.const 0 drop - local.get $5 ->>>>>>> master + local.get $4 local.get $2 - call $~lib/map/MapEntry#set:value + call $~lib/map/MapEntry#set:value i32.const 0 drop local.get $0 @@ -16535,11 +14686,7 @@ i32.load offset=28 i32.const 1 i32.add -<<<<<<< HEAD - i32.store offset=28 -======= - call $~lib/map/Map#set:entriesCount ->>>>>>> master + call $~lib/map/Map#set:entriesCount local.get $0 i32.load local.get $3 @@ -16554,15 +14701,10 @@ local.get $4 local.get $6 i32.load - call $~lib/map/MapEntry#set:taggedNext + call $~lib/map/MapEntry#set:taggedNext local.get $6 local.get $4 i32.store -<<<<<<< HEAD - local.get $5 - call $~lib/rt/pure/__release -======= ->>>>>>> master end local.get $0 local.set $7 @@ -16572,12 +14714,12 @@ global.set $~lib/memory/__stack_pointer local.get $7 ) - (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (param $0 i32) (param $1 i32) (result i32) (local $2 i32) -<<<<<<< HEAD -======= (local $3 i32) (local $4 i32) + (local $5 i32) + (local $6 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -16586,13 +14728,12 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store ->>>>>>> master local.get $0 - local.set $4 + local.set $6 global.get $~lib/memory/__stack_pointer - local.get $4 + local.get $6 i32.store - local.get $4 + local.get $6 local.get $1 local.get $1 call $~lib/util/hash/HASH @@ -16601,84 +14742,79 @@ local.get $2 i32.eqz if - i32.const 592 - i32.const 656 - i32.const 105 - i32.const 17 - call $~lib/builtins/abort - unreachable + i32.const 0 + local.set $6 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $6 + return end local.get $2 - i32.load offset=4 - local.set $4 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $4 - ) -<<<<<<< HEAD - (func $~lib/map/Map#get:size (param $0 i32) (result i32) + local.get $2 + i32.load offset=8 + i32.const 1 + i32.or + call $~lib/map/MapEntry#set:taggedNext + local.get $0 local.get $0 i32.load offset=28 - ) - (func $~lib/array/Array#constructor (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) -======= - (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i32) ->>>>>>> master - (local $3 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 1 i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - local.get $1 + call $~lib/map/Map#set:entriesCount local.get $0 - i32.load offset=12 + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 + local.set $3 + local.get $3 + i32.const 1 + i32.add + i32.const 4 + local.tee $4 + local.get $0 + i32.load offset=28 + local.tee $5 + local.get $4 + local.get $5 + i32.gt_u + select i32.ge_u - if - local.get $1 - i32.const 0 - i32.lt_s - if - i32.const 224 - i32.const 704 - i32.const 108 - i32.const 22 - call $~lib/builtins/abort - unreachable - end + if (result i32) local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.const 1 - call $~lib/array/ensureSize + i32.load offset=28 local.get $0 - local.get $1 - i32.const 1 - i32.add - call $~lib/array/Array#set:length_ + i32.load offset=20 + i32.const 3 + i32.mul + i32.const 4 + i32.div_s + i32.lt_s + else + i32.const 0 end - local.get $0 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - local.get $1 - local.get $2 - call $~lib/array/Array#__uset + if + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store + local.get $6 + local.get $3 + call $~lib/map/Map#rehash + end + i32.const 1 + local.set $6 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer + local.get $6 ) - (func $~lib/map/Map#keys (param $0 i32) (result i32) + (func $std/map/testNumeric + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16688,838 +14824,564 @@ (local $7 i32) (local $8 i32) (local $9 i32) + (local $10 i32) + (local $11 i32) global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 24 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - local.get $0 - i32.load offset=16 - local.set $1 - local.get $0 - i32.load offset=24 - local.set $2 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=8 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=16 global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $2 - call $~lib/array/Array#constructor -<<<<<<< HEAD - local.set $3 - i32.const 0 - local.set $4 + call $~lib/map/Map#constructor + local.tee $0 + i32.store i32.const 0 - local.set $5 - loop $for-loop|0 - local.get $5 - local.get $2 + local.set $1 + loop $for-loop|1 + local.get $1 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i32.const 100 i32.lt_s - local.set $6 - local.get $6 + local.set $3 + local.get $3 if + local.get $0 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 local.get $1 - local.get $5 - i32.const 12 - i32.mul + call $~lib/map/Map#has + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 6 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 + local.get $1 + i32.const 10 + local.get $1 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s i32.add - local.set $7 - local.get $7 - i32.load offset=8 - i32.const 1 - i32.and + call $~lib/map/Map#set + drop + local.get $0 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 + local.get $1 + call $~lib/map/Map#has i32.eqz if - local.get $3 - local.get $4 - local.tee $8 - i32.const 1 - i32.add - local.set $4 - local.get $8 - local.get $7 - i32.load16_s - call $~lib/array/Array#__set + i32.const 0 + i32.const 544 + i32.const 8 + i32.const 5 + call $~lib/builtins/abort + unreachable end - local.get $5 + local.get $0 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 + local.get $1 + call $~lib/map/Map#get + i32.const 10 + local.get $1 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i32.add + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 9 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 i32.const 1 i32.add - local.set $5 - br $for-loop|0 + local.set $1 + br $for-loop|1 end end - local.get $3 - local.get $4 - call $~lib/array/Array#set:length - local.get $3 - ) - (func $~lib/map/Map#values (param $0 i32) (result i32) - (local $1 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.load offset=16 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 + call $~lib/map/Map#get:size + i32.const 100 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 11 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 0 local.set $1 - local.get $0 - i32.load offset=24 - local.set $2 - i32.const 0 - local.get $2 - call $~lib/array/Array#constructor - local.set $3 -======= - local.tee $3 - i32.store ->>>>>>> master - i32.const 0 - local.set $4 - i32.const 0 - local.set $5 - loop $for-loop|0 - local.get $5 - local.get $2 + loop $for-loop|3 + local.get $1 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i32.const 100 i32.lt_s - local.set $6 - local.get $6 + local.set $4 + local.get $4 if + local.get $0 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 local.get $1 - local.get $5 - i32.const 12 - i32.mul + call $~lib/map/Map#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 15 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 + local.get $1 + call $~lib/map/Map#get + i32.const 10 + local.get $1 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s i32.add - local.set $7 - local.get $7 - i32.load offset=8 - i32.const 1 - i32.and + i32.eq i32.eqz if - local.get $3 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $4 - local.tee $8 - i32.const 1 - i32.add - local.set $4 - local.get $8 - local.get $7 - i32.load16_s - call $~lib/array/Array#__set + i32.const 0 + i32.const 544 + i32.const 16 + i32.const 5 + call $~lib/builtins/abort + unreachable end - local.get $5 + local.get $0 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 + local.get $1 + i32.const 20 + local.get $1 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i32.add + call $~lib/map/Map#set + drop + local.get $0 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 + local.get $1 + call $~lib/map/Map#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 18 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 + local.get $1 + call $~lib/map/Map#get + i32.const 20 + local.get $1 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i32.add + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 19 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 i32.const 1 i32.add - local.set $5 - br $for-loop|0 + local.set $1 + br $for-loop|3 end end - local.get $3 - local.set $9 + local.get $0 + local.set $11 global.get $~lib/memory/__stack_pointer - local.get $9 + local.get $11 i32.store offset=4 - local.get $9 - local.get $4 - call $~lib/array/Array#set:length - local.get $3 -<<<<<<< HEAD - ) - (func $~lib/map/Map#constructor (param $0 i32) (result i32) - local.get $0 + local.get $11 + call $~lib/map/Map#get:size + i32.const 100 + i32.eq i32.eqz if - i32.const 32 - i32.const 13 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.set $0 - end - local.get $0 - i32.const 0 - i32.const 4 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store - local.get $0 - i64.const 4 - i64.const 1 - i64.sub - i64.store offset=8 - local.get $0 - i32.const 0 - i32.const 4 - i32.const 8 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $0 - i32.const 0 - i32.store offset=28 - local.get $0 - ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 - i32.load offset=12 - ) - (func $~lib/array/Array#__uget (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.load16_s - ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u - if + i32.const 0 i32.const 544 - i32.const 496 - i32.const 104 - i32.const 42 + i32.const 21 + i32.const 3 call $~lib/builtins/abort unreachable end + global.get $~lib/memory/__stack_pointer local.get $0 - local.get $1 - call $~lib/array/Array#__uget - local.set $2 - i32.const 0 - drop - local.get $2 - ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.get $2 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 + call $~lib/map/Map#keys + local.tee $1 + i32.store offset=8 + global.get $~lib/memory/__stack_pointer local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul -======= - local.set $9 + local.set $11 global.get $~lib/memory/__stack_pointer - i32.const 8 ->>>>>>> master - i32.add - global.set $~lib/memory/__stack_pointer - local.get $9 - ) - (func $~lib/map/Map#values (param $0 i32) (result i32) - (local $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) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - local.get $0 - i32.load offset=8 - local.set $1 - local.get $0 - i32.load offset=16 - local.set $2 + local.get $11 + i32.store offset=4 + local.get $11 + call $~lib/map/Map#values + local.tee $4 + i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $2 - call $~lib/array/Array#constructor - local.tee $3 - i32.store + call $~lib/map/Map#constructor + local.tee $5 + i32.store offset=16 + global.get $~lib/memory/__stack_pointer i32.const 0 - local.set $4 + call $~lib/map/Map#constructor + local.tee $6 + i32.store offset=20 i32.const 0 - local.set $5 -<<<<<<< HEAD - local.get $0 - i32.load offset=16 - local.set $6 - local.get $6 - local.get $0 - i32.load offset=24 - i32.const 8 - i32.mul - i32.add local.set $7 - local.get $5 - local.set $8 - loop $while-continue|0 -======= - loop $for-loop|0 - local.get $5 - local.get $2 + loop $for-loop|4 + local.get $7 + local.get $1 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 + call $~lib/array/Array#get:length i32.lt_s - local.set $6 ->>>>>>> master - local.get $6 + local.set $8 + local.get $8 if local.get $1 - local.get $5 - i32.const 12 - i32.mul - i32.add - local.set $7 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 local.get $7 - i32.load offset=8 - i32.const 1 - i32.and + call $~lib/array/Array#__get + local.set $9 + local.get $4 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 + local.get $7 + call $~lib/array/Array#__get + local.set $10 + local.get $0 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 + local.get $9 + call $~lib/map/Map#has i32.eqz if -<<<<<<< HEAD - local.get $8 - local.set $11 - local.get $10 - i32.load16_s - local.set $12 - local.get $11 - local.get $12 - i32.store16 - local.get $11 - local.get $10 - i32.load16_s offset=2 - i32.store16 offset=2 - local.get $12 - call $~lib/util/hash/HASH - local.get $1 - i64.extend_i32_u - i64.and - i32.wrap_i64 - local.set $13 - local.get $3 - local.get $13 - i32.const 4 - i32.mul - i32.add - local.set $14 - local.get $11 - local.get $14 - i32.load -======= - local.get $3 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 ->>>>>>> master - i32.store offset=4 - local.get $9 - local.get $4 - local.tee $8 - i32.const 1 - i32.add - local.set $4 - local.get $8 - local.get $7 - i32.load offset=4 - call $~lib/array/Array#__set + i32.const 0 + i32.const 544 + i32.const 31 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 + local.get $10 + i32.const 20 + i32.sub + call $~lib/map/Map#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 32 + i32.const 5 + call $~lib/builtins/abort + unreachable end local.get $5 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 + local.get $9 + local.get $9 + call $~lib/map/Map#set + drop + local.get $6 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 + local.get $10 + i32.const 20 + i32.sub + local.get $10 + i32.const 20 + i32.sub + call $~lib/map/Map#set + drop + local.get $7 i32.const 1 i32.add - local.set $5 - br $for-loop|0 + local.set $7 + br $for-loop|4 end end - local.get $3 -<<<<<<< HEAD - local.tee $12 - local.get $11 - i32.load - local.tee $9 - i32.ne - if - local.get $12 - call $~lib/rt/pure/__retain - local.set $12 - local.get $9 - call $~lib/rt/pure/__release - end - local.get $12 - i32.store - local.get $0 - local.get $1 - i64.extend_i32_u - i64.store offset=8 - local.get $0 - local.tee $13 local.get $5 - local.tee $14 - local.get $13 - i32.load offset=16 - local.tee $11 - i32.ne + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 + call $~lib/map/Map#get:size + i32.const 100 + i32.eq + i32.eqz if - local.get $14 - call $~lib/rt/pure/__retain - local.set $14 - local.get $11 - call $~lib/rt/pure/__release + i32.const 0 + i32.const 544 + i32.const 36 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $14 - i32.store offset=16 - local.get $0 - local.get $4 - i32.store offset=20 - local.get $0 - local.get $0 - i32.load offset=28 - i32.store offset=24 -======= - local.set $9 + local.get $6 + local.set $11 global.get $~lib/memory/__stack_pointer - local.get $9 + local.get $11 i32.store offset=4 - local.get $9 - local.get $4 - call $~lib/array/Array#set:length ->>>>>>> master - local.get $3 - local.set $9 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $9 - ) - (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i64) - (local $4 i32) - (local $5 i32) - (local $6 i32) -<<<<<<< HEAD - local.get $1 - call $~lib/util/hash/HASH - local.set $3 -======= - (local $7 i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - block $~lib/util/hash/HASH|inlined.4 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop + local.get $11 + call $~lib/map/Map#get:size + i32.const 100 + i32.eq + i32.eqz + if i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $3 + i32.const 544 + i32.const 37 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + local.set $7 + loop $for-loop|6 + local.get $7 i32.const 16 i32.shl i32.const 16 i32.shr_s - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.4 - end - local.set $4 ->>>>>>> master - local.get $0 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store - local.get $7 - local.get $1 - local.get $3 - call $~lib/map/Map#find - local.set $4 - local.get $4 - if -<<<<<<< HEAD - i32.const 0 - drop - local.get $4 -======= - local.get $5 ->>>>>>> master - local.get $2 - call $~lib/map/MapEntry#set:value - i32.const 0 - drop - else - local.get $0 - i32.load offset=24 - local.get $0 - i32.load offset=20 - i32.eq + i32.const 50 + i32.lt_s + local.set $10 + local.get $10 if local.get $0 - local.set $7 + local.set $11 global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 local.get $7 - i32.store + call $~lib/map/Map#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 41 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 + local.get $7 + call $~lib/map/Map#get + i32.const 20 local.get $7 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i32.add + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 42 + i32.const 5 + call $~lib/builtins/abort + unreachable + end local.get $0 - i32.load offset=28 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 + local.get $7 + call $~lib/map/Map#delete + drop local.get $0 - i32.load offset=20 - i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s - if (result i64) - local.get $0 - i64.load offset=8 - else - local.get $0 - i64.load offset=8 - i64.const 1 - i64.shl - i64.const 1 - i64.or + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 + local.get $7 + call $~lib/map/Map#has + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 44 + i32.const 5 + call $~lib/builtins/abort + unreachable end - i32.wrap_i64 - call $~lib/map/Map#rehash + local.get $7 + i32.const 1 + i32.add + local.set $7 + br $for-loop|6 end - global.get $~lib/memory/__stack_pointer - local.get $0 -<<<<<<< HEAD - i32.load offset=16 - call $~lib/rt/pure/__retain - local.set $5 - local.get $5 -======= - i32.load offset=8 - local.tee $3 - i32.store offset=4 - local.get $3 ->>>>>>> master - local.get $0 - local.get $0 - i32.load offset=24 - local.tee $6 - i32.const 1 - i32.add -<<<<<<< HEAD - i32.store offset=24 -======= - call $~lib/map/Map#set:entriesOffset ->>>>>>> master - local.get $6 - i32.const 8 - i32.mul - i32.add - local.set $4 - local.get $4 - local.get $1 -<<<<<<< HEAD - i32.store16 - local.get $4 -======= - call $~lib/map/MapEntry#set:key - i32.const 0 - drop - local.get $5 ->>>>>>> master - local.get $2 - call $~lib/map/MapEntry#set:value - i32.const 0 - drop - local.get $0 - local.get $0 - i32.load offset=28 - i32.const 1 - i32.add -<<<<<<< HEAD - i32.store offset=28 -======= - call $~lib/map/Map#set:entriesCount ->>>>>>> master - local.get $0 - i32.load - local.get $3 - local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - local.set $6 - local.get $4 - local.get $6 - i32.load - call $~lib/map/MapEntry#set:taggedNext - local.get $6 - local.get $4 - i32.store -<<<<<<< HEAD - local.get $5 - call $~lib/rt/pure/__release end local.get $0 - call $~lib/rt/pure/__retain - ) - (func $~lib/map/Map#get:size (param $0 i32) (result i32) - local.get $0 - i32.load offset=28 -======= + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 + call $~lib/map/Map#get:size + i32.const 50 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 46 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $0 + i32.const 0 local.set $7 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $7 ->>>>>>> master - ) - (func $~lib/map/Map#delete (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store - local.get $6 - local.get $1 - local.get $1 - call $~lib/util/hash/HASH - call $~lib/map/Map#find - local.set $2 - local.get $2 - i32.eqz - if - i32.const 0 - local.set $6 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $6 - return - end -<<<<<<< HEAD - i32.const 0 - drop - i32.const 0 - drop - local.get $2 - local.get $2 -======= - local.get $3 - local.get $3 ->>>>>>> master - i32.load offset=8 - i32.const 1 - i32.or - call $~lib/map/MapEntry#set:taggedNext - local.get $0 - local.get $0 - i32.load offset=28 - i32.const 1 - i32.sub -<<<<<<< HEAD - i32.store offset=28 -======= - call $~lib/map/Map#set:entriesCount ->>>>>>> master - local.get $0 - i64.load offset=8 - i64.const 1 - i64.shr_u - i32.wrap_i64 - local.set $3 - local.get $3 - i32.const 1 - i32.add - i32.const 4 - local.tee $4 - local.get $0 - i32.load offset=28 - local.tee $5 - local.get $4 - local.get $5 - i32.gt_u - select - i32.ge_u - if (result i32) - local.get $0 - i32.load offset=28 - local.get $0 - i32.load offset=20 - i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s - else - i32.const 0 - end - if - local.get $0 -<<<<<<< HEAD - local.get $3 - call $~lib/map/Map#rehash - end - i32.const 1 - ) - (func $~lib/map/Map#clear (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - local.tee $1 - i32.const 0 - i32.const 4 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $2 - local.get $1 - i32.load - call $~lib/rt/pure/__release - local.get $2 - i32.store - local.get $0 - i64.const 4 - i64.const 1 - i64.sub - i64.store offset=8 - local.get $0 - local.tee $2 - i32.const 0 - i32.const 4 - i32.const 12 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 - local.get $2 - i32.load offset=16 - call $~lib/rt/pure/__release - local.get $1 - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $0 - i32.const 0 - i32.store offset=28 -======= - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store - local.get $6 - local.get $4 - call $~lib/map/Map#rehash - end - i32.const 1 - local.set $6 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $6 ->>>>>>> master - ) - (func $std/map/testNumeric - (local $0 i32) - (local $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 $10 i32) - (local $11 i32) - global.get $~lib/memory/__stack_pointer - i32.const 24 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=16 - global.get $~lib/memory/__stack_pointer - i32.const 0 - call $~lib/map/Map#constructor - local.tee $0 - i32.store - i32.const 0 - local.set $1 - loop $for-loop|1 - local.get $1 + loop $for-loop|8 + local.get $7 i32.const 16 i32.shl i32.const 16 i32.shr_s - i32.const 100 + i32.const 50 i32.lt_s - local.set $3 - local.get $3 + local.set $9 + local.get $9 if local.get $0 local.set $11 @@ -17527,14 +15389,14 @@ local.get $11 i32.store offset=4 local.get $11 - local.get $1 + local.get $7 call $~lib/map/Map#has i32.eqz i32.eqz if i32.const 0 i32.const 544 - i32.const 6 + i32.const 50 i32.const 5 call $~lib/builtins/abort unreachable @@ -17545,9 +15407,9 @@ local.get $11 i32.store offset=4 local.get $11 - local.get $1 + local.get $7 i32.const 10 - local.get $1 + local.get $7 i32.const 16 i32.shl i32.const 16 @@ -17561,13 +15423,13 @@ local.get $11 i32.store offset=4 local.get $11 - local.get $1 + local.get $7 call $~lib/map/Map#has i32.eqz if i32.const 0 i32.const 544 - i32.const 8 + i32.const 52 i32.const 5 call $~lib/builtins/abort unreachable @@ -17578,30 +15440,32 @@ local.get $11 i32.store offset=4 local.get $11 - local.get $1 - call $~lib/map/Map#get - i32.const 10 - local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i32.add - i32.eq + local.get $7 + call $~lib/map/Map#delete + drop + local.get $0 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 + local.get $7 + call $~lib/map/Map#has + i32.eqz i32.eqz if i32.const 0 i32.const 544 - i32.const 9 + i32.const 54 i32.const 5 call $~lib/builtins/abort unreachable end - local.get $1 + local.get $7 i32.const 1 i32.add - local.set $1 - br $for-loop|1 + local.set $7 + br $for-loop|8 end end local.get $0 @@ -17611,1214 +15475,580 @@ i32.store offset=4 local.get $11 call $~lib/map/Map#get:size - i32.const 100 + i32.const 50 i32.eq i32.eqz if i32.const 0 i32.const 544 - i32.const 11 + i32.const 56 i32.const 3 call $~lib/builtins/abort unreachable end + local.get $0 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 + call $~lib/map/Map#clear + local.get $0 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 + call $~lib/map/Map#get:size i32.const 0 - local.set $1 - loop $for-loop|3 - local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i32.const 100 - i32.lt_s - local.set $4 - local.get $4 - if - local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - local.get $1 - call $~lib/map/Map#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 15 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - local.get $1 - call $~lib/map/Map#get - i32.const 10 - local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i32.add - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 16 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - local.get $1 - i32.const 20 - local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i32.add - call $~lib/map/Map#set - drop - local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - local.get $1 - call $~lib/map/Map#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 18 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - local.get $1 - call $~lib/map/Map#get - i32.const 20 - local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i32.add - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 19 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|3 - end - end - local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - call $~lib/map/Map#get:size - i32.const 100 i32.eq i32.eqz if i32.const 0 i32.const 544 - i32.const 21 + i32.const 60 i32.const 3 call $~lib/builtins/abort unreachable end global.get $~lib/memory/__stack_pointer - local.get $0 - local.set $11 + i32.const 24 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - call $~lib/map/Map#keys - local.tee $1 - i32.store offset=8 + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - call $~lib/map/Map#values - local.tee $4 - i32.store offset=12 + local.set $2 global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store + local.get $2 + local.get $1 + local.get $1 + call $~lib/util/hash/HASH + call $~lib/map/Map#find i32.const 0 - call $~lib/map/Map#constructor - local.tee $5 - i32.store offset=16 + i32.ne + local.set $2 global.get $~lib/memory/__stack_pointer - i32.const 0 - call $~lib/map/Map#constructor - local.tee $6 - i32.store offset=20 - i32.const 0 + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i64) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + local.get $1 + call $~lib/util/hash/HASH + local.set $3 + local.get $0 local.set $7 - loop $for-loop|4 - local.get $7 - local.get $1 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - call $~lib/array/Array#get:length - i32.lt_s - local.set $8 - local.get $8 + global.get $~lib/memory/__stack_pointer + local.get $7 + i32.store + local.get $7 + local.get $1 + local.get $3 + call $~lib/map/Map#find + local.set $4 + local.get $4 + if + local.get $4 + local.get $2 + call $~lib/map/MapEntry#set:value + i32.const 0 + drop + else + local.get $0 + i32.load offset=24 + local.get $0 + i32.load offset=20 + i32.eq if - local.get $1 - local.set $11 + local.get $0 + local.set $7 global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 local.get $7 - call $~lib/array/Array#__get - local.set $9 - local.get $4 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 + i32.store local.get $7 - call $~lib/array/Array#__get - local.set $10 local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - local.get $9 - call $~lib/map/Map#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 31 - i32.const 5 - call $~lib/builtins/abort - unreachable - end + i32.load offset=28 local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - local.get $10 - i32.const 20 - i32.sub - call $~lib/map/Map#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 32 - i32.const 5 - call $~lib/builtins/abort - unreachable + i32.load offset=20 + i32.const 3 + i32.mul + i32.const 4 + i32.div_s + i32.lt_s + if (result i64) + local.get $0 + i64.load offset=8 + else + local.get $0 + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end - local.get $5 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - local.get $9 - local.get $9 - call $~lib/map/Map#set - drop - local.get $6 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - local.get $10 - i32.const 20 - i32.sub - local.get $10 - i32.const 20 - i32.sub - call $~lib/map/Map#set - drop - local.get $7 - i32.const 1 - i32.add - local.set $7 - br $for-loop|4 + i32.wrap_i64 + call $~lib/map/Map#rehash end + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.load offset=16 + local.tee $5 + i32.store offset=4 + local.get $5 + local.get $0 + local.get $0 + i32.load offset=24 + local.tee $6 + i32.const 1 + i32.add + call $~lib/map/Map#set:entriesOffset + local.get $6 + i32.const 12 + i32.mul + i32.add + local.set $4 + local.get $4 + local.get $1 + call $~lib/map/MapEntry#set:key + i32.const 0 + drop + local.get $4 + local.get $2 + call $~lib/map/MapEntry#set:value + i32.const 0 + drop + local.get $0 + local.get $0 + i32.load offset=28 + i32.const 1 + i32.add + call $~lib/map/Map#set:entriesCount + local.get $0 + i32.load + local.get $3 + local.get $0 + i64.load offset=8 + i64.and + i32.wrap_i64 + i32.const 4 + i32.mul + i32.add + local.set $6 + local.get $4 + local.get $6 + i32.load + call $~lib/map/MapEntry#set:taggedNext + local.get $6 + local.get $4 + i32.store end - local.get $5 - local.set $11 + local.get $0 + local.set $7 global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - call $~lib/map/Map#get:size - i32.const 100 - i32.eq + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $7 + ) + (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $0 + local.set $3 + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.store + local.get $3 + local.get $1 + local.get $1 + call $~lib/util/hash/HASH + call $~lib/map/Map#find + local.set $2 + local.get $2 i32.eqz if - i32.const 0 - i32.const 544 - i32.const 36 - i32.const 3 + i32.const 592 + i32.const 656 + i32.const 105 + i32.const 17 call $~lib/builtins/abort unreachable end - local.get $6 - local.set $11 + local.get $2 + i32.load offset=4 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - call $~lib/map/Map#get:size - i32.const 100 - i32.eq - i32.eqz + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u if + local.get $1 i32.const 0 - i32.const 544 - i32.const 37 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - local.set $7 - loop $for-loop|6 - local.get $7 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i32.const 50 i32.lt_s - local.set $10 - local.get $10 if - local.get $0 -<<<<<<< HEAD - local.get $7 - call $~lib/map/Map#has - i32.eqz - if - i32.const 0 - i32.const 336 - i32.const 41 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $7 - call $~lib/map/Map#get - i32.const 20 - local.get $7 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i32.add - i32.eq - i32.eqz - if - i32.const 0 - i32.const 336 - i32.const 42 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $7 - call $~lib/map/Map#delete - drop - local.get $0 - local.get $7 - call $~lib/map/Map#has - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 336 - i32.const 44 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $7 - i32.const 1 - i32.add - local.set $7 - br $for-loop|6 + i32.const 224 + i32.const 704 + i32.const 108 + i32.const 22 + call $~lib/builtins/abort + unreachable end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.const 1 + call $~lib/array/ensureSize + local.get $0 + local.get $1 + i32.const 1 + i32.add + call $~lib/array/Array#set:length_ end local.get $0 - call $~lib/map/Map#get:size - i32.const 50 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 336 - i32.const 46 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + local.set $3 + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.store + local.get $3 + local.get $1 + local.get $2 + call $~lib/array/Array#__uset + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $~lib/map/Map#keys (param $0 i32) (result i32) + (local $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) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + local.get $0 + i32.load offset=16 + local.set $1 + local.get $0 + i32.load offset=24 + local.set $2 + global.get $~lib/memory/__stack_pointer i32.const 0 - local.set $7 - loop $for-loop|8 - local.get $7 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i32.const 50 + local.get $2 + call $~lib/array/Array#constructor + local.tee $3 + i32.store + i32.const 0 + local.set $4 + i32.const 0 + local.set $5 + loop $for-loop|0 + local.get $5 + local.get $2 i32.lt_s - local.set $9 - local.get $9 + local.set $6 + local.get $6 if - local.get $0 - local.get $7 - call $~lib/map/Map#has - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 336 - i32.const 50 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $7 - i32.const 10 - local.get $7 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s + local.get $1 + local.get $5 + i32.const 12 + i32.mul i32.add - call $~lib/map/Map#set - call $~lib/rt/pure/__release - local.get $0 - local.get $7 - call $~lib/map/Map#has - i32.eqz - if - i32.const 0 - i32.const 336 - i32.const 52 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $7 - call $~lib/map/Map#delete - drop - local.get $0 + local.set $7 local.get $7 - call $~lib/map/Map#has - i32.eqz + i32.load offset=8 + i32.const 1 + i32.and i32.eqz if - i32.const 0 - i32.const 336 - i32.const 54 - i32.const 5 - call $~lib/builtins/abort - unreachable + local.get $3 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $4 + local.tee $8 + i32.const 1 + i32.add + local.set $4 + local.get $8 + local.get $7 + i32.load16_u + call $~lib/array/Array#__set end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 - br $for-loop|8 + local.set $5 + br $for-loop|0 end end - local.get $0 - call $~lib/map/Map#get:size - i32.const 50 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 336 - i32.const 56 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/map/Map#clear - local.get $0 - call $~lib/map/Map#get:size - i32.const 0 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 336 - i32.const 60 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release + local.get $3 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release + call $~lib/array/Array#set:length + local.get $3 + local.set $9 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $9 ) - (func $~lib/map/Map#constructor (param $0 i32) (result i32) + (func $~lib/map/Map#values (param $0 i32) (result i32) + (local $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) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store local.get $0 - i32.eqz - if - i32.const 32 - i32.const 14 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.set $0 - end + i32.load offset=16 + local.set $1 local.get $0 + i32.load offset=24 + local.set $2 + global.get $~lib/memory/__stack_pointer i32.const 0 - i32.const 4 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store - local.get $0 - i64.const 4 - i64.const 1 - i64.sub - i64.store offset=8 - local.get $0 - i32.const 0 - i32.const 4 - i32.const 12 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $0 - i32.const 0 - i32.store offset=28 - local.get $0 - ) - (func $~lib/util/hash/HASH (param $0 i32) (result i64) - (local $1 i64) - (local $2 i32) - (local $3 i64) - i32.const 0 - drop + local.get $2 + call $~lib/array/Array#constructor + local.tee $3 + i32.store i32.const 0 - drop + local.set $4 i32.const 0 - drop - i32.const 2 - i32.const 4 - i32.le_u - drop - local.get $0 - i32.const 65535 - i32.and - local.set $2 - i64.const 2 - local.set $1 - i64.const 0 - i64.const 2870177450012600261 - i64.add - local.get $1 - i64.add - local.set $3 - local.get $3 - local.get $2 - i64.extend_i32_u - i64.const -7046029288634856825 - i64.mul - i64.xor - local.set $3 - local.get $3 - i64.const 23 - i64.rotl - i64.const -4417276706812531889 - i64.mul - i64.const 1609587929392839161 - i64.add - local.set $3 - local.get $3 - local.get $3 - i64.const 33 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const -4417276706812531889 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 29 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const 1609587929392839161 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 32 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - return - ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.get $2 - local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - i32.load - local.set $3 - loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 + local.set $5 + loop $for-loop|0 + local.get $5 + local.get $2 + i32.lt_s + local.set $6 + local.get $6 if - local.get $3 - i32.load offset=8 - local.set $5 + local.get $1 local.get $5 - i32.const 1 - i32.and -======= - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - local.get $7 - call $~lib/map/Map#has ->>>>>>> master - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 41 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - local.get $7 - call $~lib/map/Map#get - i32.const 20 - local.get $7 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s + i32.const 12 + i32.mul i32.add - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 42 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - local.get $7 - call $~lib/map/Map#delete - drop - local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 + local.set $7 local.get $7 - call $~lib/map/Map#has - i32.eqz + i32.load offset=8 + i32.const 1 + i32.and i32.eqz if - i32.const 0 - i32.const 544 - i32.const 44 - i32.const 5 - call $~lib/builtins/abort - unreachable + local.get $3 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $4 + local.tee $8 + i32.const 1 + i32.add + local.set $4 + local.get $8 + local.get $7 + i32.load offset=4 + call $~lib/array/Array#__set end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 - br $for-loop|6 + local.set $5 + br $for-loop|0 end end -<<<<<<< HEAD - i32.const 0 - ) - (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - local.get $1 - call $~lib/util/hash/HASH - call $~lib/map/Map#find - i32.const 0 - i32.ne + local.get $3 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $4 + call $~lib/array/Array#set:length + local.get $3 + local.set $9 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $9 ) - (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) + (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i64) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - local.get $1 - i32.const 1 - i32.add - local.set $2 - i32.const 0 - local.get $2 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $3 - local.get $2 + global.get $~lib/memory/__stack_pointer i32.const 8 - i32.mul - i32.const 3 - i32.div_s - local.set $4 - i32.const 0 - local.get $4 - i32.const 12 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $0 - i32.load offset=16 - local.set $6 - local.get $6 - local.get $0 - i32.load offset=24 - i32.const 12 - i32.mul - i32.add -======= + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 - local.set $11 + local.set $7 global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - call $~lib/map/Map#get:size - i32.const 50 - i32.eq - i32.eqz + local.get $7 + i32.store + local.get $7 + local.get $1 + local.get $3 + call $~lib/map/Map#find + local.set $4 + local.get $4 if + local.get $4 + local.get $2 + call $~lib/map/MapEntry#set:value i32.const 0 - i32.const 544 - i32.const 46 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 0 ->>>>>>> master - local.set $7 - loop $for-loop|8 - local.get $7 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i32.const 50 - i32.lt_s - local.set $9 - local.get $9 + drop + else + local.get $0 + i32.load offset=24 + local.get $0 + i32.load offset=20 + i32.eq if local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - local.get $7 - call $~lib/map/Map#has - i32.eqz - i32.eqz - if -<<<<<<< HEAD - local.get $8 - local.set $11 - local.get $10 - i32.load16_u - local.set $12 - local.get $11 - local.get $12 - i32.store16 - local.get $11 - local.get $10 - i32.load offset=4 - i32.store offset=4 - local.get $12 - call $~lib/util/hash/HASH - local.get $1 - i64.extend_i32_u - i64.and - i32.wrap_i64 - local.set $13 - local.get $3 - local.get $13 - i32.const 4 - i32.mul - i32.add - local.set $14 - local.get $11 - local.get $14 - i32.load - i32.store offset=8 - local.get $14 - local.get $8 - i32.store - local.get $8 - i32.const 12 - i32.add - local.set $8 -======= - i32.const 0 - i32.const 544 - i32.const 50 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $11 + local.set $7 global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - local.get $7 - i32.const 10 local.get $7 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i32.add - call $~lib/map/Map#set - drop - local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 + i32.store local.get $7 - call $~lib/map/Map#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 52 - i32.const 5 - call $~lib/builtins/abort - unreachable ->>>>>>> master - end local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - local.get $7 - call $~lib/map/Map#delete - drop + i32.load offset=28 local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - local.get $7 - call $~lib/map/Map#has - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 54 - i32.const 5 - call $~lib/builtins/abort - unreachable + i32.load offset=20 + i32.const 3 + i32.mul + i32.const 4 + i32.div_s + i32.lt_s + if (result i64) + local.get $0 + i64.load offset=8 + else + local.get $0 + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end - local.get $7 - i32.const 1 - i32.add - local.set $7 - br $for-loop|8 + i32.wrap_i64 + call $~lib/map/Map#rehash end - end - local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - call $~lib/map/Map#get:size - i32.const 50 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 56 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 -<<<<<<< HEAD - local.get $1 - i64.extend_i32_u - i64.store offset=8 - local.get $0 - local.tee $13 - local.get $5 - local.tee $14 - local.get $13 - i32.load offset=16 - local.tee $11 - i32.ne -======= - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - call $~lib/map/Map#clear - local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - call $~lib/map/Map#get:size - i32.const 0 - i32.eq - i32.eqz ->>>>>>> master - if - i32.const 0 - i32.const 544 - i32.const 60 - i32.const 3 - call $~lib/builtins/abort - unreachable - end -<<<<<<< HEAD - local.get $14 - i32.store offset=16 - local.get $0 - local.get $4 - i32.store offset=20 - local.get $0 - local.get $0 - i32.load offset=28 - i32.store offset=24 -======= - global.get $~lib/memory/__stack_pointer - i32.const 24 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - local.get $0 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $2 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.0 - end - call $~lib/map/Map#find - i32.const 0 - i32.ne - local.set $3 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer ->>>>>>> master - local.get $3 - ) - (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i64) - (local $4 i32) - (local $5 i32) - (local $6 i32) -<<<<<<< HEAD - local.get $1 - call $~lib/util/hash/HASH - local.set $3 -======= - (local $7 i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $3 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $4 ->>>>>>> master - local.get $0 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store - local.get $7 - local.get $1 - local.get $3 - call $~lib/map/Map#find - local.set $4 - local.get $4 - if -<<<<<<< HEAD - i32.const 0 - drop - local.get $4 -======= - local.get $5 ->>>>>>> master - local.get $2 - call $~lib/map/MapEntry#set:value + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.load offset=16 + local.tee $5 + i32.store offset=4 + local.get $5 + local.get $0 + local.get $0 + i32.load offset=24 + local.tee $6 + i32.const 1 + i32.add + call $~lib/map/Map#set:entriesOffset + local.get $6 + i32.const 8 + i32.mul + i32.add + local.set $4 + local.get $4 + local.get $1 + call $~lib/map/MapEntry#set:key i32.const 0 drop - else - local.get $0 - i32.load offset=24 - local.get $0 - i32.load offset=20 - i32.eq - if - local.get $0 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store - local.get $7 - local.get $0 - i32.load offset=28 - local.get $0 - i32.load offset=20 - i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s - if (result i64) - local.get $0 - i64.load offset=8 - else - local.get $0 - i64.load offset=8 - i64.const 1 - i64.shl - i64.const 1 - i64.or - end - i32.wrap_i64 - call $~lib/map/Map#rehash - end - global.get $~lib/memory/__stack_pointer - local.get $0 -<<<<<<< HEAD - i32.load offset=16 - call $~lib/rt/pure/__retain - local.set $5 - local.get $5 -======= - i32.load offset=8 - local.tee $3 - i32.store offset=4 - local.get $3 ->>>>>>> master - local.get $0 - local.get $0 - i32.load offset=24 - local.tee $6 - i32.const 1 - i32.add -<<<<<<< HEAD - i32.store offset=24 -======= - call $~lib/map/Map#set:entriesOffset ->>>>>>> master - local.get $6 - i32.const 12 - i32.mul - i32.add - local.set $4 - local.get $4 - local.get $1 -<<<<<<< HEAD - i32.store16 local.get $4 -======= - call $~lib/map/MapEntry#set:key - i32.const 0 - drop - local.get $5 ->>>>>>> master local.get $2 - call $~lib/map/MapEntry#set:value + call $~lib/map/MapEntry#set:value i32.const 0 drop local.get $0 @@ -18826,11 +16056,7 @@ i32.load offset=28 i32.const 1 i32.add -<<<<<<< HEAD - i32.store offset=28 -======= - call $~lib/map/Map#set:entriesCount ->>>>>>> master + call $~lib/map/Map#set:entriesCount local.get $0 i32.load local.get $3 @@ -18845,15 +16071,10 @@ local.get $4 local.get $6 i32.load - call $~lib/map/MapEntry#set:taggedNext + call $~lib/map/MapEntry#set:taggedNext local.get $6 local.get $4 i32.store -<<<<<<< HEAD - local.get $5 - call $~lib/rt/pure/__release -======= ->>>>>>> master end local.get $0 local.set $7 @@ -18863,12 +16084,12 @@ global.set $~lib/memory/__stack_pointer local.get $7 ) - (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (param $0 i32) (param $1 i32) (result i32) (local $2 i32) -<<<<<<< HEAD -======= (local $3 i32) (local $4 i32) + (local $5 i32) + (local $6 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -18877,13 +16098,12 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store ->>>>>>> master local.get $0 - local.set $4 + local.set $6 global.get $~lib/memory/__stack_pointer - local.get $4 + local.get $6 i32.store - local.get $4 + local.get $6 local.get $1 local.get $1 call $~lib/util/hash/HASH @@ -18892,152 +16112,79 @@ local.get $2 i32.eqz if - i32.const 592 - i32.const 656 - i32.const 105 - i32.const 17 - call $~lib/builtins/abort - unreachable -<<<<<<< HEAD + i32.const 0 + local.set $6 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $6 + return end local.get $2 - i32.load offset=4 - ) - (func $~lib/map/Map#get:size (param $0 i32) (result i32) + local.get $2 + i32.load offset=8 + i32.const 1 + i32.or + call $~lib/map/MapEntry#set:taggedNext + local.get $0 local.get $0 i32.load offset=28 - ) - (func $~lib/array/Array#constructor (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.eqz - if - i32.const 16 - i32.const 15 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - 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 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 1073741820 - i32.const 1 - i32.shr_u - i32.gt_u - if - i32.const 224 - i32.const 496 - i32.const 57 - i32.const 60 - call $~lib/builtins/abort - unreachable - end - local.get $1 i32.const 1 - i32.shl - local.set $2 - local.get $2 - i32.const 0 - call $~lib/rt/pure/__new - local.set $3 - local.get $3 - i32.const 0 - local.get $2 - call $~lib/memory/memory.fill + i32.sub + call $~lib/map/Map#set:entriesCount local.get $0 - local.tee $4 - local.get $3 - local.tee $5 - local.get $4 - i32.load - local.tee $6 - i32.ne - if - local.get $5 - call $~lib/rt/pure/__retain - local.set $5 - local.get $6 - call $~lib/rt/pure/__release -======= ->>>>>>> master - end + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 + local.set $3 local.get $3 - i32.load offset=4 - local.set $4 - global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 1 i32.add - global.set $~lib/memory/__stack_pointer - local.get $4 - ) - (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - global.get $~lib/memory/__stack_pointer i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - local.get $1 + local.tee $4 local.get $0 - i32.load offset=12 + i32.load offset=28 + local.tee $5 + local.get $4 + local.get $5 + i32.gt_u + select i32.ge_u - if - local.get $1 - i32.const 0 - i32.lt_s - if - i32.const 224 - i32.const 704 - i32.const 108 - i32.const 22 - call $~lib/builtins/abort - unreachable - end + if (result i32) local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.const 1 - call $~lib/array/ensureSize + i32.load offset=28 local.get $0 - local.get $1 - i32.const 1 - i32.add - call $~lib/array/Array#set:length_ + i32.load offset=20 + i32.const 3 + i32.mul + i32.const 4 + i32.div_s + i32.lt_s + else + i32.const 0 end - local.get $0 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - local.get $1 - local.get $2 - call $~lib/array/Array#__uset + if + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store + local.get $6 + local.get $3 + call $~lib/map/Map#rehash + end + i32.const 1 + local.set $6 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer + local.get $6 ) - (func $~lib/map/Map#keys (param $0 i32) (result i32) + (func $std/map/testNumeric + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -19047,860 +16194,441 @@ (local $7 i32) (local $8 i32) (local $9 i32) + (local $10 i32) + (local $11 i32) global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 24 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - local.get $0 - i32.load offset=16 - local.set $1 - local.get $0 - i32.load offset=24 - local.set $2 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=8 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=16 global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $2 - call $~lib/array/Array#constructor - local.tee $3 + call $~lib/map/Map#constructor + local.tee $0 i32.store i32.const 0 - local.set $4 - i32.const 0 - local.set $5 - loop $for-loop|0 - local.get $5 - local.get $2 - i32.lt_s - local.set $6 - local.get $6 + local.set $1 + loop $for-loop|1 + local.get $1 + i32.const 65535 + i32.and + i32.const 100 + i32.lt_u + local.set $3 + local.get $3 if + local.get $0 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 local.get $1 - local.get $5 - i32.const 12 - i32.mul - i32.add - local.set $7 - local.get $7 - i32.load offset=8 - i32.const 1 - i32.and + call $~lib/map/Map#has + i32.eqz i32.eqz if - local.get $3 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $4 - local.tee $8 - i32.const 1 - i32.add - local.set $4 - local.get $8 - local.get $7 - i32.load16_u - call $~lib/array/Array#__set + i32.const 0 + i32.const 544 + i32.const 6 + i32.const 5 + call $~lib/builtins/abort + unreachable end - local.get $5 - i32.const 1 + local.get $0 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 + local.get $1 + i32.const 10 + local.get $1 + i32.const 65535 + i32.and i32.add - local.set $5 - br $for-loop|0 - end - end - local.get $3 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $4 - call $~lib/array/Array#set:length - local.get $3 -<<<<<<< HEAD - ) - (func $~lib/map/Map#values (param $0 i32) (result i32) - (local $1 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.load offset=16 - local.set $1 - local.get $0 - i32.load offset=24 - local.set $2 - i32.const 0 - local.get $2 - call $~lib/array/Array#constructor - local.set $3 - i32.const 0 - local.set $4 - i32.const 0 - local.set $5 - loop $for-loop|0 - local.get $5 - local.get $2 - i32.lt_s - local.set $6 - local.get $6 - if + call $~lib/map/Map#set + drop + local.get $0 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 local.get $1 - local.get $5 - i32.const 12 - i32.mul - i32.add - local.set $7 - local.get $7 - i32.load offset=8 - i32.const 1 + call $~lib/map/Map#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 8 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 + local.get $1 + call $~lib/map/Map#get + i32.const 10 + local.get $1 + i32.const 65535 i32.and + i32.add + i32.eq i32.eqz if - local.get $3 - local.get $4 - local.tee $8 - i32.const 1 - i32.add - local.set $4 - local.get $8 - local.get $7 - i32.load offset=4 - call $~lib/array/Array#__set + i32.const 0 + i32.const 544 + i32.const 9 + i32.const 5 + call $~lib/builtins/abort + unreachable end - local.get $5 + local.get $1 i32.const 1 i32.add - local.set $5 - br $for-loop|0 + local.set $1 + br $for-loop|1 end end - local.get $3 - local.get $4 - call $~lib/array/Array#set:length - local.get $3 - ) - (func $~lib/map/Map#constructor (param $0 i32) (result i32) local.get $0 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 + call $~lib/map/Map#get:size + i32.const 100 + i32.eq i32.eqz if - i32.const 32 - i32.const 16 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.set $0 - end - local.get $0 - i32.const 0 - i32.const 4 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store - local.get $0 - i64.const 4 - i64.const 1 - i64.sub - i64.store offset=8 - local.get $0 - i32.const 0 - i32.const 4 - i32.const 8 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $0 - i32.const 0 - i32.store offset=28 - local.get $0 - ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 - i32.load offset=12 - ) - (func $~lib/array/Array#__uget (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.load16_u - ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u - if + i32.const 0 i32.const 544 - i32.const 496 - i32.const 104 - i32.const 42 + i32.const 11 + i32.const 3 call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 - call $~lib/array/Array#__uget - local.set $2 i32.const 0 - drop - local.get $2 - ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.get $2 - local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - i32.load - local.set $3 - loop $while-continue|0 - local.get $3 + local.set $1 + loop $for-loop|3 + local.get $1 + i32.const 65535 + i32.and + i32.const 100 + i32.lt_u local.set $4 local.get $4 if - local.get $3 - i32.load offset=4 - local.set $5 - local.get $5 - i32.const 1 - i32.and + local.get $0 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 + local.get $1 + call $~lib/map/Map#has i32.eqz - if (result i32) - local.get $3 - i32.load16_u - local.get $1 - i32.const 65535 - i32.and - i32.eq - else + if i32.const 0 + i32.const 544 + i32.const 15 + i32.const 5 + call $~lib/builtins/abort + unreachable end + local.get $0 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 + local.get $1 + call $~lib/map/Map#get + i32.const 10 + local.get $1 + i32.const 65535 + i32.and + i32.add + i32.eq + i32.eqz if - local.get $3 - return + i32.const 0 + i32.const 544 + i32.const 16 + i32.const 5 + call $~lib/builtins/abort + unreachable end - local.get $5 - i32.const 1 - i32.const -1 - i32.xor + local.get $0 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 + local.get $1 + i32.const 20 + local.get $1 + i32.const 65535 i32.and - local.set $3 - br $while-continue|0 - end - end - i32.const 0 -======= - local.set $9 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $9 ->>>>>>> master - ) - (func $~lib/map/Map#values (param $0 i32) (result i32) - (local $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) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - local.get $0 - i32.load offset=8 - local.set $1 - local.get $0 - i32.load offset=16 - local.set $2 - global.get $~lib/memory/__stack_pointer - i32.const 0 - local.get $2 - call $~lib/array/Array#constructor - local.tee $3 - i32.store - i32.const 0 - local.set $4 - i32.const 0 - local.set $5 -<<<<<<< HEAD - local.get $0 - i32.load offset=16 - local.set $6 - local.get $6 - local.get $0 - i32.load offset=24 - i32.const 8 - i32.mul - i32.add - local.set $7 - local.get $5 - local.set $8 - loop $while-continue|0 -======= - loop $for-loop|0 - local.get $5 - local.get $2 - i32.lt_s - local.set $6 ->>>>>>> master - local.get $6 - if - local.get $1 - local.get $5 - i32.const 12 - i32.mul i32.add - local.set $7 - local.get $7 - i32.load offset=8 - i32.const 1 + call $~lib/map/Map#set + drop + local.get $0 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 + local.get $1 + call $~lib/map/Map#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 18 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 + local.get $1 + call $~lib/map/Map#get + i32.const 20 + local.get $1 + i32.const 65535 i32.and + i32.add + i32.eq i32.eqz if -<<<<<<< HEAD - local.get $8 - local.set $11 - local.get $10 - i32.load16_u - local.set $12 - local.get $11 - local.get $12 - i32.store16 - local.get $11 - local.get $10 - i32.load16_u offset=2 - i32.store16 offset=2 - local.get $12 - call $~lib/util/hash/HASH - local.get $1 - i64.extend_i32_u - i64.and - i32.wrap_i64 - local.set $13 -======= ->>>>>>> master - local.get $3 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $4 - local.tee $8 - i32.const 1 - i32.add - local.set $4 - local.get $8 - local.get $7 - i32.load offset=4 - call $~lib/array/Array#__set + i32.const 0 + i32.const 544 + i32.const 19 + i32.const 5 + call $~lib/builtins/abort + unreachable end - local.get $5 + local.get $1 i32.const 1 i32.add - local.set $5 - br $for-loop|0 + local.set $1 + br $for-loop|3 end end - local.get $3 -<<<<<<< HEAD - local.tee $12 - local.get $11 - i32.load - local.tee $9 - i32.ne - if - local.get $12 - call $~lib/rt/pure/__retain - local.set $12 - local.get $9 - call $~lib/rt/pure/__release - end - local.get $12 - i32.store - local.get $0 - local.get $1 - i64.extend_i32_u - i64.store offset=8 local.get $0 - local.tee $13 - local.get $5 - local.tee $14 - local.get $13 - i32.load offset=16 - local.tee $11 - i32.ne + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 + call $~lib/map/Map#get:size + i32.const 100 + i32.eq + i32.eqz if - local.get $14 - call $~lib/rt/pure/__retain - local.set $14 - local.get $11 - call $~lib/rt/pure/__release + i32.const 0 + i32.const 544 + i32.const 21 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $14 - i32.store offset=16 - local.get $0 - local.get $4 - i32.store offset=20 - local.get $0 + global.get $~lib/memory/__stack_pointer local.get $0 - i32.load offset=28 - i32.store offset=24 -======= - local.set $9 + local.set $11 global.get $~lib/memory/__stack_pointer - local.get $9 + local.get $11 i32.store offset=4 - local.get $9 - local.get $4 - call $~lib/array/Array#set:length ->>>>>>> master - local.get $3 - local.set $9 + local.get $11 + call $~lib/map/Map#keys + local.tee $1 + i32.store offset=8 global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $9 - ) - (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i64) - (local $4 i32) - (local $5 i32) - (local $6 i32) -<<<<<<< HEAD - local.get $1 - call $~lib/util/hash/HASH - local.set $3 -======= - (local $7 i32) + local.get $0 + local.set $11 global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check + local.get $11 + i32.store offset=4 + local.get $11 + call $~lib/map/Map#values + local.tee $4 + i32.store offset=12 global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - block $~lib/util/hash/HASH|inlined.4 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $3 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.4 - end - local.set $4 ->>>>>>> master - local.get $0 - local.set $7 + i32.const 0 + call $~lib/map/Map#constructor + local.tee $5 + i32.store offset=16 global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store - local.get $7 - local.get $1 - local.get $3 - call $~lib/map/Map#find - local.set $4 - local.get $4 - if -<<<<<<< HEAD - i32.const 0 - drop - local.get $4 -======= - local.get $5 ->>>>>>> master - local.get $2 - call $~lib/map/MapEntry#set:value - i32.const 0 - drop - else - local.get $0 - i32.load offset=24 - local.get $0 - i32.load offset=20 - i32.eq + i32.const 0 + call $~lib/map/Map#constructor + local.tee $6 + i32.store offset=20 + i32.const 0 + local.set $7 + loop $for-loop|4 + local.get $7 + local.get $1 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 + call $~lib/array/Array#get:length + i32.lt_s + local.set $8 + local.get $8 if - local.get $0 - local.set $7 + local.get $1 + local.set $11 global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 local.get $7 - i32.store + call $~lib/array/Array#__get + local.set $9 + local.get $4 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 local.get $7 + call $~lib/array/Array#__get + local.set $10 local.get $0 - i32.load offset=28 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 + local.get $9 + call $~lib/map/Map#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 31 + i32.const 5 + call $~lib/builtins/abort + unreachable + end local.get $0 - i32.load offset=20 - i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s - if (result i64) - local.get $0 - i64.load offset=8 - else - local.get $0 - i64.load offset=8 - i64.const 1 - i64.shl - i64.const 1 - i64.or + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 + local.get $10 + i32.const 20 + i32.sub + call $~lib/map/Map#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 32 + i32.const 5 + call $~lib/builtins/abort + unreachable end - i32.wrap_i64 - call $~lib/map/Map#rehash + local.get $5 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 + local.get $9 + local.get $9 + call $~lib/map/Map#set + drop + local.get $6 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 + local.get $10 + i32.const 20 + i32.sub + local.get $10 + i32.const 20 + i32.sub + call $~lib/map/Map#set + drop + local.get $7 + i32.const 1 + i32.add + local.set $7 + br $for-loop|4 end - global.get $~lib/memory/__stack_pointer - local.get $0 -<<<<<<< HEAD - i32.load offset=16 - call $~lib/rt/pure/__retain - local.set $5 - local.get $5 -======= - i32.load offset=8 - local.tee $3 - i32.store offset=4 - local.get $3 ->>>>>>> master - local.get $0 - local.get $0 - i32.load offset=24 - local.tee $6 - i32.const 1 - i32.add -<<<<<<< HEAD - i32.store offset=24 -======= - call $~lib/map/Map#set:entriesOffset ->>>>>>> master - local.get $6 - i32.const 8 - i32.mul - i32.add - local.set $4 - local.get $4 - local.get $1 -<<<<<<< HEAD - i32.store16 - local.get $4 -======= - call $~lib/map/MapEntry#set:key - i32.const 0 - drop - local.get $5 ->>>>>>> master - local.get $2 - call $~lib/map/MapEntry#set:value - i32.const 0 - drop - local.get $0 - local.get $0 - i32.load offset=28 - i32.const 1 - i32.add -<<<<<<< HEAD - i32.store offset=28 -======= - call $~lib/map/Map#set:entriesCount ->>>>>>> master - local.get $0 - i32.load - local.get $3 - local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - local.set $6 - local.get $4 - local.get $6 - i32.load - call $~lib/map/MapEntry#set:taggedNext - local.get $6 - local.get $4 - i32.store -<<<<<<< HEAD - local.get $5 - call $~lib/rt/pure/__release - end - local.get $0 - call $~lib/rt/pure/__retain - ) - (func $~lib/map/Map#get:size (param $0 i32) (result i32) - local.get $0 - i32.load offset=28 -======= end - local.get $0 - local.set $7 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $7 ->>>>>>> master - ) - (func $~lib/map/Map#delete (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - local.get $0 - local.set $6 + local.get $5 + local.set $11 global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store - local.get $6 - local.get $1 - local.get $1 - call $~lib/util/hash/HASH - call $~lib/map/Map#find - local.set $2 - local.get $2 + local.get $11 + i32.store offset=4 + local.get $11 + call $~lib/map/Map#get:size + i32.const 100 + i32.eq i32.eqz if i32.const 0 - local.set $6 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $6 - return + i32.const 544 + i32.const 36 + i32.const 3 + call $~lib/builtins/abort + unreachable end -<<<<<<< HEAD - i32.const 0 - drop - i32.const 0 - drop - local.get $2 - local.get $2 -======= - local.get $3 - local.get $3 ->>>>>>> master - i32.load offset=8 - i32.const 1 - i32.or - call $~lib/map/MapEntry#set:taggedNext - local.get $0 - local.get $0 - i32.load offset=28 - i32.const 1 - i32.sub -<<<<<<< HEAD - i32.store offset=28 -======= - call $~lib/map/Map#set:entriesCount ->>>>>>> master - local.get $0 - i64.load offset=8 - i64.const 1 - i64.shr_u - i32.wrap_i64 - local.set $3 - local.get $3 - i32.const 1 - i32.add - i32.const 4 - local.tee $4 - local.get $0 - i32.load offset=28 - local.tee $5 - local.get $4 - local.get $5 - i32.gt_u - select - i32.ge_u - if (result i32) - local.get $0 - i32.load offset=28 - local.get $0 - i32.load offset=20 - i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s - else - i32.const 0 - end - if - local.get $0 -<<<<<<< HEAD - local.get $3 - call $~lib/map/Map#rehash - end - i32.const 1 - ) - (func $~lib/map/Map#clear (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - local.tee $1 - i32.const 0 - i32.const 4 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $2 - local.get $1 - i32.load - call $~lib/rt/pure/__release - local.get $2 - i32.store - local.get $0 - i64.const 4 - i64.const 1 - i64.sub - i64.store offset=8 - local.get $0 - local.tee $2 - i32.const 0 - i32.const 4 - i32.const 12 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 - local.get $2 - i32.load offset=16 - call $~lib/rt/pure/__release - local.get $1 - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $0 - i32.const 0 - i32.store offset=28 -======= - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store - local.get $6 - local.get $4 - call $~lib/map/Map#rehash - end - i32.const 1 - local.set $6 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer local.get $6 ->>>>>>> master - ) - (func $std/map/testNumeric - (local $0 i32) - (local $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 $10 i32) - (local $11 i32) - global.get $~lib/memory/__stack_pointer - i32.const 24 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=16 + local.set $11 global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 + call $~lib/map/Map#get:size + i32.const 100 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 37 + i32.const 3 + call $~lib/builtins/abort + unreachable + end i32.const 0 - call $~lib/map/Map#constructor - local.tee $0 - i32.store - i32.const 0 - local.set $1 - loop $for-loop|1 - local.get $1 + local.set $7 + loop $for-loop|6 + local.get $7 i32.const 65535 i32.and - i32.const 100 + i32.const 50 i32.lt_u - local.set $3 - local.get $3 + local.set $10 + local.get $10 if local.get $0 local.set $11 @@ -19908,14 +16636,13 @@ local.get $11 i32.store offset=4 local.get $11 - local.get $1 + local.get $7 call $~lib/map/Map#has i32.eqz - i32.eqz if i32.const 0 i32.const 544 - i32.const 6 + i32.const 41 i32.const 5 call $~lib/builtins/abort unreachable @@ -19926,27 +16653,19 @@ local.get $11 i32.store offset=4 local.get $11 - local.get $1 - i32.const 10 - local.get $1 + local.get $7 + call $~lib/map/Map#get + i32.const 20 + local.get $7 i32.const 65535 i32.and i32.add - call $~lib/map/Map#set - drop - local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - local.get $1 - call $~lib/map/Map#has + i32.eq i32.eqz if i32.const 0 i32.const 544 - i32.const 8 + i32.const 42 i32.const 5 call $~lib/builtins/abort unreachable @@ -19957,28 +16676,32 @@ local.get $11 i32.store offset=4 local.get $11 - local.get $1 - call $~lib/map/Map#get - i32.const 10 - local.get $1 - i32.const 65535 - i32.and - i32.add - i32.eq + local.get $7 + call $~lib/map/Map#delete + drop + local.get $0 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 + local.get $7 + call $~lib/map/Map#has + i32.eqz i32.eqz if i32.const 0 i32.const 544 - i32.const 9 + i32.const 44 i32.const 5 call $~lib/builtins/abort unreachable end - local.get $1 + local.get $7 i32.const 1 i32.add - local.set $1 - br $for-loop|1 + local.set $7 + br $for-loop|6 end end local.get $0 @@ -19988,27 +16711,27 @@ i32.store offset=4 local.get $11 call $~lib/map/Map#get:size - i32.const 100 + i32.const 50 i32.eq i32.eqz if i32.const 0 i32.const 544 - i32.const 11 + i32.const 46 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 - local.set $1 - loop $for-loop|3 - local.get $1 + local.set $7 + loop $for-loop|8 + local.get $7 i32.const 65535 i32.and - i32.const 100 + i32.const 50 i32.lt_u - local.set $4 - local.get $4 + local.set $9 + local.get $9 if local.get $0 local.set $11 @@ -20016,13 +16739,14 @@ local.get $11 i32.store offset=4 local.get $11 - local.get $1 + local.get $7 call $~lib/map/Map#has i32.eqz + i32.eqz if i32.const 0 i32.const 544 - i32.const 15 + i32.const 50 i32.const 5 call $~lib/builtins/abort unreachable @@ -20033,32 +16757,9 @@ local.get $11 i32.store offset=4 local.get $11 - local.get $1 - call $~lib/map/Map#get + local.get $7 i32.const 10 - local.get $1 - i32.const 65535 - i32.and - i32.add - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 16 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - local.get $1 - i32.const 20 - local.get $1 + local.get $7 i32.const 65535 i32.and i32.add @@ -20070,13 +16771,13 @@ local.get $11 i32.store offset=4 local.get $11 - local.get $1 + local.get $7 call $~lib/map/Map#has i32.eqz if i32.const 0 i32.const 544 - i32.const 18 + i32.const 52 i32.const 5 call $~lib/builtins/abort unreachable @@ -20087,28 +16788,32 @@ local.get $11 i32.store offset=4 local.get $11 - local.get $1 - call $~lib/map/Map#get - i32.const 20 - local.get $1 - i32.const 65535 - i32.and - i32.add - i32.eq + local.get $7 + call $~lib/map/Map#delete + drop + local.get $0 + local.set $11 + global.get $~lib/memory/__stack_pointer + local.get $11 + i32.store offset=4 + local.get $11 + local.get $7 + call $~lib/map/Map#has + i32.eqz i32.eqz if i32.const 0 i32.const 544 - i32.const 19 + i32.const 54 i32.const 5 call $~lib/builtins/abort unreachable end - local.get $1 + local.get $7 i32.const 1 i32.add - local.set $1 - br $for-loop|3 + local.set $7 + br $for-loop|8 end end local.get $0 @@ -20118,443 +16823,307 @@ i32.store offset=4 local.get $11 call $~lib/map/Map#get:size - i32.const 100 + i32.const 50 i32.eq i32.eqz if i32.const 0 i32.const 544 - i32.const 21 + i32.const 56 i32.const 3 call $~lib/builtins/abort unreachable end - global.get $~lib/memory/__stack_pointer local.get $0 local.set $11 global.get $~lib/memory/__stack_pointer local.get $11 i32.store offset=4 local.get $11 - call $~lib/map/Map#keys - local.tee $1 - i32.store offset=8 - global.get $~lib/memory/__stack_pointer + call $~lib/map/Map#clear local.get $0 local.set $11 global.get $~lib/memory/__stack_pointer local.get $11 i32.store offset=4 local.get $11 - call $~lib/map/Map#values - local.tee $4 - i32.store offset=12 - global.get $~lib/memory/__stack_pointer - i32.const 0 - call $~lib/map/Map#constructor - local.tee $5 - i32.store offset=16 - global.get $~lib/memory/__stack_pointer - i32.const 0 - call $~lib/map/Map#constructor - local.tee $6 - i32.store offset=20 + call $~lib/map/Map#get:size i32.const 0 - local.set $7 - loop $for-loop|4 - local.get $7 - local.get $1 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - call $~lib/array/Array#get:length - i32.lt_s - local.set $8 - local.get $8 - if - local.get $1 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - local.get $7 - call $~lib/array/Array#__get - local.set $9 - local.get $4 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - local.get $7 - call $~lib/array/Array#__get - local.set $10 - local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - local.get $9 - call $~lib/map/Map#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 31 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - local.get $10 - i32.const 20 - i32.sub - call $~lib/map/Map#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 32 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - local.get $9 - local.get $9 - call $~lib/map/Map#set - drop - local.get $6 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - local.get $10 - i32.const 20 - i32.sub - local.get $10 - i32.const 20 - i32.sub - call $~lib/map/Map#set - drop - local.get $7 - i32.const 1 - i32.add - local.set $7 - br $for-loop|4 - end - end - local.get $5 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - call $~lib/map/Map#get:size - i32.const 100 i32.eq i32.eqz if i32.const 0 i32.const 544 - i32.const 36 + i32.const 60 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $6 - local.set $11 global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - call $~lib/map/Map#get:size - i32.const 100 - i32.eq + i32.const 24 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $0 + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store + local.get $2 + local.get $1 + local.get $1 + call $~lib/util/hash/HASH + call $~lib/map/Map#find + i32.const 0 + i32.ne + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $0 + local.set $3 + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.store + local.get $3 + local.get $1 + local.get $1 + call $~lib/util/hash/HASH + call $~lib/map/Map#find + local.set $2 + local.get $2 i32.eqz if - i32.const 0 - i32.const 544 - i32.const 37 - i32.const 3 + i32.const 592 + i32.const 656 + i32.const 105 + i32.const 17 call $~lib/builtins/abort unreachable end - i32.const 0 - local.set $7 - loop $for-loop|6 - local.get $7 - i32.const 65535 - i32.and - i32.const 50 - i32.lt_u - local.set $10 - local.get $10 + local.get $2 + i32.load offset=4 + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $~lib/map/Map#keys (param $0 i32) (result i32) + (local $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) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + local.get $0 + i32.load offset=16 + local.set $1 + local.get $0 + i32.load offset=24 + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 0 + local.get $2 + call $~lib/array/Array#constructor + local.tee $3 + i32.store + i32.const 0 + local.set $4 + i32.const 0 + local.set $5 + loop $for-loop|0 + local.get $5 + local.get $2 + i32.lt_s + local.set $6 + local.get $6 if - local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - local.get $7 - call $~lib/map/Map#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 41 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - local.get $7 - call $~lib/map/Map#get - i32.const 20 - local.get $7 - i32.const 65535 - i32.and + local.get $1 + local.get $5 + i32.const 12 + i32.mul i32.add - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 42 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - local.get $7 - call $~lib/map/Map#delete - drop - local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 + local.set $7 local.get $7 - call $~lib/map/Map#has - i32.eqz + i32.load offset=8 + i32.const 1 + i32.and i32.eqz if - i32.const 0 - i32.const 544 - i32.const 44 - i32.const 5 - call $~lib/builtins/abort - unreachable + local.get $3 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $4 + local.tee $8 + i32.const 1 + i32.add + local.set $4 + local.get $8 + local.get $7 + i32.load + call $~lib/array/Array#__set end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 - br $for-loop|6 + local.set $5 + br $for-loop|0 end end - local.get $0 - local.set $11 + local.get $3 + local.set $9 global.get $~lib/memory/__stack_pointer - local.get $11 + local.get $9 i32.store offset=4 - local.get $11 - call $~lib/map/Map#get:size - i32.const 50 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 46 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + local.get $9 + local.get $4 + call $~lib/array/Array#set:length + local.get $3 + local.set $9 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $9 + ) + (func $~lib/map/Map#values (param $0 i32) (result i32) + (local $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) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + local.get $0 + i32.load offset=16 + local.set $1 + local.get $0 + i32.load offset=24 + local.set $2 + global.get $~lib/memory/__stack_pointer i32.const 0 - local.set $7 - loop $for-loop|8 - local.get $7 - i32.const 65535 - i32.and - i32.const 50 - i32.lt_u - local.set $9 - local.get $9 + local.get $2 + call $~lib/array/Array#constructor + local.tee $3 + i32.store + i32.const 0 + local.set $4 + i32.const 0 + local.set $5 + loop $for-loop|0 + local.get $5 + local.get $2 + i32.lt_s + local.set $6 + local.get $6 if - local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 + local.get $1 + local.get $5 + i32.const 12 + i32.mul + i32.add + local.set $7 local.get $7 - call $~lib/map/Map#has - i32.eqz + i32.load offset=8 + i32.const 1 + i32.and i32.eqz if - i32.const 0 - i32.const 544 - i32.const 50 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - local.get $7 - i32.const 10 - local.get $7 - i32.const 65535 - i32.and - i32.add - call $~lib/map/Map#set - drop - local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - local.get $7 - call $~lib/map/Map#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 52 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - local.get $7 - call $~lib/map/Map#delete - drop - local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - local.get $7 - call $~lib/map/Map#has - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 54 - i32.const 5 - call $~lib/builtins/abort - unreachable + local.get $3 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $4 + local.tee $8 + i32.const 1 + i32.add + local.set $4 + local.get $8 + local.get $7 + i32.load offset=4 + call $~lib/array/Array#__set end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 - br $for-loop|8 + local.set $5 + br $for-loop|0 end end - local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - call $~lib/map/Map#get:size - i32.const 50 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 56 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $11 - global.get $~lib/memory/__stack_pointer - local.get $11 - i32.store offset=4 - local.get $11 - call $~lib/map/Map#clear - local.get $0 - local.set $11 + local.get $3 + local.set $9 global.get $~lib/memory/__stack_pointer - local.get $11 + local.get $9 i32.store offset=4 - local.get $11 - call $~lib/map/Map#get:size - i32.const 0 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 60 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + local.get $9 + local.get $4 + call $~lib/array/Array#set:length + local.get $3 + local.set $9 global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer + local.get $9 ) - (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) -<<<<<<< HEAD - local.get $0 - local.get $1 - local.get $1 - call $~lib/util/hash/HASH - call $~lib/map/Map#find - i32.const 0 - i32.ne - ) - (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) -======= + (func $~lib/map/Map#delete (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -20563,15 +17132,13 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store ->>>>>>> master local.get $0 - local.set $3 + local.set $6 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $6 i32.store - local.get $3 + local.get $6 local.get $1 -<<<<<<< HEAD local.get $1 call $~lib/util/hash/HASH call $~lib/map/Map#find @@ -20579,646 +17146,407 @@ local.get $2 i32.eqz if - i32.const 384 - i32.const 448 - i32.const 105 - i32.const 17 - call $~lib/builtins/abort - unreachable + i32.const 0 + local.set $6 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $6 + return end local.get $2 - i32.load offset=4 - ) - (func $~lib/map/Map#keys (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) + local.get $2 + i32.load offset=8 + i32.const 1 + i32.or + call $~lib/map/MapEntry#set:taggedNext local.get $0 - i32.load offset=16 - local.set $1 local.get $0 - i32.load offset=24 - local.set $2 -======= - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 + i32.load offset=28 + i32.const 1 + i32.sub + call $~lib/map/Map#set:entriesCount + local.get $0 + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 + local.set $3 + local.get $3 + i32.const 1 + i32.add + i32.const 4 + local.tee $4 + local.get $0 + i32.load offset=28 + local.tee $5 + local.get $4 + local.get $5 + i32.gt_u + select + i32.ge_u + if (result i32) + local.get $0 + i32.load offset=28 + local.get $0 + i32.load offset=20 + i32.const 3 + i32.mul i32.const 4 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 + i32.div_s + i32.lt_s + else + i32.const 0 end - call $~lib/map/Map#find ->>>>>>> master - i32.const 0 - i32.ne - local.set $3 + if + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store + local.get $6 + local.get $3 + call $~lib/map/Map#rehash + end + i32.const 1 + local.set $6 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $6 ) - (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) + (func $std/map/testNumeric + (local $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) -<<<<<<< HEAD (local $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) - local.get $0 - i32.load offset=16 - local.set $1 - local.get $0 - i32.load offset=24 - local.set $2 - i32.const 0 - local.get $2 - call $~lib/array/Array#constructor - local.set $3 -======= + (local $9 i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 24 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer ->>>>>>> master - i32.const 0 - i32.store - local.get $0 - local.set $4 + i64.const 0 + i64.store global.get $~lib/memory/__stack_pointer - local.get $4 - i32.store - local.get $4 - local.get $1 -<<<<<<< HEAD - local.get $1 - call $~lib/util/hash/HASH -======= - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end ->>>>>>> master - call $~lib/map/Map#find - local.set $2 - local.get $2 - i32.eqz - if -<<<<<<< HEAD - i32.const 0 - return - end - i32.const 0 - drop - i32.const 0 - drop - local.get $2 - local.get $2 - i32.load offset=8 - i32.const 1 - i32.or - i32.store offset=8 - local.get $0 - local.get $0 - i32.load offset=28 - i32.const 1 - i32.sub - i32.store offset=28 - local.get $0 - i64.load offset=8 - i64.const 1 - i64.shr_u - i32.wrap_i64 - local.set $3 - local.get $3 - i32.const 1 - i32.add - i32.const 4 - local.tee $4 - local.get $0 - i32.load offset=28 - local.tee $5 - local.get $4 - local.get $5 - i32.gt_u - select - i32.ge_u - if (result i32) - local.get $0 - i32.load offset=28 - local.get $0 - i32.load offset=20 - i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s - else - i32.const 0 - end - if - local.get $0 - local.get $3 - call $~lib/map/Map#rehash - end - i32.const 1 - ) - (func $~lib/map/Map#clear (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - local.tee $1 - i32.const 0 - i32.const 4 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $2 - local.get $1 - i32.load - call $~lib/rt/pure/__release - local.get $2 - i32.store - local.get $0 - i64.const 4 - i64.const 1 - i64.sub + i64.const 0 i64.store offset=8 - local.get $0 - local.tee $2 - i32.const 0 - i32.const 4 - i32.const 12 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 - local.get $2 - i32.load offset=16 - call $~lib/rt/pure/__release - local.get $1 - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $0 - i32.const 0 - i32.store offset=28 -======= - i32.const 592 - i32.const 656 - i32.const 105 - i32.const 17 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.load offset=4 - local.set $4 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $4 ->>>>>>> master - ) - (func $~lib/map/Map#keys (param $0 i32) (result i32) - (local $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) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check global.get $~lib/memory/__stack_pointer i64.const 0 - i64.store - local.get $0 - i32.load offset=8 - local.set $1 - local.get $0 - i32.load offset=16 - local.set $2 + i64.store offset=16 global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $2 - call $~lib/array/Array#constructor - local.tee $3 + call $~lib/map/Map#constructor + local.tee $0 i32.store i32.const 0 - local.set $4 - i32.const 0 - local.set $5 + local.set $1 loop $for-loop|0 - local.get $5 - local.get $2 + local.get $1 + i32.const 100 i32.lt_s - local.set $6 - local.get $6 + local.set $2 + local.get $2 if + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 local.get $1 - local.get $5 - i32.const 12 - i32.mul - i32.add - local.set $7 - local.get $7 - i32.load offset=8 - i32.const 1 - i32.and + call $~lib/map/Map#has + i32.eqz i32.eqz if - local.get $3 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $4 - local.tee $8 - i32.const 1 - i32.add - local.set $4 - local.get $8 - local.get $7 - i32.load - call $~lib/array/Array#__set + i32.const 0 + i32.const 544 + i32.const 6 + i32.const 5 + call $~lib/builtins/abort + unreachable end - local.get $5 - i32.const 1 + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + i32.const 10 + local.get $1 i32.add - local.set $5 - br $for-loop|0 - end - end - local.get $3 + call $~lib/map/Map#set + drop + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 8 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#get + i32.const 10 + local.get $1 + i32.add + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 9 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end + local.get $0 local.set $9 global.get $~lib/memory/__stack_pointer local.get $9 i32.store offset=4 local.get $9 - local.get $4 - call $~lib/array/Array#set:length - local.get $3 - local.set $9 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $9 - ) - (func $~lib/map/Map#values (param $0 i32) (result i32) - (local $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) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - local.get $0 - i32.load offset=8 - local.set $1 - local.get $0 - i32.load offset=16 - local.set $2 - global.get $~lib/memory/__stack_pointer - i32.const 0 - local.get $2 - call $~lib/array/Array#constructor - local.tee $3 - i32.store - i32.const 0 - local.set $4 + call $~lib/map/Map#get:size + i32.const 100 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 11 + i32.const 3 + call $~lib/builtins/abort + unreachable + end i32.const 0 - local.set $5 - loop $for-loop|0 - local.get $5 - local.get $2 + local.set $1 + loop $for-loop|1 + local.get $1 + i32.const 100 i32.lt_s - local.set $6 - local.get $6 + local.set $2 + local.get $2 if + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 15 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#get + i32.const 10 local.get $1 - local.get $5 - i32.const 12 - i32.mul i32.add - local.set $7 - local.get $7 - i32.load offset=8 - i32.const 1 - i32.and + i32.eq i32.eqz if - local.get $3 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $4 - local.tee $8 - i32.const 1 - i32.add - local.set $4 - local.get $8 - local.get $7 - i32.load offset=4 - call $~lib/array/Array#__set + i32.const 0 + i32.const 544 + i32.const 16 + i32.const 5 + call $~lib/builtins/abort + unreachable end - local.get $5 + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + i32.const 20 + local.get $1 + i32.add + call $~lib/map/Map#set + drop + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 18 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#get + i32.const 20 + local.get $1 + i32.add + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 19 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 i32.const 1 i32.add - local.set $5 - br $for-loop|0 + local.set $1 + br $for-loop|1 end end - local.get $3 + local.get $0 local.set $9 global.get $~lib/memory/__stack_pointer local.get $9 i32.store offset=4 local.get $9 - local.get $4 - call $~lib/array/Array#set:length - local.get $3 + call $~lib/map/Map#get:size + i32.const 100 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 21 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.get $0 local.set $9 global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer local.get $9 - ) - (func $~lib/map/Map#delete (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check + i32.store offset=4 + local.get $9 + call $~lib/map/Map#keys + local.tee $1 + i32.store offset=8 global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store local.get $0 - local.set $6 + local.set $9 global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store - local.get $6 - local.get $1 - block $~lib/util/hash/HASH|inlined.4 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.4 - end - call $~lib/map/Map#find - local.set $3 - local.get $3 - i32.eqz - if - i32.const 0 - local.set $6 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $6 - return - end - local.get $3 - local.get $3 - i32.load offset=8 - i32.const 1 - i32.or - call $~lib/map/MapEntry#set:taggedNext - local.get $0 - local.get $0 - i32.load offset=20 - i32.const 1 - i32.sub - call $~lib/map/Map#set:entriesCount - local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u - local.set $4 - local.get $4 - i32.const 1 - i32.add - i32.const 4 + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/map/Map#values local.tee $2 - local.get $0 - i32.load offset=20 - local.tee $5 - local.get $2 - local.get $5 - i32.gt_u - select - i32.ge_u - if (result i32) - local.get $0 - i32.load offset=20 - local.get $0 - i32.load offset=12 - i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s - else - i32.const 0 - end - if - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store - local.get $6 - local.get $4 - call $~lib/map/Map#rehash - end - i32.const 1 - local.set $6 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $6 - ) - (func $std/map/testNumeric - (local $0 i32) - (local $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) - global.get $~lib/memory/__stack_pointer - i32.const 24 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 + i32.store offset=12 global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=16 + i32.const 0 + call $~lib/map/Map#constructor + local.tee $3 + i32.store offset=16 global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/map/Map#constructor - local.tee $0 - i32.store + local.tee $4 + i32.store offset=20 i32.const 0 - local.set $1 - loop $for-loop|0 + local.set $5 + loop $for-loop|2 + local.get $5 local.get $1 - i32.const 100 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/array/Array#get:length i32.lt_s - local.set $2 - local.get $2 + local.set $6 + local.get $6 if - local.get $0 + local.get $1 local.set $9 global.get $~lib/memory/__stack_pointer local.get $9 i32.store offset=4 local.get $9 - local.get $1 - call $~lib/map/Map#has - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 6 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 + local.get $5 + call $~lib/array/Array#__get + local.set $7 + local.get $2 local.set $9 global.get $~lib/memory/__stack_pointer local.get $9 i32.store offset=4 local.get $9 - local.get $1 - i32.const 10 - local.get $1 - i32.add - call $~lib/map/Map#set - drop + local.get $5 + call $~lib/array/Array#__get + local.set $8 local.get $0 local.set $9 global.get $~lib/memory/__stack_pointer local.get $9 i32.store offset=4 local.get $9 - local.get $1 + local.get $7 call $~lib/map/Map#has i32.eqz if i32.const 0 i32.const 544 - i32.const 8 + i32.const 31 i32.const 5 call $~lib/builtins/abort unreachable @@ -21229,29 +17557,51 @@ local.get $9 i32.store offset=4 local.get $9 - local.get $1 - call $~lib/map/Map#get - i32.const 10 - local.get $1 - i32.add - i32.eq + local.get $8 + i32.const 20 + i32.sub + call $~lib/map/Map#has i32.eqz if i32.const 0 i32.const 544 - i32.const 9 + i32.const 32 i32.const 5 call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $7 + local.get $7 + call $~lib/map/Map#set + drop + local.get $4 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $8 + i32.const 20 + i32.sub + local.get $8 + i32.const 20 + i32.sub + call $~lib/map/Map#set + drop + local.get $5 i32.const 1 i32.add - local.set $1 - br $for-loop|0 + local.set $5 + br $for-loop|2 end end - local.get $0 + local.get $3 local.set $9 global.get $~lib/memory/__stack_pointer local.get $9 @@ -21264,33 +17614,51 @@ if i32.const 0 i32.const 544 - i32.const 11 + i32.const 36 i32.const 3 call $~lib/builtins/abort unreachable end - i32.const 0 - local.set $1 - loop $for-loop|1 - local.get $1 - i32.const 100 - i32.lt_s - local.set $2 - local.get $2 - if - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 + local.get $4 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/map/Map#get:size + i32.const 100 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 37 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + local.set $5 + loop $for-loop|3 + local.get $5 + i32.const 50 + i32.lt_s + local.set $6 + local.get $6 + if + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $5 call $~lib/map/Map#has i32.eqz if i32.const 0 i32.const 544 - i32.const 15 + i32.const 41 i32.const 5 call $~lib/builtins/abort unreachable @@ -21301,17 +17669,17 @@ local.get $9 i32.store offset=4 local.get $9 - local.get $1 + local.get $5 call $~lib/map/Map#get - i32.const 10 - local.get $1 + i32.const 20 + local.get $5 i32.add i32.eq i32.eqz if i32.const 0 i32.const 544 - i32.const 16 + i32.const 42 i32.const 5 call $~lib/builtins/abort unreachable @@ -21322,9 +17690,88 @@ local.get $9 i32.store offset=4 local.get $9 - local.get $1 - i32.const 20 - local.get $1 + local.get $5 + call $~lib/map/Map#delete + drop + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $5 + call $~lib/map/Map#has + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 44 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|3 + end + end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/map/Map#get:size + i32.const 50 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 46 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + local.set $5 + loop $for-loop|4 + local.get $5 + i32.const 50 + i32.lt_s + local.set $6 + local.get $6 + if + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $5 + call $~lib/map/Map#has + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 50 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $5 + i32.const 10 + local.get $5 i32.add call $~lib/map/Map#set drop @@ -21334,13 +17781,13 @@ local.get $9 i32.store offset=4 local.get $9 - local.get $1 + local.get $5 call $~lib/map/Map#has i32.eqz if i32.const 0 i32.const 544 - i32.const 18 + i32.const 52 i32.const 5 call $~lib/builtins/abort unreachable @@ -21351,26 +17798,32 @@ local.get $9 i32.store offset=4 local.get $9 - local.get $1 - call $~lib/map/Map#get - i32.const 20 - local.get $1 - i32.add - i32.eq + local.get $5 + call $~lib/map/Map#delete + drop + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $5 + call $~lib/map/Map#has + i32.eqz i32.eqz if i32.const 0 i32.const 544 - i32.const 19 + i32.const 54 i32.const 5 call $~lib/builtins/abort unreachable end - local.get $1 + local.get $5 i32.const 1 i32.add - local.set $1 - br $for-loop|1 + local.set $5 + br $for-loop|4 end end local.get $0 @@ -21380,302 +17833,394 @@ i32.store offset=4 local.get $9 call $~lib/map/Map#get:size - i32.const 100 + i32.const 50 i32.eq i32.eqz if i32.const 0 i32.const 544 - i32.const 21 + i32.const 56 i32.const 3 call $~lib/builtins/abort unreachable end -<<<<<<< HEAD - local.get $1 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/map/Map#constructor (param $0 i32) (result i32) + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/map/Map#clear local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/map/Map#get:size + i32.const 0 + i32.eq i32.eqz if - i32.const 32 - i32.const 17 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.set $0 + i32.const 0 + i32.const 544 + i32.const 60 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $0 - i32.const 0 - i32.const 4 + global.get $~lib/memory/__stack_pointer + i32.const 24 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 i32.store local.get $0 - i64.const 4 - i64.const 1 - i64.sub - i64.store offset=8 - local.get $0 + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store + local.get $2 + local.get $1 + local.get $1 + call $~lib/util/hash/HASH + call $~lib/map/Map#find i32.const 0 + i32.ne + local.set $2 + global.get $~lib/memory/__stack_pointer i32.const 4 - i32.const 12 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $0 - i32.const 0 - i32.store offset=28 - local.get $0 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 ) - (func $~lib/util/hash/HASH (param $0 i32) (result i64) - (local $1 i64) - (local $2 i32) + (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i64) - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 4 - i32.le_u - drop - local.get $0 - local.set $2 - i64.const 4 - local.set $1 + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer i64.const 0 - i64.const 2870177450012600261 - i64.add + i64.store local.get $1 - i64.add - local.set $3 - local.get $3 - local.get $2 - i64.extend_i32_u - i64.const -7046029288634856825 - i64.mul - i64.xor - local.set $3 - local.get $3 - i64.const 23 - i64.rotl - i64.const -4417276706812531889 - i64.mul - i64.const 1609587929392839161 - i64.add - local.set $3 - local.get $3 - local.get $3 - i64.const 33 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const -4417276706812531889 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 29 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const 1609587929392839161 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 32 - i64.shr_u - i64.xor + call $~lib/util/hash/HASH local.set $3 - local.get $3 - return - ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.get $2 local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - i32.load - local.set $3 - loop $while-continue|0 - local.get $3 + local.set $7 + global.get $~lib/memory/__stack_pointer + local.get $7 + i32.store + local.get $7 + local.get $1 + local.get $3 + call $~lib/map/Map#find + local.set $4 + local.get $4 + if + local.get $4 + local.get $2 + call $~lib/map/MapEntry#set:value + i32.const 0 + drop + else + local.get $0 + i32.load offset=24 + local.get $0 + i32.load offset=20 + i32.eq + if + local.get $0 + local.set $7 + global.get $~lib/memory/__stack_pointer + local.get $7 + i32.store + local.get $7 + local.get $0 + i32.load offset=28 + local.get $0 + i32.load offset=20 + i32.const 3 + i32.mul + i32.const 4 + i32.div_s + i32.lt_s + if (result i64) + local.get $0 + i64.load offset=8 + else + local.get $0 + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or + end + i32.wrap_i64 + call $~lib/map/Map#rehash + end + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.load offset=16 + local.tee $5 + i32.store offset=4 + local.get $5 + local.get $0 + local.get $0 + i32.load offset=24 + local.tee $6 + i32.const 1 + i32.add + call $~lib/map/Map#set:entriesOffset + local.get $6 + i32.const 12 + i32.mul + i32.add local.set $4 local.get $4 -======= - global.get $~lib/memory/__stack_pointer + local.get $1 + call $~lib/map/MapEntry#set:key + i32.const 0 + drop + local.get $4 + local.get $2 + call $~lib/map/MapEntry#set:value + i32.const 0 + drop + local.get $0 + local.get $0 + i32.load offset=28 + i32.const 1 + i32.add + call $~lib/map/Map#set:entriesCount + local.get $0 + i32.load + local.get $3 + local.get $0 + i64.load offset=8 + i64.and + i32.wrap_i64 + i32.const 4 + i32.mul + i32.add + local.set $6 + local.get $4 + local.get $6 + i32.load + call $~lib/map/MapEntry#set:taggedNext + local.get $6 + local.get $4 + i32.store + end local.get $0 - local.set $9 + local.set $7 global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/map/Map#keys - local.tee $1 - i32.store offset=8 + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $7 + ) + (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store local.get $0 - local.set $9 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/map/Map#values - local.tee $2 - i32.store offset=12 + local.get $3 + i32.store + local.get $3 + local.get $1 + local.get $1 + call $~lib/util/hash/HASH + call $~lib/map/Map#find + local.set $2 + local.get $2 + i32.eqz + if + i32.const 592 + i32.const 656 + i32.const 105 + i32.const 17 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.load offset=4 + local.set $3 global.get $~lib/memory/__stack_pointer - i32.const 0 - call $~lib/map/Map#constructor - local.tee $3 - i32.store offset=16 + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check global.get $~lib/memory/__stack_pointer i32.const 0 - call $~lib/map/Map#constructor - local.tee $4 - i32.store offset=20 + i32.store + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u + if + local.get $1 + i32.const 0 + i32.lt_s + if + i32.const 224 + i32.const 704 + i32.const 108 + i32.const 22 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.const 2 + call $~lib/array/ensureSize + local.get $0 + local.get $1 + i32.const 1 + i32.add + call $~lib/array/Array#set:length_ + end + local.get $0 + local.set $3 + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.store + local.get $3 + local.get $1 + local.get $2 + call $~lib/array/Array#__uset + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $~lib/map/Map#keys (param $0 i32) (result i32) + (local $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) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + local.get $0 + i32.load offset=16 + local.set $1 + local.get $0 + i32.load offset=24 + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 0 + local.get $2 + call $~lib/array/Array#constructor + local.tee $3 + i32.store + i32.const 0 + local.set $4 i32.const 0 local.set $5 - loop $for-loop|2 + loop $for-loop|0 local.get $5 - local.get $1 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/array/Array#get:length + local.get $2 i32.lt_s local.set $6 local.get $6 ->>>>>>> master if local.get $1 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 local.get $5 - call $~lib/array/Array#__get + i32.const 12 + i32.mul + i32.add local.set $7 - local.get $2 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $5 - call $~lib/array/Array#__get - local.set $8 - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 local.get $7 - call $~lib/map/Map#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 31 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $8 - i32.const 20 - i32.sub - call $~lib/map/Map#has + i32.load offset=8 + i32.const 1 + i32.and i32.eqz if - i32.const 0 - i32.const 544 - i32.const 32 - i32.const 5 - call $~lib/builtins/abort - unreachable + local.get $3 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $4 + local.tee $8 + i32.const 1 + i32.add + local.set $4 + local.get $8 + local.get $7 + i32.load + call $~lib/array/Array#__set end - local.get $3 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $7 - local.get $7 - call $~lib/map/Map#set - drop - local.get $4 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $8 - i32.const 20 - i32.sub - local.get $8 - i32.const 20 - i32.sub - call $~lib/map/Map#set - drop local.get $5 i32.const 1 i32.add local.set $5 - br $for-loop|2 + br $for-loop|0 end end -<<<<<<< HEAD - i32.const 0 - ) - (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - local.get $1 - call $~lib/util/hash/HASH - call $~lib/map/Map#find - i32.const 0 - i32.ne + local.get $3 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $4 + call $~lib/array/Array#set:length + local.get $3 + local.set $9 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $9 ) - (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) + (func $~lib/map/Map#values (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -21684,338 +18229,136 @@ (local $7 i32) (local $8 i32) (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - local.get $1 - i32.const 1 - i32.add + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + local.get $0 + i32.load offset=16 + local.set $1 + local.get $0 + i32.load offset=24 local.set $2 + global.get $~lib/memory/__stack_pointer i32.const 0 local.get $2 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $3 - local.get $2 - i32.const 8 - i32.mul - i32.const 3 - i32.div_s + call $~lib/array/Array#constructor + local.tee $3 + i32.store + i32.const 0 local.set $4 -======= - local.get $3 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/map/Map#get:size - i32.const 100 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 36 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $4 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/map/Map#get:size - i32.const 100 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 37 - i32.const 3 - call $~lib/builtins/abort - unreachable - end ->>>>>>> master i32.const 0 local.set $5 -<<<<<<< HEAD - local.get $0 - i32.load offset=16 - local.set $6 - local.get $6 - local.get $0 - i32.load offset=24 - i32.const 12 - i32.mul - i32.add - local.set $7 - local.get $5 - local.set $8 - loop $while-continue|0 -======= - loop $for-loop|3 + loop $for-loop|0 local.get $5 - i32.const 50 + local.get $2 i32.lt_s local.set $6 ->>>>>>> master local.get $6 if - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 + local.get $1 local.get $5 - call $~lib/map/Map#has + i32.const 12 + i32.mul + i32.add + local.set $7 + local.get $7 + i32.load offset=8 + i32.const 1 + i32.and i32.eqz if -<<<<<<< HEAD - local.get $8 - local.set $11 - local.get $10 - i32.load - local.set $12 - local.get $11 - local.get $12 - i32.store - local.get $11 - local.get $10 - i32.load offset=4 - i32.store offset=4 - local.get $12 - call $~lib/util/hash/HASH - local.get $1 - i64.extend_i32_u - i64.and - i32.wrap_i64 - local.set $13 local.get $3 - local.get $13 - i32.const 4 - i32.mul + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $4 + local.tee $8 + i32.const 1 i32.add - local.set $14 - local.get $11 - local.get $14 - i32.load - i32.store offset=8 - local.get $14 - local.get $8 - i32.store + local.set $4 local.get $8 - i32.const 12 - i32.add - local.set $8 -======= - i32.const 0 - i32.const 544 - i32.const 41 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $5 - call $~lib/map/Map#get - i32.const 20 - local.get $5 - i32.add - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 42 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $5 - call $~lib/map/Map#delete - drop - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $5 - call $~lib/map/Map#has - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 44 - i32.const 5 - call $~lib/builtins/abort - unreachable ->>>>>>> master + local.get $7 + i32.load offset=4 + call $~lib/array/Array#__set end local.get $5 i32.const 1 i32.add local.set $5 - br $for-loop|3 + br $for-loop|0 end end - local.get $0 -<<<<<<< HEAD - local.tee $11 local.get $3 - local.tee $12 - local.get $11 - i32.load - local.tee $9 - i32.ne - if - local.get $12 - call $~lib/rt/pure/__retain - local.set $12 - local.get $9 - call $~lib/rt/pure/__release - end - local.get $12 - i32.store - local.get $0 - local.get $1 - i64.extend_i32_u - i64.store offset=8 - local.get $0 - local.tee $13 - local.get $5 - local.tee $14 - local.get $13 - i32.load offset=16 - local.tee $11 - i32.ne - if - local.get $14 - call $~lib/rt/pure/__retain - local.set $14 - local.get $11 - call $~lib/rt/pure/__release - end - local.get $14 - i32.store offset=16 - local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 local.get $4 - i32.store offset=20 - local.get $0 - local.get $0 - i32.load offset=28 - i32.store offset=24 + call $~lib/array/Array#set:length local.get $3 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release + local.set $9 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $9 ) - (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i64) (local $4 i32) (local $5 i32) (local $6 i32) + (local $7 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store local.get $1 call $~lib/util/hash/HASH local.set $3 local.get $0 + local.set $7 + global.get $~lib/memory/__stack_pointer + local.get $7 + i32.store + local.get $7 local.get $1 local.get $3 - call $~lib/map/Map#find + call $~lib/map/Map#find local.set $4 local.get $4 if - i32.const 0 - drop local.get $4 local.get $2 - i32.store offset=4 + call $~lib/map/MapEntry#set:value + i32.const 0 + drop else local.get $0 i32.load offset=24 local.get $0 i32.load offset=20 i32.eq -======= - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/map/Map#get:size - i32.const 50 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 46 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - local.set $5 - loop $for-loop|4 - local.get $5 - i32.const 50 - i32.lt_s - local.set $6 - local.get $6 ->>>>>>> master if local.get $0 - local.set $9 + local.set $7 global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $5 - call $~lib/map/Map#has - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 50 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $5 - i32.const 10 - local.get $5 - i32.add - call $~lib/map/Map#set - drop + local.get $7 + i32.store + local.get $7 local.get $0 -<<<<<<< HEAD i32.load offset=28 local.get $0 i32.load offset=20 @@ -22036,12 +18379,13 @@ i64.or end i32.wrap_i64 - call $~lib/map/Map#rehash + call $~lib/map/Map#rehash end + global.get $~lib/memory/__stack_pointer local.get $0 i32.load offset=16 - call $~lib/rt/pure/__retain - local.set $5 + local.tee $5 + i32.store offset=4 local.get $5 local.get $0 local.get $0 @@ -22049,7 +18393,7 @@ local.tee $6 i32.const 1 i32.add - i32.store offset=24 + call $~lib/map/Map#set:entriesOffset local.get $6 i32.const 12 i32.mul @@ -22057,16 +18401,20 @@ local.set $4 local.get $4 local.get $1 - i32.store + call $~lib/map/MapEntry#set:key + i32.const 0 + drop local.get $4 local.get $2 - i32.store offset=4 + call $~lib/map/MapEntry#set:value + i32.const 0 + drop local.get $0 local.get $0 i32.load offset=28 i32.const 1 i32.add - i32.store offset=28 + call $~lib/map/Map#set:entriesCount local.get $0 i32.load local.get $3 @@ -22081,25 +18429,171 @@ local.get $4 local.get $6 i32.load - i32.store offset=8 + call $~lib/map/MapEntry#set:taggedNext local.get $6 local.get $4 i32.store - local.get $5 - call $~lib/rt/pure/__release -======= + end + local.get $0 + local.set $7 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $7 + ) + (func $~lib/map/Map#delete (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store + local.get $6 + local.get $1 + local.get $1 + call $~lib/util/hash/HASH + call $~lib/map/Map#find + local.set $2 + local.get $2 + i32.eqz + if + i32.const 0 + local.set $6 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $6 + return + end + local.get $2 + local.get $2 + i32.load offset=8 + i32.const 1 + i32.or + call $~lib/map/MapEntry#set:taggedNext + local.get $0 + local.get $0 + i32.load offset=28 + i32.const 1 + i32.sub + call $~lib/map/Map#set:entriesCount + local.get $0 + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 + local.set $3 + local.get $3 + i32.const 1 + i32.add + i32.const 4 + local.tee $4 + local.get $0 + i32.load offset=28 + local.tee $5 + local.get $4 + local.get $5 + i32.gt_u + select + i32.ge_u + if (result i32) + local.get $0 + i32.load offset=28 + local.get $0 + i32.load offset=20 + i32.const 3 + i32.mul + i32.const 4 + i32.div_s + i32.lt_s + else + i32.const 0 + end + if + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store + local.get $6 + local.get $3 + call $~lib/map/Map#rehash + end + i32.const 1 + local.set $6 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $6 + ) + (func $std/map/testNumeric + (local $0 i32) + (local $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) + global.get $~lib/memory/__stack_pointer + i32.const 24 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=8 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=16 + global.get $~lib/memory/__stack_pointer + i32.const 0 + call $~lib/map/Map#constructor + local.tee $0 + i32.store + i32.const 0 + local.set $1 + loop $for-loop|0 + local.get $1 + i32.const 100 + i32.lt_u + local.set $2 + local.get $2 + if + local.get $0 local.set $9 global.get $~lib/memory/__stack_pointer local.get $9 i32.store offset=4 local.get $9 - local.get $5 - call $~lib/map/Map#has + local.get $1 + call $~lib/map/Map#has + i32.eqz i32.eqz if i32.const 0 i32.const 544 - i32.const 52 + i32.const 6 i32.const 5 call $~lib/builtins/abort unreachable @@ -22110,8 +18604,11 @@ local.get $9 i32.store offset=4 local.get $9 - local.get $5 - call $~lib/map/Map#delete + local.get $1 + i32.const 10 + local.get $1 + i32.add + call $~lib/map/Map#set drop local.get $0 local.set $9 @@ -22119,25 +18616,44 @@ local.get $9 i32.store offset=4 local.get $9 - local.get $5 - call $~lib/map/Map#has + local.get $1 + call $~lib/map/Map#has i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 8 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#get + i32.const 10 + local.get $1 + i32.add + i32.eq i32.eqz if i32.const 0 i32.const 544 - i32.const 54 + i32.const 9 i32.const 5 call $~lib/builtins/abort unreachable end - local.get $5 + local.get $1 i32.const 1 i32.add - local.set $5 - br $for-loop|4 + local.set $1 + br $for-loop|0 end ->>>>>>> master end local.get $0 local.set $9 @@ -22145,4257 +18661,312 @@ local.get $9 i32.store offset=4 local.get $9 - call $~lib/map/Map#get:size - i32.const 50 + call $~lib/map/Map#get:size + i32.const 100 i32.eq i32.eqz if i32.const 0 i32.const 544 - i32.const 56 + i32.const 11 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/map/Map#clear - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/map/Map#get:size i32.const 0 + local.set $1 + loop $for-loop|1 + local.get $1 + i32.const 100 + i32.lt_u + local.set $2 + local.get $2 + if + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 15 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#get + i32.const 10 + local.get $1 + i32.add + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 16 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + i32.const 20 + local.get $1 + i32.add + call $~lib/map/Map#set + drop + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 18 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#get + i32.const 20 + local.get $1 + i32.add + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 19 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|1 + end + end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/map/Map#get:size + i32.const 100 i32.eq i32.eqz if i32.const 0 i32.const 544 - i32.const 60 + i32.const 21 i32.const 3 call $~lib/builtins/abort unreachable end global.get $~lib/memory/__stack_pointer - i32.const 24 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) -<<<<<<< HEAD -======= - (local $3 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store ->>>>>>> master local.get $0 - local.set $3 + local.set $9 global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - local.get $1 -<<<<<<< HEAD - local.get $1 - call $~lib/util/hash/HASH - call $~lib/map/Map#find - local.set $2 - local.get $2 - i32.eqz - if - i32.const 384 - i32.const 448 - i32.const 105 - i32.const 17 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.load offset=4 - ) - (func $~lib/map/Map#get:size (param $0 i32) (result i32) - local.get $0 - i32.load offset=28 -======= - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end - call $~lib/map/Map#find - i32.const 0 - i32.ne - local.set $3 + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/map/Map#keys + local.tee $1 + i32.store offset=8 global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $3 ->>>>>>> master - ) - (func $~lib/map/Map#set (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.get $0 + local.set $9 global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/map/Map#values + local.tee $2 + i32.store offset=12 global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $3 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $4 - local.get $0 - local.set $7 + i32.const 0 + call $~lib/map/Map#constructor + local.tee $3 + i32.store offset=16 global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store - local.get $7 - local.get $1 -<<<<<<< HEAD - local.get $2 - call $~lib/array/Array#__uset - ) - (func $~lib/array/Array#set:length (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=12 - local.set $2 i32.const 0 - drop - local.get $0 - local.get $1 - i32.const 2 - call $~lib/array/ensureSize - local.get $0 - local.get $1 - i32.store offset=12 - ) - (func $~lib/map/Map#keys (param $0 i32) (result i32) - (local $1 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.load offset=16 - local.set $1 - local.get $0 - i32.load offset=24 - local.set $2 - i32.const 0 - local.get $2 - call $~lib/array/Array#constructor - local.set $3 - i32.const 0 - local.set $4 + call $~lib/map/Map#constructor + local.tee $4 + i32.store offset=20 i32.const 0 -======= - local.get $4 - call $~lib/map/Map#find ->>>>>>> master local.set $5 - local.get $5 - if + loop $for-loop|2 local.get $5 - local.get $2 - call $~lib/map/MapEntry#set:value - i32.const 0 - drop - else - local.get $0 - i32.load offset=16 - local.get $0 - i32.load offset=12 - i32.eq + local.get $1 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/array/Array#get:length + i32.lt_s + local.set $6 + local.get $6 if - local.get $0 + local.get $1 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $5 + call $~lib/array/Array#__get local.set $7 + local.get $2 + local.set $9 global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store - local.get $7 + local.get $9 + i32.store offset=4 + local.get $9 + local.get $5 + call $~lib/array/Array#__get + local.set $8 local.get $0 - i32.load offset=20 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $7 + call $~lib/map/Map#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 31 + i32.const 5 + call $~lib/builtins/abort + unreachable + end local.get $0 - i32.load offset=12 - i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s - if (result i32) - local.get $0 - i32.load offset=4 - else - local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $8 + i32.const 20 + i32.sub + call $~lib/map/Map#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 32 + i32.const 5 + call $~lib/builtins/abort + unreachable end - call $~lib/map/Map#rehash + local.get $3 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $7 + local.get $7 + call $~lib/map/Map#set + drop + local.get $4 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $8 + i32.const 20 + i32.sub + local.get $8 + i32.const 20 + i32.sub + call $~lib/map/Map#set + drop + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|2 end - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.load offset=8 - local.tee $3 - i32.store offset=4 - local.get $3 - local.get $0 - local.get $0 - i32.load offset=16 - local.tee $6 - i32.const 1 - i32.add - call $~lib/map/Map#set:entriesOffset - local.get $6 - i32.const 12 - i32.mul - i32.add - local.set $5 - local.get $5 - local.get $1 - call $~lib/map/MapEntry#set:key - i32.const 0 - drop - local.get $5 - local.get $2 - call $~lib/map/MapEntry#set:value + end + local.get $3 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/map/Map#get:size + i32.const 100 + i32.eq + i32.eqz + if i32.const 0 - drop - local.get $0 - local.get $0 - i32.load offset=20 - i32.const 1 - i32.add - call $~lib/map/Map#set:entriesCount - local.get $0 - i32.load - local.get $4 - local.get $0 - i32.load offset=4 - i32.and - i32.const 4 - i32.mul - i32.add - local.set $6 - local.get $5 - local.get $6 - i32.load - call $~lib/map/MapEntry#set:taggedNext - local.get $6 - local.get $5 - i32.store + i32.const 544 + i32.const 36 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $0 - local.set $7 + local.get $4 + local.set $9 global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $7 - ) - (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) -<<<<<<< HEAD - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $0 - i32.load offset=16 - local.set $1 - local.get $0 - i32.load offset=24 - local.set $2 + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/map/Map#get:size + i32.const 100 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 37 + i32.const 3 + call $~lib/builtins/abort + unreachable + end i32.const 0 - local.get $2 - call $~lib/array/Array#constructor - local.set $3 -======= - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer ->>>>>>> master - i32.const 0 - i32.store - local.get $0 - local.set $4 - global.get $~lib/memory/__stack_pointer - local.get $4 - i32.store - local.get $4 - local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end - call $~lib/map/Map#find - local.set $3 - local.get $3 - i32.eqz - if -<<<<<<< HEAD - i32.const 32 - i32.const 19 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.set $0 -======= - i32.const 592 - i32.const 656 - i32.const 105 - i32.const 17 - call $~lib/builtins/abort - unreachable ->>>>>>> master - end - local.get $3 - i32.load offset=4 - local.set $4 - global.get $~lib/memory/__stack_pointer - i32.const 4 -<<<<<<< HEAD - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store - local.get $0 - i64.const 4 - i64.const 1 - i64.sub - i64.store offset=8 - local.get $0 - i32.const 0 - i32.const 4 - i32.const 12 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $0 - i32.const 0 - i32.store offset=28 - local.get $0 - ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 - i32.load offset=12 - ) - (func $~lib/array/Array#__uget (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load - ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) -======= - i32.add - global.set $~lib/memory/__stack_pointer - local.get $4 - ) - (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store ->>>>>>> master - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u - if - local.get $1 - i32.const 0 - i32.lt_s - if - i32.const 224 - i32.const 704 - i32.const 108 - i32.const 22 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.const 2 - call $~lib/array/ensureSize - local.get $0 - local.get $1 - i32.const 1 - i32.add - call $~lib/array/Array#set:length_ - end - local.get $0 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - local.get $1 - local.get $2 - call $~lib/array/Array#__uset - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) -<<<<<<< HEAD - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) -======= - (func $~lib/map/Map#keys (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) ->>>>>>> master - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - local.get $0 - i32.load offset=8 - local.set $1 - local.get $0 -<<<<<<< HEAD - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - i32.load - local.set $3 - loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 -======= - i32.load offset=16 - local.set $2 - global.get $~lib/memory/__stack_pointer - i32.const 0 - local.get $2 - call $~lib/array/Array#constructor - local.tee $3 - i32.store - i32.const 0 - local.set $4 - i32.const 0 - local.set $5 - loop $for-loop|0 - local.get $5 - local.get $2 - i32.lt_s - local.set $6 - local.get $6 ->>>>>>> master - if - local.get $1 - local.get $5 - i32.const 12 - i32.mul - i32.add - local.set $7 - local.get $7 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $3 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $4 - local.tee $8 - i32.const 1 - i32.add - local.set $4 - local.get $8 - local.get $7 - i32.load - call $~lib/array/Array#__set - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end - local.get $3 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $4 - call $~lib/array/Array#set:length - local.get $3 - local.set $9 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $9 - ) - (func $~lib/map/Map#values (param $0 i32) (result i32) - (local $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) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - local.get $0 - i32.load offset=8 - local.set $1 - local.get $0 - i32.load offset=16 - local.set $2 - global.get $~lib/memory/__stack_pointer - i32.const 0 - local.get $2 - call $~lib/array/Array#constructor - local.tee $3 - i32.store - i32.const 0 - local.set $4 - i32.const 0 - local.set $5 -<<<<<<< HEAD - local.get $0 - i32.load offset=16 - local.set $6 - local.get $6 - local.get $0 - i32.load offset=24 - i32.const 12 - i32.mul - i32.add - local.set $7 - local.get $5 - local.set $8 - loop $while-continue|0 -======= - loop $for-loop|0 - local.get $5 - local.get $2 - i32.lt_s - local.set $6 ->>>>>>> master - local.get $6 - if - local.get $1 - local.get $5 - i32.const 12 - i32.mul - i32.add - local.set $7 - local.get $7 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if -<<<<<<< HEAD - local.get $8 - local.set $11 - local.get $10 - i32.load - local.set $12 - local.get $11 - local.get $12 - i32.store - local.get $11 - local.get $10 - i32.load offset=4 - i32.store offset=4 - local.get $12 - call $~lib/util/hash/HASH - local.get $1 - i64.extend_i32_u - i64.and - i32.wrap_i64 - local.set $13 -======= ->>>>>>> master - local.get $3 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $4 - local.tee $8 - i32.const 1 - i32.add - local.set $4 - local.get $8 - local.get $7 - i32.load offset=4 - call $~lib/array/Array#__set - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end - local.get $3 -<<<<<<< HEAD - local.tee $12 - local.get $11 - i32.load - local.tee $9 - i32.ne - if - local.get $12 - call $~lib/rt/pure/__retain - local.set $12 - local.get $9 - call $~lib/rt/pure/__release - end - local.get $12 - i32.store - local.get $0 - local.get $1 - i64.extend_i32_u - i64.store offset=8 - local.get $0 - local.tee $13 - local.get $5 - local.tee $14 - local.get $13 - i32.load offset=16 - local.tee $11 - i32.ne - if - local.get $14 - call $~lib/rt/pure/__retain - local.set $14 - local.get $11 - call $~lib/rt/pure/__release - end - local.get $14 - i32.store offset=16 - local.get $0 - local.get $4 - i32.store offset=20 - local.get $0 - local.get $0 - i32.load offset=28 - i32.store offset=24 -======= - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $4 - call $~lib/array/Array#set:length ->>>>>>> master - local.get $3 - local.set $9 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $9 - ) - (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i64) - (local $4 i32) - (local $5 i32) - (local $6 i32) -<<<<<<< HEAD - local.get $1 - call $~lib/util/hash/HASH - local.set $3 -======= - (local $7 i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - block $~lib/util/hash/HASH|inlined.4 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $3 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.4 - end - local.set $4 ->>>>>>> master - local.get $0 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store - local.get $7 - local.get $1 - local.get $3 - call $~lib/map/Map#find - local.set $4 - local.get $4 - if -<<<<<<< HEAD - i32.const 0 - drop - local.get $4 -======= - local.get $5 ->>>>>>> master - local.get $2 - call $~lib/map/MapEntry#set:value - i32.const 0 - drop - else - local.get $0 - i32.load offset=24 - local.get $0 - i32.load offset=20 - i32.eq - if - local.get $0 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store - local.get $7 - local.get $0 - i32.load offset=28 - local.get $0 - i32.load offset=20 - i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s - if (result i64) - local.get $0 - i64.load offset=8 - else - local.get $0 - i64.load offset=8 - i64.const 1 - i64.shl - i64.const 1 - i64.or - end - i32.wrap_i64 - call $~lib/map/Map#rehash - end - global.get $~lib/memory/__stack_pointer - local.get $0 -<<<<<<< HEAD - i32.load offset=16 - call $~lib/rt/pure/__retain - local.set $5 - local.get $5 -======= - i32.load offset=8 - local.tee $3 - i32.store offset=4 - local.get $3 ->>>>>>> master - local.get $0 - local.get $0 - i32.load offset=24 - local.tee $6 - i32.const 1 - i32.add -<<<<<<< HEAD - i32.store offset=24 -======= - call $~lib/map/Map#set:entriesOffset ->>>>>>> master - local.get $6 - i32.const 12 - i32.mul - i32.add - local.set $4 - local.get $4 - local.get $1 -<<<<<<< HEAD - i32.store - local.get $4 -======= - call $~lib/map/MapEntry#set:key - i32.const 0 - drop - local.get $5 ->>>>>>> master - local.get $2 - call $~lib/map/MapEntry#set:value - i32.const 0 - drop - local.get $0 - local.get $0 - i32.load offset=28 - i32.const 1 - i32.add -<<<<<<< HEAD - i32.store offset=28 -======= - call $~lib/map/Map#set:entriesCount ->>>>>>> master - local.get $0 - i32.load - local.get $3 - local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - local.set $6 - local.get $4 - local.get $6 - i32.load - call $~lib/map/MapEntry#set:taggedNext - local.get $6 - local.get $4 - i32.store -<<<<<<< HEAD - local.get $5 - call $~lib/rt/pure/__release - end - local.get $0 - call $~lib/rt/pure/__retain - ) - (func $~lib/map/Map#get:size (param $0 i32) (result i32) - local.get $0 - i32.load offset=28 -======= - end - local.get $0 - local.set $7 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $7 ->>>>>>> master - ) - (func $~lib/map/Map#delete (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store - local.get $6 - local.get $1 - local.get $1 - call $~lib/util/hash/HASH - call $~lib/map/Map#find - local.set $2 - local.get $2 - i32.eqz - if - i32.const 0 - local.set $6 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $6 - return - end -<<<<<<< HEAD - i32.const 0 - drop - i32.const 0 - drop - local.get $2 - local.get $2 -======= - local.get $3 - local.get $3 ->>>>>>> master - i32.load offset=8 - i32.const 1 - i32.or - call $~lib/map/MapEntry#set:taggedNext - local.get $0 - local.get $0 - i32.load offset=28 - i32.const 1 - i32.sub -<<<<<<< HEAD - i32.store offset=28 -======= - call $~lib/map/Map#set:entriesCount ->>>>>>> master - local.get $0 - i64.load offset=8 - i64.const 1 - i64.shr_u - i32.wrap_i64 - local.set $3 - local.get $3 - i32.const 1 - i32.add - i32.const 4 - local.tee $4 - local.get $0 - i32.load offset=28 - local.tee $5 - local.get $4 - local.get $5 - i32.gt_u - select - i32.ge_u - if (result i32) - local.get $0 - i32.load offset=28 - local.get $0 - i32.load offset=20 - i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s - else - i32.const 0 - end - if - local.get $0 -<<<<<<< HEAD - local.get $3 - call $~lib/map/Map#rehash - end - i32.const 1 - ) - (func $~lib/map/Map#clear (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - local.tee $1 - i32.const 0 - i32.const 4 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $2 - local.get $1 - i32.load - call $~lib/rt/pure/__release - local.get $2 - i32.store - local.get $0 - i64.const 4 - i64.const 1 - i64.sub - i64.store offset=8 - local.get $0 - local.tee $2 - i32.const 0 - i32.const 4 - i32.const 12 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 - local.get $2 - i32.load offset=16 - call $~lib/rt/pure/__release - local.get $1 - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $0 - i32.const 0 - i32.store offset=28 -======= - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store - local.get $6 - local.get $4 - call $~lib/map/Map#rehash - end - i32.const 1 - local.set $6 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $6 ->>>>>>> master - ) - (func $std/map/testNumeric - (local $0 i32) - (local $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) - global.get $~lib/memory/__stack_pointer - i32.const 24 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=16 - global.get $~lib/memory/__stack_pointer - i32.const 0 - call $~lib/map/Map#constructor - local.tee $0 - i32.store - i32.const 0 - local.set $1 - loop $for-loop|0 - local.get $1 - i32.const 100 - i32.lt_u - local.set $2 - local.get $2 - if - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/map/Map#has - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 6 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - i32.const 10 - local.get $1 - i32.add - call $~lib/map/Map#set - drop - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/map/Map#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 8 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/map/Map#get - i32.const 10 - local.get $1 - i32.add - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 9 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/map/Map#get:size - i32.const 100 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 11 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - local.set $1 - loop $for-loop|1 - local.get $1 - i32.const 100 - i32.lt_u - local.set $2 - local.get $2 - if - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/map/Map#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 15 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/map/Map#get - i32.const 10 - local.get $1 - i32.add - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 16 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - i32.const 20 - local.get $1 - i32.add - call $~lib/map/Map#set - drop - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/map/Map#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 18 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/map/Map#get - i32.const 20 - local.get $1 - i32.add - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 19 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|1 - end - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/map/Map#get:size - i32.const 100 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 21 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/map/Map#keys - local.tee $1 - i32.store offset=8 - global.get $~lib/memory/__stack_pointer - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/map/Map#values - local.tee $2 - i32.store offset=12 - global.get $~lib/memory/__stack_pointer - i32.const 0 - call $~lib/map/Map#constructor - local.tee $3 - i32.store offset=16 - global.get $~lib/memory/__stack_pointer - i32.const 0 - call $~lib/map/Map#constructor - local.tee $4 - i32.store offset=20 - i32.const 0 - local.set $5 - loop $for-loop|2 - local.get $5 - local.get $1 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/array/Array#get:length - i32.lt_s - local.set $6 - local.get $6 - if - local.get $1 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $5 - call $~lib/array/Array#__get - local.set $7 - local.get $2 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $5 - call $~lib/array/Array#__get - local.set $8 - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $7 - call $~lib/map/Map#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 31 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $8 - i32.const 20 - i32.sub - call $~lib/map/Map#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 32 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $3 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $7 - local.get $7 - call $~lib/map/Map#set - drop - local.get $4 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $8 - i32.const 20 - i32.sub - local.get $8 - i32.const 20 - i32.sub - call $~lib/map/Map#set - drop - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|2 - end - end - local.get $3 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/map/Map#get:size - i32.const 100 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 36 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $4 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/map/Map#get:size - i32.const 100 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 37 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - local.set $5 - loop $for-loop|3 - local.get $5 - i32.const 50 - i32.lt_u - local.set $6 - local.get $6 - if - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $5 - call $~lib/map/Map#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 41 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $5 - call $~lib/map/Map#get - i32.const 20 - local.get $5 - i32.add - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 42 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $5 - call $~lib/map/Map#delete - drop - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $5 - call $~lib/map/Map#has - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 44 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|3 - end - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/map/Map#get:size - i32.const 50 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 46 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - local.set $5 - loop $for-loop|4 - local.get $5 - i32.const 50 - i32.lt_u - local.set $6 - local.get $6 - if - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $5 - call $~lib/map/Map#has - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 50 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $5 - i32.const 10 - local.get $5 - i32.add - call $~lib/map/Map#set - drop - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $5 - call $~lib/map/Map#has - i32.eqz -<<<<<<< HEAD - i32.eqz - if - i32.const 0 - i32.const 336 - i32.const 54 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|4 - end - end - local.get $0 - call $~lib/map/Map#get:size - i32.const 50 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 336 - i32.const 56 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/map/Map#clear - local.get $0 - call $~lib/map/Map#get:size - i32.const 0 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 336 - i32.const 60 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/map/Map#constructor (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 32 - i32.const 20 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.set $0 - end - local.get $0 - i32.const 0 - i32.const 4 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store - local.get $0 - i64.const 4 - i64.const 1 - i64.sub - i64.store offset=8 - local.get $0 - i32.const 0 - i32.const 4 - i32.const 16 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $0 - i32.const 0 - i32.store offset=28 - local.get $0 - ) - (func $~lib/util/hash/HASH (param $0 i64) (result i64) - (local $1 i64) - (local $2 i64) - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 4 - i32.le_u - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $0 - local.set $1 - i64.const 0 - i64.const 2870177450012600261 - i64.add - i64.const 8 - i64.add - local.set $2 - local.get $2 - local.get $1 - i64.const -4417276706812531889 - i64.mul - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - local.set $2 - local.get $2 - i64.const 27 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.set $2 - local.get $2 - local.get $2 - i64.const 33 - i64.shr_u - i64.xor - local.set $2 - local.get $2 - i64.const -4417276706812531889 - i64.mul - local.set $2 - local.get $2 - local.get $2 - i64.const 29 - i64.shr_u - i64.xor - local.set $2 - local.get $2 - i64.const 1609587929392839161 - i64.mul - local.set $2 - local.get $2 - local.get $2 - i64.const 32 - i64.shr_u - i64.xor - local.set $2 - local.get $2 - return - ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i64) (param $2 i64) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.get $2 - local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - i32.load - local.set $3 - loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 - if - local.get $3 - i32.load offset=12 - local.set $5 - local.get $5 - i32.const 1 - i32.and - i32.eqz - if (result i32) - local.get $3 - i64.load - local.get $1 - i64.eq - else -======= - if ->>>>>>> master - i32.const 0 - i32.const 544 - i32.const 52 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $5 - call $~lib/map/Map#delete - drop - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $5 - call $~lib/map/Map#has - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 54 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|4 - end - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/map/Map#get:size - i32.const 50 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 56 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/map/Map#clear - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/map/Map#get:size - i32.const 0 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 60 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - i32.const 24 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $~lib/map/Map#has (param $0 i32) (param $1 i64) (result i32) -<<<<<<< HEAD -======= - (local $2 i64) - (local $3 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store ->>>>>>> master - local.get $0 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - local.get $1 -<<<<<<< HEAD - local.get $1 - call $~lib/util/hash/HASH - call $~lib/map/Map#find - i32.const 0 - i32.ne - ) - (func $~lib/map/Map#rehash (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 $10 i32) - (local $11 i32) - (local $12 i64) - (local $13 i32) - (local $14 i32) - local.get $1 - i32.const 1 - i32.add - local.set $2 - i32.const 0 - local.get $2 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $3 - local.get $2 - i32.const 8 - i32.mul - i32.const 3 - i32.div_s - local.set $4 - i32.const 0 - local.get $4 - i32.const 16 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $0 - i32.load offset=16 - local.set $6 - local.get $6 - local.get $0 - i32.load offset=24 - i32.const 16 - i32.mul - i32.add - local.set $7 - local.get $5 - local.set $8 - loop $while-continue|0 - local.get $6 - local.get $7 - i32.ne - local.set $9 - local.get $9 - if - local.get $6 - local.set $10 - local.get $10 - i32.load offset=12 - i32.const 1 - i32.and - i32.eqz - if - local.get $8 - local.set $11 - local.get $10 - i64.load - local.set $12 - local.get $11 - local.get $12 - i64.store - local.get $11 - local.get $10 - i32.load offset=8 - i32.store offset=8 - local.get $12 - call $~lib/util/hash/HASH - local.get $1 - i64.extend_i32_u - i64.and - i32.wrap_i64 - local.set $13 - local.get $3 - local.get $13 - i32.const 4 - i32.mul - i32.add - local.set $14 - local.get $11 - local.get $14 - i32.load - i32.store offset=12 - local.get $14 - local.get $8 - i32.store - local.get $8 - i32.const 16 - i32.add - local.set $8 - end - local.get $6 - i32.const 16 - i32.add - local.set $6 - br $while-continue|0 - end - end - local.get $0 - local.tee $11 - local.get $3 - local.tee $13 - local.get $11 - i32.load - local.tee $9 - i32.ne - if - local.get $13 - call $~lib/rt/pure/__retain - local.set $13 - local.get $9 - call $~lib/rt/pure/__release - end - local.get $13 - i32.store - local.get $0 - local.get $1 - i64.extend_i32_u - i64.store offset=8 - local.get $0 - local.tee $14 - local.get $5 - local.tee $9 - local.get $14 - i32.load offset=16 - local.tee $11 - i32.ne - if - local.get $9 - call $~lib/rt/pure/__retain - local.set $9 - local.get $11 - call $~lib/rt/pure/__release - end - local.get $9 - i32.store offset=16 - local.get $0 - local.get $4 - i32.store offset=20 - local.get $0 - local.get $0 - i32.load offset=28 - i32.store offset=24 -======= - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.0 - end - call $~lib/map/Map#find - i32.const 0 - i32.ne - local.set $3 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer ->>>>>>> master - local.get $3 - ) - (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i32) (result i32) - (local $3 i64) - (local $4 i32) - (local $5 i32) - (local $6 i32) -<<<<<<< HEAD - local.get $1 - call $~lib/util/hash/HASH - local.set $3 -======= - (local $7 i32) - (local $8 i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $4 ->>>>>>> master - local.get $0 - local.set $8 - global.get $~lib/memory/__stack_pointer - local.get $8 - i32.store - local.get $8 - local.get $1 - local.get $3 - call $~lib/map/Map#find - local.set $4 - local.get $4 - if -<<<<<<< HEAD - i32.const 0 - drop - local.get $4 -======= - local.get $5 ->>>>>>> master - local.get $2 - call $~lib/map/MapEntry#set:value - i32.const 0 - drop - else - local.get $0 - i32.load offset=24 - local.get $0 - i32.load offset=20 - i32.eq - if - local.get $0 - local.set $8 - global.get $~lib/memory/__stack_pointer - local.get $8 - i32.store - local.get $8 - local.get $0 - i32.load offset=28 - local.get $0 - i32.load offset=20 - i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s - if (result i64) - local.get $0 - i64.load offset=8 - else - local.get $0 - i64.load offset=8 - i64.const 1 - i64.shl - i64.const 1 - i64.or - end - i32.wrap_i64 - call $~lib/map/Map#rehash - end - global.get $~lib/memory/__stack_pointer - local.get $0 -<<<<<<< HEAD - i32.load offset=16 - call $~lib/rt/pure/__retain - local.set $5 - local.get $5 -======= - i32.load offset=8 - local.tee $6 - i32.store offset=4 - local.get $6 ->>>>>>> master - local.get $0 - local.get $0 - i32.load offset=24 - local.tee $6 - i32.const 1 - i32.add -<<<<<<< HEAD - i32.store offset=24 - local.get $6 -======= - call $~lib/map/Map#set:entriesOffset - local.get $7 ->>>>>>> master - i32.const 16 - i32.mul - i32.add - local.set $4 - local.get $4 - local.get $1 -<<<<<<< HEAD - i64.store - local.get $4 -======= - call $~lib/map/MapEntry#set:key - i32.const 0 - drop - local.get $5 ->>>>>>> master - local.get $2 - call $~lib/map/MapEntry#set:value - i32.const 0 - drop - local.get $0 - local.get $0 - i32.load offset=28 - i32.const 1 - i32.add -<<<<<<< HEAD - i32.store offset=28 -======= - call $~lib/map/Map#set:entriesCount ->>>>>>> master - local.get $0 - i32.load - local.get $3 - local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - local.set $6 - local.get $4 - local.get $6 - i32.load -<<<<<<< HEAD - i32.store offset=12 - local.get $6 - local.get $4 - i32.store - local.get $5 - call $~lib/rt/pure/__release -======= - call $~lib/map/MapEntry#set:taggedNext - local.get $7 - local.get $5 - i32.store ->>>>>>> master - end - local.get $0 - local.set $8 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $8 - ) - (func $~lib/map/Map#get (param $0 i32) (param $1 i64) (result i32) -<<<<<<< HEAD - (local $2 i32) -======= - (local $2 i64) - (local $3 i32) - (local $4 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store ->>>>>>> master - local.get $0 - local.set $4 - global.get $~lib/memory/__stack_pointer - local.get $4 - i32.store - local.get $4 - local.get $1 - local.get $1 - call $~lib/util/hash/HASH - call $~lib/map/Map#find - local.set $2 - local.get $2 - i32.eqz - if - i32.const 592 - i32.const 656 - i32.const 105 - i32.const 17 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.load offset=8 - local.set $4 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $4 - ) -<<<<<<< HEAD - (func $~lib/map/Map#get:size (param $0 i32) (result i32) - local.get $0 - i32.load offset=28 - ) - (func $~lib/array/Array#constructor (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) -======= - (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i64) ->>>>>>> master - (local $3 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u - if - local.get $1 - i32.const 0 - i32.lt_s - if - i32.const 224 - i32.const 704 - i32.const 108 - i32.const 22 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.const 3 - call $~lib/array/ensureSize - local.get $0 - local.get $1 - i32.const 1 - i32.add - call $~lib/array/Array#set:length_ - end - local.get $0 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - local.get $1 - local.get $2 - call $~lib/array/Array#__uset - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $~lib/map/Map#keys (param $0 i32) (result i32) - (local $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) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - local.get $0 - i32.load offset=16 - local.set $1 - local.get $0 - i32.load offset=24 - local.set $2 - global.get $~lib/memory/__stack_pointer - i32.const 0 - local.get $2 - call $~lib/array/Array#constructor -<<<<<<< HEAD - local.set $3 - i32.const 0 - local.set $4 - i32.const 0 - local.set $5 - loop $for-loop|0 - local.get $5 - local.get $2 - i32.lt_s - local.set $6 - local.get $6 - if - local.get $1 - local.get $5 - i32.const 16 - i32.mul - i32.add - local.set $7 - local.get $7 - i32.load offset=12 - i32.const 1 - i32.and - i32.eqz - if - local.get $3 - local.get $4 - local.tee $8 - i32.const 1 - i32.add - local.set $4 - local.get $8 - local.get $7 - i64.load - call $~lib/array/Array#__set - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end - local.get $3 - local.get $4 - call $~lib/array/Array#set:length - local.get $3 - ) - (func $~lib/map/Map#values (param $0 i32) (result i32) - (local $1 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.load offset=16 - local.set $1 - local.get $0 - i32.load offset=24 - local.set $2 - i32.const 0 - local.get $2 - call $~lib/array/Array#constructor - local.set $3 -======= - local.tee $3 - i32.store ->>>>>>> master - i32.const 0 - local.set $4 - i32.const 0 - local.set $5 - loop $for-loop|0 - local.get $5 - local.get $2 - i32.lt_s - local.set $6 - local.get $6 - if - local.get $1 - local.get $5 - i32.const 16 - i32.mul - i32.add - local.set $7 - local.get $7 - i32.load offset=12 - i32.const 1 - i32.and - i32.eqz - if - local.get $3 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $4 - local.tee $8 - i32.const 1 - i32.add - local.set $4 - local.get $8 - local.get $7 - i64.load - call $~lib/array/Array#__set - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end - local.get $3 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $4 - call $~lib/array/Array#set:length - local.get $3 -<<<<<<< HEAD - ) - (func $~lib/map/Map#constructor (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 32 - i32.const 22 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.set $0 - end - local.get $0 - i32.const 0 - i32.const 4 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store - local.get $0 - i64.const 4 - i64.const 1 - i64.sub - i64.store offset=8 - local.get $0 - i32.const 0 - i32.const 4 - i32.const 24 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $0 - i32.const 0 - i32.store offset=28 - local.get $0 - ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 - i32.load offset=12 - ) - (func $~lib/array/Array#__uget (param $0 i32) (param $1 i32) (result i64) - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 3 - i32.shl - i32.add - i64.load - ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i64) - (local $2 i64) - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u - if - i32.const 544 - i32.const 496 - i32.const 104 - i32.const 42 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - call $~lib/array/Array#__uget - local.set $2 - i32.const 0 - drop - local.get $2 - ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i64) (param $2 i64) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.get $2 - local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul -======= - local.set $9 - global.get $~lib/memory/__stack_pointer - i32.const 8 ->>>>>>> master - i32.add - global.set $~lib/memory/__stack_pointer - local.get $9 - ) - (func $~lib/map/Map#values (param $0 i32) (result i32) - (local $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) -<<<<<<< HEAD - (local $10 i32) - (local $11 i32) - (local $12 i64) - (local $13 i32) - (local $14 i32) - local.get $1 - i32.const 1 - i32.add -======= - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - local.get $0 - i32.load offset=8 - local.set $1 - local.get $0 - i32.load offset=16 ->>>>>>> master - local.set $2 - global.get $~lib/memory/__stack_pointer - i32.const 0 - local.get $2 - call $~lib/array/Array#constructor - local.tee $3 - i32.store - i32.const 0 - local.set $4 - i32.const 0 - local.set $5 -<<<<<<< HEAD - local.get $0 - i32.load offset=16 - local.set $6 - local.get $6 - local.get $0 - i32.load offset=24 - i32.const 24 - i32.mul - i32.add - local.set $7 - local.get $5 - local.set $8 - loop $while-continue|0 -======= - loop $for-loop|0 - local.get $5 - local.get $2 - i32.lt_s - local.set $6 ->>>>>>> master - local.get $6 - if - local.get $1 - local.get $5 - i32.const 16 - i32.mul - i32.add - local.set $7 - local.get $7 - i32.load offset=12 - i32.const 1 - i32.and - i32.eqz - if -<<<<<<< HEAD - local.get $8 - local.set $11 - local.get $10 - i64.load - local.set $12 - local.get $11 - local.get $12 - i64.store - local.get $11 - local.get $10 - i64.load offset=8 - i64.store offset=8 - local.get $12 - call $~lib/util/hash/HASH - local.get $1 - i64.extend_i32_u - i64.and - i32.wrap_i64 - local.set $13 - local.get $3 - local.get $13 - i32.const 4 - i32.mul - i32.add - local.set $14 - local.get $11 - local.get $14 - i32.load - i32.store offset=16 - local.get $14 - local.get $8 - i32.store -======= - local.get $3 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $4 - local.tee $8 - i32.const 1 - i32.add - local.set $4 ->>>>>>> master - local.get $8 - local.get $7 - i32.load offset=8 - call $~lib/array/Array#__set - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end - local.get $3 -<<<<<<< HEAD - local.tee $13 - local.get $11 - i32.load - local.tee $9 - i32.ne - if - local.get $13 - call $~lib/rt/pure/__retain - local.set $13 - local.get $9 - call $~lib/rt/pure/__release - end - local.get $13 - i32.store - local.get $0 - local.get $1 - i64.extend_i32_u - i64.store offset=8 - local.get $0 - local.tee $14 - local.get $5 - local.tee $9 - local.get $14 - i32.load offset=16 - local.tee $11 - i32.ne - if - local.get $9 - call $~lib/rt/pure/__retain - local.set $9 - local.get $11 - call $~lib/rt/pure/__release -======= - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $4 - call $~lib/array/Array#set:length - local.get $3 - local.set $9 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $9 - ) - (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i64) (result i32) - (local $3 i64) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - block $~lib/util/hash/HASH|inlined.4 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.4 ->>>>>>> master - end - local.get $9 - i32.store offset=16 - local.get $0 -<<<<<<< HEAD -======= - local.set $8 - global.get $~lib/memory/__stack_pointer - local.get $8 - i32.store - local.get $8 - local.get $1 ->>>>>>> master - local.get $4 - i32.store offset=20 - local.get $0 - local.get $0 - i32.load offset=28 - i32.store offset=24 - local.get $3 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - ) - (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i64) (result i32) - (local $3 i64) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $3 - local.get $0 - local.get $1 - local.get $3 - call $~lib/map/Map#find - local.set $4 - local.get $4 - if -<<<<<<< HEAD - i32.const 0 - drop - local.get $4 -======= - local.get $5 ->>>>>>> master - local.get $2 - call $~lib/map/MapEntry#set:value - i32.const 0 - drop - else - local.get $0 - i32.load offset=24 - local.get $0 - i32.load offset=20 - i32.eq - if - local.get $0 - local.set $8 - global.get $~lib/memory/__stack_pointer - local.get $8 - i32.store - local.get $8 - local.get $0 - i32.load offset=28 - local.get $0 - i32.load offset=20 - i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s - if (result i64) - local.get $0 - i64.load offset=8 - else - local.get $0 - i64.load offset=8 - i64.const 1 - i64.shl - i64.const 1 - i64.or - end - i32.wrap_i64 - call $~lib/map/Map#rehash - end - global.get $~lib/memory/__stack_pointer - local.get $0 -<<<<<<< HEAD - i32.load offset=16 - call $~lib/rt/pure/__retain - local.set $5 - local.get $5 -======= - i32.load offset=8 - local.tee $6 - i32.store offset=4 - local.get $6 ->>>>>>> master - local.get $0 - local.get $0 - i32.load offset=24 - local.tee $6 - i32.const 1 - i32.add -<<<<<<< HEAD - i32.store offset=24 - local.get $6 -======= - call $~lib/map/Map#set:entriesOffset - local.get $7 ->>>>>>> master - i32.const 24 - i32.mul - i32.add - local.set $4 - local.get $4 - local.get $1 -<<<<<<< HEAD - i64.store - local.get $4 -======= - call $~lib/map/MapEntry#set:key - i32.const 0 - drop - local.get $5 ->>>>>>> master - local.get $2 - call $~lib/map/MapEntry#set:value - i32.const 0 - drop - local.get $0 - local.get $0 - i32.load offset=28 - i32.const 1 - i32.add -<<<<<<< HEAD - i32.store offset=28 -======= - call $~lib/map/Map#set:entriesCount ->>>>>>> master - local.get $0 - i32.load - local.get $3 - local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - local.set $6 - local.get $4 - local.get $6 - i32.load -<<<<<<< HEAD - i32.store offset=16 - local.get $6 - local.get $4 - i32.store - local.get $5 - call $~lib/rt/pure/__release - end - local.get $0 - call $~lib/rt/pure/__retain - ) - (func $~lib/map/Map#get:size (param $0 i32) (result i32) - local.get $0 - i32.load offset=28 -======= - call $~lib/map/MapEntry#set:taggedNext - local.get $7 - local.get $5 - i32.store - end - local.get $0 - local.set $8 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $8 ->>>>>>> master - ) - (func $~lib/map/Map#delete (param $0 i32) (param $1 i64) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) -<<<<<<< HEAD -======= - (local $6 i32) - (local $7 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store ->>>>>>> master - local.get $0 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store - local.get $7 - local.get $1 - local.get $1 - call $~lib/util/hash/HASH - call $~lib/map/Map#find - local.set $2 - local.get $2 - i32.eqz - if - i32.const 0 - local.set $7 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $7 - return - end -<<<<<<< HEAD - i32.const 0 - drop - i32.const 0 - drop - local.get $2 - local.get $2 -======= - local.get $3 - local.get $3 ->>>>>>> master - i32.load offset=12 - i32.const 1 - i32.or - call $~lib/map/MapEntry#set:taggedNext - local.get $0 - local.get $0 - i32.load offset=28 - i32.const 1 - i32.sub -<<<<<<< HEAD - i32.store offset=28 -======= - call $~lib/map/Map#set:entriesCount ->>>>>>> master - local.get $0 - i64.load offset=8 - i64.const 1 - i64.shr_u - i32.wrap_i64 - local.set $3 - local.get $3 - i32.const 1 - i32.add - i32.const 4 - local.tee $4 - local.get $0 - i32.load offset=28 - local.tee $5 - local.get $4 - local.get $5 - i32.gt_u - select - i32.ge_u - if (result i32) - local.get $0 - i32.load offset=28 - local.get $0 - i32.load offset=20 - i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s - else - i32.const 0 - end - if - local.get $0 -<<<<<<< HEAD - local.get $3 - call $~lib/map/Map#rehash - end - i32.const 1 - ) - (func $~lib/map/Map#clear (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - local.tee $1 - i32.const 0 - i32.const 4 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $2 - local.get $1 - i32.load - call $~lib/rt/pure/__release - local.get $2 - i32.store - local.get $0 - i64.const 4 - i64.const 1 - i64.sub - i64.store offset=8 - local.get $0 - local.tee $2 - i32.const 0 - i32.const 4 - i32.const 16 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 - local.get $2 - i32.load offset=16 - call $~lib/rt/pure/__release - local.get $1 - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $0 - i32.const 0 - i32.store offset=28 - ) - (func $std/map/testNumeric - (local $0 i32) - (local $1 i64) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - i32.const 0 - call $~lib/map/Map#constructor - local.set $0 - i64.const 0 - local.set $1 - loop $for-loop|0 - local.get $1 - i64.const 100 - i64.lt_s - local.set $2 - local.get $2 - if - local.get $0 - local.get $1 - call $~lib/map/Map#has - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 336 - i32.const 6 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 10 - local.get $1 - i32.wrap_i64 - i32.add - call $~lib/map/Map#set - call $~lib/rt/pure/__release - local.get $0 - local.get $1 - call $~lib/map/Map#has - i32.eqz - if - i32.const 0 - i32.const 336 - i32.const 8 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - call $~lib/map/Map#get - i32.const 10 - local.get $1 - i32.wrap_i64 - i32.add - i32.eq - i32.eqz - if - i32.const 0 - i32.const 336 - i32.const 9 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i64.const 1 - i64.add - local.set $1 - br $for-loop|0 - end - end - local.get $0 - call $~lib/map/Map#get:size - i32.const 100 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 336 - i32.const 11 - i32.const 3 - call $~lib/builtins/abort - unreachable -======= - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store - local.get $7 - local.get $4 - call $~lib/map/Map#rehash ->>>>>>> master - end - i32.const 1 - local.set $7 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $7 - ) - (func $std/map/testNumeric - (local $0 i32) - (local $1 i64) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - global.get $~lib/memory/__stack_pointer - i32.const 24 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=16 - global.get $~lib/memory/__stack_pointer - i32.const 0 - call $~lib/map/Map#constructor - local.tee $0 - i32.store - i64.const 0 - local.set $1 - loop $for-loop|0 - local.get $1 - i64.const 100 - i64.lt_s - local.set $2 - local.get $2 - if - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/map/Map#has - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 6 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - i32.const 10 - local.get $1 - i32.wrap_i64 - i32.add - call $~lib/map/Map#set - drop - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/map/Map#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 8 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/map/Map#get - i32.const 10 - local.get $1 - i32.wrap_i64 - i32.add - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 9 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i64.const 1 - i64.add - local.set $1 - br $for-loop|0 - end - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/map/Map#get:size - i32.const 100 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 11 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i64.const 0 - local.set $1 - loop $for-loop|1 - local.get $1 - i64.const 100 - i64.lt_s - local.set $2 - local.get $2 - if - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/map/Map#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 15 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/map/Map#get - i32.const 10 - local.get $1 - i32.wrap_i64 - i32.add - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 16 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - i32.const 20 - local.get $1 - i32.wrap_i64 - i32.add - call $~lib/map/Map#set - drop - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/map/Map#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 18 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/map/Map#get - i32.const 20 - local.get $1 - i32.wrap_i64 - i32.add - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 19 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i64.const 1 - i64.add - local.set $1 - br $for-loop|1 - end - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/map/Map#get:size - i32.const 100 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 21 - i32.const 3 - call $~lib/builtins/abort - unreachable - end -<<<<<<< HEAD - local.get $2 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/map/Map#constructor (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 32 - i32.const 23 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.set $0 - end - local.get $0 - i32.const 0 - i32.const 4 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store - local.get $0 - i64.const 4 - i64.const 1 - i64.sub - i64.store offset=8 - local.get $0 - i32.const 0 - i32.const 4 - i32.const 16 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $0 - i32.const 0 - i32.store offset=28 - local.get $0 - ) - (func $~lib/util/hash/HASH (param $0 i64) (result i64) - (local $1 i64) - (local $2 i64) - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 4 - i32.le_u - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $0 - local.set $1 - i64.const 0 - i64.const 2870177450012600261 - i64.add - i64.const 8 - i64.add - local.set $2 - local.get $2 - local.get $1 - i64.const -4417276706812531889 - i64.mul - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - local.set $2 - local.get $2 - i64.const 27 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.set $2 - local.get $2 - local.get $2 - i64.const 33 - i64.shr_u - i64.xor - local.set $2 - local.get $2 - i64.const -4417276706812531889 - i64.mul - local.set $2 - local.get $2 - local.get $2 - i64.const 29 - i64.shr_u - i64.xor - local.set $2 - local.get $2 - i64.const 1609587929392839161 - i64.mul - local.set $2 - local.get $2 - local.get $2 - i64.const 32 - i64.shr_u - i64.xor - local.set $2 - local.get $2 - return - ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i64) (param $2 i64) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.get $2 - local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - i32.load - local.set $3 - loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 - if - local.get $3 - i32.load offset=12 - local.set $5 - local.get $5 - i32.const 1 - i32.and - i32.eqz - if (result i32) - local.get $3 - i64.load - local.get $1 - i64.eq - else - i32.const 0 - end - if - local.get $3 - return - end - local.get $5 - i32.const 1 - i32.const -1 - i32.xor - i32.and - local.set $3 - br $while-continue|0 - end - end - i32.const 0 - ) - (func $~lib/map/Map#has (param $0 i32) (param $1 i64) (result i32) - local.get $0 - local.get $1 - local.get $1 - call $~lib/util/hash/HASH - call $~lib/map/Map#find - i32.const 0 - i32.ne - ) - (func $~lib/map/Map#rehash (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 $10 i32) - (local $11 i32) - (local $12 i64) - (local $13 i32) - (local $14 i32) - local.get $1 - i32.const 1 - i32.add - local.set $2 - i32.const 0 - local.get $2 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $3 - local.get $2 - i32.const 8 - i32.mul - i32.const 3 - i32.div_s - local.set $4 - i32.const 0 - local.get $4 - i32.const 16 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $0 - i32.load offset=16 - local.set $6 - local.get $6 - local.get $0 - i32.load offset=24 - i32.const 16 - i32.mul - i32.add - local.set $7 - local.get $5 - local.set $8 - loop $while-continue|0 -======= - global.get $~lib/memory/__stack_pointer - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/map/Map#keys - local.tee $2 - i32.store offset=8 - global.get $~lib/memory/__stack_pointer - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/map/Map#values - local.tee $3 - i32.store offset=12 - global.get $~lib/memory/__stack_pointer - i32.const 0 - call $~lib/map/Map#constructor - local.tee $4 - i32.store offset=16 - global.get $~lib/memory/__stack_pointer - i32.const 0 - call $~lib/map/Map#constructor - local.tee $5 - i32.store offset=20 - i32.const 0 - local.set $6 - loop $for-loop|2 ->>>>>>> master - local.get $6 - local.get $2 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/array/Array#get:length - i32.lt_s - local.set $7 - local.get $7 - if - local.get $2 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $6 - call $~lib/array/Array#__get - local.set $1 - local.get $3 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $6 - call $~lib/array/Array#__get - local.set $8 - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/map/Map#has - i32.eqz - if -<<<<<<< HEAD - local.get $8 - local.set $11 - local.get $10 - i64.load - local.set $12 - local.get $11 - local.get $12 - i64.store - local.get $11 - local.get $10 - i32.load offset=8 - i32.store offset=8 - local.get $12 - call $~lib/util/hash/HASH - local.get $1 - i64.extend_i32_u - i64.and - i32.wrap_i64 - local.set $13 - local.get $3 - local.get $13 - i32.const 4 - i32.mul - i32.add - local.set $14 - local.get $11 - local.get $14 - i32.load - i32.store offset=12 - local.get $14 - local.get $8 - i32.store - local.get $8 - i32.const 16 - i32.add - local.set $8 -======= - i32.const 0 - i32.const 544 - i32.const 31 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $8 - i32.const 20 - i32.sub - i64.extend_i32_s - call $~lib/map/Map#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 32 - i32.const 5 - call $~lib/builtins/abort - unreachable ->>>>>>> master - end - local.get $4 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - local.get $1 - call $~lib/map/Map#set - drop - local.get $5 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $8 - i32.const 20 - i32.sub - local.get $8 - i32.const 20 - i32.sub - call $~lib/map/Map#set - drop - local.get $6 - i32.const 1 - i32.add - local.set $6 - br $for-loop|2 - end - end -<<<<<<< HEAD - local.get $0 - local.tee $11 - local.get $3 - local.tee $13 - local.get $11 - i32.load - local.tee $9 - i32.ne - if - local.get $13 - call $~lib/rt/pure/__retain - local.set $13 - local.get $9 - call $~lib/rt/pure/__release - end - local.get $13 - i32.store - local.get $0 - local.get $1 - i64.extend_i32_u - i64.store offset=8 - local.get $0 - local.tee $14 - local.get $5 - local.tee $9 - local.get $14 - i32.load offset=16 - local.tee $11 - i32.ne - if - local.get $9 - call $~lib/rt/pure/__retain - local.set $9 - local.get $11 - call $~lib/rt/pure/__release - end - local.get $9 - i32.store offset=16 - local.get $0 - local.get $4 - i32.store offset=20 - local.get $0 - local.get $0 - i32.load offset=28 - i32.store offset=24 - local.get $3 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - ) - (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i32) (result i32) - (local $3 i64) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $3 - local.get $0 - local.get $1 - local.get $3 - call $~lib/map/Map#find - local.set $4 - local.get $4 - if - i32.const 0 - drop - local.get $4 - local.get $2 - i32.store offset=8 - else - local.get $0 - i32.load offset=24 - local.get $0 - i32.load offset=20 - i32.eq -======= - local.get $4 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/map/Map#get:size - i32.const 100 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 36 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $5 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/map/Map#get:size - i32.const 100 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 37 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i64.const 0 - local.set $1 + local.set $5 loop $for-loop|3 - local.get $1 - i64.const 50 - i64.lt_s + local.get $5 + i32.const 50 + i32.lt_u local.set $6 local.get $6 if @@ -26405,8 +18976,8 @@ local.get $9 i32.store offset=4 local.get $9 - local.get $1 - call $~lib/map/Map#has + local.get $5 + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -26422,11 +18993,10 @@ local.get $9 i32.store offset=4 local.get $9 - local.get $1 - call $~lib/map/Map#get + local.get $5 + call $~lib/map/Map#get i32.const 20 - local.get $1 - i32.wrap_i64 + local.get $5 i32.add i32.eq i32.eqz @@ -26444,8 +19014,8 @@ local.get $9 i32.store offset=4 local.get $9 - local.get $1 - call $~lib/map/Map#delete + local.get $5 + call $~lib/map/Map#delete drop local.get $0 local.set $9 @@ -26453,8 +19023,8 @@ local.get $9 i32.store offset=4 local.get $9 - local.get $1 - call $~lib/map/Map#has + local.get $5 + call $~lib/map/Map#has i32.eqz i32.eqz if @@ -26465,10 +19035,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 - i64.const 1 - i64.add - local.set $1 + local.get $5 + i32.const 1 + i32.add + local.set $5 br $for-loop|3 end end @@ -26478,7 +19048,7 @@ local.get $9 i32.store offset=4 local.get $9 - call $~lib/map/Map#get:size + call $~lib/map/Map#get:size i32.const 50 i32.eq i32.eqz @@ -26490,119 +19060,44 @@ call $~lib/builtins/abort unreachable end - i64.const 0 - local.set $1 - loop $for-loop|4 - local.get $1 - i64.const 50 - i64.lt_s - local.set $6 - local.get $6 ->>>>>>> master - if - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/map/Map#has - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 50 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 -<<<<<<< HEAD - i32.load offset=28 - local.get $0 - i32.load offset=20 - i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s - if (result i64) - local.get $0 - i64.load offset=8 - else - local.get $0 - i64.load offset=8 - i64.const 1 - i64.shl - i64.const 1 - i64.or - end - i32.wrap_i64 - call $~lib/map/Map#rehash - end - local.get $0 - i32.load offset=16 - call $~lib/rt/pure/__retain - local.set $5 - local.get $5 - local.get $0 - local.get $0 - i32.load offset=24 - local.tee $6 - i32.const 1 - i32.add - i32.store offset=24 - local.get $6 - i32.const 16 - i32.mul - i32.add - local.set $4 - local.get $4 - local.get $1 - i64.store - local.get $4 - local.get $2 - i32.store offset=8 - local.get $0 - local.get $0 - i32.load offset=28 - i32.const 1 - i32.add - i32.store offset=28 - local.get $0 - i32.load - local.get $3 - local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add + i32.const 0 + local.set $5 + loop $for-loop|4 + local.get $5 + i32.const 50 + i32.lt_u local.set $6 - local.get $4 - local.get $6 - i32.load - i32.store offset=12 local.get $6 - local.get $4 - i32.store - local.get $5 - call $~lib/rt/pure/__release -======= + if + local.get $0 local.set $9 global.get $~lib/memory/__stack_pointer local.get $9 i32.store offset=4 local.get $9 - local.get $1 + local.get $5 + call $~lib/map/Map#has + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 50 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $5 i32.const 10 - local.get $1 - i32.wrap_i64 + local.get $5 i32.add - call $~lib/map/Map#set + call $~lib/map/Map#set drop local.get $0 local.set $9 @@ -26610,8 +19105,8 @@ local.get $9 i32.store offset=4 local.get $9 - local.get $1 - call $~lib/map/Map#has + local.get $5 + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -26627,8 +19122,8 @@ local.get $9 i32.store offset=4 local.get $9 - local.get $1 - call $~lib/map/Map#delete + local.get $5 + call $~lib/map/Map#delete drop local.get $0 local.set $9 @@ -26636,8 +19131,8 @@ local.get $9 i32.store offset=4 local.get $9 - local.get $1 - call $~lib/map/Map#has + local.get $5 + call $~lib/map/Map#has i32.eqz i32.eqz if @@ -26648,13 +19143,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 - i64.const 1 - i64.add - local.set $1 + local.get $5 + i32.const 1 + i32.add + local.set $5 br $for-loop|4 end ->>>>>>> master end local.get $0 local.set $9 @@ -26662,7 +19156,7 @@ local.get $9 i32.store offset=4 local.get $9 - call $~lib/map/Map#get:size + call $~lib/map/Map#get:size i32.const 50 i32.eq i32.eqz @@ -26680,14 +19174,14 @@ local.get $9 i32.store offset=4 local.get $9 - call $~lib/map/Map#clear + call $~lib/map/Map#clear local.get $0 local.set $9 global.get $~lib/memory/__stack_pointer local.get $9 i32.store offset=4 local.get $9 - call $~lib/map/Map#get:size + call $~lib/map/Map#get:size i32.const 0 i32.eq i32.eqz @@ -26704,13 +19198,8 @@ i32.add global.set $~lib/memory/__stack_pointer ) -<<<<<<< HEAD - (func $~lib/map/Map#get (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#has (param $0 i32) (param $1 i64) (result i32) (local $2 i32) -======= - (func $~lib/map/Map#has (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) - (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -26719,83 +19208,31 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store ->>>>>>> master local.get $0 - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $2 i32.store - local.get $3 + local.get $2 local.get $1 -<<<<<<< HEAD local.get $1 - call $~lib/util/hash/HASH - call $~lib/map/Map#find - local.set $2 - local.get $2 - i32.eqz - if - i32.const 384 - i32.const 448 - i32.const 105 - i32.const 17 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.load offset=8 - ) - (func $~lib/map/Map#get:size (param $0 i32) (result i32) - local.get $0 - i32.load offset=28 -======= - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.0 - end - call $~lib/map/Map#find + call $~lib/util/hash/HASH + call $~lib/map/Map#find i32.const 0 i32.ne - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 ->>>>>>> master + local.get $2 ) - (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i64) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -26804,329 +19241,165 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 - local.set $8 + local.set $7 global.get $~lib/memory/__stack_pointer - local.get $8 + local.get $7 i32.store - local.get $8 - local.get $1 -<<<<<<< HEAD - local.get $2 - call $~lib/array/Array#__uset - ) - (func $~lib/array/Array#set:length (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=12 - local.set $2 - i32.const 0 - drop - local.get $0 - local.get $1 - i32.const 3 - call $~lib/array/ensureSize - local.get $0 + local.get $7 local.get $1 - i32.store offset=12 - ) - (func $~lib/map/Map#keys (param $0 i32) (result i32) - (local $1 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.load offset=16 - local.set $1 - local.get $0 - i32.load offset=24 - local.set $2 - i32.const 0 - local.get $2 - call $~lib/array/Array#constructor - local.set $3 - i32.const 0 + local.get $3 + call $~lib/map/Map#find local.set $4 - i32.const 0 -======= local.get $4 - call $~lib/map/Map#find ->>>>>>> master - local.set $5 - local.get $5 if - local.get $5 + local.get $4 local.get $2 - call $~lib/map/MapEntry#set:value + call $~lib/map/MapEntry#set:value i32.const 0 drop else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 - local.set $8 + local.set $7 global.get $~lib/memory/__stack_pointer - local.get $8 + local.get $7 i32.store - local.get $8 + local.get $7 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end - call $~lib/map/Map#rehash + i32.wrap_i64 + call $~lib/map/Map#rehash end global.get $~lib/memory/__stack_pointer local.get $0 - i32.load offset=8 - local.tee $6 + i32.load offset=16 + local.tee $5 i32.store offset=4 - local.get $6 + local.get $5 local.get $0 local.get $0 - i32.load offset=16 - local.tee $7 + i32.load offset=24 + local.tee $6 i32.const 1 i32.add - call $~lib/map/Map#set:entriesOffset - local.get $7 + call $~lib/map/Map#set:entriesOffset + local.get $6 i32.const 16 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 - call $~lib/map/MapEntry#set:key + call $~lib/map/MapEntry#set:key i32.const 0 drop - local.get $5 + local.get $4 local.get $2 - call $~lib/map/MapEntry#set:value + call $~lib/map/MapEntry#set:value i32.const 0 drop local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - call $~lib/map/Map#set:entriesCount + call $~lib/map/Map#set:entriesCount local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add - local.set $7 - local.get $5 - local.get $7 + local.set $6 + local.get $4 + local.get $6 i32.load - call $~lib/map/MapEntry#set:taggedNext - local.get $7 - local.get $5 + call $~lib/map/MapEntry#set:taggedNext + local.get $6 + local.get $4 i32.store end local.get $0 - local.set $8 + local.set $7 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $8 + local.get $7 ) - (func $~lib/map/Map#get (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) + (func $~lib/map/Map#get (param $0 i32) (param $1 i64) (result i32) + (local $2 i32) (local $3 i32) - (local $4 i32) -<<<<<<< HEAD - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $0 - i32.load offset=16 - local.set $1 - local.get $0 - i32.load offset=24 - local.set $2 - i32.const 0 - local.get $2 - call $~lib/array/Array#constructor - local.set $3 -======= global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer ->>>>>>> master i32.const 0 i32.store local.get $0 - local.set $4 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $4 + local.get $3 i32.store - local.get $4 - local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.3 - end - call $~lib/map/Map#find - local.set $3 local.get $3 + local.get $1 + local.get $1 + call $~lib/util/hash/HASH + call $~lib/map/Map#find + local.set $2 + local.get $2 i32.eqz if -<<<<<<< HEAD - i32.const 32 - i32.const 25 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.set $0 -======= i32.const 592 i32.const 656 i32.const 105 i32.const 17 call $~lib/builtins/abort unreachable ->>>>>>> master end - local.get $3 + local.get $2 i32.load offset=8 - local.set $4 + local.set $3 global.get $~lib/memory/__stack_pointer i32.const 4 -<<<<<<< HEAD - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store - local.get $0 - i64.const 4 - i64.const 1 - i64.sub - i64.store offset=8 - local.get $0 - i32.const 0 - i32.const 4 - i32.const 24 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $0 - i32.const 0 - i32.store offset=28 - local.get $0 - ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 - i32.load offset=12 - ) - (func $~lib/array/Array#__uget (param $0 i32) (param $1 i32) (result i64) - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 3 - i32.shl - i32.add - i64.load - ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i64) - (local $2 i64) -======= i32.add global.set $~lib/memory/__stack_pointer - local.get $4 + local.get $3 ) - (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i64) (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 4 @@ -27136,7 +19409,6 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store ->>>>>>> master local.get $1 local.get $0 i32.load offset=12 @@ -27163,7 +19435,7 @@ local.get $1 i32.const 1 i32.add - call $~lib/array/Array#set:length_ + call $~lib/array/Array#set:length_ end local.get $0 local.set $3 @@ -27173,19 +19445,15 @@ local.get $3 local.get $1 local.get $2 - call $~lib/array/Array#__uset + call $~lib/array/Array#__uset global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer ) -<<<<<<< HEAD - (func $~lib/map/Map#find (param $0 i32) (param $1 i64) (param $2 i64) (result i32) -======= - (func $~lib/map/Map#keys (param $0 i32) (result i32) + (func $~lib/map/Map#keys (param $0 i32) (result i32) (local $1 i32) (local $2 i32) ->>>>>>> master (local $3 i32) (local $4 i32) (local $5 i32) @@ -27202,29 +19470,15 @@ i64.const 0 i64.store local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $1 local.get $0 -<<<<<<< HEAD - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - i32.load - local.set $3 - loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 -======= - i32.load offset=16 + i32.load offset=24 local.set $2 global.get $~lib/memory/__stack_pointer i32.const 0 local.get $2 - call $~lib/array/Array#constructor + call $~lib/array/Array#constructor local.tee $3 i32.store i32.const 0 @@ -27237,7 +19491,6 @@ i32.lt_s local.set $6 local.get $6 ->>>>>>> master if local.get $1 local.get $5 @@ -27265,7 +19518,7 @@ local.get $8 local.get $7 i64.load - call $~lib/array/Array#__set + call $~lib/array/Array#__set end local.get $5 i32.const 1 @@ -27281,7 +19534,7 @@ i32.store offset=4 local.get $9 local.get $4 - call $~lib/array/Array#set:length + call $~lib/array/Array#set:length local.get $3 local.set $9 global.get $~lib/memory/__stack_pointer @@ -27290,7 +19543,7 @@ global.set $~lib/memory/__stack_pointer local.get $9 ) - (func $~lib/map/Map#values (param $0 i32) (result i32) + (func $~lib/map/Map#values (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -27300,16 +19553,6 @@ (local $7 i32) (local $8 i32) (local $9 i32) -<<<<<<< HEAD - (local $10 i32) - (local $11 i32) - (local $12 i64) - (local $13 i32) - (local $14 i32) - local.get $1 - i32.const 1 - i32.add -======= global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -27319,91 +19562,40 @@ i64.const 0 i64.store local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $1 local.get $0 - i32.load offset=16 ->>>>>>> master + i32.load offset=24 local.set $2 global.get $~lib/memory/__stack_pointer i32.const 0 local.get $2 call $~lib/array/Array#constructor - local.tee $3 - i32.store - i32.const 0 - local.set $4 - i32.const 0 - local.set $5 -<<<<<<< HEAD - local.get $0 - i32.load offset=16 - local.set $6 - local.get $6 - local.get $0 - i32.load offset=24 - i32.const 24 - i32.mul - i32.add - local.set $7 - local.get $5 - local.set $8 - loop $while-continue|0 -======= - loop $for-loop|0 - local.get $5 - local.get $2 - i32.lt_s - local.set $6 ->>>>>>> master - local.get $6 - if - local.get $1 - local.get $5 - i32.const 16 - i32.mul - i32.add - local.set $7 - local.get $7 - i32.load offset=12 - i32.const 1 - i32.and - i32.eqz - if -<<<<<<< HEAD - local.get $8 - local.set $11 - local.get $10 - i64.load - local.set $12 - local.get $11 - local.get $12 - i64.store - local.get $11 - local.get $10 - i64.load offset=8 - i64.store offset=8 - local.get $12 - call $~lib/util/hash/HASH - local.get $1 - i64.extend_i32_u - i64.and - i32.wrap_i64 - local.set $13 - local.get $3 - local.get $13 - i32.const 4 - i32.mul - i32.add - local.set $14 - local.get $11 - local.get $14 - i32.load - i32.store offset=16 - local.get $14 - local.get $8 - i32.store -======= + local.tee $3 + i32.store + i32.const 0 + local.set $4 + i32.const 0 + local.set $5 + loop $for-loop|0 + local.get $5 + local.get $2 + i32.lt_s + local.set $6 + local.get $6 + if + local.get $1 + local.get $5 + i32.const 16 + i32.mul + i32.add + local.set $7 + local.get $7 + i32.load offset=12 + i32.const 1 + i32.and + i32.eqz + if local.get $3 local.set $9 global.get $~lib/memory/__stack_pointer @@ -27415,7 +19607,6 @@ i32.const 1 i32.add local.set $4 ->>>>>>> master local.get $8 local.get $7 i32.load offset=8 @@ -27429,40 +19620,6 @@ end end local.get $3 -<<<<<<< HEAD - local.tee $13 - local.get $11 - i32.load - local.tee $9 - i32.ne - if - local.get $13 - call $~lib/rt/pure/__retain - local.set $13 - local.get $9 - call $~lib/rt/pure/__release - end - local.get $13 - i32.store - local.get $0 - local.get $1 - i64.extend_i32_u - i64.store offset=8 - local.get $0 - local.tee $14 - local.get $5 - local.tee $9 - local.get $14 - i32.load offset=16 - local.tee $11 - i32.ne - if - local.get $9 - call $~lib/rt/pure/__retain - local.set $9 - local.get $11 - call $~lib/rt/pure/__release -======= local.set $9 global.get $~lib/memory/__stack_pointer local.get $9 @@ -27478,13 +19635,12 @@ global.set $~lib/memory/__stack_pointer local.get $9 ) - (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i64) (result i32) + (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i64) (result i32) (local $3 i64) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -27493,83 +19649,24 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $~lib/util/hash/HASH|inlined.4 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.4 ->>>>>>> master - end - local.get $9 - i32.store offset=16 - local.get $0 -<<<<<<< HEAD -======= - local.set $8 - global.get $~lib/memory/__stack_pointer - local.get $8 - i32.store - local.get $8 - local.get $1 ->>>>>>> master - local.get $4 - i32.store offset=20 - local.get $0 - local.get $0 - i32.load offset=28 - i32.store offset=24 - local.get $3 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - ) - (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i64) (result i32) - (local $3 i64) - (local $4 i32) - (local $5 i32) - (local $6 i32) local.get $1 - call $~lib/util/hash/HASH + call $~lib/util/hash/HASH local.set $3 local.get $0 + local.set $7 + global.get $~lib/memory/__stack_pointer + local.get $7 + i32.store + local.get $7 local.get $1 local.get $3 - call $~lib/map/Map#find + call $~lib/map/Map#find local.set $4 local.get $4 if -<<<<<<< HEAD - i32.const 0 - drop local.get $4 -======= - local.get $5 ->>>>>>> master local.get $2 - call $~lib/map/MapEntry#set:value + call $~lib/map/MapEntry#set:value i32.const 0 drop else @@ -27580,11 +19677,11 @@ i32.eq if local.get $0 - local.set $8 + local.set $7 global.get $~lib/memory/__stack_pointer - local.get $8 + local.get $7 i32.store - local.get $8 + local.get $7 local.get $0 i32.load offset=28 local.get $0 @@ -27606,51 +19703,34 @@ i64.or end i32.wrap_i64 - call $~lib/map/Map#rehash + call $~lib/map/Map#rehash end global.get $~lib/memory/__stack_pointer local.get $0 -<<<<<<< HEAD i32.load offset=16 - call $~lib/rt/pure/__retain - local.set $5 - local.get $5 -======= - i32.load offset=8 - local.tee $6 + local.tee $5 i32.store offset=4 - local.get $6 ->>>>>>> master + local.get $5 local.get $0 local.get $0 i32.load offset=24 local.tee $6 i32.const 1 i32.add -<<<<<<< HEAD - i32.store offset=24 + call $~lib/map/Map#set:entriesOffset local.get $6 -======= - call $~lib/map/Map#set:entriesOffset - local.get $7 ->>>>>>> master i32.const 24 i32.mul i32.add local.set $4 local.get $4 local.get $1 -<<<<<<< HEAD - i64.store - local.get $4 -======= - call $~lib/map/MapEntry#set:key + call $~lib/map/MapEntry#set:key i32.const 0 drop - local.get $5 ->>>>>>> master + local.get $4 local.get $2 - call $~lib/map/MapEntry#set:value + call $~lib/map/MapEntry#set:value i32.const 0 drop local.get $0 @@ -27658,11 +19738,7 @@ i32.load offset=28 i32.const 1 i32.add -<<<<<<< HEAD - i32.store offset=28 -======= - call $~lib/map/Map#set:entriesCount ->>>>>>> master + call $~lib/map/Map#set:entriesCount local.get $0 i32.load local.get $3 @@ -27677,44 +19753,25 @@ local.get $4 local.get $6 i32.load -<<<<<<< HEAD - i32.store offset=16 + call $~lib/map/MapEntry#set:taggedNext local.get $6 local.get $4 i32.store - local.get $5 - call $~lib/rt/pure/__release - end - local.get $0 - call $~lib/rt/pure/__retain - ) - (func $~lib/map/Map#get:size (param $0 i32) (result i32) - local.get $0 - i32.load offset=28 -======= - call $~lib/map/MapEntry#set:taggedNext - local.get $7 - local.get $5 - i32.store end local.get $0 - local.set $8 + local.set $7 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $8 ->>>>>>> master + local.get $7 ) - (func $~lib/map/Map#delete (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#delete (param $0 i32) (param $1 i64) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) -<<<<<<< HEAD -======= (local $6 i32) - (local $7 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -27723,55 +19780,41 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store ->>>>>>> master local.get $0 - local.set $7 + local.set $6 global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $6 i32.store - local.get $7 + local.get $6 local.get $1 local.get $1 - call $~lib/util/hash/HASH - call $~lib/map/Map#find + call $~lib/util/hash/HASH + call $~lib/map/Map#find local.set $2 local.get $2 i32.eqz if i32.const 0 - local.set $7 + local.set $6 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $7 + local.get $6 return end -<<<<<<< HEAD - i32.const 0 - drop - i32.const 0 - drop local.get $2 local.get $2 -======= - local.get $3 - local.get $3 ->>>>>>> master i32.load offset=12 i32.const 1 i32.or - call $~lib/map/MapEntry#set:taggedNext + call $~lib/map/MapEntry#set:taggedNext local.get $0 local.get $0 i32.load offset=28 i32.const 1 i32.sub -<<<<<<< HEAD - i32.store offset=28 -======= - call $~lib/map/Map#set:entriesCount ->>>>>>> master + call $~lib/map/Map#set:entriesCount local.get $0 i64.load offset=8 i64.const 1 @@ -27806,74 +19849,23 @@ end if local.get $0 -<<<<<<< HEAD - local.get $3 - call $~lib/map/Map#rehash - end - i32.const 1 - ) - (func $~lib/map/Map#clear (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - local.tee $1 - i32.const 0 - i32.const 4 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $2 - local.get $1 - i32.load - call $~lib/rt/pure/__release - local.get $2 - i32.store - local.get $0 - i64.const 4 - i64.const 1 - i64.sub - i64.store offset=8 - local.get $0 - local.tee $2 - i32.const 0 - i32.const 4 - i32.const 16 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 - local.get $2 - i32.load offset=16 - call $~lib/rt/pure/__release - local.get $1 - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $0 - i32.const 0 - i32.store offset=28 -======= - local.set $7 + local.set $6 global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $6 i32.store - local.get $7 - local.get $4 - call $~lib/map/Map#rehash + local.get $6 + local.get $3 + call $~lib/map/Map#rehash end i32.const 1 - local.set $7 + local.set $6 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $7 ->>>>>>> master + local.get $6 ) - (func $std/map/testNumeric + (func $std/map/testNumeric (local $0 i32) (local $1 i64) (local $2 i32) @@ -27900,7 +19892,7 @@ i64.store offset=16 global.get $~lib/memory/__stack_pointer i32.const 0 - call $~lib/map/Map#constructor + call $~lib/map/Map#constructor local.tee $0 i32.store i64.const 0 @@ -27908,7 +19900,7 @@ loop $for-loop|0 local.get $1 i64.const 100 - i64.lt_u + i64.lt_s local.set $2 local.get $2 if @@ -27919,7 +19911,7 @@ i32.store offset=4 local.get $9 local.get $1 - call $~lib/map/Map#has + call $~lib/map/Map#has i32.eqz i32.eqz if @@ -27941,7 +19933,7 @@ local.get $1 i32.wrap_i64 i32.add - call $~lib/map/Map#set + call $~lib/map/Map#set drop local.get $0 local.set $9 @@ -27950,7 +19942,7 @@ i32.store offset=4 local.get $9 local.get $1 - call $~lib/map/Map#has + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -27967,7 +19959,7 @@ i32.store offset=4 local.get $9 local.get $1 - call $~lib/map/Map#get + call $~lib/map/Map#get i32.const 10 local.get $1 i32.wrap_i64 @@ -27995,7 +19987,7 @@ local.get $9 i32.store offset=4 local.get $9 - call $~lib/map/Map#get:size + call $~lib/map/Map#get:size i32.const 100 i32.eq i32.eqz @@ -28012,7 +20004,7 @@ loop $for-loop|1 local.get $1 i64.const 100 - i64.lt_u + i64.lt_s local.set $2 local.get $2 if @@ -28023,7 +20015,7 @@ i32.store offset=4 local.get $9 local.get $1 - call $~lib/map/Map#has + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -28040,7 +20032,7 @@ i32.store offset=4 local.get $9 local.get $1 - call $~lib/map/Map#get + call $~lib/map/Map#get i32.const 10 local.get $1 i32.wrap_i64 @@ -28066,7 +20058,7 @@ local.get $1 i32.wrap_i64 i32.add - call $~lib/map/Map#set + call $~lib/map/Map#set drop local.get $0 local.set $9 @@ -28075,7 +20067,7 @@ i32.store offset=4 local.get $9 local.get $1 - call $~lib/map/Map#has + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -28092,7 +20084,7 @@ i32.store offset=4 local.get $9 local.get $1 - call $~lib/map/Map#get + call $~lib/map/Map#get i32.const 20 local.get $1 i32.wrap_i64 @@ -28120,7 +20112,7 @@ local.get $9 i32.store offset=4 local.get $9 - call $~lib/map/Map#get:size + call $~lib/map/Map#get:size i32.const 100 i32.eq i32.eqz @@ -28139,7 +20131,7 @@ local.get $9 i32.store offset=4 local.get $9 - call $~lib/map/Map#keys + call $~lib/map/Map#keys local.tee $2 i32.store offset=8 global.get $~lib/memory/__stack_pointer @@ -28149,12 +20141,12 @@ local.get $9 i32.store offset=4 local.get $9 - call $~lib/map/Map#values + call $~lib/map/Map#values local.tee $3 i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 0 - call $~lib/map/Map#constructor + call $~lib/map/Map#constructor local.tee $4 i32.store offset=16 global.get $~lib/memory/__stack_pointer @@ -28172,7 +20164,7 @@ local.get $9 i32.store offset=4 local.get $9 - call $~lib/array/Array#get:length + call $~lib/array/Array#get:length i32.lt_s local.set $7 local.get $7 @@ -28184,7 +20176,7 @@ i32.store offset=4 local.get $9 local.get $6 - call $~lib/array/Array#__get + call $~lib/array/Array#__get local.set $1 local.get $3 local.set $9 @@ -28202,7 +20194,7 @@ i32.store offset=4 local.get $9 local.get $1 - call $~lib/map/Map#has + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -28222,7 +20214,7 @@ i32.const 20 i32.sub i64.extend_i32_s - call $~lib/map/Map#has + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -28240,7 +20232,7 @@ local.get $9 local.get $1 local.get $1 - call $~lib/map/Map#set + call $~lib/map/Map#set drop local.get $5 local.set $9 @@ -28248,333 +20240,870 @@ local.get $9 i32.store offset=4 local.get $9 - local.get $8 - i32.const 20 - i32.sub - local.get $8 - i32.const 20 - i32.sub - call $~lib/map/Map#set - drop - local.get $6 - i32.const 1 - i32.add - local.set $6 - br $for-loop|2 + local.get $8 + i32.const 20 + i32.sub + local.get $8 + i32.const 20 + i32.sub + call $~lib/map/Map#set + drop + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $for-loop|2 + end + end + local.get $4 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/map/Map#get:size + i32.const 100 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 36 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $5 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/map/Map#get:size + i32.const 100 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 37 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i64.const 0 + local.set $1 + loop $for-loop|3 + local.get $1 + i64.const 50 + i64.lt_s + local.set $6 + local.get $6 + if + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 41 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#get + i32.const 20 + local.get $1 + i32.wrap_i64 + i32.add + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 42 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#delete + drop + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#has + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 44 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i64.const 1 + i64.add + local.set $1 + br $for-loop|3 + end + end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/map/Map#get:size + i32.const 50 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 46 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i64.const 0 + local.set $1 + loop $for-loop|4 + local.get $1 + i64.const 50 + i64.lt_s + local.set $6 + local.get $6 + if + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#has + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 50 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + i32.const 10 + local.get $1 + i32.wrap_i64 + i32.add + call $~lib/map/Map#set + drop + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 52 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#delete + drop + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#has + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 54 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i64.const 1 + i64.add + local.set $1 + br $for-loop|4 end end - local.get $4 + local.get $0 local.set $9 global.get $~lib/memory/__stack_pointer local.get $9 i32.store offset=4 local.get $9 - call $~lib/map/Map#get:size - i32.const 100 + call $~lib/map/Map#get:size + i32.const 50 i32.eq i32.eqz if i32.const 0 i32.const 544 - i32.const 36 + i32.const 56 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/map/Map#clear + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/map/Map#get:size + i32.const 0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 60 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $5 - local.set $9 global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/map/Map#get:size - i32.const 100 - i32.eq - i32.eqz + i32.const 24 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $~lib/map/Map#has (param $0 i32) (param $1 i64) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $0 + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store + local.get $2 + local.get $1 + local.get $1 + call $~lib/util/hash/HASH + call $~lib/map/Map#find + i32.const 0 + i32.ne + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (local $3 i64) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + local.get $1 + call $~lib/util/hash/HASH + local.set $3 + local.get $0 + local.set $7 + global.get $~lib/memory/__stack_pointer + local.get $7 + i32.store + local.get $7 + local.get $1 + local.get $3 + call $~lib/map/Map#find + local.set $4 + local.get $4 + if + local.get $4 + local.get $2 + call $~lib/map/MapEntry#set:value + i32.const 0 + drop + else + local.get $0 + i32.load offset=24 + local.get $0 + i32.load offset=20 + i32.eq + if + local.get $0 + local.set $7 + global.get $~lib/memory/__stack_pointer + local.get $7 + i32.store + local.get $7 + local.get $0 + i32.load offset=28 + local.get $0 + i32.load offset=20 + i32.const 3 + i32.mul + i32.const 4 + i32.div_s + i32.lt_s + if (result i64) + local.get $0 + i64.load offset=8 + else + local.get $0 + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or + end + i32.wrap_i64 + call $~lib/map/Map#rehash + end + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.load offset=16 + local.tee $5 + i32.store offset=4 + local.get $5 + local.get $0 + local.get $0 + i32.load offset=24 + local.tee $6 + i32.const 1 + i32.add + call $~lib/map/Map#set:entriesOffset + local.get $6 + i32.const 16 + i32.mul + i32.add + local.set $4 + local.get $4 + local.get $1 + call $~lib/map/MapEntry#set:key + i32.const 0 + drop + local.get $4 + local.get $2 + call $~lib/map/MapEntry#set:value + i32.const 0 + drop + local.get $0 + local.get $0 + i32.load offset=28 + i32.const 1 + i32.add + call $~lib/map/Map#set:entriesCount + local.get $0 + i32.load + local.get $3 + local.get $0 + i64.load offset=8 + i64.and + i32.wrap_i64 + i32.const 4 + i32.mul + i32.add + local.set $6 + local.get $4 + local.get $6 + i32.load + call $~lib/map/MapEntry#set:taggedNext + local.get $6 + local.get $4 + i32.store + end + local.get $0 + local.set $7 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $7 + ) + (func $~lib/map/Map#get (param $0 i32) (param $1 i64) (result i32) + (local $2 i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $0 + local.set $3 + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.store + local.get $3 + local.get $1 + local.get $1 + call $~lib/util/hash/HASH + call $~lib/map/Map#find + local.set $2 + local.get $2 + i32.eqz + if + i32.const 592 + i32.const 656 + i32.const 105 + i32.const 17 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.load offset=8 + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i64) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u if + local.get $1 i32.const 0 - i32.const 544 - i32.const 37 + i32.lt_s + if + i32.const 224 + i32.const 704 + i32.const 108 + i32.const 22 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add i32.const 3 - call $~lib/builtins/abort - unreachable + call $~lib/array/ensureSize + local.get $0 + local.get $1 + i32.const 1 + i32.add + call $~lib/array/Array#set:length_ end + local.get $0 + local.set $3 + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.store + local.get $3 + local.get $1 + local.get $2 + call $~lib/array/Array#__uset + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $~lib/map/Map#keys (param $0 i32) (result i32) + (local $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) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer i64.const 0 + i64.store + local.get $0 + i32.load offset=16 local.set $1 - loop $for-loop|3 - local.get $1 - i64.const 50 - i64.lt_u + local.get $0 + i32.load offset=24 + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 0 + local.get $2 + call $~lib/array/Array#constructor + local.tee $3 + i32.store + i32.const 0 + local.set $4 + i32.const 0 + local.set $5 + loop $for-loop|0 + local.get $5 + local.get $2 + i32.lt_s local.set $6 local.get $6 if - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/map/Map#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 41 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/map/Map#get - i32.const 20 local.get $1 - i32.wrap_i64 + local.get $5 + i32.const 16 + i32.mul i32.add - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 42 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/map/Map#delete - drop - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/map/Map#has - i32.eqz + local.set $7 + local.get $7 + i32.load offset=12 + i32.const 1 + i32.and i32.eqz if - i32.const 0 - i32.const 544 - i32.const 44 - i32.const 5 - call $~lib/builtins/abort - unreachable + local.get $3 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $4 + local.tee $8 + i32.const 1 + i32.add + local.set $4 + local.get $8 + local.get $7 + i64.load + call $~lib/array/Array#__set end - local.get $1 - i64.const 1 - i64.add - local.set $1 - br $for-loop|3 + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|0 end end - local.get $0 + local.get $3 local.set $9 global.get $~lib/memory/__stack_pointer local.get $9 i32.store offset=4 local.get $9 - call $~lib/map/Map#get:size - i32.const 50 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 46 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + local.get $4 + call $~lib/array/Array#set:length + local.get $3 + local.set $9 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $9 + ) + (func $~lib/map/Map#values (param $0 i32) (result i32) + (local $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) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer i64.const 0 - local.set $1 - loop $for-loop|4 - local.get $1 - i64.const 50 - i64.lt_u + i64.store + local.get $0 + i32.load offset=16 + local.set $1 + local.get $0 + i32.load offset=24 + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 0 + local.get $2 + call $~lib/array/Array#constructor + local.tee $3 + i32.store + i32.const 0 + local.set $4 + i32.const 0 + local.set $5 + loop $for-loop|0 + local.get $5 + local.get $2 + i32.lt_s local.set $6 local.get $6 if - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/map/Map#has - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 50 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - i32.const 10 local.get $1 - i32.wrap_i64 + local.get $5 + i32.const 16 + i32.mul i32.add - call $~lib/map/Map#set - drop - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/map/Map#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 52 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/map/Map#delete - drop - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/map/Map#has - i32.eqz + local.set $7 + local.get $7 + i32.load offset=12 + i32.const 1 + i32.and i32.eqz if - i32.const 0 - i32.const 544 - i32.const 54 - i32.const 5 - call $~lib/builtins/abort - unreachable + local.get $3 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $4 + local.tee $8 + i32.const 1 + i32.add + local.set $4 + local.get $8 + local.get $7 + i32.load offset=8 + call $~lib/array/Array#__set end - local.get $1 - i64.const 1 - i64.add - local.set $1 - br $for-loop|4 + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|0 end end - local.get $0 + local.get $3 local.set $9 global.get $~lib/memory/__stack_pointer local.get $9 i32.store offset=4 local.get $9 - call $~lib/map/Map#get:size - i32.const 50 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 56 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 + local.get $4 + call $~lib/array/Array#set:length + local.get $3 local.set $9 global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/map/Map#clear + ) + (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i64) (result i32) + (local $3 i64) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 - local.set $9 + local.set $7 global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/map/Map#get:size - i32.const 0 - i32.eq - i32.eqz + local.get $7 + i32.store + local.get $7 + local.get $1 + local.get $3 + call $~lib/map/Map#find + local.set $4 + local.get $4 if + local.get $4 + local.get $2 + call $~lib/map/MapEntry#set:value i32.const 0 - i32.const 544 - i32.const 60 - i32.const 3 - call $~lib/builtins/abort - unreachable + drop + else + local.get $0 + i32.load offset=24 + local.get $0 + i32.load offset=20 + i32.eq + if + local.get $0 + local.set $7 + global.get $~lib/memory/__stack_pointer + local.get $7 + i32.store + local.get $7 + local.get $0 + i32.load offset=28 + local.get $0 + i32.load offset=20 + i32.const 3 + i32.mul + i32.const 4 + i32.div_s + i32.lt_s + if (result i64) + local.get $0 + i64.load offset=8 + else + local.get $0 + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or + end + i32.wrap_i64 + call $~lib/map/Map#rehash + end + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.load offset=16 + local.tee $5 + i32.store offset=4 + local.get $5 + local.get $0 + local.get $0 + i32.load offset=24 + local.tee $6 + i32.const 1 + i32.add + call $~lib/map/Map#set:entriesOffset + local.get $6 + i32.const 24 + i32.mul + i32.add + local.set $4 + local.get $4 + local.get $1 + call $~lib/map/MapEntry#set:key + i32.const 0 + drop + local.get $4 + local.get $2 + call $~lib/map/MapEntry#set:value + i32.const 0 + drop + local.get $0 + local.get $0 + i32.load offset=28 + i32.const 1 + i32.add + call $~lib/map/Map#set:entriesCount + local.get $0 + i32.load + local.get $3 + local.get $0 + i64.load offset=8 + i64.and + i32.wrap_i64 + i32.const 4 + i32.mul + i32.add + local.set $6 + local.get $4 + local.get $6 + i32.load + call $~lib/map/MapEntry#set:taggedNext + local.get $6 + local.get $4 + i32.store end + local.get $0 + local.set $7 global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer + local.get $7 ) -<<<<<<< HEAD - (func $~lib/map/Map#constructor (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 32 - i32.const 26 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.set $0 - end - local.get $0 - i32.const 0 - i32.const 4 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store - local.get $0 - i64.const 4 - i64.const 1 - i64.sub - i64.store offset=8 - local.get $0 - i32.const 0 - i32.const 4 - i32.const 12 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 -======= - (func $~lib/map/Map#has (param $0 i32) (param $1 f32) (result i32) - (local $2 f32) + (func $~lib/map/Map#delete (param $0 i32) (param $1 i64) (result i32) + (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -28583,709 +21112,791 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store ->>>>>>> master local.get $0 - local.set $3 + local.set $6 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $6 i32.store - local.get $3 + local.get $6 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop + local.get $1 + call $~lib/util/hash/HASH + call $~lib/map/Map#find + local.set $2 + local.get $2 + i32.eqz + if i32.const 0 - drop - i32.const 1 - drop - i32.const 4 + local.set $6 + global.get $~lib/memory/__stack_pointer i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $6 + return end - call $~lib/map/Map#find - i32.const 0 -<<<<<<< HEAD - i32.store offset=24 + local.get $2 + local.get $2 + i32.load offset=12 + i32.const 1 + i32.or + call $~lib/map/MapEntry#set:taggedNext local.get $0 - i32.const 0 - i32.store offset=28 local.get $0 - ) - (func $~lib/util/hash/HASH (param $0 f32) (result i64) - (local $1 i32) - (local $2 i64) - (local $3 i64) - i32.const 0 - drop - i32.const 0 - drop + i32.load offset=28 i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop + i32.sub + call $~lib/map/Map#set:entriesCount local.get $0 - i32.reinterpret_f32 - local.set $1 - i64.const 4 - local.set $2 - i64.const 0 - i64.const 2870177450012600261 - i64.add - local.get $2 - i64.add - local.set $3 - local.get $3 - local.get $1 - i64.extend_i32_u - i64.const -7046029288634856825 - i64.mul - i64.xor - local.set $3 - local.get $3 - i64.const 23 - i64.rotl - i64.const -4417276706812531889 - i64.mul - i64.const 1609587929392839161 - i64.add - local.set $3 - local.get $3 - local.get $3 - i64.const 33 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const -4417276706812531889 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 29 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const 1609587929392839161 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 32 + i64.load offset=8 + i64.const 1 i64.shr_u - i64.xor + i32.wrap_i64 local.set $3 local.get $3 - return - ) - (func $~lib/map/Map#find (param $0 i32) (param $1 f32) (param $2 i64) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.get $2 + i32.const 1 + i32.add + i32.const 4 + local.tee $4 local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 -======= - i32.ne - local.set $3 + i32.load offset=28 + local.tee $5 + local.get $4 + local.get $5 + i32.gt_u + select + i32.ge_u + if (result i32) + local.get $0 + i32.load offset=28 + local.get $0 + i32.load offset=20 + i32.const 3 + i32.mul + i32.const 4 + i32.div_s + i32.lt_s + else + i32.const 0 + end + if + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store + local.get $6 + local.get $3 + call $~lib/map/Map#rehash + end + i32.const 1 + local.set $6 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $6 ) - (func $~lib/map/Map#set (param $0 i32) (param $1 f32) (param $2 i32) (result i32) - (local $3 f32) + (func $std/map/testNumeric + (local $0 i32) + (local $1 i64) + (local $2 i32) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) + (local $9 i32) global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 24 i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $3 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $4 - local.get $0 - local.set $8 + global.set $~lib/memory/__stack_pointer + call $~stack_check global.get $~lib/memory/__stack_pointer - local.get $8 + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=8 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=16 + global.get $~lib/memory/__stack_pointer + i32.const 0 + call $~lib/map/Map#constructor + local.tee $0 i32.store - local.get $8 - local.get $1 - local.get $4 - call $~lib/map/Map#find - local.set $5 - local.get $5 - if - local.get $5 + i64.const 0 + local.set $1 + loop $for-loop|0 + local.get $1 + i64.const 100 + i64.lt_u + local.set $2 local.get $2 - call $~lib/map/MapEntry#set:value - i32.const 0 - drop - else - local.get $0 - i32.load offset=16 - local.get $0 - i32.load offset=12 - i32.eq if local.get $0 - local.set $8 + local.set $9 global.get $~lib/memory/__stack_pointer - local.get $8 - i32.store - local.get $8 + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#has + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 6 + i32.const 5 + call $~lib/builtins/abort + unreachable + end local.get $0 - i32.load offset=20 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + i32.const 10 + local.get $1 + i32.wrap_i64 + i32.add + call $~lib/map/Map#set + drop local.get $0 - i32.load offset=12 - i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s - if (result i32) - local.get $0 - i32.load offset=4 - else - local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 8 + i32.const 5 + call $~lib/builtins/abort + unreachable end - call $~lib/map/Map#rehash + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#get + i32.const 10 + local.get $1 + i32.wrap_i64 + i32.add + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 9 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i64.const 1 + i64.add + local.set $1 + br $for-loop|0 end - global.get $~lib/memory/__stack_pointer - local.get $0 - i32.load offset=8 - local.tee $6 - i32.store offset=4 - local.get $6 - local.get $0 - local.get $0 - i32.load offset=16 - local.tee $7 - i32.const 1 - i32.add - call $~lib/map/Map#set:entriesOffset - local.get $7 - i32.const 12 - i32.mul - i32.add - local.set $5 - local.get $5 - local.get $1 - call $~lib/map/MapEntry#set:key + end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/map/Map#get:size + i32.const 100 + i32.eq + i32.eqz + if i32.const 0 - drop - local.get $5 + i32.const 544 + i32.const 11 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i64.const 0 + local.set $1 + loop $for-loop|1 + local.get $1 + i64.const 100 + i64.lt_u + local.set $2 local.get $2 - call $~lib/map/MapEntry#set:value + if + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 15 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#get + i32.const 10 + local.get $1 + i32.wrap_i64 + i32.add + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 16 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + i32.const 20 + local.get $1 + i32.wrap_i64 + i32.add + call $~lib/map/Map#set + drop + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 18 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#get + i32.const 20 + local.get $1 + i32.wrap_i64 + i32.add + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 19 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i64.const 1 + i64.add + local.set $1 + br $for-loop|1 + end + end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/map/Map#get:size + i32.const 100 + i32.eq + i32.eqz + if i32.const 0 - drop - local.get $0 - local.get $0 - i32.load offset=20 - i32.const 1 - i32.add - call $~lib/map/Map#set:entriesCount - local.get $0 - i32.load - local.get $4 - local.get $0 - i32.load offset=4 - i32.and - i32.const 4 - i32.mul - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.load - call $~lib/map/MapEntry#set:taggedNext - local.get $7 - local.get $5 - i32.store + i32.const 544 + i32.const 21 + i32.const 3 + call $~lib/builtins/abort + unreachable end + global.get $~lib/memory/__stack_pointer local.get $0 - local.set $8 + local.set $9 global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $8 - ) - (func $~lib/map/Map#get (param $0 i32) (param $1 f32) (result i32) - (local $2 f32) - (local $3 i32) - (local $4 i32) + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/map/Map#keys + local.tee $2 + i32.store offset=8 global.get $~lib/memory/__stack_pointer ->>>>>>> master - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/map/Map#values + local.tee $3 + i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 0 -<<<<<<< HEAD - ) - (func $~lib/map/Map#has (param $0 i32) (param $1 f32) (result i32) -======= - i32.store ->>>>>>> master - local.get $0 - local.set $4 + call $~lib/map/Map#constructor + local.tee $4 + i32.store offset=16 global.get $~lib/memory/__stack_pointer - local.get $4 - i32.store - local.get $4 - local.get $1 -<<<<<<< HEAD - local.get $1 - call $~lib/util/hash/HASH -======= - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop + i32.const 0 + call $~lib/map/Map#constructor + local.tee $5 + i32.store offset=20 + i32.const 0 + local.set $6 + loop $for-loop|2 + local.get $6 local.get $2 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/array/Array#get:length + i32.lt_s + local.set $7 + local.get $7 + if + local.get $2 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $6 + call $~lib/array/Array#__get + local.set $1 + local.get $3 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $6 + call $~lib/array/Array#__get + local.set $8 + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 31 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $8 + i32.const 20 + i32.sub + i64.extend_i32_s + call $~lib/map/Map#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 32 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $4 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + local.get $1 + call $~lib/map/Map#set + drop + local.get $5 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $8 + i32.const 20 + i32.sub + local.get $8 + i32.const 20 + i32.sub + call $~lib/map/Map#set + drop + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $for-loop|2 + end end ->>>>>>> master - call $~lib/map/Map#find - local.set $3 - local.get $3 + local.get $4 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/map/Map#get:size + i32.const 100 + i32.eq i32.eqz if - i32.const 592 - i32.const 656 - i32.const 105 - i32.const 17 + i32.const 0 + i32.const 544 + i32.const 36 + i32.const 3 call $~lib/builtins/abort unreachable end - local.get $3 - i32.load offset=4 - local.set $4 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $4 - ) - (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 f32) - (local $3 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check + local.get $5 + local.set $9 global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/map/Map#get:size + i32.const 100 + i32.eq + i32.eqz if - local.get $1 i32.const 0 - i32.lt_s + i32.const 544 + i32.const 37 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i64.const 0 + local.set $1 + loop $for-loop|3 + local.get $1 + i64.const 50 + i64.lt_u + local.set $6 + local.get $6 if - i32.const 224 - i32.const 704 - i32.const 108 - i32.const 22 - call $~lib/builtins/abort - unreachable + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 41 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#get + i32.const 20 + local.get $1 + i32.wrap_i64 + i32.add + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 42 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#delete + drop + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#has + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 44 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i64.const 1 + i64.add + local.set $1 + br $for-loop|3 end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.const 2 - call $~lib/array/ensureSize - local.get $0 - local.get $1 - i32.const 1 - i32.add - call $~lib/array/Array#set:length_ end local.get $0 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - local.get $1 - local.get $2 - call $~lib/array/Array#__uset - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $~lib/map/Map#keys (param $0 i32) (result i32) - (local $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) -<<<<<<< HEAD - (local $10 i32) - (local $11 i32) - (local $12 f32) - (local $13 i32) - (local $14 i32) - local.get $1 - i32.const 1 - i32.add -======= - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check + local.set $9 global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/map/Map#get:size + i32.const 50 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 46 + i32.const 3 + call $~lib/builtins/abort + unreachable + end i64.const 0 - i64.store - local.get $0 - i32.load offset=8 local.set $1 - local.get $0 - i32.load offset=16 ->>>>>>> master - local.set $2 - global.get $~lib/memory/__stack_pointer - i32.const 0 - local.get $2 - call $~lib/array/Array#constructor - local.tee $3 - i32.store - i32.const 0 - local.set $4 - i32.const 0 - local.set $5 - loop $for-loop|0 - local.get $5 - local.get $2 - i32.lt_s + loop $for-loop|4 + local.get $1 + i64.const 50 + i64.lt_u local.set $6 local.get $6 if + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 local.get $1 - local.get $5 - i32.const 12 - i32.mul + call $~lib/map/Map#has + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 50 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + i32.const 10 + local.get $1 + i32.wrap_i64 i32.add - local.set $7 - local.get $7 - i32.load offset=8 - i32.const 1 - i32.and + call $~lib/map/Map#set + drop + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 52 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#delete + drop + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#has + i32.eqz i32.eqz if - local.get $3 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $4 - local.tee $8 - i32.const 1 - i32.add - local.set $4 - local.get $8 - local.get $7 - f32.load - call $~lib/array/Array#__set + i32.const 0 + i32.const 544 + i32.const 54 + i32.const 5 + call $~lib/builtins/abort + unreachable end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 + local.get $1 + i64.const 1 + i64.add + local.set $1 + br $for-loop|4 end end - local.get $3 + local.get $0 local.set $9 global.get $~lib/memory/__stack_pointer local.get $9 i32.store offset=4 local.get $9 - local.get $4 - call $~lib/array/Array#set:length - local.get $3 + call $~lib/map/Map#get:size + i32.const 50 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 56 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 local.set $9 global.get $~lib/memory/__stack_pointer - i32.const 8 + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/map/Map#clear + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/map/Map#get:size + i32.const 0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 60 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + i32.const 24 i32.add global.set $~lib/memory/__stack_pointer - local.get $9 ) - (func $~lib/map/Map#values (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/map/Map#has (param $0 i32) (param $1 f32) (result 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) global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - local.get $0 -<<<<<<< HEAD - i32.load offset=16 - local.set $6 - local.get $6 - local.get $0 - i32.load offset=24 - i32.const 12 - i32.mul - i32.add - local.set $7 - local.get $5 - local.set $8 - loop $while-continue|0 - local.get $6 - local.get $7 - i32.ne - local.set $9 - local.get $9 -======= - i32.load offset=8 - local.set $1 + i32.const 0 + i32.store local.get $0 - i32.load offset=16 local.set $2 global.get $~lib/memory/__stack_pointer - i32.const 0 local.get $2 - call $~lib/array/Array#constructor - local.tee $3 - i32.store - i32.const 0 - local.set $4 - i32.const 0 - local.set $5 - loop $for-loop|0 - local.get $5 - local.get $2 - i32.lt_s - local.set $6 - local.get $6 ->>>>>>> master - if - local.get $1 - local.get $5 - i32.const 12 - i32.mul - i32.add - local.set $7 - local.get $7 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if -<<<<<<< HEAD - local.get $8 - local.set $11 - local.get $10 - f32.load - local.set $12 - local.get $11 - local.get $12 - f32.store - local.get $11 - local.get $10 - i32.load offset=4 - i32.store offset=4 - local.get $12 - call $~lib/util/hash/HASH - local.get $1 - i64.extend_i32_u - i64.and - i32.wrap_i64 - local.set $13 - local.get $3 - local.get $13 - i32.const 4 - i32.mul - i32.add - local.set $14 - local.get $11 - local.get $14 - i32.load - i32.store offset=8 - local.get $14 - local.get $8 - i32.store -======= - local.get $3 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $4 - local.tee $8 - i32.const 1 - i32.add - local.set $4 ->>>>>>> master - local.get $8 - local.get $7 - i32.load offset=4 - call $~lib/array/Array#__set - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end - local.get $3 -<<<<<<< HEAD - local.tee $13 - local.get $11 - i32.load - local.tee $9 - i32.ne - if - local.get $13 - call $~lib/rt/pure/__retain - local.set $13 - local.get $9 - call $~lib/rt/pure/__release - end - local.get $13 i32.store - local.get $0 + local.get $2 local.get $1 - i64.extend_i32_u - i64.store offset=8 - local.get $0 - local.tee $14 - local.get $5 - local.tee $9 - local.get $14 - i32.load offset=16 - local.tee $11 + local.get $1 + call $~lib/util/hash/HASH + call $~lib/map/Map#find + i32.const 0 i32.ne - if - local.get $9 - call $~lib/rt/pure/__retain - local.set $9 - local.get $11 - call $~lib/rt/pure/__release - end - local.get $9 - i32.store offset=16 - local.get $0 - local.get $4 - i32.store offset=20 - local.get $0 - local.get $0 - i32.load offset=28 - i32.store offset=24 -======= - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $4 - call $~lib/array/Array#set:length ->>>>>>> master - local.get $3 - local.set $9 + local.set $2 global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $9 + local.get $2 ) -<<<<<<< HEAD (func $~lib/map/Map#set (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i64) (local $4 i32) (local $5 i32) (local $6 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $3 -======= - (func $~lib/map/Map#set (param $0 i32) (param $1 f32) (param $2 f32) (result i32) - (local $3 f32) - (local $4 i32) - (local $5 i32) - (local $6 i32) (local $7 i32) - (local $8 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -29294,52 +21905,24 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $~lib/util/hash/HASH|inlined.4 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $3 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.4 - end - local.set $4 ->>>>>>> master + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 - local.set $8 + local.set $7 global.get $~lib/memory/__stack_pointer - local.get $8 + local.get $7 i32.store - local.get $8 + local.get $7 local.get $1 -<<<<<<< HEAD local.get $3 call $~lib/map/Map#find local.set $4 local.get $4 if - i32.const 0 - drop local.get $4 -======= - local.get $4 - call $~lib/map/Map#find - local.set $5 - local.get $5 - if - local.get $5 ->>>>>>> master local.get $2 - call $~lib/map/MapEntry#set:value + call $~lib/map/MapEntry#set:value i32.const 0 drop else @@ -29350,11 +21933,11 @@ i32.eq if local.get $0 - local.set $8 + local.set $7 global.get $~lib/memory/__stack_pointer - local.get $8 + local.get $7 i32.store - local.get $8 + local.get $7 local.get $0 i32.load offset=28 local.get $0 @@ -29375,56 +21958,35 @@ i64.const 1 i64.or end -<<<<<<< HEAD i32.wrap_i64 call $~lib/map/Map#rehash -======= - call $~lib/map/Map#rehash ->>>>>>> master end global.get $~lib/memory/__stack_pointer local.get $0 -<<<<<<< HEAD i32.load offset=16 - call $~lib/rt/pure/__retain - local.set $5 - local.get $5 -======= - i32.load offset=8 - local.tee $6 + local.tee $5 i32.store offset=4 - local.get $6 ->>>>>>> master + local.get $5 local.get $0 local.get $0 i32.load offset=24 local.tee $6 i32.const 1 i32.add -<<<<<<< HEAD - i32.store offset=24 + call $~lib/map/Map#set:entriesOffset local.get $6 -======= - call $~lib/map/Map#set:entriesOffset - local.get $7 ->>>>>>> master i32.const 12 i32.mul i32.add local.set $4 local.get $4 local.get $1 -<<<<<<< HEAD - f32.store - local.get $4 -======= - call $~lib/map/MapEntry#set:key + call $~lib/map/MapEntry#set:key i32.const 0 drop - local.get $5 ->>>>>>> master + local.get $4 local.get $2 - call $~lib/map/MapEntry#set:value + call $~lib/map/MapEntry#set:value i32.const 0 drop local.get $0 @@ -29432,11 +21994,7 @@ i32.load offset=28 i32.const 1 i32.add -<<<<<<< HEAD - i32.store offset=28 -======= - call $~lib/map/Map#set:entriesCount ->>>>>>> master + call $~lib/map/Map#set:entriesCount local.get $0 i32.load local.get $3 @@ -29451,833 +22009,529 @@ local.get $4 local.get $6 i32.load -<<<<<<< HEAD - i32.store offset=8 + call $~lib/map/MapEntry#set:taggedNext local.get $6 local.get $4 i32.store - local.get $5 - call $~lib/rt/pure/__release -======= - call $~lib/map/MapEntry#set:taggedNext - local.get $7 - local.get $5 - i32.store ->>>>>>> master - end - local.get $0 - local.set $8 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $8 - ) -<<<<<<< HEAD - (func $~lib/map/Map#get (param $0 i32) (param $1 f32) (result i32) - (local $2 i32) -======= - (func $~lib/map/Map#delete (param $0 i32) (param $1 f32) (result i32) - (local $2 f32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store ->>>>>>> master - local.get $0 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store - local.get $7 - local.get $1 -<<<<<<< HEAD - local.get $1 - call $~lib/util/hash/HASH -======= - block $~lib/util/hash/HASH|inlined.6 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.6 - end ->>>>>>> master - call $~lib/map/Map#find - local.set $2 - local.get $2 - i32.eqz - if -<<<<<<< HEAD - i32.const 384 - i32.const 448 - i32.const 105 - i32.const 17 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.load offset=4 - ) - (func $~lib/map/Map#get:size (param $0 i32) (result i32) - local.get $0 - i32.load offset=28 - ) - (func $~lib/array/Array#constructor (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.eqz - if - i32.const 16 - i32.const 27 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - 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 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 1073741820 - i32.const 2 - i32.shr_u - i32.gt_u - if - i32.const 224 - i32.const 496 - i32.const 57 - i32.const 60 - call $~lib/builtins/abort - unreachable -======= - i32.const 0 - local.set $7 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $7 - return ->>>>>>> master end - local.get $3 - local.get $3 - i32.load offset=8 - i32.const 1 - i32.or - call $~lib/map/MapEntry#set:taggedNext - local.get $0 - local.get $0 - i32.load offset=20 - i32.const 1 - i32.sub - call $~lib/map/Map#set:entriesCount - local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u - local.set $4 - local.get $4 - i32.const 1 - i32.add - i32.const 4 - local.tee $5 local.get $0 - i32.load offset=20 - local.tee $6 - local.get $5 - local.get $6 - i32.gt_u - select - i32.ge_u - if (result i32) - local.get $0 - i32.load offset=20 - local.get $0 - i32.load offset=12 - i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s - else - i32.const 0 - end - if - local.get $0 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store - local.get $7 - local.get $4 - call $~lib/map/Map#rehash - end - i32.const 1 local.set $7 global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $7 - ) - (func $std/map/testNumeric - (local $0 i32) - (local $1 f32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) -<<<<<<< HEAD - local.get $0 - i32.load offset=16 - local.set $1 - local.get $0 - i32.load offset=24 - local.set $2 - i32.const 0 - local.get $2 - call $~lib/array/Array#constructor - local.set $3 - i32.const 0 - local.set $4 -======= - (local $9 i32) + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $7 + ) + (func $~lib/map/Map#get (param $0 i32) (param $1 f32) (result i32) + (local $2 i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=16 - global.get $~lib/memory/__stack_pointer ->>>>>>> master i32.const 0 - call $~lib/map/Map#constructor - local.tee $0 i32.store - f32.const 0 - local.set $1 - loop $for-loop|0 - local.get $1 - f32.const 100 - f32.lt - local.set $2 - local.get $2 - if - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/map/Map#has - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 6 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - i32.const 10 - local.get $1 - i32.trunc_f32_s - i32.add - call $~lib/map/Map#set - drop - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/map/Map#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 8 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/map/Map#get - i32.const 10 - local.get $1 - i32.trunc_f32_s - i32.add - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 9 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - f32.const 1 - f32.add - local.set $1 - br $for-loop|0 - end - end local.get $0 - local.set $9 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/map/Map#get:size - i32.const 100 - i32.eq + local.get $3 + i32.store + local.get $3 + local.get $1 + local.get $1 + call $~lib/util/hash/HASH + call $~lib/map/Map#find + local.set $2 + local.get $2 i32.eqz if - i32.const 0 - i32.const 544 - i32.const 11 - i32.const 3 + i32.const 592 + i32.const 656 + i32.const 105 + i32.const 17 call $~lib/builtins/abort unreachable end - f32.const 0 - local.set $1 - loop $for-loop|1 - local.get $1 - f32.const 100 - f32.lt - local.set $2 - local.get $2 - if - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/map/Map#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 15 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/map/Map#get - i32.const 10 - local.get $1 - i32.trunc_f32_s - i32.add - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 16 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - i32.const 20 - local.get $1 - i32.trunc_f32_s - i32.add - call $~lib/map/Map#set - drop - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/map/Map#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 18 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/map/Map#get - i32.const 20 - local.get $1 - i32.trunc_f32_s - i32.add - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 19 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - f32.const 1 - f32.add - local.set $1 - br $for-loop|1 + local.get $2 + i32.load offset=4 + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 f32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u + if + local.get $1 + i32.const 0 + i32.lt_s + if + i32.const 224 + i32.const 704 + i32.const 108 + i32.const 22 + call $~lib/builtins/abort + unreachable end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.const 2 + call $~lib/array/ensureSize + local.get $0 + local.get $1 + i32.const 1 + i32.add + call $~lib/array/Array#set:length_ end local.get $0 -<<<<<<< HEAD + local.set $3 + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.store + local.get $3 + local.get $1 + local.get $2 + call $~lib/array/Array#__uset + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $~lib/map/Map#keys (param $0 i32) (result i32) + (local $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) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + local.get $0 i32.load offset=16 local.set $1 local.get $0 i32.load offset=24 local.set $2 -======= - local.set $9 global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/map/Map#get:size - i32.const 100 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 21 - i32.const 3 - call $~lib/builtins/abort - unreachable + i32.const 0 + local.get $2 + call $~lib/array/Array#constructor + local.tee $3 + i32.store + i32.const 0 + local.set $4 + i32.const 0 + local.set $5 + loop $for-loop|0 + local.get $5 + local.get $2 + i32.lt_s + local.set $6 + local.get $6 + if + local.get $1 + local.get $5 + i32.const 12 + i32.mul + i32.add + local.set $7 + local.get $7 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $3 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $4 + local.tee $8 + i32.const 1 + i32.add + local.set $4 + local.get $8 + local.get $7 + f32.load + call $~lib/array/Array#__set + end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|0 + end end - global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $3 local.set $9 global.get $~lib/memory/__stack_pointer local.get $9 i32.store offset=4 local.get $9 - call $~lib/map/Map#keys - local.tee $2 - i32.store offset=8 - global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $4 + call $~lib/array/Array#set:length + local.get $3 local.set $9 global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/map/Map#values - local.tee $3 - i32.store offset=12 + ) + (func $~lib/map/Map#values (param $0 i32) (result i32) + (local $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) global.get $~lib/memory/__stack_pointer ->>>>>>> master - i32.const 0 - call $~lib/map/Map#constructor - local.tee $4 - i32.store offset=16 + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + local.get $0 + i32.load offset=16 + local.set $1 + local.get $0 + i32.load offset=24 + local.set $2 global.get $~lib/memory/__stack_pointer i32.const 0 - call $~lib/map/Map#constructor - local.tee $5 - i32.store offset=20 + local.get $2 + call $~lib/array/Array#constructor + local.tee $3 + i32.store i32.const 0 - local.set $6 - loop $for-loop|2 - local.get $6 + local.set $4 + i32.const 0 + local.set $5 + loop $for-loop|0 + local.get $5 local.get $2 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/array/Array#get:length i32.lt_s - local.set $7 - local.get $7 + local.set $6 + local.get $6 if - local.get $2 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $6 - call $~lib/array/Array#__get - local.set $1 - local.get $3 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $6 - call $~lib/array/Array#__get - local.set $8 - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 local.get $1 - call $~lib/map/Map#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 31 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $8 - i32.const 20 - i32.sub - f32.convert_i32_s - call $~lib/map/Map#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 32 - i32.const 5 - call $~lib/builtins/abort - unreachable + local.get $5 + i32.const 12 + i32.mul + i32.add + local.set $7 + local.get $7 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $3 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $4 + local.tee $8 + i32.const 1 + i32.add + local.set $4 + local.get $8 + local.get $7 + i32.load offset=4 + call $~lib/array/Array#__set end - local.get $4 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - local.get $1 - call $~lib/map/Map#set - drop local.get $5 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $8 - i32.const 20 - i32.sub - local.get $8 - i32.const 20 - i32.sub - call $~lib/map/Map#set - drop - local.get $6 i32.const 1 i32.add - local.set $6 - br $for-loop|2 + local.set $5 + br $for-loop|0 end end - local.get $4 + local.get $3 local.set $9 global.get $~lib/memory/__stack_pointer local.get $9 i32.store offset=4 local.get $9 - call $~lib/map/Map#get:size - i32.const 100 - i32.eq - i32.eqz - if -<<<<<<< HEAD - i32.const 32 - i32.const 28 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.set $0 - end - local.get $0 - i32.const 0 - i32.const 4 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store - local.get $0 - i64.const 4 - i64.const 1 - i64.sub - i64.store offset=8 - local.get $0 - i32.const 0 - i32.const 4 - i32.const 12 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $0 - i32.const 0 - i32.store offset=28 - local.get $0 - ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 - i32.load offset=12 - ) - (func $~lib/array/Array#__uget (param $0 i32) (param $1 i32) (result f32) - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 2 - i32.shl + local.get $4 + call $~lib/array/Array#set:length + local.get $3 + local.set $9 + global.get $~lib/memory/__stack_pointer + i32.const 8 i32.add - f32.load + global.set $~lib/memory/__stack_pointer + local.get $9 ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result f32) - (local $2 f32) + (func $~lib/map/Map#set (param $0 i32) (param $1 f32) (param $2 f32) (result i32) + (local $3 i64) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 - i32.load offset=12 - i32.ge_u -======= + local.set $7 + global.get $~lib/memory/__stack_pointer + local.get $7 + i32.store + local.get $7 + local.get $1 + local.get $3 + call $~lib/map/Map#find + local.set $4 + local.get $4 + if + local.get $4 + local.get $2 + call $~lib/map/MapEntry#set:value i32.const 0 - i32.const 544 - i32.const 36 - i32.const 3 - call $~lib/builtins/abort - unreachable + drop + else + local.get $0 + i32.load offset=24 + local.get $0 + i32.load offset=20 + i32.eq + if + local.get $0 + local.set $7 + global.get $~lib/memory/__stack_pointer + local.get $7 + i32.store + local.get $7 + local.get $0 + i32.load offset=28 + local.get $0 + i32.load offset=20 + i32.const 3 + i32.mul + i32.const 4 + i32.div_s + i32.lt_s + if (result i64) + local.get $0 + i64.load offset=8 + else + local.get $0 + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or + end + i32.wrap_i64 + call $~lib/map/Map#rehash + end + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.load offset=16 + local.tee $5 + i32.store offset=4 + local.get $5 + local.get $0 + local.get $0 + i32.load offset=24 + local.tee $6 + i32.const 1 + i32.add + call $~lib/map/Map#set:entriesOffset + local.get $6 + i32.const 12 + i32.mul + i32.add + local.set $4 + local.get $4 + local.get $1 + call $~lib/map/MapEntry#set:key + i32.const 0 + drop + local.get $4 + local.get $2 + call $~lib/map/MapEntry#set:value + i32.const 0 + drop + local.get $0 + local.get $0 + i32.load offset=28 + i32.const 1 + i32.add + call $~lib/map/Map#set:entriesCount + local.get $0 + i32.load + local.get $3 + local.get $0 + i64.load offset=8 + i64.and + i32.wrap_i64 + i32.const 4 + i32.mul + i32.add + local.set $6 + local.get $4 + local.get $6 + i32.load + call $~lib/map/MapEntry#set:taggedNext + local.get $6 + local.get $4 + i32.store end - local.get $5 - local.set $9 + local.get $0 + local.set $7 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $7 + ) + (func $~lib/map/Map#delete (param $0 i32) (param $1 f32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $0 + local.set $6 global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/map/Map#get:size - i32.const 100 - i32.eq + local.get $6 + i32.store + local.get $6 + local.get $1 + local.get $1 + call $~lib/util/hash/HASH + call $~lib/map/Map#find + local.set $2 + local.get $2 i32.eqz ->>>>>>> master if i32.const 0 - i32.const 544 - i32.const 37 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.set $6 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $6 + return end -<<<<<<< HEAD - local.get $0 - local.get $1 - call $~lib/array/Array#__uget - local.set $2 - i32.const 0 - drop local.get $2 - ) - (func $~lib/map/Map#find (param $0 i32) (param $1 f32) (param $2 i64) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load local.get $2 + i32.load offset=8 + i32.const 1 + i32.or + call $~lib/map/MapEntry#set:taggedNext + local.get $0 + local.get $0 + i32.load offset=28 + i32.const 1 + i32.sub + call $~lib/map/Map#set:entriesCount local.get $0 i64.load offset=8 - i64.and + i64.const 1 + i64.shr_u i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - i32.load local.set $3 - loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 -======= - f32.const 0 - local.set $1 - loop $for-loop|3 - local.get $1 - f32.const 50 - f32.lt + local.get $3 + i32.const 1 + i32.add + i32.const 4 + local.tee $4 + local.get $0 + i32.load offset=28 + local.tee $5 + local.get $4 + local.get $5 + i32.gt_u + select + i32.ge_u + if (result i32) + local.get $0 + i32.load offset=28 + local.get $0 + i32.load offset=20 + i32.const 3 + i32.mul + i32.const 4 + i32.div_s + i32.lt_s + else + i32.const 0 + end + if + local.get $0 local.set $6 + global.get $~lib/memory/__stack_pointer local.get $6 ->>>>>>> master - if - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/map/Map#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 41 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/map/Map#get - i32.const 20 - local.get $1 - i32.trunc_f32_s - i32.add - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 42 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/map/Map#delete - drop - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/map/Map#has - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 44 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - f32.const 1 - f32.add - local.set $1 - br $for-loop|3 - end + i32.store + local.get $6 + local.get $3 + call $~lib/map/Map#rehash end -<<<<<<< HEAD - i32.const 0 + i32.const 1 + local.set $6 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $6 ) - (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) + (func $std/map/testNumeric + (local $0 i32) + (local $1 f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -30286,79 +22540,33 @@ (local $7 i32) (local $8 i32) (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 f32) - (local $13 i32) - (local $14 i32) - local.get $1 - i32.const 1 - i32.add - local.set $2 - i32.const 0 - local.get $2 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $3 - local.get $2 - i32.const 8 - i32.mul - i32.const 3 - i32.div_s - local.set $4 - i32.const 0 - local.get $4 - i32.const 12 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $0 - i32.load offset=16 - local.set $6 - local.get $6 - local.get $0 - i32.load offset=24 - i32.const 12 - i32.mul - i32.add - local.set $7 - local.get $5 - local.set $8 - loop $while-continue|0 - local.get $6 - local.get $7 - i32.ne - local.set $9 - local.get $9 -======= - local.get $0 - local.set $9 global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/map/Map#get:size - i32.const 50 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 46 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + i32.const 24 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=8 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=16 + global.get $~lib/memory/__stack_pointer + i32.const 0 + call $~lib/map/Map#constructor + local.tee $0 + i32.store f32.const 0 local.set $1 - loop $for-loop|4 + loop $for-loop|0 local.get $1 - f32.const 50 + f32.const 100 f32.lt - local.set $6 - local.get $6 ->>>>>>> master + local.set $2 + local.get $2 if local.get $0 local.set $9 @@ -30371,51 +22579,12 @@ i32.eqz i32.eqz if -<<<<<<< HEAD - local.get $8 - local.set $11 - local.get $10 - f32.load - local.set $12 - local.get $11 - local.get $12 - f32.store - local.get $11 - local.get $10 - f32.load offset=4 - f32.store offset=4 - local.get $12 - call $~lib/util/hash/HASH - local.get $1 - i64.extend_i32_u - i64.and - i32.wrap_i64 - local.set $13 - local.get $3 - local.get $13 - i32.const 4 - i32.mul - i32.add - local.set $14 - local.get $11 - local.get $14 - i32.load - i32.store offset=8 - local.get $14 - local.get $8 - i32.store - local.get $8 - i32.const 12 - i32.add - local.set $8 -======= i32.const 0 i32.const 544 - i32.const 50 + i32.const 6 i32.const 5 call $~lib/builtins/abort unreachable ->>>>>>> master end local.get $0 local.set $9 @@ -30438,804 +22607,628 @@ local.get $9 local.get $1 call $~lib/map/Map#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 52 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/map/Map#delete - drop - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/map/Map#has - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 54 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - f32.const 1 - f32.add - local.set $1 - br $for-loop|4 - end - end - local.get $0 -<<<<<<< HEAD - local.tee $11 - local.get $3 - local.tee $13 - local.get $11 - i32.load - local.tee $9 - i32.ne - if - local.get $13 - call $~lib/rt/pure/__retain - local.set $13 - local.get $9 - call $~lib/rt/pure/__release - end - local.get $13 - i32.store - local.get $0 - local.get $1 - i64.extend_i32_u - i64.store offset=8 - local.get $0 - local.tee $14 - local.get $5 - local.tee $9 - local.get $14 - i32.load offset=16 - local.tee $11 - i32.ne -======= - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/map/Map#get:size - i32.const 50 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 56 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/map/Map#clear - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/map/Map#get:size - i32.const 0 - i32.eq - i32.eqz ->>>>>>> master - if - i32.const 0 - i32.const 544 - i32.const 60 - i32.const 3 - call $~lib/builtins/abort - unreachable - end -<<<<<<< HEAD - local.get $9 - i32.store offset=16 - local.get $0 - local.get $4 - i32.store offset=20 - local.get $0 - local.get $0 - i32.load offset=28 - i32.store offset=24 -======= - global.get $~lib/memory/__stack_pointer - i32.const 24 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $~lib/map/Map#has (param $0 i32) (param $1 f64) (result i32) - (local $2 f64) - (local $3 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - local.get $0 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.0 - end - call $~lib/map/Map#find - i32.const 0 - i32.ne - local.set $3 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer ->>>>>>> master - local.get $3 - ) -<<<<<<< HEAD - (func $~lib/map/Map#set (param $0 i32) (param $1 f32) (param $2 f32) (result i32) - (local $3 i64) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $3 -======= - (func $~lib/map/Map#set (param $0 i32) (param $1 f64) (param $2 i32) (result i32) - (local $3 f64) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.1 + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 8 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#get + i32.const 10 + local.get $1 + i32.trunc_f32_s + i32.add + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 9 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + f32.const 1 + f32.add + local.set $1 + br $for-loop|0 + end end - local.set $4 ->>>>>>> master local.get $0 - local.set $8 + local.set $9 global.get $~lib/memory/__stack_pointer - local.get $8 - i32.store - local.get $8 - local.get $1 -<<<<<<< HEAD - local.get $3 - call $~lib/map/Map#find - local.set $4 - local.get $4 + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/map/Map#get:size + i32.const 100 + i32.eq + i32.eqz if i32.const 0 - drop - local.get $4 -======= - local.get $4 - call $~lib/map/Map#find - local.set $5 - local.get $5 - if - local.get $5 ->>>>>>> master + i32.const 544 + i32.const 11 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + f32.const 0 + local.set $1 + loop $for-loop|1 + local.get $1 + f32.const 100 + f32.lt + local.set $2 local.get $2 - call $~lib/map/MapEntry#set:value - i32.const 0 - drop - else - local.get $0 - i32.load offset=24 - local.get $0 - i32.load offset=20 - i32.eq if local.get $0 - local.set $8 + local.set $9 global.get $~lib/memory/__stack_pointer - local.get $8 - i32.store - local.get $8 + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 15 + i32.const 5 + call $~lib/builtins/abort + unreachable + end local.get $0 - i32.load offset=28 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#get + i32.const 10 + local.get $1 + i32.trunc_f32_s + i32.add + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 16 + i32.const 5 + call $~lib/builtins/abort + unreachable + end local.get $0 - i32.load offset=20 - i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s - if (result i64) - local.get $0 - i64.load offset=8 - else - local.get $0 - i64.load offset=8 - i64.const 1 - i64.shl - i64.const 1 - i64.or + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + i32.const 20 + local.get $1 + i32.trunc_f32_s + i32.add + call $~lib/map/Map#set + drop + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 18 + i32.const 5 + call $~lib/builtins/abort + unreachable end -<<<<<<< HEAD - i32.wrap_i64 - call $~lib/map/Map#rehash -======= - call $~lib/map/Map#rehash ->>>>>>> master - end - global.get $~lib/memory/__stack_pointer - local.get $0 -<<<<<<< HEAD - i32.load offset=16 - call $~lib/rt/pure/__retain - local.set $5 - local.get $5 -======= - i32.load offset=8 - local.tee $6 - i32.store offset=4 - local.get $6 ->>>>>>> master - local.get $0 - local.get $0 - i32.load offset=24 - local.tee $6 - i32.const 1 - i32.add -<<<<<<< HEAD - i32.store offset=24 - local.get $6 - i32.const 12 -======= - call $~lib/map/Map#set:entriesOffset - local.get $7 - i32.const 16 ->>>>>>> master - i32.mul - i32.add - local.set $4 - local.get $4 - local.get $1 -<<<<<<< HEAD - f32.store - local.get $4 -======= - call $~lib/map/MapEntry#set:key - i32.const 0 - drop - local.get $5 ->>>>>>> master - local.get $2 - call $~lib/map/MapEntry#set:value - i32.const 0 - drop - local.get $0 - local.get $0 - i32.load offset=28 - i32.const 1 - i32.add -<<<<<<< HEAD - i32.store offset=28 -======= - call $~lib/map/Map#set:entriesCount ->>>>>>> master - local.get $0 - i32.load - local.get $3 - local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - local.set $6 - local.get $4 - local.get $6 - i32.load -<<<<<<< HEAD - i32.store offset=8 - local.get $6 - local.get $4 - i32.store - local.get $5 - call $~lib/rt/pure/__release - end - local.get $0 - call $~lib/rt/pure/__retain - ) - (func $~lib/map/Map#get:size (param $0 i32) (result i32) - local.get $0 - i32.load offset=28 - ) - (func $~lib/map/Map#delete (param $0 i32) (param $1 f32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) -======= - call $~lib/map/MapEntry#set:taggedNext - local.get $7 - local.get $5 - i32.store + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#get + i32.const 20 + local.get $1 + i32.trunc_f32_s + i32.add + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 19 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + f32.const 1 + f32.add + local.set $1 + br $for-loop|1 + end end local.get $0 - local.set $8 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $8 - ) - (func $~lib/map/Map#get (param $0 i32) (param $1 f64) (result i32) - (local $2 f64) - (local $3 i32) - (local $4 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store ->>>>>>> master - local.get $0 - local.set $4 + local.set $9 global.get $~lib/memory/__stack_pointer - local.get $4 - i32.store - local.get $4 - local.get $1 -<<<<<<< HEAD - local.get $1 - call $~lib/util/hash/HASH - call $~lib/map/Map#find - local.set $2 - local.get $2 -======= - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.3 - end - call $~lib/map/Map#find - local.set $3 - local.get $3 ->>>>>>> master + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/map/Map#get:size + i32.const 100 + i32.eq i32.eqz if - i32.const 592 - i32.const 656 - i32.const 105 - i32.const 17 + i32.const 0 + i32.const 544 + i32.const 21 + i32.const 3 call $~lib/builtins/abort unreachable end -<<<<<<< HEAD - i32.const 0 - drop - i32.const 0 - drop - local.get $2 - local.get $2 - i32.load offset=8 - i32.const 1 - i32.or - i32.store offset=8 - local.get $0 + global.get $~lib/memory/__stack_pointer local.get $0 - i32.load offset=28 - i32.const 1 - i32.sub - i32.store offset=28 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/map/Map#keys + local.tee $2 + i32.store offset=8 + global.get $~lib/memory/__stack_pointer local.get $0 - i64.load offset=8 - i64.const 1 - i64.shr_u - i32.wrap_i64 - local.set $3 - local.get $3 - i32.const 1 -======= - local.get $3 - i32.load offset=8 - local.set $4 + local.set $9 global.get $~lib/memory/__stack_pointer - i32.const 4 ->>>>>>> master - i32.add - global.set $~lib/memory/__stack_pointer - local.get $4 - ) - (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 f64) - (local $3 i32) + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/map/Map#values + local.tee $3 + i32.store offset=12 global.get $~lib/memory/__stack_pointer - i32.const 4 -<<<<<<< HEAD + i32.const 0 + call $~lib/map/Map#constructor local.tee $4 - local.get $0 - i32.load offset=28 + i32.store offset=16 + global.get $~lib/memory/__stack_pointer + i32.const 0 + call $~lib/map/Map#constructor local.tee $5 - local.get $4 - local.get $5 - i32.gt_u - select - i32.ge_u - if (result i32) - local.get $0 - i32.load offset=28 - local.get $0 - i32.load offset=20 -======= - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check + i32.store offset=20 + i32.const 0 + local.set $6 + loop $for-loop|2 + local.get $6 + local.get $2 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/array/Array#get:length + i32.lt_s + local.set $7 + local.get $7 + if + local.get $2 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $6 + call $~lib/array/Array#__get + local.set $1 + local.get $3 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $6 + call $~lib/array/Array#__get + local.set $8 + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 31 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $8 + i32.const 20 + i32.sub + f32.convert_i32_s + call $~lib/map/Map#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 32 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $4 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + local.get $1 + call $~lib/map/Map#set + drop + local.get $5 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $8 + i32.const 20 + i32.sub + local.get $8 + i32.const 20 + i32.sub + call $~lib/map/Map#set + drop + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $for-loop|2 + end + end + local.get $4 + local.set $9 global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/map/Map#get:size + i32.const 100 + i32.eq + i32.eqz if - local.get $1 i32.const 0 - i32.lt_s - if - i32.const 224 - i32.const 704 - i32.const 108 - i32.const 22 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add ->>>>>>> master + i32.const 544 + i32.const 36 i32.const 3 - call $~lib/array/ensureSize - local.get $0 -<<<<<<< HEAD - local.get $3 - call $~lib/map/Map#rehash -======= - local.get $1 - i32.const 1 - i32.add - call $~lib/array/Array#set:length_ ->>>>>>> master + call $~lib/builtins/abort + unreachable end - local.get $0 - local.set $3 + local.get $5 + local.set $9 global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store -<<<<<<< HEAD - local.get $0 - i64.const 4 - i64.const 1 - i64.sub - i64.store offset=8 - local.get $0 - local.tee $2 - i32.const 0 - i32.const 4 - i32.const 12 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/map/Map#get:size + i32.const 100 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 37 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + f32.const 0 local.set $1 - local.get $2 - i32.load offset=16 - call $~lib/rt/pure/__release - local.get $1 - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 + loop $for-loop|3 + local.get $1 + f32.const 50 + f32.lt + local.set $6 + local.get $6 + if + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 41 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#get + i32.const 20 + local.get $1 + i32.trunc_f32_s + i32.add + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 42 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#delete + drop + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#has + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 44 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + f32.const 1 + f32.add + local.set $1 + br $for-loop|3 + end + end local.get $0 - i32.const 0 - i32.store offset=28 -======= - local.get $3 - local.get $1 - local.get $2 - call $~lib/array/Array#__uset - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer ->>>>>>> master - ) - (func $~lib/map/Map#keys (param $0 i32) (result i32) - (local $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) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check + local.set $9 global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - local.get $0 - i32.load offset=8 + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/map/Map#get:size + i32.const 50 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 46 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + f32.const 0 local.set $1 - local.get $0 - i32.load offset=16 - local.set $2 - global.get $~lib/memory/__stack_pointer - i32.const 0 - local.get $2 - call $~lib/array/Array#constructor - local.tee $3 - i32.store - i32.const 0 - local.set $4 - i32.const 0 - local.set $5 - loop $for-loop|0 - local.get $5 - local.get $2 - i32.lt_s + loop $for-loop|4 + local.get $1 + f32.const 50 + f32.lt local.set $6 local.get $6 if + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#has + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 50 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 local.get $1 - local.get $5 - i32.const 16 - i32.mul + i32.const 10 + local.get $1 + i32.trunc_f32_s i32.add - local.set $7 - local.get $7 - i32.load offset=12 - i32.const 1 - i32.and + call $~lib/map/Map#set + drop + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#has i32.eqz if - local.get $3 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $4 - local.tee $8 - i32.const 1 - i32.add - local.set $4 - local.get $8 - local.get $7 - f64.load - call $~lib/array/Array#__set + i32.const 0 + i32.const 544 + i32.const 52 + i32.const 5 + call $~lib/builtins/abort + unreachable end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#delete + drop + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#has + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 54 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + f32.const 1 + f32.add + local.set $1 + br $for-loop|4 end end - local.get $3 + local.get $0 local.set $9 global.get $~lib/memory/__stack_pointer local.get $9 i32.store offset=4 local.get $9 - local.get $4 - call $~lib/array/Array#set:length - local.get $3 + call $~lib/map/Map#get:size + i32.const 50 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 56 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 local.set $9 global.get $~lib/memory/__stack_pointer - i32.const 8 + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/map/Map#clear + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/map/Map#get:size + i32.const 0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 60 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + i32.const 24 i32.add global.set $~lib/memory/__stack_pointer - local.get $9 ) - (func $~lib/map/Map#values (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/map/Map#has (param $0 i32) (param $1 f64) (result 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) global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - local.get $0 - i32.load offset=8 - local.set $1 + i32.const 0 + i32.store local.get $0 - i32.load offset=16 local.set $2 global.get $~lib/memory/__stack_pointer - i32.const 0 local.get $2 - call $~lib/array/Array#constructor - local.tee $3 i32.store + local.get $2 + local.get $1 + local.get $1 + call $~lib/util/hash/HASH + call $~lib/map/Map#find i32.const 0 - local.set $4 - i32.const 0 - local.set $5 - loop $for-loop|0 - local.get $5 - local.get $2 - i32.lt_s - local.set $6 - local.get $6 - if - local.get $1 - local.get $5 - i32.const 16 - i32.mul - i32.add - local.set $7 - local.get $7 - i32.load offset=12 - i32.const 1 - i32.and - i32.eqz - if - local.get $3 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $4 - local.tee $8 - i32.const 1 - i32.add - local.set $4 - local.get $8 - local.get $7 - i32.load offset=8 - call $~lib/array/Array#__set - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end - local.get $3 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $4 - call $~lib/array/Array#set:length - local.get $3 - local.set $9 + i32.ne + local.set $2 global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $9 + local.get $2 ) - (func $~lib/map/Map#set (param $0 i32) (param $1 f64) (param $2 f64) (result i32) - (local $3 f64) + (func $~lib/map/Map#set (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (local $3 i64) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -31244,148 +23237,126 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $~lib/util/hash/HASH|inlined.4 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.4 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 - local.set $8 + local.set $7 global.get $~lib/memory/__stack_pointer - local.get $8 + local.get $7 i32.store - local.get $8 + local.get $7 local.get $1 + local.get $3 + call $~lib/map/Map#find + local.set $4 local.get $4 - call $~lib/map/Map#find - local.set $5 - local.get $5 if - local.get $5 + local.get $4 local.get $2 - call $~lib/map/MapEntry#set:value + call $~lib/map/MapEntry#set:value i32.const 0 drop else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 - local.set $8 + local.set $7 global.get $~lib/memory/__stack_pointer - local.get $8 + local.get $7 i32.store - local.get $8 + local.get $7 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end - call $~lib/map/Map#rehash + i32.wrap_i64 + call $~lib/map/Map#rehash end global.get $~lib/memory/__stack_pointer local.get $0 - i32.load offset=8 - local.tee $6 + i32.load offset=16 + local.tee $5 i32.store offset=4 - local.get $6 + local.get $5 local.get $0 local.get $0 - i32.load offset=16 - local.tee $7 + i32.load offset=24 + local.tee $6 i32.const 1 i32.add - call $~lib/map/Map#set:entriesOffset - local.get $7 - i32.const 24 + call $~lib/map/Map#set:entriesOffset + local.get $6 + i32.const 16 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 - call $~lib/map/MapEntry#set:key + call $~lib/map/MapEntry#set:key i32.const 0 drop - local.get $5 + local.get $4 local.get $2 - call $~lib/map/MapEntry#set:value + call $~lib/map/MapEntry#set:value i32.const 0 drop local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - call $~lib/map/Map#set:entriesCount + call $~lib/map/Map#set:entriesCount local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add - local.set $7 - local.get $5 - local.get $7 + local.set $6 + local.get $4 + local.get $6 i32.load - call $~lib/map/MapEntry#set:taggedNext - local.get $7 - local.get $5 + call $~lib/map/MapEntry#set:taggedNext + local.get $6 + local.get $4 i32.store end local.get $0 - local.set $8 + local.set $7 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $8 + local.get $7 ) - (func $~lib/map/Map#delete (param $0 i32) (param $1 f64) (result i32) - (local $2 f64) + (func $~lib/map/Map#get (param $0 i32) (param $1 f64) (result i32) + (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -31395,112 +23366,89 @@ i32.const 0 i32.store local.get $0 - local.set $7 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $3 i32.store - local.get $7 + local.get $3 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.6 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if - i32.const 0 - local.set $7 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $7 - return + i32.const 592 + i32.const 656 + i32.const 105 + i32.const 17 + call $~lib/builtins/abort + unreachable end - local.get $3 - local.get $3 - i32.load offset=12 - i32.const 1 - i32.or - call $~lib/map/MapEntry#set:taggedNext - local.get $0 - local.get $0 - i32.load offset=20 - i32.const 1 - i32.sub - call $~lib/map/Map#set:entriesCount - local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u - local.set $4 - local.get $4 - i32.const 1 + local.get $2 + i32.load offset=8 + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 4 i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + ) + (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 f64) + (local $3 i32) + global.get $~lib/memory/__stack_pointer i32.const 4 - local.tee $5 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $1 local.get $0 - i32.load offset=20 - local.tee $6 - local.get $5 - local.get $6 - i32.gt_u - select + i32.load offset=12 i32.ge_u - if (result i32) - local.get $0 - i32.load offset=20 + if + local.get $1 + i32.const 0 + i32.lt_s + if + i32.const 224 + i32.const 704 + i32.const 108 + i32.const 22 + call $~lib/builtins/abort + unreachable + end local.get $0 - i32.load offset=12 + local.get $1 + i32.const 1 + i32.add i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s - else - i32.const 0 - end - if + call $~lib/array/ensureSize local.get $0 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store - local.get $7 - local.get $4 - call $~lib/map/Map#rehash + local.get $1 + i32.const 1 + i32.add + call $~lib/array/Array#set:length_ end - i32.const 1 - local.set $7 + local.get $0 + local.set $3 + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.store + local.get $3 + local.get $1 + local.get $2 + call $~lib/array/Array#__uset global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $7 ) - (func $std/map/testNumeric - (local $0 i32) - (local $1 f64) + (func $~lib/map/Map#keys (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -31510,314 +23458,412 @@ (local $8 i32) (local $9 i32) global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=16 + local.get $0 + i32.load offset=16 + local.set $1 + local.get $0 + i32.load offset=24 + local.set $2 global.get $~lib/memory/__stack_pointer i32.const 0 - call $~lib/map/Map#constructor - local.tee $0 - i32.store - f64.const 0 - local.set $1 + local.get $2 + call $~lib/array/Array#constructor + local.tee $3 + i32.store + i32.const 0 + local.set $4 + i32.const 0 + local.set $5 loop $for-loop|0 - local.get $1 - f64.const 100 - f64.lt - local.set $2 + local.get $5 local.get $2 + i32.lt_s + local.set $6 + local.get $6 if - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/map/Map#has - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 6 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - i32.const 10 local.get $1 - i32.trunc_f64_s + local.get $5 + i32.const 16 + i32.mul i32.add - call $~lib/map/Map#set - drop - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/map/Map#has + local.set $7 + local.get $7 + i32.load offset=12 + i32.const 1 + i32.and i32.eqz if - i32.const 0 - i32.const 544 - i32.const 8 - i32.const 5 - call $~lib/builtins/abort - unreachable + local.get $3 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $4 + local.tee $8 + i32.const 1 + i32.add + local.set $4 + local.get $8 + local.get $7 + f64.load + call $~lib/array/Array#__set end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/map/Map#get - i32.const 10 - local.get $1 - i32.trunc_f64_s + local.get $5 + i32.const 1 i32.add - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 9 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - f64.const 1 - f64.add - local.set $1 + local.set $5 br $for-loop|0 end end - local.get $0 + local.get $3 local.set $9 global.get $~lib/memory/__stack_pointer local.get $9 i32.store offset=4 local.get $9 - call $~lib/map/Map#get:size - i32.const 100 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 11 - i32.const 3 - call $~lib/builtins/abort - unreachable - end -<<<<<<< HEAD - local.get $2 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/map/Map#constructor (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 32 - i32.const 29 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.set $0 - end - local.get $0 - i32.const 0 - i32.const 4 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store - local.get $0 - i64.const 4 - i64.const 1 - i64.sub - i64.store offset=8 - local.get $0 - i32.const 0 - i32.const 4 - i32.const 16 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $0 - i32.const 0 - i32.store offset=28 - local.get $0 - ) - (func $~lib/util/hash/HASH (param $0 f64) (result i64) - (local $1 i64) - (local $2 i64) - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 + call $~lib/array/Array#set:length + local.get $3 + local.set $9 + global.get $~lib/memory/__stack_pointer i32.const 8 - i32.eq - drop - local.get $0 - i64.reinterpret_f64 - local.set $1 - i64.const 0 - i64.const 2870177450012600261 - i64.add - i64.const 8 - i64.add - local.set $2 - local.get $2 - local.get $1 - i64.const -4417276706812531889 - i64.mul - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - local.set $2 - local.get $2 - i64.const 27 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.set $2 - local.get $2 - local.get $2 - i64.const 33 - i64.shr_u - i64.xor - local.set $2 - local.get $2 - i64.const -4417276706812531889 - i64.mul - local.set $2 - local.get $2 - local.get $2 - i64.const 29 - i64.shr_u - i64.xor - local.set $2 - local.get $2 - i64.const 1609587929392839161 - i64.mul - local.set $2 - local.get $2 - local.get $2 - i64.const 32 - i64.shr_u - i64.xor - local.set $2 - local.get $2 - return + i32.add + global.set $~lib/memory/__stack_pointer + local.get $9 ) - (func $~lib/map/Map#find (param $0 i32) (param $1 f64) (param $2 i64) (result i32) + (func $~lib/map/Map#values (param $0 i32) (result i32) + (local $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) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store local.get $0 - i32.load - local.get $2 + i32.load offset=16 + local.set $1 local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - i32.load - local.set $3 - loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 + i32.load offset=24 + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 0 + local.get $2 + call $~lib/array/Array#constructor + local.tee $3 + i32.store + i32.const 0 + local.set $4 + i32.const 0 + local.set $5 + loop $for-loop|0 + local.get $5 + local.get $2 + i32.lt_s + local.set $6 + local.get $6 if - local.get $3 - i32.load offset=12 - local.set $5 + local.get $1 local.get $5 + i32.const 16 + i32.mul + i32.add + local.set $7 + local.get $7 + i32.load offset=12 i32.const 1 i32.and i32.eqz - if (result i32) - local.get $3 - f64.load - local.get $1 - f64.eq - else - i32.const 0 - end if local.get $3 - return + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $4 + local.tee $8 + i32.const 1 + i32.add + local.set $4 + local.get $8 + local.get $7 + i32.load offset=8 + call $~lib/array/Array#__set end local.get $5 i32.const 1 - i32.const -1 - i32.xor - i32.and - local.set $3 - br $while-continue|0 + i32.add + local.set $5 + br $for-loop|0 + end + end + local.get $3 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $4 + call $~lib/array/Array#set:length + local.get $3 + local.set $9 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $9 + ) + (func $~lib/map/Map#set (param $0 i32) (param $1 f64) (param $2 f64) (result i32) + (local $3 i64) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + local.get $1 + call $~lib/util/hash/HASH + local.set $3 + local.get $0 + local.set $7 + global.get $~lib/memory/__stack_pointer + local.get $7 + i32.store + local.get $7 + local.get $1 + local.get $3 + call $~lib/map/Map#find + local.set $4 + local.get $4 + if + local.get $4 + local.get $2 + call $~lib/map/MapEntry#set:value + i32.const 0 + drop + else + local.get $0 + i32.load offset=24 + local.get $0 + i32.load offset=20 + i32.eq + if + local.get $0 + local.set $7 + global.get $~lib/memory/__stack_pointer + local.get $7 + i32.store + local.get $7 + local.get $0 + i32.load offset=28 + local.get $0 + i32.load offset=20 + i32.const 3 + i32.mul + i32.const 4 + i32.div_s + i32.lt_s + if (result i64) + local.get $0 + i64.load offset=8 + else + local.get $0 + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or + end + i32.wrap_i64 + call $~lib/map/Map#rehash end + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.load offset=16 + local.tee $5 + i32.store offset=4 + local.get $5 + local.get $0 + local.get $0 + i32.load offset=24 + local.tee $6 + i32.const 1 + i32.add + call $~lib/map/Map#set:entriesOffset + local.get $6 + i32.const 24 + i32.mul + i32.add + local.set $4 + local.get $4 + local.get $1 + call $~lib/map/MapEntry#set:key + i32.const 0 + drop + local.get $4 + local.get $2 + call $~lib/map/MapEntry#set:value + i32.const 0 + drop + local.get $0 + local.get $0 + i32.load offset=28 + i32.const 1 + i32.add + call $~lib/map/Map#set:entriesCount + local.get $0 + i32.load + local.get $3 + local.get $0 + i64.load offset=8 + i64.and + i32.wrap_i64 + i32.const 4 + i32.mul + i32.add + local.set $6 + local.get $4 + local.get $6 + i32.load + call $~lib/map/MapEntry#set:taggedNext + local.get $6 + local.get $4 + i32.store + end + local.get $0 + local.set $7 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $7 + ) + (func $~lib/map/Map#delete (param $0 i32) (param $1 f64) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store + local.get $6 + local.get $1 + local.get $1 + call $~lib/util/hash/HASH + call $~lib/map/Map#find + local.set $2 + local.get $2 + i32.eqz + if + i32.const 0 + local.set $6 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $6 + return end - i32.const 0 - ) - (func $~lib/map/Map#has (param $0 i32) (param $1 f64) (result i32) + local.get $2 + local.get $2 + i32.load offset=12 + i32.const 1 + i32.or + call $~lib/map/MapEntry#set:taggedNext local.get $0 - local.get $1 - local.get $1 - call $~lib/util/hash/HASH - call $~lib/map/Map#find - i32.const 0 - i32.ne + local.get $0 + i32.load offset=28 + i32.const 1 + i32.sub + call $~lib/map/Map#set:entriesCount + local.get $0 + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 + local.set $3 + local.get $3 + i32.const 1 + i32.add + i32.const 4 + local.tee $4 + local.get $0 + i32.load offset=28 + local.tee $5 + local.get $4 + local.get $5 + i32.gt_u + select + i32.ge_u + if (result i32) + local.get $0 + i32.load offset=28 + local.get $0 + i32.load offset=20 + i32.const 3 + i32.mul + i32.const 4 + i32.div_s + i32.lt_s + else + i32.const 0 + end + if + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store + local.get $6 + local.get $3 + call $~lib/map/Map#rehash + end + i32.const 1 + local.set $6 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $6 ) - (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) + (func $std/map/testNumeric + (local $0 i32) + (local $1 f64) (local $2 i32) (local $3 i32) (local $4 i32) @@ -31826,61 +23872,137 @@ (local $7 i32) (local $8 i32) (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 f64) - (local $13 i32) - (local $14 i32) - local.get $1 - i32.const 1 - i32.add - local.set $2 - i32.const 0 - local.get $2 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $3 - local.get $2 - i32.const 8 - i32.mul - i32.const 3 - i32.div_s - local.set $4 + global.get $~lib/memory/__stack_pointer + i32.const 24 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=8 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=16 + global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $4 - i32.const 16 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $0 - i32.load offset=16 - local.set $6 - local.get $6 - local.get $0 - i32.load offset=24 - i32.const 16 - i32.mul - i32.add - local.set $7 - local.get $5 - local.set $8 - loop $while-continue|0 - local.get $6 - local.get $7 - i32.ne - local.set $9 - local.get $9 -======= + call $~lib/map/Map#constructor + local.tee $0 + i32.store f64.const 0 local.set $1 - loop $for-loop|1 + loop $for-loop|0 + local.get $1 + f64.const 100 + f64.lt + local.set $2 + local.get $2 + if + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#has + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 6 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + i32.const 10 + local.get $1 + i32.trunc_f64_s + i32.add + call $~lib/map/Map#set + drop + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 8 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/map/Map#get + i32.const 10 + local.get $1 + i32.trunc_f64_s + i32.add + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 9 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + f64.const 1 + f64.add + local.set $1 + br $for-loop|0 + end + end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/map/Map#get:size + i32.const 100 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 11 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + f64.const 0 + local.set $1 + loop $for-loop|1 local.get $1 f64.const 100 f64.lt local.set $2 local.get $2 ->>>>>>> master if local.get $0 local.set $9 @@ -31892,41 +24014,6 @@ call $~lib/map/Map#has i32.eqz if -<<<<<<< HEAD - local.get $8 - local.set $11 - local.get $10 - f64.load - local.set $12 - local.get $11 - local.get $12 - f64.store - local.get $11 - local.get $10 - i32.load offset=8 - i32.store offset=8 - local.get $12 - call $~lib/util/hash/HASH - local.get $1 - i64.extend_i32_u - i64.and - i32.wrap_i64 - local.set $13 - local.get $3 - local.get $13 - i32.const 4 - i32.mul - i32.add - local.set $14 - local.get $11 - local.get $14 - i32.load - i32.store offset=12 - local.get $14 - local.get $8 - i32.store - local.get $8 -======= i32.const 0 i32.const 544 i32.const 15 @@ -31951,7 +24038,6 @@ if i32.const 0 i32.const 544 ->>>>>>> master i32.const 16 i32.const 5 call $~lib/builtins/abort @@ -32017,36 +24103,6 @@ end end local.get $0 -<<<<<<< HEAD - local.tee $11 - local.get $3 - local.tee $13 - local.get $11 - i32.load - local.tee $9 - i32.ne - if - local.get $13 - call $~lib/rt/pure/__retain - local.set $13 - local.get $9 - call $~lib/rt/pure/__release - end - local.get $13 - i32.store - local.get $0 - local.get $1 - i64.extend_i32_u - i64.store offset=8 - local.get $0 - local.tee $14 - local.get $5 - local.tee $9 - local.get $14 - i32.load offset=16 - local.tee $11 - i32.ne -======= local.set $9 global.get $~lib/memory/__stack_pointer local.get $9 @@ -32056,7 +24112,6 @@ i32.const 100 i32.eq i32.eqz ->>>>>>> master if i32.const 0 i32.const 544 @@ -32070,47 +24125,6 @@ local.set $9 global.get $~lib/memory/__stack_pointer local.get $9 -<<<<<<< HEAD - i32.store offset=16 - local.get $0 - local.get $4 - i32.store offset=20 - local.get $0 - local.get $0 - i32.load offset=28 - i32.store offset=24 - local.get $3 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - ) - (func $~lib/map/Map#set (param $0 i32) (param $1 f64) (param $2 i32) (result i32) - (local $3 i64) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $3 - local.get $0 - local.get $1 - local.get $3 - call $~lib/map/Map#find - local.set $4 - local.get $4 - if - i32.const 0 - drop - local.get $4 - local.get $2 - i32.store offset=8 - else - local.get $0 - i32.load offset=24 - local.get $0 - i32.load offset=20 - i32.eq -======= i32.store offset=4 local.get $9 call $~lib/map/Map#keys @@ -32150,7 +24164,6 @@ i32.lt_s local.set $7 local.get $7 ->>>>>>> master if local.get $2 local.set $9 @@ -32188,92 +24201,6 @@ unreachable end local.get $0 -<<<<<<< HEAD - i32.load offset=28 - local.get $0 - i32.load offset=20 - i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s - if (result i64) - local.get $0 - i64.load offset=8 - else - local.get $0 - i64.load offset=8 - i64.const 1 - i64.shl - i64.const 1 - i64.or - end - i32.wrap_i64 - call $~lib/map/Map#rehash - end - local.get $0 - i32.load offset=16 - call $~lib/rt/pure/__retain - local.set $5 - local.get $5 - local.get $0 - local.get $0 - i32.load offset=24 - local.tee $6 - i32.const 1 - i32.add - i32.store offset=24 - local.get $6 - i32.const 16 - i32.mul - i32.add - local.set $4 - local.get $4 - local.get $1 - f64.store - local.get $4 - local.get $2 - i32.store offset=8 - local.get $0 - local.get $0 - i32.load offset=28 - i32.const 1 - i32.add - i32.store offset=28 - local.get $0 - i32.load - local.get $3 - local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - local.set $6 - local.get $4 - local.get $6 - i32.load - i32.store offset=12 - local.get $6 - local.get $4 - i32.store - local.get $5 - call $~lib/rt/pure/__release - end - local.get $0 - call $~lib/rt/pure/__retain - ) - (func $~lib/map/Map#get (param $0 i32) (param $1 f64) (result i32) - (local $2 i32) - local.get $0 - local.get $1 - local.get $1 - call $~lib/util/hash/HASH - call $~lib/map/Map#find - local.set $2 - local.get $2 -======= local.set $9 global.get $~lib/memory/__stack_pointer local.get $9 @@ -32333,7 +24260,6 @@ call $~lib/map/Map#get:size i32.const 100 i32.eq ->>>>>>> master i32.eqz if i32.const 0 @@ -32343,22 +24269,6 @@ call $~lib/builtins/abort unreachable end -<<<<<<< HEAD - local.get $2 - i32.load offset=8 - ) - (func $~lib/map/Map#get:size (param $0 i32) (result i32) - local.get $0 - i32.load offset=28 - ) - (func $~lib/array/Array#constructor (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 -======= local.get $5 local.set $9 global.get $~lib/memory/__stack_pointer @@ -32368,7 +24278,6 @@ call $~lib/map/Map#get:size i32.const 100 i32.eq ->>>>>>> master i32.eqz if i32.const 0 @@ -32641,97 +24550,11 @@ end global.get $~lib/memory/__stack_pointer local.get $1 -<<<<<<< HEAD - i32.store offset=12 - ) - (func $~lib/map/Map#keys (param $0 i32) (result i32) - (local $1 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.load offset=16 - local.set $1 - local.get $0 - i32.load offset=24 - local.set $2 -======= ->>>>>>> master i32.const 0 call $~lib/rt/itcms/__new local.tee $2 i32.store local.get $2 -<<<<<<< HEAD - call $~lib/array/Array#constructor - local.set $3 - i32.const 0 - local.set $4 - i32.const 0 - local.set $5 - loop $for-loop|0 - local.get $5 - local.get $2 - i32.lt_s - local.set $6 - local.get $6 - if - local.get $1 - local.get $5 - i32.const 16 - i32.mul - i32.add - local.set $7 - local.get $7 - i32.load offset=12 - i32.const 1 - i32.and - i32.eqz - if - local.get $3 - local.get $4 - local.tee $8 - i32.const 1 - i32.add - local.set $4 - local.get $8 - local.get $7 - f64.load - call $~lib/array/Array#__set - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end - local.get $3 - local.get $4 - call $~lib/array/Array#set:length - local.get $3 - ) - (func $~lib/map/Map#values (param $0 i32) (result i32) - (local $1 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.load offset=16 - local.set $1 - local.get $0 - i32.load offset=24 - local.set $2 -======= ->>>>>>> master i32.const 0 local.get $1 call $~lib/memory/memory.fill @@ -32756,20 +24579,12 @@ local.get $0 i32.eqz if -<<<<<<< HEAD - i32.const 32 - i32.const 31 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.set $0 -======= global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 3 call $~lib/rt/itcms/__new local.tee $0 i32.store ->>>>>>> master end local.get $0 i32.const 0 @@ -32779,35 +24594,16 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets local.get $0 -<<<<<<< HEAD i64.const 4 i64.const 1 i64.sub - i64.store offset=8 -======= - i32.const 4 - i32.const 1 - i32.sub call $~lib/map/Map#set:bucketsMask ->>>>>>> master local.get $0 i32.const 0 i32.const 4 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor -<<<<<<< HEAD - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $0 - i32.const 0 - i32.store offset=28 -======= call $~lib/map/Map#set:entries local.get $0 i32.const 4 @@ -32854,7 +24650,6 @@ local.get $0 i32.const 0 call $~lib/array/Array#set:dataStart ->>>>>>> master local.get $0 i32.const 0 call $~lib/array/Array#set:byteLength @@ -32887,13 +24682,6 @@ local.get $3 i32.const 0 local.get $2 -<<<<<<< HEAD - ) - (func $~lib/map/Map#find (param $0 i32) (param $1 f64) (param $2 i64) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) -======= call $~lib/memory/memory.fill local.get $0 local.get $3 @@ -32901,25 +24689,16 @@ local.get $0 local.get $3 call $~lib/array/Array#set:dataStart ->>>>>>> master local.get $0 local.get $2 call $~lib/array/Array#set:byteLength local.get $0 -<<<<<<< HEAD - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul -======= local.get $1 call $~lib/array/Array#set:length_ local.get $0 local.set $4 global.get $~lib/memory/__stack_pointer i32.const 8 ->>>>>>> master i32.add global.set $~lib/memory/__stack_pointer local.get $4 @@ -32928,31 +24707,7 @@ (local $2 i32) (local $3 i32) (local $4 i32) -<<<<<<< HEAD - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 f64) - (local $13 i32) - (local $14 i32) - local.get $1 - i32.const 1 - i32.add - local.set $2 - i32.const 0 - local.get $2 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $3 - local.get $2 -======= global.get $~lib/memory/__stack_pointer ->>>>>>> master i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer @@ -32974,77 +24729,6 @@ i32.const 0 call $~lib/array/Array#set:buffer local.get $0 -<<<<<<< HEAD - i32.load offset=16 - local.set $6 - local.get $6 - local.get $0 - i32.load offset=24 - i32.const 24 - i32.mul - i32.add - local.set $7 - local.get $5 - local.set $8 - loop $while-continue|0 - local.get $6 - local.get $7 - i32.ne - local.set $9 - local.get $9 - if - local.get $6 - local.set $10 - local.get $10 - i32.load offset=16 - i32.const 1 - i32.and - i32.eqz - if - local.get $8 - local.set $11 - local.get $10 - f64.load - local.set $12 - local.get $11 - local.get $12 - f64.store - local.get $11 - local.get $10 - f64.load offset=8 - f64.store offset=8 - local.get $12 - call $~lib/util/hash/HASH - local.get $1 - i64.extend_i32_u - i64.and - i32.wrap_i64 - local.set $13 - local.get $3 - local.get $13 - i32.const 4 - i32.mul - i32.add - local.set $14 - local.get $11 - local.get $14 - i32.load - i32.store offset=16 - local.get $14 - local.get $8 - i32.store - local.get $8 - i32.const 24 - i32.add - local.set $8 - end - local.get $6 - i32.const 24 - i32.add - local.set $6 - br $while-continue|0 - end -======= i32.const 0 call $~lib/array/Array#set:dataStart local.get $0 @@ -33065,7 +24749,6 @@ i32.const 60 call $~lib/builtins/abort unreachable ->>>>>>> master end local.get $1 i32.const 2 @@ -33086,22 +24769,6 @@ call $~lib/array/Array#set:buffer local.get $0 local.get $3 -<<<<<<< HEAD - local.tee $13 - local.get $11 - i32.load - local.tee $9 - i32.ne - if - local.get $13 - call $~lib/rt/pure/__retain - local.set $13 - local.get $9 - call $~lib/rt/pure/__release - end - local.get $13 - i32.store -======= call $~lib/array/Array#set:dataStart local.get $0 local.get $2 @@ -33131,13 +24798,12 @@ i32.eqz if global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 6 call $~lib/rt/itcms/__new local.tee $0 i32.store end ->>>>>>> master local.get $0 i32.const 0 i32.const 4 @@ -33146,9 +24812,9 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/map/Map#set:bucketsMask local.get $0 i32.const 0 @@ -33173,18 +24839,6 @@ i32.add global.set $~lib/memory/__stack_pointer local.get $1 -<<<<<<< HEAD - i64.extend_i32_u - i64.store offset=8 - local.get $0 - local.tee $14 - local.get $5 - local.tee $9 - local.get $14 - i32.load offset=16 - local.tee $11 - i32.ne -======= ) (func $~lib/map/Map#constructor (param $0 i32) (result i32) (local $1 i32) @@ -33198,22 +24852,14 @@ i32.store local.get $0 i32.eqz ->>>>>>> master if global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 7 call $~lib/rt/itcms/__new local.tee $0 i32.store end -<<<<<<< HEAD - local.get $9 - i32.store offset=16 - local.get $0 - local.get $4 - i32.store offset=20 -======= local.get $0 i32.const 0 i32.const 4 @@ -33222,9 +24868,9 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/map/Map#set:bucketsMask local.get $0 i32.const 0 @@ -33233,28 +24879,10 @@ i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:entries ->>>>>>> master local.get $0 i32.const 4 call $~lib/map/Map#set:entriesCapacity local.get $0 -<<<<<<< HEAD - i32.load offset=28 - i32.store offset=24 - local.get $3 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - ) - (func $~lib/map/Map#set (param $0 i32) (param $1 f64) (param $2 f64) (result i32) - (local $3 i64) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $3 -======= i32.const 0 call $~lib/map/Map#set:entriesOffset local.get $0 @@ -33282,13 +24910,12 @@ i32.eqz if global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 8 call $~lib/rt/itcms/__new local.tee $0 i32.store end ->>>>>>> master local.get $0 i32.const 0 i32.const 4 @@ -33297,9 +24924,9 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/map/Map#set:bucketsMask local.get $0 i32.const 0 @@ -33315,107 +24942,15 @@ i32.const 0 call $~lib/map/Map#set:entriesOffset local.get $0 - i32.const 0 - call $~lib/map/Map#set:entriesCount - local.get $0 - local.set $1 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $1 -<<<<<<< HEAD - local.get $3 - call $~lib/map/Map#find - local.set $4 - local.get $4 - if - i32.const 0 - drop - local.get $4 - local.get $2 - f64.store offset=8 - else - local.get $0 - i32.load offset=24 - local.get $0 - i32.load offset=20 - i32.eq - if - local.get $0 - local.get $0 - i32.load offset=28 - local.get $0 - i32.load offset=20 - i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s - if (result i64) - local.get $0 - i64.load offset=8 - else - local.get $0 - i64.load offset=8 - i64.const 1 - i64.shl - i64.const 1 - i64.or - end - i32.wrap_i64 - call $~lib/map/Map#rehash - end - local.get $0 - i32.load offset=16 - call $~lib/rt/pure/__retain - local.set $5 - local.get $5 - local.get $0 - local.get $0 - i32.load offset=24 - local.tee $6 - i32.const 1 - i32.add - i32.store offset=24 - local.get $6 - i32.const 24 - i32.mul - i32.add - local.set $4 - local.get $4 - local.get $1 - f64.store - local.get $4 - local.get $2 - f64.store offset=8 - local.get $0 - local.get $0 - i32.load offset=28 - i32.const 1 - i32.add - i32.store offset=28 - local.get $0 - i32.load - local.get $3 - local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - local.set $6 - local.get $4 - local.get $6 - i32.load - i32.store offset=16 - local.get $6 - local.get $4 - i32.store - local.get $5 - call $~lib/rt/pure/__release -======= + i32.const 0 + call $~lib/map/Map#set:entriesCount + local.get $0 + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 ) (func $~lib/array/Array#constructor (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -33438,44 +24973,24 @@ call $~lib/rt/itcms/__new local.tee $0 i32.store ->>>>>>> master end local.get $0 i32.const 0 call $~lib/array/Array#set:buffer local.get $0 -<<<<<<< HEAD - i32.load offset=28 - ) - (func $~lib/map/Map#delete (param $0 i32) (param $1 f64) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) -======= i32.const 0 call $~lib/array/Array#set:dataStart local.get $0 i32.const 0 call $~lib/array/Array#set:byteLength ->>>>>>> master local.get $0 i32.const 0 call $~lib/array/Array#set:length_ local.get $1 -<<<<<<< HEAD - local.get $1 - call $~lib/util/hash/HASH - call $~lib/map/Map#find - local.set $2 - local.get $2 - i32.eqz -======= i32.const 1073741820 i32.const 0 i32.shr_u i32.gt_u ->>>>>>> master if i32.const 432 i32.const 704 @@ -33491,15 +25006,6 @@ global.get $~lib/memory/__stack_pointer local.get $2 i32.const 0 -<<<<<<< HEAD - drop - local.get $2 - local.get $2 - i32.load offset=12 - i32.const 1 - i32.or - i32.store offset=12 -======= call $~lib/rt/itcms/__new local.tee $3 i32.store offset=4 @@ -33513,32 +25019,16 @@ local.get $0 local.get $3 call $~lib/array/Array#set:dataStart ->>>>>>> master local.get $0 local.get $2 call $~lib/array/Array#set:byteLength local.get $0 -<<<<<<< HEAD - i32.load offset=28 - i32.const 1 - i32.sub - i32.store offset=28 - local.get $0 - i64.load offset=8 - i64.const 1 - i64.shr_u - i32.wrap_i64 - local.set $3 - local.get $3 - i32.const 1 -======= local.get $1 call $~lib/array/Array#set:length_ local.get $0 local.set $4 global.get $~lib/memory/__stack_pointer i32.const 8 ->>>>>>> master i32.add global.set $~lib/memory/__stack_pointer local.get $4 @@ -33547,34 +25037,6 @@ (local $1 i32) global.get $~lib/memory/__stack_pointer i32.const 4 -<<<<<<< HEAD - local.tee $4 - local.get $0 - i32.load offset=28 - local.tee $5 - local.get $4 - local.get $5 - i32.gt_u - select - i32.ge_u - if (result i32) - local.get $0 - i32.load offset=28 - local.get $0 - i32.load offset=20 - i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s - else - i32.const 0 - end - if - local.get $0 - local.get $3 - call $~lib/map/Map#rehash -======= i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check @@ -33585,12 +25047,11 @@ i32.eqz if global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 10 call $~lib/rt/itcms/__new local.tee $0 i32.store ->>>>>>> master end local.get $0 i32.const 0 @@ -33600,9 +25061,9 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/map/Map#set:bucketsMask local.get $0 i32.const 0 @@ -33642,7 +25103,7 @@ i32.eqz if global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 11 call $~lib/rt/itcms/__new local.tee $0 @@ -33656,40 +25117,16 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets local.get $0 -<<<<<<< HEAD i64.const 4 i64.const 1 i64.sub - i64.store offset=8 -======= - i32.const 4 - i32.const 1 - i32.sub call $~lib/map/Map#set:bucketsMask ->>>>>>> master local.get $0 i32.const 0 i32.const 4 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor -<<<<<<< HEAD - local.set $1 - local.get $2 - i32.load offset=16 - call $~lib/rt/pure/__release - local.get $1 - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $0 - i32.const 0 - i32.store offset=28 -======= call $~lib/map/Map#set:entries local.get $0 i32.const 4 @@ -33707,7 +25144,6 @@ i32.add global.set $~lib/memory/__stack_pointer local.get $1 ->>>>>>> master ) (func $~lib/array/Array#constructor (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -33804,7 +25240,7 @@ i32.eqz if global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 13 call $~lib/rt/itcms/__new local.tee $0 @@ -33818,9 +25254,9 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/map/Map#set:bucketsMask local.get $0 i32.const 0 @@ -33860,7 +25296,7 @@ i32.eqz if global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 14 call $~lib/rt/itcms/__new local.tee $0 @@ -33874,9 +25310,9 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/map/Map#set:bucketsMask local.get $0 i32.const 0 @@ -33997,7 +25433,7 @@ i32.eqz if global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 16 call $~lib/rt/itcms/__new local.tee $0 @@ -34011,9 +25447,9 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/map/Map#set:bucketsMask local.get $0 i32.const 0 @@ -34053,7 +25489,7 @@ i32.eqz if global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 17 call $~lib/rt/itcms/__new local.tee $0 @@ -34067,9 +25503,9 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/map/Map#set:bucketsMask local.get $0 i32.const 0 @@ -34190,7 +25626,7 @@ i32.eqz if global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 19 call $~lib/rt/itcms/__new local.tee $0 @@ -34204,9 +25640,9 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/map/Map#set:bucketsMask local.get $0 i32.const 0 @@ -34246,7 +25682,7 @@ i32.eqz if global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 20 call $~lib/rt/itcms/__new local.tee $0 @@ -34260,9 +25696,9 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/map/Map#set:bucketsMask local.get $0 i32.const 0 @@ -34383,7 +25819,7 @@ i32.eqz if global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 22 call $~lib/rt/itcms/__new local.tee $0 @@ -34397,16 +25833,11 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/map/Map#set:bucketsMask local.get $0 -<<<<<<< HEAD - i32.load offset=16 - local.set $2 -======= ->>>>>>> master i32.const 0 i32.const 4 i32.const 24 @@ -34444,7 +25875,7 @@ i32.eqz if global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 23 call $~lib/rt/itcms/__new local.tee $0 @@ -34458,16 +25889,11 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/map/Map#set:bucketsMask local.get $0 -<<<<<<< HEAD - i32.load offset=16 - local.set $2 -======= ->>>>>>> master i32.const 0 i32.const 4 i32.const 16 @@ -34481,11 +25907,6 @@ i32.const 0 call $~lib/map/Map#set:entriesOffset local.get $0 -<<<<<<< HEAD - i32.load offset=16 - local.set $2 -======= ->>>>>>> master i32.const 0 call $~lib/map/Map#set:entriesCount local.get $0 @@ -34519,11 +25940,6 @@ i32.store end local.get $0 -<<<<<<< HEAD - i32.load offset=16 - local.set $2 -======= ->>>>>>> master i32.const 0 call $~lib/array/Array#set:buffer local.get $0 @@ -34549,14 +25965,8 @@ unreachable end local.get $1 -<<<<<<< HEAD - call $~lib/rt/pure/__visit - local.get $0 - i32.load offset=16 -======= i32.const 3 i32.shl ->>>>>>> master local.set $2 global.get $~lib/memory/__stack_pointer local.get $2 @@ -34575,18 +25985,6 @@ local.get $3 call $~lib/array/Array#set:dataStart local.get $0 -<<<<<<< HEAD - i32.load offset=16 - local.set $2 - i32.const 0 - if (result i32) - i32.const 1 - else - i32.const 0 - end - drop -======= ->>>>>>> master local.get $2 call $~lib/array/Array#set:byteLength local.get $0 @@ -34614,7 +26012,7 @@ i32.eqz if global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 25 call $~lib/rt/itcms/__new local.tee $0 @@ -34628,16 +26026,11 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/map/Map#set:bucketsMask local.get $0 -<<<<<<< HEAD - i32.load offset=16 - local.set $2 -======= ->>>>>>> master i32.const 0 i32.const 4 i32.const 24 @@ -34651,11 +26044,6 @@ i32.const 0 call $~lib/map/Map#set:entriesOffset local.get $0 -<<<<<<< HEAD - i32.load offset=16 - local.set $2 -======= ->>>>>>> master i32.const 0 call $~lib/map/Map#set:entriesCount local.get $0 @@ -34680,7 +26068,7 @@ i32.eqz if global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 26 call $~lib/rt/itcms/__new local.tee $0 @@ -34694,16 +26082,11 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/map/Map#set:bucketsMask local.get $0 -<<<<<<< HEAD - i32.load offset=16 - local.set $2 -======= ->>>>>>> master i32.const 0 i32.const 4 i32.const 12 @@ -34750,11 +26133,6 @@ i32.store end local.get $0 -<<<<<<< HEAD - i32.load offset=16 - local.set $2 -======= ->>>>>>> master i32.const 0 call $~lib/array/Array#set:buffer local.get $0 @@ -34780,14 +26158,8 @@ unreachable end local.get $1 -<<<<<<< HEAD - call $~lib/rt/pure/__visit - local.get $0 - i32.load offset=16 -======= i32.const 2 i32.shl ->>>>>>> master local.set $2 global.get $~lib/memory/__stack_pointer local.get $2 @@ -34806,18 +26178,6 @@ local.get $3 call $~lib/array/Array#set:dataStart local.get $0 -<<<<<<< HEAD - i32.load offset=16 - local.set $2 - i32.const 0 - if (result i32) - i32.const 1 - else - i32.const 0 - end - drop -======= ->>>>>>> master local.get $2 call $~lib/array/Array#set:byteLength local.get $0 @@ -34845,7 +26205,7 @@ i32.eqz if global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 28 call $~lib/rt/itcms/__new local.tee $0 @@ -34859,16 +26219,11 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/map/Map#set:bucketsMask local.get $0 -<<<<<<< HEAD - i32.load offset=16 - local.set $2 -======= ->>>>>>> master i32.const 0 i32.const 4 i32.const 12 @@ -34882,11 +26237,6 @@ i32.const 0 call $~lib/map/Map#set:entriesOffset local.get $0 -<<<<<<< HEAD - i32.load offset=16 - local.set $2 -======= ->>>>>>> master i32.const 0 call $~lib/map/Map#set:entriesCount local.get $0 @@ -34911,7 +26261,7 @@ i32.eqz if global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 29 call $~lib/rt/itcms/__new local.tee $0 @@ -34925,16 +26275,11 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/map/Map#set:bucketsMask local.get $0 -<<<<<<< HEAD - i32.load offset=16 - local.set $2 -======= ->>>>>>> master i32.const 0 i32.const 4 i32.const 16 @@ -34981,11 +26326,6 @@ i32.store end local.get $0 -<<<<<<< HEAD - i32.load offset=16 - local.set $2 -======= ->>>>>>> master i32.const 0 call $~lib/array/Array#set:buffer local.get $0 @@ -35011,14 +26351,8 @@ unreachable end local.get $1 -<<<<<<< HEAD - call $~lib/rt/pure/__visit - local.get $0 - i32.load offset=16 -======= i32.const 3 i32.shl ->>>>>>> master local.set $2 global.get $~lib/memory/__stack_pointer local.get $2 @@ -35043,15 +26377,6 @@ local.get $1 call $~lib/array/Array#set:length_ local.get $0 -<<<<<<< HEAD - i32.load offset=16 - local.set $2 - i32.const 0 - if (result i32) - i32.const 1 - else - i32.const 0 -======= local.set $4 global.get $~lib/memory/__stack_pointer i32.const 8 @@ -35073,12 +26398,11 @@ i32.eqz if global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 31 call $~lib/rt/itcms/__new local.tee $0 i32.store ->>>>>>> master end local.get $0 i32.const 0 @@ -35088,9 +26412,9 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/map/Map#set:bucketsMask local.get $0 i32.const 0 @@ -35103,11 +26427,6 @@ i32.const 4 call $~lib/map/Map#set:entriesCapacity local.get $0 -<<<<<<< HEAD - i32.load offset=16 - local.set $2 -======= ->>>>>>> master i32.const 0 call $~lib/map/Map#set:entriesOffset local.get $0 diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index e76900f88c..910c0adedb 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -6,20 +6,23 @@ (type $none_=>_i32 (func (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_none (func (param i32))) + (type $i32_=>_i64 (func (param i32) (result i64))) (type $i32_i64_=>_none (func (param i32 i64))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_i32_i64_=>_i32 (func (param i32 i32 i64) (result i32))) (type $i32_f32_=>_none (func (param i32 f32))) (type $i32_f64_=>_none (func (param i32 f64))) (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) - (type $i32_i64_i32_=>_i32 (func (param i32 i64 i32) (result i32))) + (type $i32_i64_i64_=>_i32 (func (param i32 i64 i64) (result i32))) (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) - (type $i64_=>_i32 (func (param i64) (result i32))) (type $i32_f32_=>_i32 (func (param i32 f32) (result i32))) - (type $i32_f32_i32_=>_i32 (func (param i32 f32 i32) (result i32))) + (type $i32_f32_i64_=>_i32 (func (param i32 f32 i64) (result i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) - (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) + (type $i32_f64_i64_=>_i32 (func (param i32 f64 i64) (result i32))) + (type $i64_=>_i64 (func (param i64) (result i64))) + (type $f32_=>_i64 (func (param f32) (result i64))) + (type $f64_=>_i64 (func (param f64) (result i64))) (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -1814,7 +1817,7 @@ (func $~lib/set/Set#set:entries (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $1 call $~lib/rt/itcms/__link @@ -1942,7 +1945,7 @@ i32.store offset=4 local.get $0 i32.load offset=16 - local.tee $4 + local.tee $8 local.get $0 i32.load offset=24 i32.const 3 @@ -1956,20 +1959,21 @@ local.get $8 i32.ne if - local.get $4 - local.tee $6 + local.get $8 i32.load offset=4 i32.const 1 i32.and i32.eqz if local.get $2 - local.get $6 + local.get $8 i32.load8_s - local.tee $4 + local.tee $7 i32.store8 local.get $2 local.get $6 + local.get $7 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -1977,10 +1981,10 @@ i32.const 2 i32.shl i32.add - local.tee $4 + local.tee $7 i32.load i32.store offset=4 - local.get $4 + local.get $7 local.get $2 i32.store local.get $2 @@ -1988,10 +1992,10 @@ i32.add local.set $2 end - local.get $6 + local.get $8 i32.const 8 i32.add - local.set $4 + local.set $8 br $while-continue|0 end end @@ -2000,17 +2004,18 @@ call $~lib/set/Set#set:buckets local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.get $3 call $~lib/set/Set#set:entries local.get $0 local.get $5 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add @@ -2320,21 +2325,57 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:buckets local.get $0 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $0 i32.const 32 call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:entries local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 + ) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) + local.get $0 + i32.const 255 + i32.and + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.const 2870177450012600262 + i64.xor + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.tee $1 + local.get $1 + i64.const 33 + i64.shr_u + i64.xor + i64.const -4417276706812531889 + i64.mul + local.tee $1 + local.get $1 + i64.const 29 + i64.shr_u + i64.xor + i64.const 1609587929392839161 + i64.mul + local.tee $1 + local.get $1 + i64.const 32 + i64.shr_u + i64.xor ) (func $~lib/set/Set#rehash (param $0 i32) (param $1 i32) (local $2 i32) @@ -2375,10 +2416,10 @@ local.tee $3 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $8 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 3 i32.shl i32.add @@ -2403,13 +2444,12 @@ i32.store8 local.get $2 local.get $6 - local.get $1 local.get $7 - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - i32.and + call $~lib/util/hash/HASH + local.get $1 + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -2436,17 +2476,18 @@ call $~lib/set/Set#set:buckets local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.get $3 call $~lib/set/Set#set:entries local.get $0 local.get $5 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add @@ -2471,28 +2512,53 @@ i32.add i32.load8_u ) - (func $~lib/util/hash/hash16 (param $0 i32) (result i32) - local.get $0 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) local.get $0 - i32.const 8 - i32.shr_u - i32.xor - i32.const 16777619 - i32.mul + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.const 2870177450012600263 + i64.xor + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.tee $1 + local.get $1 + i64.const 33 + i64.shr_u + i64.xor + i64.const -4417276706812531889 + i64.mul + local.tee $1 + local.get $1 + i64.const 29 + i64.shr_u + i64.xor + i64.const 1609587929392839161 + i64.mul + local.tee $1 + local.get $1 + i64.const 32 + i64.shr_u + i64.xor ) - (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (local $3 i32) local.get $0 i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -2503,7 +2569,7 @@ if local.get $0 i32.load offset=4 - local.tee $2 + local.tee $3 i32.const 1 i32.and if (result i32) @@ -2520,7 +2586,7 @@ local.get $0 return end - local.get $2 + local.get $3 i32.const -2 i32.and local.set $0 @@ -2568,10 +2634,10 @@ local.tee $3 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $8 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 3 i32.shl i32.add @@ -2597,9 +2663,11 @@ local.get $2 local.get $6 local.get $7 - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -2626,17 +2694,18 @@ call $~lib/set/Set#set:buckets local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.get $3 call $~lib/set/Set#set:entries local.get $0 local.get $5 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add @@ -2672,6 +2741,42 @@ i32.add i32.load16_s ) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) + local.get $0 + i32.const 65535 + i32.and + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.const 2870177450012600263 + i64.xor + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.tee $1 + local.get $1 + i64.const 33 + i64.shr_u + i64.xor + i64.const -4417276706812531889 + i64.mul + local.tee $1 + local.get $1 + i64.const 29 + i64.shr_u + i64.xor + i64.const 1609587929392839161 + i64.mul + local.tee $1 + local.get $1 + i64.const 32 + i64.shr_u + i64.xor + ) (func $~lib/set/Set#rehash (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -2711,10 +2816,10 @@ local.tee $3 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $8 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 3 i32.shl i32.add @@ -2740,9 +2845,11 @@ local.get $2 local.get $6 local.get $7 - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -2769,17 +2876,18 @@ call $~lib/set/Set#set:buckets local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.get $3 call $~lib/set/Set#set:entries local.get $0 local.get $5 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add @@ -2806,44 +2914,49 @@ i32.add i32.load16_u ) - (func $~lib/util/hash/hash32 (param $0 i32) (result i32) - local.get $0 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - local.get $0 - i32.const 8 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.get $0 - i32.const 16 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) local.get $0 - i32.const 24 - i32.shr_u - i32.xor - i32.const 16777619 - i32.mul + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.const 2870177450012600265 + i64.xor + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.tee $1 + local.get $1 + i64.const 33 + i64.shr_u + i64.xor + i64.const -4417276706812531889 + i64.mul + local.tee $1 + local.get $1 + i64.const 29 + i64.shr_u + i64.xor + i64.const 1609587929392839161 + i64.mul + local.tee $1 + local.get $1 + i64.const 32 + i64.shr_u + i64.xor ) - (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (local $3 i32) local.get $0 i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -2854,7 +2967,7 @@ if local.get $0 i32.load offset=4 - local.tee $2 + local.tee $3 i32.const 1 i32.and if (result i32) @@ -2869,7 +2982,7 @@ local.get $0 return end - local.get $2 + local.get $3 i32.const -2 i32.and local.set $0 @@ -2917,10 +3030,10 @@ local.tee $3 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $8 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 3 i32.shl i32.add @@ -2946,9 +3059,11 @@ local.get $2 local.get $6 local.get $7 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -2975,17 +3090,18 @@ call $~lib/set/Set#set:buckets local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.get $3 call $~lib/set/Set#set:entries local.get $0 local.get $5 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add @@ -3021,13 +3137,15 @@ i32.add i32.load ) - (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (local $3 i32) local.get $0 i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -3038,7 +3156,7 @@ if local.get $0 i32.load offset=4 - local.tee $2 + local.tee $3 i32.const 1 i32.and if (result i32) @@ -3053,7 +3171,7 @@ local.get $0 return end - local.get $2 + local.get $3 i32.const -2 i32.and local.set $0 @@ -3101,10 +3219,10 @@ local.tee $3 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $8 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 3 i32.shl i32.add @@ -3130,9 +3248,11 @@ local.get $2 local.get $6 local.get $7 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -3159,17 +3279,18 @@ call $~lib/set/Set#set:buckets local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.get $3 call $~lib/set/Set#set:entries local.get $0 local.get $5 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add @@ -3196,79 +3317,51 @@ i32.add i32.load ) - (func $~lib/util/hash/hash64 (param $0 i64) (result i32) - (local $1 i32) + (func $~lib/util/hash/HASH (param $0 i64) (result i64) local.get $0 - i32.wrap_i64 - local.tee $1 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - local.get $1 - i32.const 8 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.get $1 - i32.const 16 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.get $1 - i32.const 24 - i32.shr_u - i32.xor - i32.const 16777619 - i32.mul + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const 2870177450012600269 + i64.xor + i64.const 27 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const 8796714831421723037 + i64.sub + local.tee $0 + local.get $0 + i64.const 33 + i64.shr_u + i64.xor + i64.const -4417276706812531889 + i64.mul + local.tee $0 + local.get $0 + i64.const 29 + i64.shr_u + i64.xor + i64.const 1609587929392839161 + i64.mul + local.tee $0 local.get $0 i64.const 32 i64.shr_u - i32.wrap_i64 - local.tee $1 - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.get $1 - i32.const 8 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.get $1 - i32.const 16 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.get $1 - i32.const 24 - i32.shr_u - i32.xor - i32.const 16777619 - i32.mul + i64.xor ) - (func $~lib/set/Set#find (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (param $0 i32) (param $1 i64) (param $2 i64) (result i32) + (local $3 i32) local.get $0 i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -3279,7 +3372,7 @@ if local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 i32.const 1 i32.and if (result i32) @@ -3294,7 +3387,7 @@ local.get $0 return end - local.get $2 + local.get $3 i32.const -2 i32.and local.set $0 @@ -3343,10 +3436,10 @@ local.tee $3 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $9 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 4 i32.shl i32.add @@ -3372,9 +3465,11 @@ local.get $2 local.get $8 local.get $5 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -3401,17 +3496,18 @@ call $~lib/set/Set#set:buckets local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.get $3 call $~lib/set/Set#set:entries local.get $0 local.get $7 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add @@ -3453,29 +3549,31 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:buckets local.get $0 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $0 i32.const 64 call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:entries local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 ) - (func $~lib/set/Set#find (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (param $0 i32) (param $1 i64) (param $2 i64) (result i32) + (local $3 i32) local.get $0 i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -3486,7 +3584,7 @@ if local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 i32.const 1 i32.and if (result i32) @@ -3501,7 +3599,7 @@ local.get $0 return end - local.get $2 + local.get $3 i32.const -2 i32.and local.set $0 @@ -3550,10 +3648,10 @@ local.tee $3 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $9 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 4 i32.shl i32.add @@ -3579,9 +3677,11 @@ local.get $2 local.get $8 local.get $5 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -3608,17 +3708,18 @@ call $~lib/set/Set#set:buckets local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.get $3 call $~lib/set/Set#set:entries local.get $0 local.get $7 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add @@ -3640,18 +3741,55 @@ local.get $0 i32.load offset=4 local.get $1 - i32.const 3 - i32.shl - i32.add - i64.load + i32.const 3 + i32.shl + i32.add + i64.load + ) + (func $~lib/util/hash/HASH (param $0 f32) (result i64) + (local $1 i64) + local.get $0 + i32.reinterpret_f32 + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.const 2870177450012600265 + i64.xor + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.tee $1 + local.get $1 + i64.const 33 + i64.shr_u + i64.xor + i64.const -4417276706812531889 + i64.mul + local.tee $1 + local.get $1 + i64.const 29 + i64.shr_u + i64.xor + i64.const 1609587929392839161 + i64.mul + local.tee $1 + local.get $1 + i64.const 32 + i64.shr_u + i64.xor ) - (func $~lib/set/Set#find (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (param $0 i32) (param $1 f32) (param $2 i64) (result i32) + (local $3 i32) local.get $0 i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -3662,7 +3800,7 @@ if local.get $0 i32.load offset=4 - local.tee $2 + local.tee $3 i32.const 1 i32.and if (result i32) @@ -3677,7 +3815,7 @@ local.get $0 return end - local.get $2 + local.get $3 i32.const -2 i32.and local.set $0 @@ -3726,10 +3864,10 @@ local.tee $3 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $9 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 3 i32.shl i32.add @@ -3755,10 +3893,11 @@ local.get $2 local.get $8 local.get $5 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -3785,17 +3924,18 @@ call $~lib/set/Set#set:buckets local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.get $3 call $~lib/set/Set#set:entries local.get $0 local.get $7 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add @@ -3822,13 +3962,53 @@ i32.add f32.load ) - (func $~lib/set/Set#find (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/util/hash/HASH (param $0 f64) (result i64) + (local $1 i64) + local.get $0 + i64.reinterpret_f64 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const 2870177450012600269 + i64.xor + i64.const 27 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const 8796714831421723037 + i64.sub + local.tee $1 + local.get $1 + i64.const 33 + i64.shr_u + i64.xor + i64.const -4417276706812531889 + i64.mul + local.tee $1 + local.get $1 + i64.const 29 + i64.shr_u + i64.xor + i64.const 1609587929392839161 + i64.mul + local.tee $1 + local.get $1 + i64.const 32 + i64.shr_u + i64.xor + ) + (func $~lib/set/Set#find (param $0 i32) (param $1 f64) (param $2 i64) (result i32) + (local $3 i32) local.get $0 i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -3839,7 +4019,7 @@ if local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 i32.const 1 i32.and if (result i32) @@ -3854,7 +4034,7 @@ local.get $0 return end - local.get $2 + local.get $3 i32.const -2 i32.and local.set $0 @@ -3903,10 +4083,10 @@ local.tee $3 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $9 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 4 i32.shl i32.add @@ -3932,10 +4112,11 @@ local.get $2 local.get $8 local.get $5 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -3962,17 +4143,18 @@ call $~lib/set/Set#set:buckets local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.get $3 call $~lib/set/Set#set:entries local.get $0 local.get $7 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add @@ -4031,7 +4213,7 @@ i32.load call $~lib/rt/itcms/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 call $~lib/rt/itcms/__visit return end @@ -4121,14 +4303,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -4139,7 +4314,7 @@ ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (local $2 i32) - (local $3 i32) + (local $3 i64) (local $4 i32) global.get $~lib/memory/__stack_pointer i32.const 4 @@ -4149,30 +4324,22 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store + local.get $1 + call $~lib/util/hash/HASH + local.set $3 global.get $~lib/memory/__stack_pointer local.get $0 i32.store - local.get $1 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - local.tee $2 - local.set $3 local.get $0 local.get $1 - local.get $2 + local.get $3 call $~lib/set/Set#find i32.eqz if local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if global.get $~lib/memory/__stack_pointer @@ -4180,36 +4347,37 @@ i32.store local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/set/Set#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $4 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $4 i32.const 3 i32.shl @@ -4219,17 +4387,18 @@ i32.store8 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $2 local.get $0 i32.load local.get $3 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -4312,11 +4481,11 @@ i64.const 0 i64.store local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $5 global.get $~lib/memory/__stack_pointer local.get $0 - i32.load offset=16 + i32.load offset=24 local.set $0 global.get $~lib/memory/__stack_pointer i32.const 8 @@ -4590,7 +4759,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -4659,7 +4828,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -4733,12 +4902,12 @@ local.get $3 i32.store offset=4 local.get $3 - i32.load offset=20 + i32.load offset=28 global.get $~lib/memory/__stack_pointer local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.ne if i32.const 0 @@ -4805,7 +4974,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -4893,7 +5062,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -4913,7 +5082,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 if i32.const 0 i32.const 1568 @@ -4953,7 +5122,7 @@ ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (local $2 i32) - (local $3 i32) + (local $3 i64) (local $4 i32) global.get $~lib/memory/__stack_pointer i32.const 4 @@ -4963,23 +5132,15 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store + local.get $1 + call $~lib/util/hash/HASH + local.set $3 global.get $~lib/memory/__stack_pointer local.get $0 i32.store - local.get $1 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - local.tee $2 - local.set $3 local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH - local.tee $3 + local.get $3 call $~lib/set/Set#find i32.eqz if @@ -4994,6 +5155,8 @@ i32.store local.get $0 local.get $0 + i32.load offset=28 + local.get $0 i32.load offset=20 i32.const 3 i32.mul @@ -5075,11 +5238,11 @@ i64.const 0 i64.store local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $5 global.get $~lib/memory/__stack_pointer local.get $0 - i32.load offset=16 + i32.load offset=24 local.set $0 global.get $~lib/memory/__stack_pointer i32.const 8 @@ -5351,7 +5514,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -5418,7 +5581,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -5492,12 +5655,12 @@ local.get $3 i32.store offset=4 local.get $3 - i32.load offset=20 + i32.load offset=28 global.get $~lib/memory/__stack_pointer local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.ne if i32.const 0 @@ -5562,7 +5725,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -5648,7 +5811,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -5668,7 +5831,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 if i32.const 0 i32.const 1568 @@ -5708,7 +5871,7 @@ ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (local $2 i32) - (local $3 i32) + (local $3 i64) (local $4 i32) global.get $~lib/memory/__stack_pointer i32.const 4 @@ -5719,11 +5882,7 @@ i32.const 0 i32.store local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH local.set $3 global.get $~lib/memory/__stack_pointer local.get $0 @@ -5745,6 +5904,8 @@ i32.store local.get $0 local.get $0 + i32.load offset=28 + local.get $0 i32.load offset=20 i32.const 3 i32.mul @@ -5881,7 +6042,7 @@ i64.const 0 i64.store local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 global.get $~lib/memory/__stack_pointer local.get $0 @@ -6163,7 +6324,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -6232,7 +6393,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -6306,12 +6467,12 @@ local.get $3 i32.store offset=4 local.get $3 - i32.load offset=20 + i32.load offset=28 global.get $~lib/memory/__stack_pointer local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.ne if i32.const 0 @@ -6378,7 +6539,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -6466,7 +6627,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -6486,7 +6647,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 if i32.const 0 i32.const 1568 @@ -6526,7 +6687,7 @@ ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (local $2 i32) - (local $3 i32) + (local $3 i64) (local $4 i32) global.get $~lib/memory/__stack_pointer i32.const 4 @@ -6537,9 +6698,7 @@ i32.const 0 i32.store local.get $1 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH local.set $3 global.get $~lib/memory/__stack_pointer local.get $0 @@ -6561,6 +6720,8 @@ i32.store local.get $0 local.get $0 + i32.load offset=28 + local.get $0 i32.load offset=20 i32.const 3 i32.mul @@ -6644,7 +6805,7 @@ i64.const 0 i64.store local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 global.get $~lib/memory/__stack_pointer local.get $0 @@ -6924,7 +7085,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -6991,7 +7152,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -7065,12 +7226,12 @@ local.get $3 i32.store offset=4 local.get $3 - i32.load offset=20 + i32.load offset=28 global.get $~lib/memory/__stack_pointer local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.ne if i32.const 0 @@ -7135,7 +7296,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -7221,7 +7382,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -7241,7 +7402,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 if i32.const 0 i32.const 1568 @@ -7281,7 +7442,7 @@ ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (local $2 i32) - (local $3 i32) + (local $3 i64) (local $4 i32) global.get $~lib/memory/__stack_pointer i32.const 4 @@ -7292,7 +7453,7 @@ i32.const 0 i32.store local.get $1 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.set $3 global.get $~lib/memory/__stack_pointer local.get $0 @@ -7314,6 +7475,8 @@ i32.store local.get $0 local.get $0 + i32.load offset=28 + local.get $0 i32.load offset=20 i32.const 3 i32.mul @@ -7450,7 +7613,7 @@ i64.const 0 i64.store local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 global.get $~lib/memory/__stack_pointer local.get $0 @@ -7728,7 +7891,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -7793,7 +7956,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -7867,12 +8030,12 @@ local.get $3 i32.store offset=4 local.get $3 - i32.load offset=20 + i32.load offset=28 global.get $~lib/memory/__stack_pointer local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.ne if i32.const 0 @@ -7935,7 +8098,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -8019,7 +8182,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -8039,7 +8202,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 if i32.const 0 i32.const 1568 @@ -8068,7 +8231,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -8079,7 +8242,7 @@ ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (local $2 i32) - (local $3 i32) + (local $3 i64) (local $4 i32) global.get $~lib/memory/__stack_pointer i32.const 4 @@ -8090,7 +8253,7 @@ i32.const 0 i32.store local.get $1 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.set $3 global.get $~lib/memory/__stack_pointer local.get $0 @@ -8102,9 +8265,9 @@ i32.eqz if local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if global.get $~lib/memory/__stack_pointer @@ -8112,36 +8275,37 @@ i32.store local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/set/Set#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $4 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $4 i32.const 3 i32.shl @@ -8151,17 +8315,18 @@ i32.store local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $2 local.get $0 i32.load local.get $3 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -8195,7 +8360,7 @@ i64.const 0 i64.store local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 global.get $~lib/memory/__stack_pointer local.get $0 @@ -8333,7 +8498,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/set/Set#find local.tee $1 i32.eqz @@ -8352,20 +8517,21 @@ i32.store offset=4 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.sub - i32.store offset=20 + i32.store offset=28 local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 local.tee $2 i32.const 1 i32.add i32.const 4 local.get $0 - i32.load offset=20 + i32.load offset=28 local.tee $1 local.get $1 i32.const 4 @@ -8374,9 +8540,9 @@ i32.ge_u if (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 @@ -8472,7 +8638,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -8537,7 +8703,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -8611,12 +8777,12 @@ local.get $3 i32.store offset=4 local.get $3 - i32.load offset=20 + i32.load offset=28 global.get $~lib/memory/__stack_pointer local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.ne if i32.const 0 @@ -8679,7 +8845,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -8763,7 +8929,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -8783,7 +8949,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 if i32.const 0 i32.const 1568 @@ -8812,7 +8978,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -8823,7 +8989,7 @@ ) (func $~lib/set/Set#add (param $0 i32) (param $1 i64) (local $2 i32) - (local $3 i32) + (local $3 i64) (local $4 i32) global.get $~lib/memory/__stack_pointer i32.const 4 @@ -8834,7 +9000,7 @@ i32.const 0 i32.store local.get $1 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.set $3 global.get $~lib/memory/__stack_pointer local.get $0 @@ -8856,6 +9022,8 @@ i32.store local.get $0 local.get $0 + i32.load offset=28 + local.get $0 i32.load offset=20 i32.const 3 i32.mul @@ -8881,11 +9049,11 @@ local.get $0 local.get $0 i32.load offset=24 - local.tee $3 + local.tee $4 i32.const 1 i32.add i32.store offset=24 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add @@ -8901,7 +9069,7 @@ local.get $2 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -8992,7 +9160,7 @@ i64.const 0 i64.store local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 global.get $~lib/memory/__stack_pointer local.get $0 @@ -9272,7 +9440,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -9337,7 +9505,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -9411,12 +9579,12 @@ local.get $3 i32.store offset=4 local.get $3 - i32.load offset=20 + i32.load offset=28 global.get $~lib/memory/__stack_pointer local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.ne if i32.const 0 @@ -9479,7 +9647,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -9563,7 +9731,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -9583,7 +9751,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 if i32.const 0 i32.const 1568 @@ -9612,7 +9780,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -9623,7 +9791,7 @@ ) (func $~lib/set/Set#add (param $0 i32) (param $1 i64) (local $2 i32) - (local $3 i32) + (local $3 i64) (local $4 i32) global.get $~lib/memory/__stack_pointer i32.const 4 @@ -9634,7 +9802,7 @@ i32.const 0 i32.store local.get $1 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.set $3 global.get $~lib/memory/__stack_pointer local.get $0 @@ -9646,9 +9814,9 @@ i32.eqz if local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if global.get $~lib/memory/__stack_pointer @@ -9656,36 +9824,37 @@ i32.store local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/set/Set#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $4 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $4 i32.const 4 i32.shl @@ -9695,17 +9864,18 @@ i64.store local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $2 local.get $0 i32.load local.get $3 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -9739,7 +9909,7 @@ i64.const 0 i64.store local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 global.get $~lib/memory/__stack_pointer local.get $0 @@ -9878,7 +10048,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH call $~lib/set/Set#find local.tee $2 i32.eqz @@ -9897,20 +10067,21 @@ i32.store offset=8 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.sub - i32.store offset=20 + i32.store offset=28 local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 local.tee $3 i32.const 1 i32.add i32.const 4 local.get $0 - i32.load offset=20 + i32.load offset=28 local.tee $2 local.get $2 i32.const 4 @@ -9919,9 +10090,9 @@ i32.ge_u if (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 @@ -10018,7 +10189,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -10083,7 +10254,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -10157,12 +10328,12 @@ local.get $3 i32.store offset=4 local.get $3 - i32.load offset=20 + i32.load offset=28 global.get $~lib/memory/__stack_pointer local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.ne if i32.const 0 @@ -10225,7 +10396,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -10309,7 +10480,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -10329,7 +10500,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 if i32.const 0 i32.const 1568 @@ -10369,7 +10540,7 @@ ) (func $~lib/set/Set#add (param $0 i32) (param $1 f32) (local $2 i32) - (local $3 i32) + (local $3 i64) (local $4 i32) global.get $~lib/memory/__stack_pointer i32.const 4 @@ -10380,8 +10551,7 @@ i32.const 0 i32.store local.get $1 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.set $3 global.get $~lib/memory/__stack_pointer local.get $0 @@ -10403,6 +10573,8 @@ i32.store local.get $0 local.get $0 + i32.load offset=28 + local.get $0 i32.load offset=20 i32.const 3 i32.mul @@ -10428,11 +10600,11 @@ local.get $0 local.get $0 i32.load offset=24 - local.tee $3 + local.tee $4 i32.const 1 i32.add i32.store offset=24 - local.get $3 + local.get $4 i32.const 3 i32.shl i32.add @@ -10448,7 +10620,7 @@ local.get $2 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -10491,7 +10663,7 @@ local.set $6 global.get $~lib/memory/__stack_pointer local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $8 local.set $2 global.get $~lib/memory/__stack_pointer @@ -10815,7 +10987,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -10880,7 +11052,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -10954,12 +11126,12 @@ local.get $3 i32.store offset=4 local.get $3 - i32.load offset=20 + i32.load offset=28 global.get $~lib/memory/__stack_pointer local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.ne if i32.const 0 @@ -11022,7 +11194,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -11106,7 +11278,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -11126,7 +11298,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 if i32.const 0 i32.const 1568 @@ -11166,7 +11338,7 @@ ) (func $~lib/set/Set#add (param $0 i32) (param $1 f64) (local $2 i32) - (local $3 i32) + (local $3 i64) (local $4 i32) global.get $~lib/memory/__stack_pointer i32.const 4 @@ -11177,8 +11349,7 @@ i32.const 0 i32.store local.get $1 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.set $3 global.get $~lib/memory/__stack_pointer local.get $0 @@ -11200,6 +11371,8 @@ i32.store local.get $0 local.get $0 + i32.load offset=28 + local.get $0 i32.load offset=20 i32.const 3 i32.mul @@ -11225,11 +11398,11 @@ local.get $0 local.get $0 i32.load offset=24 - local.tee $3 + local.tee $4 i32.const 1 i32.add i32.store offset=24 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add @@ -11245,7 +11418,7 @@ local.get $2 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i64.load offset=8 i64.and @@ -11288,7 +11461,7 @@ local.set $6 global.get $~lib/memory/__stack_pointer local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $8 local.set $2 global.get $~lib/memory/__stack_pointer @@ -11612,7 +11785,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -11677,7 +11850,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 100 i32.ne if @@ -11751,12 +11924,12 @@ local.get $3 i32.store offset=4 local.get $3 - i32.load offset=20 + i32.load offset=28 global.get $~lib/memory/__stack_pointer local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.ne if i32.const 0 @@ -11819,7 +11992,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -11903,7 +12076,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 50 i32.ne if @@ -11923,7 +12096,7 @@ local.get $0 i32.store offset=4 local.get $0 - i32.load offset=20 + i32.load offset=28 if i32.const 0 i32.const 1568 @@ -11984,7 +12157,7 @@ i32.const 0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 3 call $~lib/rt/itcms/__new local.tee $0 @@ -11994,21 +12167,21 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:buckets local.get $0 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $0 i32.const 32 call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:entries local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -12026,7 +12199,7 @@ i32.const 0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 5 call $~lib/rt/itcms/__new local.tee $0 @@ -12036,21 +12209,21 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:buckets local.get $0 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $0 i32.const 32 call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:entries local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -12068,7 +12241,7 @@ i32.const 0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 7 call $~lib/rt/itcms/__new local.tee $0 @@ -12078,21 +12251,21 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:buckets local.get $0 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $0 i32.const 32 call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:entries local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -12110,7 +12283,7 @@ i32.const 0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 9 call $~lib/rt/itcms/__new local.tee $0 @@ -12120,21 +12293,21 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:buckets local.get $0 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $0 i32.const 32 call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:entries local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -12152,7 +12325,7 @@ i32.const 0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 11 call $~lib/rt/itcms/__new local.tee $0 @@ -12162,21 +12335,21 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:buckets local.get $0 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $0 i32.const 32 call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:entries local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -12194,7 +12367,7 @@ i32.const 0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 13 call $~lib/rt/itcms/__new local.tee $0 @@ -12204,21 +12377,21 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:buckets local.get $0 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $0 i32.const 32 call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:entries local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -12236,7 +12409,7 @@ i32.const 0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 15 call $~lib/rt/itcms/__new local.tee $0 @@ -12246,21 +12419,21 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:buckets local.get $0 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $0 i32.const 64 call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:entries local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -12278,7 +12451,7 @@ i32.const 0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 17 call $~lib/rt/itcms/__new local.tee $0 @@ -12288,21 +12461,21 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:buckets local.get $0 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $0 i32.const 64 call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:entries local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -12320,7 +12493,7 @@ i32.const 0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 19 call $~lib/rt/itcms/__new local.tee $0 @@ -12330,21 +12503,21 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:buckets local.get $0 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $0 i32.const 32 call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:entries local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -12362,7 +12535,7 @@ i32.const 0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 21 call $~lib/rt/itcms/__new local.tee $0 @@ -12372,21 +12545,21 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:buckets local.get $0 - i32.const 3 - i32.store offset=4 + i64.const 3 + i64.store offset=8 local.get $0 i32.const 64 call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:entries local.get $0 i32.const 4 - i32.store offset=12 + i32.store offset=20 local.get $0 i32.const 0 - i32.store offset=16 + i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add diff --git a/tests/compiler/std/set.untouched.wat b/tests/compiler/std/set.untouched.wat index 9e3624d7b9..50dc5bffe8 100644 --- a/tests/compiler/std/set.untouched.wat +++ b/tests/compiler/std/set.untouched.wat @@ -1,47 +1,33 @@ (module (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) + (type $i32_i64_=>_none (func (param i32 i64))) (type $i32_i32_i64_=>_i32 (func (param i32 i32 i64) (result i32))) (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) (type $i32_=>_i64 (func (param i32) (result i64))) (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) -<<<<<<< HEAD - (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) -======= ->>>>>>> master (type $i32_f32_=>_i32 (func (param i32 f32) (result i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) (type $i32_i32_f64_=>_none (func (param i32 i32 f64))) -<<<<<<< HEAD (type $i32_i64_i64_=>_i32 (func (param i32 i64 i64) (result i32))) (type $i64_=>_i64 (func (param i64) (result i64))) - (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) - (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) - (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $i32_f32_i64_=>_i32 (func (param i32 f32 i64) (result i32))) - (type $i32_f64_i64_=>_i32 (func (param i32 f64 i64) (result i32))) - (type $f32_=>_i64 (func (param f32) (result i64))) - (type $f64_=>_i64 (func (param f64) (result i64))) -======= - (type $i32_i64_=>_none (func (param i32 i64))) - (type $i32_i64_i32_=>_i32 (func (param i32 i64 i32) (result i32))) (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_f32_=>_none (func (param i32 f32))) (type $i32_f64_=>_none (func (param i32 f64))) (type $none_=>_i32 (func (result i32))) - (type $i64_=>_i32 (func (param i64) (result i32))) - (type $i32_f32_i32_=>_i32 (func (param i32 f32 i32) (result i32))) - (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_f32_i64_=>_i32 (func (param i32 f32 i64) (result i32))) + (type $i32_f64_i64_=>_i32 (func (param i32 f64 i64) (result i32))) + (type $f32_=>_i64 (func (param f32) (result i64))) + (type $f64_=>_i64 (func (param f64) (result i64))) (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) ->>>>>>> master (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 12) "<\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e\00\00\00\00\00") @@ -1662,160 +1648,6 @@ call $~lib/builtins/abort unreachable end -<<<<<<< HEAD - local.get $1 - i32.const 0 - call $~lib/rt/pure/__new - local.set $2 - local.get $2 - i32.const 0 - local.get $1 - call $~lib/memory/memory.fill - local.get $2 - call $~lib/rt/pure/__retain - local.set $3 - local.get $0 - call $~lib/rt/pure/__release - local.get $3 - ) - (func $~lib/set/Set#constructor (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 32 - i32.const 3 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.set $0 - end - local.get $0 - i32.const 0 - i32.const 4 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store - local.get $0 - i64.const 4 - i64.const 1 - i64.sub - i64.store offset=8 - local.get $0 - i32.const 0 - i32.const 4 - i32.const 8 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $0 - i32.const 0 - i32.store offset=28 - local.get $0 - ) - (func $~lib/util/hash/HASH (param $0 i32) (result i64) - (local $1 i64) - (local $2 i32) - (local $3 i64) - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 4 - i32.le_u - drop - local.get $0 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - local.set $2 - i64.const 1 - local.set $1 - i64.const 0 - i64.const 2870177450012600261 - i64.add - local.get $1 - i64.add - local.set $3 - local.get $3 - local.get $2 - i64.extend_i32_u - i64.const -7046029288634856825 - i64.mul - i64.xor - local.set $3 - local.get $3 - i64.const 23 - i64.rotl - i64.const -4417276706812531889 - i64.mul - i64.const 1609587929392839161 - i64.add - local.set $3 - local.get $3 - local.get $3 - i64.const 33 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const -4417276706812531889 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 29 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const 1609587929392839161 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 32 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - return - ) - (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.get $2 - local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - i32.load - local.set $3 - loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 - if - local.get $3 - i32.load offset=4 - local.set $5 - local.get $5 -======= local.get $0 call $~lib/rt/tlsf/computeSize ) @@ -1844,7 +1676,6 @@ i32.lt_u if (result i32) local.get $1 ->>>>>>> master i32.const 1 i32.const 27 local.get $1 @@ -1857,35 +1688,6 @@ else local.get $1 end -<<<<<<< HEAD - end - i32.const 0 - ) - (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - local.get $1 - call $~lib/util/hash/HASH - call $~lib/set/Set#find - i32.const 0 - i32.ne - ) - (func $~lib/set/Set#rehash (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 $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i64) - (local $14 i32) - local.get $1 -======= local.set $4 i32.const 31 local.get $4 @@ -1909,7 +1711,6 @@ i32.sub local.set $2 end ->>>>>>> master i32.const 1 drop local.get $2 @@ -1937,23 +1738,8 @@ local.set $4 local.get $5 local.get $4 -<<<<<<< HEAD - i32.const 8 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $0 - i32.load offset=16 - local.set $6 - local.get $6 - local.get $0 - i32.load offset=24 - i32.const 8 - i32.mul -======= i32.const 2 i32.shl ->>>>>>> master i32.add i32.load offset=4 i32.const 0 @@ -2004,47 +1790,12 @@ local.get $6 i32.eqz if -<<<<<<< HEAD - local.get $8 - local.set $11 - local.get $10 - i32.load8_s - local.set $12 - local.get $11 - local.get $12 - i32.store8 - local.get $12 - call $~lib/util/hash/HASH - local.get $1 - i64.extend_i32_u - i64.and - local.set $13 - local.get $3 - local.get $13 - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - local.set $14 - local.get $11 - local.get $14 - i32.load - i32.store offset=4 - local.get $14 - local.get $8 - i32.store - local.get $8 - i32.const 8 - i32.add - local.set $8 -======= i32.const 0 i32.const 368 i32.const 347 i32.const 18 call $~lib/builtins/abort unreachable ->>>>>>> master end local.get $0 local.set $9 @@ -2074,120 +1825,16 @@ i32.ctz local.set $4 local.get $9 -<<<<<<< HEAD - call $~lib/rt/pure/__release - end - local.get $12 - i32.store - local.get $0 - local.get $1 - i64.extend_i32_u - i64.store offset=8 - local.get $0 - local.tee $14 - local.get $5 - local.tee $9 - local.get $14 - i32.load offset=16 - local.tee $11 - i32.ne - if - local.get $9 - call $~lib/rt/pure/__retain - local.set $9 - local.get $11 - call $~lib/rt/pure/__release - end - local.get $9 - i32.store offset=16 - local.get $0 - local.get $4 - i32.store offset=20 - local.get $0 - local.get $0 - i32.load offset=28 - i32.store offset=24 - local.get $3 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - ) - (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) - (local $2 i64) - (local $3 i32) - (local $4 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $2 - local.get $0 - local.get $1 - local.get $2 - call $~lib/set/Set#find - local.set $3 - local.get $3 - i32.eqz - if - local.get $0 - i32.load offset=24 - local.get $0 - i32.load offset=20 - i32.eq - if - local.get $0 - local.get $0 - i32.load offset=28 - local.get $0 - i32.load offset=20 - i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s - if (result i64) - local.get $0 - i64.load offset=8 - else - local.get $0 - i64.load offset=8 - i64.const 1 - i64.shl - i64.const 1 - i64.or - end - i32.wrap_i64 - call $~lib/set/Set#rehash - end - local.get $0 - i32.load offset=16 - local.get $0 - local.get $0 - i32.load offset=24 - local.tee $4 - i32.const 1 - i32.add - i32.store offset=24 - local.get $4 - i32.const 8 - i32.mul - i32.add - local.set $3 - local.get $3 - local.get $1 - i32.store8 - local.get $0 - local.get $0 - i32.load offset=28 -======= - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + local.get $8 + i32.const 4 + i32.shl + local.get $4 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + local.set $7 end local.get $7 ) @@ -2341,7 +1988,6 @@ else local.get $1 local.get $3 ->>>>>>> master i32.const 1 i32.const -1 i32.xor @@ -2352,16 +1998,6 @@ local.get $5 i32.const 4 i32.add -<<<<<<< HEAD - i32.store offset=28 - local.get $0 - i32.load - local.get $2 - local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 -======= local.get $5 i32.load i32.const 3 @@ -2372,26 +2008,8 @@ local.get $1 local.set $5 local.get $5 ->>>>>>> master i32.const 4 i32.add -<<<<<<< HEAD - local.set $4 - local.get $3 - local.get $4 - i32.load - i32.store offset=4 - local.get $4 - local.get $3 - i32.store - end - local.get $0 - call $~lib/rt/pure/__retain - ) - (func $~lib/set/Set#get:size (param $0 i32) (result i32) - local.get $0 - i32.load offset=28 -======= local.get $5 i32.load i32.const 3 @@ -2406,7 +2024,6 @@ i32.and call $~lib/rt/common/BLOCK#set:mmInfo end ->>>>>>> master ) (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -2835,15 +2452,15 @@ i32.const 0 call $~lib/rt/itcms/__link ) - (func $~lib/set/Set#set:bucketsMask (param $0 i32) (param $1 i32) + (func $~lib/set/Set#set:bucketsMask (param $0 i32) (param $1 i64) local.get $0 local.get $1 - i32.store offset=4 + i64.store offset=8 ) (func $~lib/set/Set#set:entries (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $1 i32.const 0 @@ -2852,26 +2469,91 @@ (func $~lib/set/Set#set:entriesCapacity (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=12 + i32.store offset=20 ) (func $~lib/set/Set#set:entriesOffset (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=16 + i32.store offset=24 ) (func $~lib/set/Set#set:entriesCount (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=20 + i32.store offset=28 ) - (func $~lib/util/hash/hash8 (param $0 i32) (result i32) - i32.const -2128831035 + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) + (local $2 i32) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + i32.const 4 + i32.le_u + drop local.get $0 - i32.xor - i32.const 16777619 - i32.mul + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + local.set $2 + i64.const 1 + local.set $1 + i64.const 0 + i64.const 2870177450012600261 + i64.add + local.get $1 + i64.add + local.set $3 + local.get $3 + local.get $2 + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $3 + local.get $3 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $3 + local.get $3 + local.get $3 + i64.const 33 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const -4417276706812531889 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 29 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const 1609587929392839161 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 32 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + return ) - (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2879,8 +2561,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -2947,7 +2630,7 @@ (local $10 i32) (local $11 i32) (local $12 i32) - (local $13 i32) + (local $13 i64) (local $14 i32) global.get $~lib/memory/__stack_pointer i32.const 8 @@ -2984,11 +2667,11 @@ local.tee $5 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 8 i32.mul i32.add @@ -3018,28 +2701,15 @@ local.get $11 local.get $12 call $~lib/set/SetEntry#set:key - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 - i32.and + i64.extend_i32_u + i64.and local.set $13 local.get $3 local.get $13 + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -3068,6 +2738,7 @@ call $~lib/set/Set#set:buckets local.get $0 local.get $1 + i64.extend_i32_u call $~lib/set/Set#set:bucketsMask local.get $0 local.get $5 @@ -3077,7 +2748,7 @@ call $~lib/set/Set#set:entriesCapacity local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 call $~lib/set/Set#set:entriesOffset global.get $~lib/memory/__stack_pointer i32.const 8 @@ -3086,7 +2757,7 @@ ) (func $~lib/set/Set#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) local.get $0 @@ -4536,9 +4207,9 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/set/Set#set:bucketsMask local.get $0 i32.const 0 @@ -4566,15 +4237,15 @@ i32.const 0 call $~lib/rt/itcms/__link ) - (func $~lib/set/Set#set:bucketsMask (param $0 i32) (param $1 i32) + (func $~lib/set/Set#set:bucketsMask (param $0 i32) (param $1 i64) local.get $0 local.get $1 - i32.store offset=4 + i64.store offset=8 ) (func $~lib/set/Set#set:entries (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $1 i32.const 0 @@ -4583,35 +4254,106 @@ (func $~lib/set/Set#set:entriesCapacity (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=12 + i32.store offset=20 ) (func $~lib/set/Set#set:entriesOffset (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=16 + i32.store offset=24 ) (func $~lib/set/Set#set:entriesCount (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=20 + i32.store offset=28 ) - (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.get $2 - local.get $0 - i32.load offset=4 - i32.and - i32.const 4 - i32.mul - i32.add - i32.load - local.set $3 - loop $while-continue|0 - local.get $3 + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) + (local $2 i32) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + i32.const 4 + i32.le_u + drop + local.get $0 + i32.const 255 + i32.and + local.set $2 + i64.const 1 + local.set $1 + i64.const 0 + i64.const 2870177450012600261 + i64.add + local.get $1 + i64.add + local.set $3 + local.get $3 + local.get $2 + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $3 + local.get $3 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $3 + local.get $3 + local.get $3 + i64.const 33 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const -4417276706812531889 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 29 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const 1609587929392839161 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 32 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + return + ) + (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load + local.get $2 + local.get $0 + i64.load offset=8 + i64.and + i32.wrap_i64 + i32.const 4 + i32.mul + i32.add + i32.load + local.set $3 + loop $while-continue|0 + local.get $3 local.set $4 local.get $4 if @@ -4669,7 +4411,7 @@ (local $10 i32) (local $11 i32) (local $12 i32) - (local $13 i32) + (local $13 i64) (local $14 i32) global.get $~lib/memory/__stack_pointer i32.const 8 @@ -4706,11 +4448,11 @@ local.tee $5 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 8 i32.mul i32.add @@ -4740,28 +4482,15 @@ local.get $11 local.get $12 call $~lib/set/SetEntry#set:key - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 - i32.and + i64.extend_i32_u + i64.and local.set $13 local.get $3 local.get $13 + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -4790,6 +4519,7 @@ call $~lib/set/Set#set:buckets local.get $0 local.get $1 + i64.extend_i32_u call $~lib/set/Set#set:bucketsMask local.get $0 local.get $5 @@ -4799,7 +4529,7 @@ call $~lib/set/Set#set:entriesCapacity local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 call $~lib/set/Set#set:entriesOffset global.get $~lib/memory/__stack_pointer i32.const 8 @@ -4808,7 +4538,7 @@ ) (func $~lib/set/Set#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) local.get $0 @@ -4894,9 +4624,9 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/set/Set#set:bucketsMask local.get $0 i32.const 0 @@ -4924,15 +4654,15 @@ i32.const 0 call $~lib/rt/itcms/__link ) - (func $~lib/set/Set#set:bucketsMask (param $0 i32) (param $1 i32) + (func $~lib/set/Set#set:bucketsMask (param $0 i32) (param $1 i64) local.get $0 local.get $1 - i32.store offset=4 + i64.store offset=8 ) (func $~lib/set/Set#set:entries (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $1 i32.const 0 @@ -4941,41 +4671,91 @@ (func $~lib/set/Set#set:entriesCapacity (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=12 + i32.store offset=20 ) (func $~lib/set/Set#set:entriesOffset (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=16 + i32.store offset=24 ) (func $~lib/set/Set#set:entriesCount (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=20 + i32.store offset=28 ) - (func $~lib/util/hash/hash16 (param $0 i32) (result i32) - (local $1 i32) - i32.const -2128831035 - local.set $1 - local.get $1 - local.get $0 - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $1 - local.get $1 + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) + (local $2 i32) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 2 + i32.const 4 + i32.le_u + drop local.get $0 - i32.const 8 - i32.shr_u - i32.xor - i32.const 16777619 - i32.mul + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + local.set $2 + i64.const 2 local.set $1 + i64.const 0 + i64.const 2870177450012600261 + i64.add local.get $1 + i64.add + local.set $3 + local.get $3 + local.get $2 + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $3 + local.get $3 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $3 + local.get $3 + local.get $3 + i64.const 33 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const -4417276706812531889 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 29 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const 1609587929392839161 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 32 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + return ) - (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4983,8 +4763,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -5051,7 +4832,7 @@ (local $10 i32) (local $11 i32) (local $12 i32) - (local $13 i32) + (local $13 i64) (local $14 i32) global.get $~lib/memory/__stack_pointer i32.const 8 @@ -5088,11 +4869,11 @@ local.tee $5 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 8 i32.mul i32.add @@ -5122,32 +4903,15 @@ local.get $11 local.get $12 call $~lib/set/SetEntry#set:key - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 - i32.and + i64.extend_i32_u + i64.and local.set $13 local.get $3 local.get $13 + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -5176,6 +4940,7 @@ call $~lib/set/Set#set:buckets local.get $0 local.get $1 + i64.extend_i32_u call $~lib/set/Set#set:bucketsMask local.get $0 local.get $5 @@ -5185,7 +4950,7 @@ call $~lib/set/Set#set:entriesCapacity local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 call $~lib/set/Set#set:entriesOffset global.get $~lib/memory/__stack_pointer i32.const 8 @@ -5194,7 +4959,7 @@ ) (func $~lib/set/Set#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) local.get $0 @@ -5280,9 +5045,9 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/set/Set#set:bucketsMask local.get $0 i32.const 0 @@ -5310,15 +5075,15 @@ i32.const 0 call $~lib/rt/itcms/__link ) - (func $~lib/set/Set#set:bucketsMask (param $0 i32) (param $1 i32) + (func $~lib/set/Set#set:bucketsMask (param $0 i32) (param $1 i64) local.get $0 local.get $1 - i32.store offset=4 + i64.store offset=8 ) (func $~lib/set/Set#set:entries (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $1 i32.const 0 @@ -5327,28 +5092,99 @@ (func $~lib/set/Set#set:entriesCapacity (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=12 + i32.store offset=20 ) (func $~lib/set/Set#set:entriesOffset (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=16 + i32.store offset=24 ) (func $~lib/set/Set#set:entriesCount (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=20 + i32.store offset=28 ) - (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) + (local $2 i32) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 2 + i32.const 4 + i32.le_u + drop + local.get $0 + i32.const 65535 + i32.and + local.set $2 + i64.const 2 + local.set $1 + i64.const 0 + i64.const 2870177450012600261 + i64.add + local.get $1 + i64.add + local.set $3 + local.get $3 + local.get $2 + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $3 + local.get $3 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $3 + local.get $3 + local.get $3 + i64.const 33 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const -4417276706812531889 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 29 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const 1609587929392839161 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 32 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + return + ) + (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -5413,7 +5249,7 @@ (local $10 i32) (local $11 i32) (local $12 i32) - (local $13 i32) + (local $13 i64) (local $14 i32) global.get $~lib/memory/__stack_pointer i32.const 8 @@ -5450,11 +5286,11 @@ local.tee $5 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 8 i32.mul i32.add @@ -5484,32 +5320,15 @@ local.get $11 local.get $12 call $~lib/set/SetEntry#set:key - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 - i32.and + i64.extend_i32_u + i64.and local.set $13 local.get $3 local.get $13 + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -5538,6 +5357,7 @@ call $~lib/set/Set#set:buckets local.get $0 local.get $1 + i64.extend_i32_u call $~lib/set/Set#set:bucketsMask local.get $0 local.get $5 @@ -5547,7 +5367,7 @@ call $~lib/set/Set#set:entriesCapacity local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 call $~lib/set/Set#set:entriesOffset global.get $~lib/memory/__stack_pointer i32.const 8 @@ -5556,7 +5376,7 @@ ) (func $~lib/set/Set#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) local.get $0 @@ -5642,9 +5462,9 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/set/Set#set:bucketsMask local.get $0 i32.const 0 @@ -5672,15 +5492,15 @@ i32.const 0 call $~lib/rt/itcms/__link ) - (func $~lib/set/Set#set:bucketsMask (param $0 i32) (param $1 i32) + (func $~lib/set/Set#set:bucketsMask (param $0 i32) (param $1 i64) local.get $0 local.get $1 - i32.store offset=4 + i64.store offset=8 ) (func $~lib/set/Set#set:entries (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $1 i32.const 0 @@ -5689,61 +5509,87 @@ (func $~lib/set/Set#set:entriesCapacity (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=12 + i32.store offset=20 ) (func $~lib/set/Set#set:entriesOffset (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=16 + i32.store offset=24 ) (func $~lib/set/Set#set:entriesCount (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=20 + i32.store offset=28 ) - (func $~lib/util/hash/hash32 (param $0 i32) (result i32) - (local $1 i32) - i32.const -2128831035 - local.set $1 - local.get $1 - local.get $0 - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $1 - local.get $1 - local.get $0 - i32.const 8 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $1 - local.get $1 - local.get $0 - i32.const 16 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $1 - local.get $1 + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) + (local $2 i32) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 4 + i32.le_u + drop local.get $0 - i32.const 24 - i32.shr_u - i32.xor - i32.const 16777619 - i32.mul + local.set $2 + i64.const 4 local.set $1 + i64.const 0 + i64.const 2870177450012600261 + i64.add local.get $1 + i64.add + local.set $3 + local.get $3 + local.get $2 + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $3 + local.get $3 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $3 + local.get $3 + local.get $3 + i64.const 33 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const -4417276706812531889 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 29 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const 1609587929392839161 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 32 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + return ) - (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5751,8 +5597,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -5815,7 +5662,7 @@ (local $10 i32) (local $11 i32) (local $12 i32) - (local $13 i32) + (local $13 i64) (local $14 i32) global.get $~lib/memory/__stack_pointer i32.const 8 @@ -5852,11 +5699,11 @@ local.tee $5 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 8 i32.mul i32.add @@ -5886,36 +5733,15 @@ local.get $11 local.get $12 call $~lib/set/SetEntry#set:key - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 - i32.and + i64.extend_i32_u + i64.and local.set $13 local.get $3 local.get $13 + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -5944,6 +5770,7 @@ call $~lib/set/Set#set:buckets local.get $0 local.get $1 + i64.extend_i32_u call $~lib/set/Set#set:bucketsMask local.get $0 local.get $5 @@ -5953,7 +5780,7 @@ call $~lib/set/Set#set:entriesCapacity local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 call $~lib/set/Set#set:entriesOffset global.get $~lib/memory/__stack_pointer i32.const 8 @@ -5962,7 +5789,7 @@ ) (func $~lib/set/Set#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) local.get $0 @@ -6048,9 +5875,9 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/set/Set#set:bucketsMask local.get $0 i32.const 0 @@ -6078,15 +5905,15 @@ i32.const 0 call $~lib/rt/itcms/__link ) - (func $~lib/set/Set#set:bucketsMask (param $0 i32) (param $1 i32) + (func $~lib/set/Set#set:bucketsMask (param $0 i32) (param $1 i64) local.get $0 local.get $1 - i32.store offset=4 + i64.store offset=8 ) (func $~lib/set/Set#set:entries (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $1 i32.const 0 @@ -6095,19 +5922,87 @@ (func $~lib/set/Set#set:entriesCapacity (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=12 + i32.store offset=20 ) (func $~lib/set/Set#set:entriesOffset (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=16 + i32.store offset=24 ) (func $~lib/set/Set#set:entriesCount (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=20 + i32.store offset=28 + ) + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) + (local $2 i32) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 4 + i32.le_u + drop + local.get $0 + local.set $2 + i64.const 4 + local.set $1 + i64.const 0 + i64.const 2870177450012600261 + i64.add + local.get $1 + i64.add + local.set $3 + local.get $3 + local.get $2 + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $3 + local.get $3 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $3 + local.get $3 + local.get $3 + i64.const 33 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const -4417276706812531889 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 29 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const 1609587929392839161 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 32 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + return ) - (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6115,8 +6010,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -6179,7 +6075,7 @@ (local $10 i32) (local $11 i32) (local $12 i32) - (local $13 i32) + (local $13 i64) (local $14 i32) global.get $~lib/memory/__stack_pointer i32.const 8 @@ -6216,11 +6112,11 @@ local.tee $5 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 8 i32.mul i32.add @@ -6250,36 +6146,15 @@ local.get $11 local.get $12 call $~lib/set/SetEntry#set:key - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 - i32.and + i64.extend_i32_u + i64.and local.set $13 local.get $3 local.get $13 + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -6308,6 +6183,7 @@ call $~lib/set/Set#set:buckets local.get $0 local.get $1 + i64.extend_i32_u call $~lib/set/Set#set:bucketsMask local.get $0 local.get $5 @@ -6317,7 +6193,7 @@ call $~lib/set/Set#set:entriesCapacity local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 call $~lib/set/Set#set:entriesOffset global.get $~lib/memory/__stack_pointer i32.const 8 @@ -6326,7 +6202,7 @@ ) (func $~lib/set/Set#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) local.get $0 @@ -6412,9 +6288,9 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/set/Set#set:bucketsMask local.get $0 i32.const 0 @@ -6442,15 +6318,15 @@ i32.const 0 call $~lib/rt/itcms/__link ) - (func $~lib/set/Set#set:bucketsMask (param $0 i32) (param $1 i32) + (func $~lib/set/Set#set:bucketsMask (param $0 i32) (param $1 i64) local.get $0 local.get $1 - i32.store offset=4 + i64.store offset=8 ) (func $~lib/set/Set#set:entries (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $1 i32.const 0 @@ -6459,123 +6335,108 @@ (func $~lib/set/Set#set:entriesCapacity (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=12 + i32.store offset=20 ) (func $~lib/set/Set#set:entriesOffset (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=16 + i32.store offset=24 ) (func $~lib/set/Set#set:entriesCount (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=20 + i32.store offset=28 ) - (func $~lib/util/hash/hash64 (param $0 i64) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) + (func $~lib/util/hash/HASH (param $0 i64) (result i64) + (local $1 i64) + (local $2 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 8 + i32.const 4 + i32.le_u + drop + i32.const 8 + i32.const 8 + i32.eq + drop local.get $0 - i32.wrap_i64 local.set $1 - local.get $0 - i64.const 32 - i64.shr_u - i32.wrap_i64 + i64.const 0 + i64.const 2870177450012600261 + i64.add + i64.const 8 + i64.add local.set $2 - i32.const -2128831035 - local.set $3 - local.get $3 - local.get $1 - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 - local.get $1 - i32.const 8 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 - local.get $1 - i32.const 16 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 + local.get $2 local.get $1 - i32.const 24 - i32.shr_u - i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $2 local.get $2 - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 + i64.const 27 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $2 local.get $2 - i32.const 8 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 local.get $2 - i32.const 16 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 + i64.const 33 + i64.shr_u + i64.xor + local.set $2 local.get $2 - i32.const 24 - i32.shr_u - i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 - ) - (func $~lib/set/Set#find (param $0 i32) (param $1 i64) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load + i64.const -4417276706812531889 + i64.mul + local.set $2 local.get $2 - local.get $0 - i32.load offset=4 - i32.and - i32.const 4 - i32.mul - i32.add - i32.load - local.set $3 - loop $while-continue|0 - local.get $3 + local.get $2 + i64.const 29 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + i64.const 1609587929392839161 + i64.mul + local.set $2 + local.get $2 + local.get $2 + i64.const 32 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + return + ) + (func $~lib/set/Set#find (param $0 i32) (param $1 i64) (param $2 i64) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load + local.get $2 + local.get $0 + i64.load offset=8 + i64.and + i32.wrap_i64 + i32.const 4 + i32.mul + i32.add + i32.load + local.set $3 + loop $while-continue|0 + local.get $3 local.set $4 local.get $4 if @@ -6633,7 +6494,6 @@ (local $12 i64) (local $13 i64) (local $14 i32) - (local $15 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -6669,11 +6529,11 @@ local.tee $5 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 16 i32.mul i32.add @@ -6703,49 +6563,24 @@ local.get $11 local.get $12 call $~lib/set/SetEntry#set:key - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 - i32.and - local.set $14 + i64.extend_i32_u + i64.and + local.set $13 local.get $3 - local.get $14 + local.get $13 + i32.wrap_i64 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load call $~lib/set/SetEntry#set:taggedNext - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -6765,6 +6600,7 @@ call $~lib/set/Set#set:buckets local.get $0 local.get $1 + i64.extend_i32_u call $~lib/set/Set#set:bucketsMask local.get $0 local.get $5 @@ -6774,7 +6610,7 @@ call $~lib/set/Set#set:entriesCapacity local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 call $~lib/set/Set#set:entriesOffset global.get $~lib/memory/__stack_pointer i32.const 8 @@ -6783,7 +6619,7 @@ ) (func $~lib/set/Set#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) local.get $0 @@ -6869,9 +6705,9 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/set/Set#set:bucketsMask local.get $0 i32.const 0 @@ -6899,15 +6735,15 @@ i32.const 0 call $~lib/rt/itcms/__link ) - (func $~lib/set/Set#set:bucketsMask (param $0 i32) (param $1 i32) + (func $~lib/set/Set#set:bucketsMask (param $0 i32) (param $1 i64) local.get $0 local.get $1 - i32.store offset=4 + i64.store offset=8 ) (func $~lib/set/Set#set:entries (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $1 i32.const 0 @@ -6916,19 +6752,91 @@ (func $~lib/set/Set#set:entriesCapacity (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=12 + i32.store offset=20 ) (func $~lib/set/Set#set:entriesOffset (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=16 + i32.store offset=24 ) (func $~lib/set/Set#set:entriesCount (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=20 + i32.store offset=28 + ) + (func $~lib/util/hash/HASH (param $0 i64) (result i64) + (local $1 i64) + (local $2 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 8 + i32.const 4 + i32.le_u + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $0 + local.set $1 + i64.const 0 + i64.const 2870177450012600261 + i64.add + i64.const 8 + i64.add + local.set $2 + local.get $2 + local.get $1 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $2 + local.get $2 + i64.const 27 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $2 + local.get $2 + local.get $2 + i64.const 33 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + i64.const -4417276706812531889 + i64.mul + local.set $2 + local.get $2 + local.get $2 + i64.const 29 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + i64.const 1609587929392839161 + i64.mul + local.set $2 + local.get $2 + local.get $2 + i64.const 32 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + return ) - (func $~lib/set/Set#find (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (param $0 i32) (param $1 i64) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6936,8 +6844,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -7002,7 +6911,6 @@ (local $12 i64) (local $13 i64) (local $14 i32) - (local $15 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -7038,11 +6946,11 @@ local.tee $5 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 16 i32.mul i32.add @@ -7072,49 +6980,24 @@ local.get $11 local.get $12 call $~lib/set/SetEntry#set:key - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 - i32.and - local.set $14 + i64.extend_i32_u + i64.and + local.set $13 local.get $3 - local.get $14 + local.get $13 + i32.wrap_i64 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load call $~lib/set/SetEntry#set:taggedNext - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -7134,6 +7017,7 @@ call $~lib/set/Set#set:buckets local.get $0 local.get $1 + i64.extend_i32_u call $~lib/set/Set#set:bucketsMask local.get $0 local.get $5 @@ -7143,7 +7027,7 @@ call $~lib/set/Set#set:entriesCapacity local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 call $~lib/set/Set#set:entriesOffset global.get $~lib/memory/__stack_pointer i32.const 8 @@ -7152,7 +7036,7 @@ ) (func $~lib/set/Set#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) local.get $0 @@ -7238,9 +7122,9 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/set/Set#set:bucketsMask local.get $0 i32.const 0 @@ -7268,15 +7152,15 @@ i32.const 0 call $~lib/rt/itcms/__link ) - (func $~lib/set/Set#set:bucketsMask (param $0 i32) (param $1 i32) + (func $~lib/set/Set#set:bucketsMask (param $0 i32) (param $1 i64) local.get $0 local.get $1 - i32.store offset=4 + i64.store offset=8 ) (func $~lib/set/Set#set:entries (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $1 i32.const 0 @@ -7285,38 +7169,108 @@ (func $~lib/set/Set#set:entriesCapacity (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=12 + i32.store offset=20 ) (func $~lib/set/Set#set:entriesOffset (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=16 + i32.store offset=24 ) (func $~lib/set/Set#set:entriesCount (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=20 + i32.store offset=28 ) - (func $~lib/set/Set#find (param $0 i32) (param $1 f32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/util/hash/HASH (param $0 f32) (result i64) + (local $1 i32) + (local $2 i64) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 4 + i32.const 4 + i32.eq + drop local.get $0 - i32.load + i32.reinterpret_f32 + local.set $1 + i64.const 4 + local.set $2 + i64.const 0 + i64.const 2870177450012600261 + i64.add local.get $2 - local.get $0 - i32.load offset=4 - i32.and - i32.const 4 - i32.mul - i32.add - i32.load + i64.add local.set $3 - loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 - if + local.get $3 + local.get $1 + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $3 + local.get $3 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $3 + local.get $3 + local.get $3 + i64.const 33 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const -4417276706812531889 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 29 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const 1609587929392839161 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 32 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + return + ) + (func $~lib/set/Set#find (param $0 i32) (param $1 f32) (param $2 i64) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load + local.get $2 + local.get $0 + i64.load offset=8 + i64.and + i32.wrap_i64 + i32.const 4 + i32.mul + i32.add + i32.load + local.set $3 + loop $while-continue|0 + local.get $3 + local.set $4 + local.get $4 + if local.get $3 i32.load offset=4 local.set $5 @@ -7369,9 +7323,8 @@ (local $10 i32) (local $11 i32) (local $12 f32) - (local $13 f32) + (local $13 i64) (local $14 i32) - (local $15 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -7407,11 +7360,11 @@ local.tee $5 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 8 i32.mul i32.add @@ -7441,38 +7394,24 @@ local.get $11 local.get $12 call $~lib/set/SetEntry#set:key - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $13 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 - i32.and - local.set $14 + i64.extend_i32_u + i64.and + local.set $13 local.get $3 - local.get $14 + local.get $13 + i32.wrap_i64 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load call $~lib/set/SetEntry#set:taggedNext - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -7492,6 +7431,7 @@ call $~lib/set/Set#set:buckets local.get $0 local.get $1 + i64.extend_i32_u call $~lib/set/Set#set:bucketsMask local.get $0 local.get $5 @@ -7501,7 +7441,7 @@ call $~lib/set/Set#set:entriesCapacity local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 call $~lib/set/Set#set:entriesOffset global.get $~lib/memory/__stack_pointer i32.const 8 @@ -7510,7 +7450,7 @@ ) (func $~lib/set/Set#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) local.get $0 @@ -7596,9 +7536,9 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/set/Set#set:bucketsMask local.get $0 i32.const 0 @@ -7626,15 +7566,15 @@ i32.const 0 call $~lib/rt/itcms/__link ) - (func $~lib/set/Set#set:bucketsMask (param $0 i32) (param $1 i32) + (func $~lib/set/Set#set:bucketsMask (param $0 i32) (param $1 i64) local.get $0 local.get $1 - i32.store offset=4 + i64.store offset=8 ) (func $~lib/set/Set#set:entries (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $1 i32.const 0 @@ -7643,19 +7583,92 @@ (func $~lib/set/Set#set:entriesCapacity (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=12 + i32.store offset=20 ) (func $~lib/set/Set#set:entriesOffset (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=16 + i32.store offset=24 ) (func $~lib/set/Set#set:entriesCount (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=20 + i32.store offset=28 + ) + (func $~lib/util/hash/HASH (param $0 f64) (result i64) + (local $1 i64) + (local $2 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $0 + i64.reinterpret_f64 + local.set $1 + i64.const 0 + i64.const 2870177450012600261 + i64.add + i64.const 8 + i64.add + local.set $2 + local.get $2 + local.get $1 + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $2 + local.get $2 + i64.const 27 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $2 + local.get $2 + local.get $2 + i64.const 33 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + i64.const -4417276706812531889 + i64.mul + local.set $2 + local.get $2 + local.get $2 + i64.const 29 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + i64.const 1609587929392839161 + i64.mul + local.set $2 + local.get $2 + local.get $2 + i64.const 32 + i64.shr_u + i64.xor + local.set $2 + local.get $2 + return ) - (func $~lib/set/Set#find (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (param $0 i32) (param $1 f64) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7663,8 +7676,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -7727,9 +7741,8 @@ (local $10 i32) (local $11 i32) (local $12 f64) - (local $13 f64) + (local $13 i64) (local $14 i32) - (local $15 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -7765,11 +7778,11 @@ local.tee $5 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 16 i32.mul i32.add @@ -7799,42 +7812,24 @@ local.get $11 local.get $12 call $~lib/set/SetEntry#set:key - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $13 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 - i32.and - local.set $14 + i64.extend_i32_u + i64.and + local.set $13 local.get $3 - local.get $14 + local.get $13 + i32.wrap_i64 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load call $~lib/set/SetEntry#set:taggedNext - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -7854,6 +7849,7 @@ call $~lib/set/Set#set:buckets local.get $0 local.get $1 + i64.extend_i32_u call $~lib/set/Set#set:bucketsMask local.get $0 local.get $5 @@ -7863,7 +7859,7 @@ call $~lib/set/Set#set:entriesCapacity local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 call $~lib/set/Set#set:entriesOffset global.get $~lib/memory/__stack_pointer i32.const 8 @@ -7872,7 +7868,7 @@ ) (func $~lib/set/Set#get:size (param $0 i32) (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 ) (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) local.get $0 @@ -7958,9 +7954,9 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/set/Set#set:bucketsMask local.get $0 i32.const 0 @@ -8086,7 +8082,7 @@ local.get $1 call $~lib/rt/itcms/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 drop @@ -8119,7 +8115,7 @@ local.get $1 call $~lib/rt/itcms/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 drop @@ -8152,7 +8148,7 @@ local.get $1 call $~lib/rt/itcms/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 drop @@ -8185,7 +8181,7 @@ local.get $1 call $~lib/rt/itcms/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 drop @@ -8218,7 +8214,7 @@ local.get $1 call $~lib/rt/itcms/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 drop @@ -8251,7 +8247,7 @@ local.get $1 call $~lib/rt/itcms/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 drop @@ -8284,7 +8280,7 @@ local.get $1 call $~lib/rt/itcms/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 drop @@ -8317,7 +8313,7 @@ local.get $1 call $~lib/rt/itcms/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 drop @@ -8350,7 +8346,7 @@ local.get $1 call $~lib/rt/itcms/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 drop @@ -8383,7 +8379,7 @@ local.get $1 call $~lib/rt/itcms/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 drop @@ -8569,7 +8565,6 @@ ) (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -8579,45 +8574,26 @@ i32.const 0 i32.store local.get $0 - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $2 i32.store - local.get $3 + local.get $2 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $2 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $2 ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (local $2 i64) (local $3 i32) (local $4 i32) (local $5 i32) @@ -8629,28 +8605,9 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $2 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 + local.get $1 + call $~lib/util/hash/HASH + local.set $2 local.get $0 local.set $5 global.get $~lib/memory/__stack_pointer @@ -8658,16 +8615,16 @@ i32.store local.get $5 local.get $1 - local.get $3 + local.get $2 call $~lib/set/Set#find - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 @@ -8677,68 +8634,70 @@ i32.store local.get $5 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/set/Set#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 local.get $0 local.get $0 - i32.load offset=16 - local.tee $2 + i32.load offset=24 + local.tee $4 i32.const 1 i32.add call $~lib/set/Set#set:entriesOffset - local.get $2 + local.get $4 i32.const 8 i32.mul i32.add - local.set $4 - local.get $4 + local.set $3 + local.get $3 local.get $1 call $~lib/set/SetEntry#set:key i32.const 0 drop local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add call $~lib/set/Set#set:entriesCount local.get $0 i32.load - local.get $3 + local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add - local.set $2 + local.set $4 + local.get $3 local.get $4 - local.get $2 i32.load call $~lib/set/SetEntry#set:taggedNext - local.get $2 local.get $4 + local.get $3 i32.store end local.get $0 @@ -8820,10 +8779,10 @@ i64.const 0 i64.store local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $1 local.get $0 - i32.load offset=16 + i32.load offset=24 local.set $2 global.get $~lib/memory/__stack_pointer i32.const 0 @@ -8914,30 +8873,11 @@ i32.store local.get $6 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $2 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -8949,41 +8889,42 @@ local.get $6 return end - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=4 i32.const 1 i32.or call $~lib/set/SetEntry#set:taggedNext local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.sub call $~lib/set/Set#set:entriesCount local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u - local.set $4 - local.get $4 + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 - i32.load offset=20 + i32.load offset=28 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select i32.ge_u if (result i32) local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 @@ -8999,7 +8940,7 @@ local.get $6 i32.store local.get $6 - local.get $4 + local.get $3 call $~lib/set/Set#rehash end i32.const 1 @@ -9527,7 +9468,6 @@ ) (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -9537,43 +9477,26 @@ i32.const 0 i32.store local.get $0 - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $2 i32.store - local.get $3 + local.get $2 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $2 - i32.const 255 - i32.and - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $2 ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (local $2 i64) (local $3 i32) (local $4 i32) (local $5 i32) @@ -9585,26 +9508,9 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $2 - i32.const 255 - i32.and - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 + local.get $1 + call $~lib/util/hash/HASH + local.set $2 local.get $0 local.set $5 global.get $~lib/memory/__stack_pointer @@ -9612,16 +9518,16 @@ i32.store local.get $5 local.get $1 - local.get $3 + local.get $2 call $~lib/set/Set#find - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 @@ -9631,68 +9537,70 @@ i32.store local.get $5 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/set/Set#rehash end local.get $0 - i32.load offset=8 + i32.load offset=16 local.get $0 local.get $0 - i32.load offset=16 - local.tee $2 + i32.load offset=24 + local.tee $4 i32.const 1 i32.add call $~lib/set/Set#set:entriesOffset - local.get $2 + local.get $4 i32.const 8 i32.mul i32.add - local.set $4 - local.get $4 + local.set $3 + local.get $3 local.get $1 call $~lib/set/SetEntry#set:key i32.const 0 drop local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add call $~lib/set/Set#set:entriesCount local.get $0 i32.load - local.get $3 + local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add - local.set $2 + local.set $4 + local.get $3 local.get $4 - local.get $2 i32.load call $~lib/set/SetEntry#set:taggedNext - local.get $2 local.get $4 + local.get $3 i32.store end local.get $0 @@ -9868,38 +9776,13 @@ i32.store local.get $6 local.get $1 -<<<<<<< HEAD local.get $1 - call $~lib/util/hash/HASH - call $~lib/set/Set#find + call $~lib/util/hash/HASH + call $~lib/set/Set#find local.set $2 local.get $2 -======= - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $2 - i32.const 255 - i32.and - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.3 - end - call $~lib/set/Set#find - local.set $3 - local.get $3 ->>>>>>> master - i32.eqz - if + i32.eqz + if i32.const 0 local.set $6 global.get $~lib/memory/__stack_pointer @@ -9909,15 +9792,8 @@ local.get $6 return end -<<<<<<< HEAD - i32.const 0 - drop local.get $2 local.get $2 -======= - local.get $3 - local.get $3 ->>>>>>> master i32.load offset=4 i32.const 1 i32.or @@ -9927,11 +9803,7 @@ i32.load offset=28 i32.const 1 i32.sub -<<<<<<< HEAD - i32.store offset=28 -======= call $~lib/set/Set#set:entriesCount ->>>>>>> master local.get $0 i64.load offset=8 i64.const 1 @@ -9966,62 +9838,12 @@ end if local.get $0 -<<<<<<< HEAD - local.get $3 - call $~lib/set/Set#rehash - end - i32.const 1 - ) - (func $~lib/set/Set#clear (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - local.tee $1 - i32.const 0 - i32.const 4 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $2 - local.get $1 - i32.load - call $~lib/rt/pure/__release - local.get $2 - i32.store - local.get $0 - i64.const 4 - i64.const 1 - i64.sub - i64.store offset=8 - local.get $0 - local.tee $2 - i32.const 0 - i32.const 4 - i32.const 8 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 - local.get $2 - i32.load offset=16 - call $~lib/rt/pure/__release - local.get $1 - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $0 - i32.const 0 - i32.store offset=28 -======= local.set $6 global.get $~lib/memory/__stack_pointer local.get $6 i32.store local.get $6 - local.get $4 + local.get $3 call $~lib/set/Set#rehash end i32.const 1 @@ -10031,7 +9853,6 @@ i32.add global.set $~lib/memory/__stack_pointer local.get $6 ->>>>>>> master ) (func $std/set/testNumeric (local $0 i32) @@ -10367,13 +10188,119 @@ i32.store offset=4 local.get $9 local.get $5 -<<<<<<< HEAD - call $~lib/set/Set#has + call $~lib/set/Set#has + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 33 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|6 + end + end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/set/Set#get:size + i32.const 50 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 35 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + local.set $5 + loop $for-loop|8 + local.get $5 + i32.const 255 + i32.and + i32.const 50 + i32.lt_u + local.set $8 + local.get $8 + if + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $5 + call $~lib/set/Set#has + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 39 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $5 + call $~lib/set/Set#add + drop + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $5 + call $~lib/set/Set#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 41 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $5 + call $~lib/set/Set#delete + drop + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $5 + call $~lib/set/Set#has i32.eqz i32.eqz if i32.const 0 - i32.const 336 + i32.const 544 i32.const 43 i32.const 5 call $~lib/builtins/abort @@ -10387,484 +10314,348 @@ end end local.get $0 - call $~lib/set/Set#get:size + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/set/Set#get:size i32.const 50 i32.eq i32.eqz if i32.const 0 - i32.const 336 + i32.const 544 i32.const 45 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - call $~lib/set/Set#clear + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/set/Set#clear local.get $0 - call $~lib/set/Set#get:size + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/set/Set#get:size i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 336 + i32.const 544 i32.const 49 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release + global.get $~lib/memory/__stack_pointer + i32.const 20 + i32.add + global.set $~lib/memory/__stack_pointer ) - (func $~lib/set/Set#constructor (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 32 - i32.const 5 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.set $0 - end - local.get $0 - i32.const 0 - i32.const 4 + (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 i32.store local.get $0 - i64.const 4 - i64.const 1 - i64.sub - i64.store offset=8 - local.get $0 + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store + local.get $2 + local.get $1 + local.get $1 + call $~lib/util/hash/HASH + call $~lib/set/Set#find i32.const 0 + i32.ne + local.set $2 + global.get $~lib/memory/__stack_pointer i32.const 4 - i32.const 8 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $0 - i32.const 0 - i32.store offset=28 - local.get $0 - ) - (func $~lib/util/hash/HASH (param $0 i32) (result i64) - (local $1 i64) - (local $2 i32) - (local $3 i64) - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 4 - i32.le_u - drop - local.get $0 - i32.const 255 - i32.and - local.set $2 - i64.const 1 - local.set $1 - i64.const 0 - i64.const 2870177450012600261 - i64.add - local.get $1 - i64.add - local.set $3 - local.get $3 + i32.add + global.set $~lib/memory/__stack_pointer local.get $2 - i64.extend_i32_u - i64.const -7046029288634856825 - i64.mul - i64.xor - local.set $3 - local.get $3 - i64.const 23 - i64.rotl - i64.const -4417276706812531889 - i64.mul - i64.const 1609587929392839161 - i64.add - local.set $3 - local.get $3 - local.get $3 - i64.const 33 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const -4417276706812531889 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 29 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const 1609587929392839161 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 32 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - return ) - (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) + (local $2 i64) (local $3 i32) (local $4 i32) (local $5 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $1 + call $~lib/util/hash/HASH + local.set $2 local.get $0 - i32.load + local.set $5 + global.get $~lib/memory/__stack_pointer + local.get $5 + i32.store + local.get $5 + local.get $1 local.get $2 - local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - i32.load + call $~lib/set/Set#find local.set $3 - loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 + local.get $3 + i32.eqz + if + local.get $0 + i32.load offset=24 + local.get $0 + i32.load offset=20 + i32.eq if - local.get $3 - i32.load offset=4 + local.get $0 local.set $5 + global.get $~lib/memory/__stack_pointer local.get $5 - i32.const 1 - i32.and -======= - call $~lib/set/Set#has - i32.eqz ->>>>>>> master - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 33 - i32.const 5 - call $~lib/builtins/abort - unreachable - end + i32.store local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|6 + local.get $0 + i32.load offset=28 + local.get $0 + i32.load offset=20 + i32.const 3 + i32.mul + i32.const 4 + i32.div_s + i32.lt_s + if (result i64) + local.get $0 + i64.load offset=8 + else + local.get $0 + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or + end + i32.wrap_i64 + call $~lib/set/Set#rehash end + local.get $0 + i32.load offset=16 + local.get $0 + local.get $0 + i32.load offset=24 + local.tee $4 + i32.const 1 + i32.add + call $~lib/set/Set#set:entriesOffset + local.get $4 + i32.const 8 + i32.mul + i32.add + local.set $3 + local.get $3 + local.get $1 + call $~lib/set/SetEntry#set:key + i32.const 0 + drop + local.get $0 + local.get $0 + i32.load offset=28 + i32.const 1 + i32.add + call $~lib/set/Set#set:entriesCount + local.get $0 + i32.load + local.get $2 + local.get $0 + i64.load offset=8 + i64.and + i32.wrap_i64 + i32.const 4 + i32.mul + i32.add + local.set $4 + local.get $3 + local.get $4 + i32.load + call $~lib/set/SetEntry#set:taggedNext + local.get $4 + local.get $3 + i32.store end -<<<<<<< HEAD - i32.const 0 - ) - (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) local.get $0 - local.get $1 - local.get $1 - call $~lib/util/hash/HASH - call $~lib/set/Set#find - i32.const 0 - i32.ne + local.set $5 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $5 ) - (func $~lib/set/Set#rehash (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/array/Array#__set (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 i32) - (local $12 i32) - (local $13 i64) - (local $14 i32) - local.get $1 - i32.const 1 - i32.add - local.set $2 - i32.const 0 - local.get $2 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $3 - local.get $2 - i32.const 8 - i32.mul - i32.const 3 - i32.div_s - local.set $4 -======= - local.get $0 - local.set $9 global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/set/Set#get:size - i32.const 50 - i32.eq - i32.eqz + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u if + local.get $1 i32.const 0 - i32.const 544 - i32.const 35 - i32.const 3 - call $~lib/builtins/abort - unreachable + i32.lt_s + if + i32.const 224 + i32.const 592 + i32.const 108 + i32.const 22 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.const 1 + call $~lib/array/ensureSize + local.get $0 + local.get $1 + i32.const 1 + i32.add + call $~lib/array/Array#set:length_ end ->>>>>>> master - i32.const 0 - local.set $5 -<<<<<<< HEAD + local.get $0 + local.set $3 + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.store + local.get $3 + local.get $1 + local.get $2 + call $~lib/array/Array#__uset + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $~lib/set/Set#values (param $0 i32) (result i32) + (local $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) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store local.get $0 i32.load offset=16 - local.set $6 - local.get $6 + local.set $1 local.get $0 i32.load offset=24 - i32.const 8 - i32.mul - i32.add - local.set $7 - local.get $5 - local.set $8 - loop $while-continue|0 - local.get $6 - local.get $7 - i32.ne - local.set $9 - local.get $9 -======= - loop $for-loop|8 + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 0 + local.get $2 + call $~lib/array/Array#constructor + local.tee $3 + i32.store + i32.const 0 + local.set $4 + i32.const 0 + local.set $5 + loop $for-loop|0 local.get $5 - i32.const 255 - i32.and - i32.const 50 - i32.lt_u - local.set $8 - local.get $8 ->>>>>>> master + local.get $2 + i32.lt_s + local.set $6 + local.get $6 if - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 + local.get $1 local.get $5 - call $~lib/set/Set#has - i32.eqz + i32.const 8 + i32.mul + i32.add + local.set $7 + local.get $7 + i32.load offset=4 + i32.const 1 + i32.and i32.eqz if -<<<<<<< HEAD - local.get $8 - local.set $11 - local.get $10 - i32.load8_u - local.set $12 - local.get $11 - local.get $12 - i32.store8 - local.get $12 - call $~lib/util/hash/HASH - local.get $1 - i64.extend_i32_u - i64.and - local.set $13 local.get $3 - local.get $13 - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - local.set $14 - local.get $11 - local.get $14 - i32.load + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 i32.store offset=4 - local.get $14 - local.get $8 - i32.store - local.get $8 - i32.const 8 + local.get $9 + local.get $4 + local.tee $8 + i32.const 1 i32.add - local.set $8 -======= - i32.const 0 - i32.const 544 - i32.const 39 - i32.const 5 - call $~lib/builtins/abort - unreachable ->>>>>>> master - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $5 - call $~lib/set/Set#add - drop - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $5 - call $~lib/set/Set#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 41 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $5 - call $~lib/set/Set#delete - drop - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $5 - call $~lib/set/Set#has - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 43 - i32.const 5 - call $~lib/builtins/abort - unreachable + local.set $4 + local.get $8 + local.get $7 + i32.load16_s + call $~lib/array/Array#__set end local.get $5 i32.const 1 i32.add local.set $5 - br $for-loop|8 + br $for-loop|0 end end - local.get $0 + local.get $3 local.set $9 global.get $~lib/memory/__stack_pointer local.get $9 i32.store offset=4 local.get $9 - call $~lib/set/Set#get:size - i32.const 50 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 45 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 -<<<<<<< HEAD - local.get $1 - i64.extend_i32_u - i64.store offset=8 - local.get $0 - local.tee $14 - local.get $5 - local.tee $9 - local.get $14 - i32.load offset=16 - local.tee $11 - i32.ne - if - local.get $9 - call $~lib/rt/pure/__retain - local.set $9 - local.get $11 - call $~lib/rt/pure/__release - end - local.get $9 - i32.store offset=16 - local.get $0 local.get $4 - i32.store offset=20 - local.get $0 - local.get $0 - i32.load offset=28 - i32.store offset=24 -======= - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/set/Set#clear - local.get $0 + call $~lib/array/Array#set:length + local.get $3 local.set $9 global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/set/Set#get:size - i32.const 0 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 49 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - i32.const 20 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer + local.get $9 ) - (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -10874,608 +10665,478 @@ i32.const 0 i32.store local.get $0 - local.set $3 + local.set $6 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $6 i32.store - local.get $3 + local.get $6 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop + local.get $1 + call $~lib/util/hash/HASH + call $~lib/set/Set#find + local.set $2 + local.get $2 + i32.eqz + if i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.0 + local.set $6 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $6 + return end - call $~lib/set/Set#find - i32.const 0 - i32.ne + local.get $2 + local.get $2 + i32.load offset=4 + i32.const 1 + i32.or + call $~lib/set/SetEntry#set:taggedNext + local.get $0 + local.get $0 + i32.load offset=28 + i32.const 1 + i32.sub + call $~lib/set/Set#set:entriesCount + local.get $0 + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 local.set $3 + local.get $3 + i32.const 1 + i32.add + i32.const 4 + local.tee $4 + local.get $0 + i32.load offset=28 + local.tee $5 + local.get $4 + local.get $5 + i32.gt_u + select + i32.ge_u + if (result i32) + local.get $0 + i32.load offset=28 + local.get $0 + i32.load offset=20 + i32.const 3 + i32.mul + i32.const 4 + i32.div_s + i32.lt_s + else + i32.const 0 + end + if + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store + local.get $6 + local.get $3 + call $~lib/set/Set#rehash + end + i32.const 1 + local.set $6 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer ->>>>>>> master - local.get $3 + local.get $6 ) -<<<<<<< HEAD - (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) - (local $2 i64) - (local $3 i32) - (local $4 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $2 -======= - (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) + (func $std/set/testNumeric + (local $0 i32) + (local $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) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 20 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=8 + global.get $~lib/memory/__stack_pointer i32.const 0 + i32.store offset=16 + global.get $~lib/memory/__stack_pointer + i32.const 0 + call $~lib/set/Set#constructor + local.tee $0 i32.store - block $~lib/util/hash/HASH|inlined.1 (result i32) + i32.const 0 + local.set $1 + loop $for-loop|1 local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $2 i32.const 16 i32.shl i32.const 16 i32.shr_s - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 ->>>>>>> master - local.get $0 - local.set $5 - global.get $~lib/memory/__stack_pointer - local.get $5 - i32.store - local.get $5 - local.get $1 -<<<<<<< HEAD - local.get $2 - call $~lib/set/Set#find - local.set $3 - local.get $3 -======= - local.get $3 - call $~lib/set/Set#find - local.set $4 - local.get $4 ->>>>>>> master - i32.eqz - if - local.get $0 - i32.load offset=24 - local.get $0 - i32.load offset=20 - i32.eq + i32.const 100 + i32.lt_s + local.set $3 + local.get $3 if local.get $0 - local.set $5 + local.set $9 global.get $~lib/memory/__stack_pointer - local.get $5 - i32.store - local.get $5 + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/set/Set#has + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 6 + i32.const 5 + call $~lib/builtins/abort + unreachable + end local.get $0 - i32.load offset=28 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/set/Set#add + drop local.get $0 - i32.load offset=20 - i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s - if (result i64) - local.get $0 - i64.load offset=8 - else - local.get $0 - i64.load offset=8 - i64.const 1 - i64.shl - i64.const 1 - i64.or + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/set/Set#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 8 + i32.const 5 + call $~lib/builtins/abort + unreachable end -<<<<<<< HEAD - i32.wrap_i64 - call $~lib/set/Set#rehash -======= - call $~lib/set/Set#rehash ->>>>>>> master + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|1 end - local.get $0 - i32.load offset=16 - local.get $0 - local.get $0 - i32.load offset=24 - local.tee $4 - i32.const 1 - i32.add -<<<<<<< HEAD - i32.store offset=24 - local.get $4 -======= - call $~lib/set/Set#set:entriesOffset - local.get $2 ->>>>>>> master - i32.const 8 - i32.mul - i32.add - local.set $3 - local.get $3 - local.get $1 - call $~lib/set/SetEntry#set:key - i32.const 0 - drop - local.get $0 - local.get $0 - i32.load offset=28 - i32.const 1 - i32.add -<<<<<<< HEAD - i32.store offset=28 -======= - call $~lib/set/Set#set:entriesCount ->>>>>>> master - local.get $0 - i32.load - local.get $2 - local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - local.set $4 - local.get $3 - local.get $4 - i32.load -<<<<<<< HEAD - i32.store offset=4 -======= - call $~lib/set/SetEntry#set:taggedNext - local.get $2 ->>>>>>> master - local.get $4 - local.get $3 - i32.store end local.get $0 -<<<<<<< HEAD - call $~lib/rt/pure/__retain - ) - (func $~lib/set/Set#get:size (param $0 i32) (result i32) - local.get $0 - i32.load offset=28 -======= - local.set $5 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $5 ->>>>>>> master - ) - (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check + local.set $9 global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/set/Set#get:size + i32.const 100 + i32.eq + i32.eqz if - local.get $1 i32.const 0 + i32.const 544 + i32.const 10 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 50 + local.set $1 + loop $for-loop|3 + local.get $1 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i32.const 100 i32.lt_s + local.set $4 + local.get $4 if - i32.const 224 - i32.const 592 - i32.const 108 - i32.const 22 - call $~lib/builtins/abort - unreachable + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/set/Set#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 14 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/set/Set#add + drop + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + call $~lib/set/Set#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 16 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|3 end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.const 1 - call $~lib/array/ensureSize - local.get $0 - local.get $1 - i32.const 1 - i32.add - call $~lib/array/Array#set:length_ end local.get $0 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - local.get $1 - local.get $2 - call $~lib/array/Array#__uset - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $~lib/set/Set#values (param $0 i32) (result i32) - (local $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.set $9 global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/set/Set#get:size + i32.const 100 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 18 + i32.const 3 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - local.get $0 - i32.load offset=16 - local.set $1 local.get $0 - i32.load offset=24 - local.set $2 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/set/Set#values + local.tee $1 + i32.store offset=8 global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $2 - call $~lib/array/Array#constructor - local.tee $3 - i32.store - i32.const 0 - local.set $4 + call $~lib/set/Set#constructor + local.tee $4 + i32.store offset=12 i32.const 0 local.set $5 - loop $for-loop|0 + loop $for-loop|4 local.get $5 - local.get $2 + local.get $1 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/array/Array#get:length i32.lt_s local.set $6 local.get $6 if + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 local.get $1 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=16 + local.get $9 local.get $5 - i32.const 8 - i32.mul - i32.add - local.set $7 - local.get $7 - i32.load offset=4 - i32.const 1 - i32.and + call $~lib/array/Array#__get + call $~lib/set/Set#has i32.eqz if - local.get $3 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $4 - local.tee $8 - i32.const 1 - i32.add - local.set $4 - local.get $8 - local.get $7 - i32.load16_s - call $~lib/array/Array#__set + i32.const 0 + i32.const 544 + i32.const 24 + i32.const 5 + call $~lib/builtins/abort + unreachable end + local.get $4 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $1 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=16 + local.get $9 + local.get $5 + call $~lib/array/Array#__get + call $~lib/set/Set#add + drop local.get $5 i32.const 1 i32.add local.set $5 - br $for-loop|0 + br $for-loop|4 end end - local.get $3 + local.get $4 local.set $9 global.get $~lib/memory/__stack_pointer local.get $9 i32.store offset=4 local.get $9 - local.get $4 - call $~lib/array/Array#set:length - local.get $3 + call $~lib/set/Set#get:size + local.get $0 local.set $9 global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer local.get $9 - ) - (func $~lib/set/Set#delete (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store - local.get $6 - local.get $1 -<<<<<<< HEAD - local.get $1 - call $~lib/util/hash/HASH - call $~lib/set/Set#find - local.set $2 - local.get $2 -======= - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop + i32.store offset=4 + local.get $9 + call $~lib/set/Set#get:size + i32.eq + i32.eqz + if i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $2 + i32.const 544 + i32.const 27 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + local.set $5 + loop $for-loop|6 + local.get $5 i32.const 16 i32.shl i32.const 16 i32.shr_s - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.3 + i32.const 50 + i32.lt_s + local.set $7 + local.get $7 + if + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $5 + call $~lib/set/Set#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 31 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $5 + call $~lib/set/Set#delete + drop + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $5 + call $~lib/set/Set#has + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 33 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|6 + end end - call $~lib/set/Set#find - local.set $3 - local.get $3 ->>>>>>> master + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/set/Set#get:size + i32.const 50 + i32.eq i32.eqz if i32.const 0 - local.set $6 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $6 - return + i32.const 544 + i32.const 35 + i32.const 3 + call $~lib/builtins/abort + unreachable end -<<<<<<< HEAD i32.const 0 - drop - local.get $2 - local.get $2 -======= - local.get $3 - local.get $3 ->>>>>>> master - i32.load offset=4 - i32.const 1 - i32.or - call $~lib/set/SetEntry#set:taggedNext - local.get $0 - local.get $0 - i32.load offset=28 - i32.const 1 - i32.sub -<<<<<<< HEAD - i32.store offset=28 -======= - call $~lib/set/Set#set:entriesCount ->>>>>>> master - local.get $0 - i64.load offset=8 - i64.const 1 - i64.shr_u - i32.wrap_i64 - local.set $3 - local.get $3 - i32.const 1 - i32.add - i32.const 4 - local.tee $4 - local.get $0 - i32.load offset=28 - local.tee $5 - local.get $4 - local.get $5 - i32.gt_u - select - i32.ge_u - if (result i32) - local.get $0 - i32.load offset=28 - local.get $0 - i32.load offset=20 - i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s - else - i32.const 0 - end - if - local.get $0 -<<<<<<< HEAD - local.get $3 - call $~lib/set/Set#rehash - end - i32.const 1 - ) - (func $~lib/set/Set#clear (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - local.tee $1 - i32.const 0 - i32.const 4 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $2 - local.get $1 - i32.load - call $~lib/rt/pure/__release - local.get $2 - i32.store - local.get $0 - i64.const 4 - i64.const 1 - i64.sub - i64.store offset=8 - local.get $0 - local.tee $2 - i32.const 0 - i32.const 4 - i32.const 8 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 - local.get $2 - i32.load offset=16 - call $~lib/rt/pure/__release - local.get $1 - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $0 - i32.const 0 - i32.store offset=28 -======= - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store - local.get $6 - local.get $4 - call $~lib/set/Set#rehash - end - i32.const 1 - local.set $6 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $6 ->>>>>>> master - ) - (func $std/set/testNumeric - (local $0 i32) - (local $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) - global.get $~lib/memory/__stack_pointer - i32.const 20 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store offset=16 - global.get $~lib/memory/__stack_pointer - i32.const 0 - call $~lib/set/Set#constructor - local.tee $0 - i32.store - i32.const 0 - local.set $1 - loop $for-loop|1 - local.get $1 + local.set $5 + loop $for-loop|8 + local.get $5 i32.const 16 i32.shl i32.const 16 i32.shr_s - i32.const 100 + i32.const 50 i32.lt_s - local.set $3 - local.get $3 + local.set $8 + local.get $8 if local.get $0 local.set $9 @@ -11483,14 +11144,14 @@ local.get $9 i32.store offset=4 local.get $9 - local.get $1 + local.get $5 call $~lib/set/Set#has i32.eqz i32.eqz if i32.const 0 i32.const 544 - i32.const 6 + i32.const 39 i32.const 5 call $~lib/builtins/abort unreachable @@ -11501,7 +11162,7 @@ local.get $9 i32.store offset=4 local.get $9 - local.get $1 + local.get $5 call $~lib/set/Set#add drop local.get $0 @@ -11510,68 +11171,13 @@ local.get $9 i32.store offset=4 local.get $9 - local.get $1 - call $~lib/set/Set#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 8 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|1 - end - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/set/Set#get:size - i32.const 100 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 10 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 50 - local.set $1 - loop $for-loop|3 - local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i32.const 100 - i32.lt_s - local.set $4 - local.get $4 - if - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 + local.get $5 call $~lib/set/Set#has i32.eqz if i32.const 0 i32.const 544 - i32.const 14 + i32.const 41 i32.const 5 call $~lib/builtins/abort unreachable @@ -11582,8 +11188,8 @@ local.get $9 i32.store offset=4 local.get $9 - local.get $1 - call $~lib/set/Set#add + local.get $5 + call $~lib/set/Set#delete drop local.get $0 local.set $9 @@ -11591,22 +11197,23 @@ local.get $9 i32.store offset=4 local.get $9 - local.get $1 + local.get $5 call $~lib/set/Set#has i32.eqz + i32.eqz if i32.const 0 i32.const 544 - i32.const 16 + i32.const 43 i32.const 5 call $~lib/builtins/abort unreachable end - local.get $1 + local.get $5 i32.const 1 i32.add - local.set $1 - br $for-loop|3 + local.set $5 + br $for-loop|8 end end local.get $0 @@ -11616,2198 +11223,80 @@ i32.store offset=4 local.get $9 call $~lib/set/Set#get:size - i32.const 100 + i32.const 50 i32.eq i32.eqz if i32.const 0 i32.const 544 - i32.const 18 + i32.const 45 i32.const 3 call $~lib/builtins/abort unreachable end + local.get $0 + local.set $9 global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/set/Set#clear local.get $0 local.set $9 global.get $~lib/memory/__stack_pointer local.get $9 i32.store offset=4 local.get $9 - call $~lib/set/Set#values - local.tee $1 - i32.store offset=8 + call $~lib/set/Set#get:size + i32.const 0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 49 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + i32.const 20 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check global.get $~lib/memory/__stack_pointer i32.const 0 - call $~lib/set/Set#constructor - local.tee $4 - i32.store offset=12 - i32.const 0 - local.set $5 - loop $for-loop|4 - local.get $5 - local.get $1 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/array/Array#get:length - i32.lt_s - local.set $6 - local.get $6 - if - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=16 - local.get $9 - local.get $5 - call $~lib/array/Array#__get - call $~lib/set/Set#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 24 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $4 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=16 - local.get $9 - local.get $5 - call $~lib/array/Array#__get - call $~lib/set/Set#add - drop - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|4 - end - end - local.get $4 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/set/Set#get:size - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/set/Set#get:size - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 27 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - local.set $5 - loop $for-loop|6 - local.get $5 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i32.const 50 - i32.lt_s - local.set $7 - local.get $7 - if - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $5 - call $~lib/set/Set#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 31 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $5 - call $~lib/set/Set#delete - drop - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $5 - call $~lib/set/Set#has - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 33 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|6 - end - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/set/Set#get:size - i32.const 50 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 35 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - local.set $5 - loop $for-loop|8 - local.get $5 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i32.const 50 - i32.lt_s - local.set $8 - local.get $8 - if - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $5 - call $~lib/set/Set#has - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 39 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $5 - call $~lib/set/Set#add - drop - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $5 - call $~lib/set/Set#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 41 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $5 - call $~lib/set/Set#delete - drop - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $5 - call $~lib/set/Set#has - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 43 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|8 - end - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/set/Set#get:size - i32.const 50 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 45 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/set/Set#clear - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/set/Set#get:size - i32.const 0 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 49 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - i32.const 20 - i32.add - global.set $~lib/memory/__stack_pointer - ) -<<<<<<< HEAD - (func $~lib/set/Set#constructor (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 32 - i32.const 7 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.set $0 - end - local.get $0 - i32.const 0 - i32.const 4 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store - local.get $0 - i64.const 4 - i64.const 1 - i64.sub - i64.store offset=8 - local.get $0 - i32.const 0 - i32.const 4 - i32.const 8 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $0 - i32.const 0 - i32.store offset=28 - local.get $0 - ) - (func $~lib/util/hash/HASH (param $0 i32) (result i64) - (local $1 i64) - (local $2 i32) - (local $3 i64) - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 4 - i32.le_u - drop - local.get $0 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - local.set $2 - i64.const 2 - local.set $1 - i64.const 0 - i64.const 2870177450012600261 - i64.add - local.get $1 - i64.add - local.set $3 - local.get $3 - local.get $2 - i64.extend_i32_u - i64.const -7046029288634856825 - i64.mul - i64.xor - local.set $3 - local.get $3 - i64.const 23 - i64.rotl - i64.const -4417276706812531889 - i64.mul - i64.const 1609587929392839161 - i64.add - local.set $3 - local.get $3 - local.get $3 - i64.const 33 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const -4417276706812531889 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 29 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const 1609587929392839161 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 32 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - return - ) - (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.get $2 - local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - i32.load - local.set $3 - loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 - if - local.get $3 - i32.load offset=4 - local.set $5 - local.get $5 - i32.const 1 - i32.and - i32.eqz - if (result i32) - local.get $3 - i32.load16_s - local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i32.eq - else - i32.const 0 - end - if - local.get $3 - return - end - local.get $5 - i32.const 1 - i32.const -1 - i32.xor - i32.and - local.set $3 - br $while-continue|0 - end - end - i32.const 0 - ) - (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - local.get $1 - call $~lib/util/hash/HASH - call $~lib/set/Set#find -======= - (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - local.get $0 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $2 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.0 - end - call $~lib/set/Set#find ->>>>>>> master - i32.const 0 - i32.ne - local.set $3 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $3 - ) - (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) -<<<<<<< HEAD - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i64) - (local $14 i32) - local.get $1 - i32.const 1 - i32.add - local.set $2 - i32.const 0 - local.get $2 -======= - global.get $~lib/memory/__stack_pointer ->>>>>>> master - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 -<<<<<<< HEAD - local.get $4 - i32.const 8 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $0 - i32.load offset=16 - local.set $6 - local.get $6 - local.get $0 - i32.load offset=24 - i32.const 8 - i32.mul - i32.add - local.set $7 - local.get $5 - local.set $8 - loop $while-continue|0 - local.get $6 - local.get $7 - i32.ne - local.set $9 - local.get $9 - if - local.get $6 - local.set $10 - local.get $10 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $8 - local.set $11 - local.get $10 - i32.load16_s - local.set $12 - local.get $11 - local.get $12 - i32.store16 - local.get $12 - call $~lib/util/hash/HASH - local.get $1 - i64.extend_i32_u - i64.and - local.set $13 - local.get $3 - local.get $13 - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - local.set $14 - local.get $11 - local.get $14 - i32.load - i32.store offset=4 - local.get $14 - local.get $8 - i32.store - local.get $8 - i32.const 8 - i32.add - local.set $8 - end - local.get $6 - i32.const 8 - i32.add - local.set $6 - br $while-continue|0 - end - end - local.get $0 - local.tee $11 - local.get $3 - local.tee $12 - local.get $11 - i32.load - local.tee $9 - i32.ne - if - local.get $12 - call $~lib/rt/pure/__retain - local.set $12 - local.get $9 - call $~lib/rt/pure/__release - end - local.get $12 - i32.store - local.get $0 - local.get $1 - i64.extend_i32_u - i64.store offset=8 - local.get $0 - local.tee $14 - local.get $5 - local.tee $9 - local.get $14 - i32.load offset=16 - local.tee $11 - i32.ne - if - local.get $9 - call $~lib/rt/pure/__retain - local.set $9 - local.get $11 - call $~lib/rt/pure/__release - end - local.get $9 - i32.store offset=16 - local.get $0 - local.get $4 - i32.store offset=20 - local.get $0 - local.get $0 - i32.load offset=28 - i32.store offset=24 - local.get $3 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - ) - (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) - (local $2 i64) - (local $3 i32) - (local $4 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $2 -======= - i32.store - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $2 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 ->>>>>>> master - local.get $0 - local.set $5 - global.get $~lib/memory/__stack_pointer - local.get $5 - i32.store - local.get $5 - local.get $1 -<<<<<<< HEAD - local.get $2 - call $~lib/set/Set#find - local.set $3 - local.get $3 -======= - local.get $3 - call $~lib/set/Set#find - local.set $4 - local.get $4 ->>>>>>> master - i32.eqz - if - local.get $0 - i32.load offset=24 - local.get $0 - i32.load offset=20 - i32.eq - if - local.get $0 - local.set $5 - global.get $~lib/memory/__stack_pointer - local.get $5 - i32.store - local.get $5 - local.get $0 - i32.load offset=28 - local.get $0 - i32.load offset=20 - i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s - if (result i64) - local.get $0 - i64.load offset=8 - else - local.get $0 - i64.load offset=8 - i64.const 1 - i64.shl - i64.const 1 - i64.or - end -<<<<<<< HEAD - i32.wrap_i64 - call $~lib/set/Set#rehash -======= - call $~lib/set/Set#rehash ->>>>>>> master - end - local.get $0 - i32.load offset=16 - local.get $0 - local.get $0 - i32.load offset=24 - local.tee $4 - i32.const 1 - i32.add -<<<<<<< HEAD - i32.store offset=24 - local.get $4 -======= - call $~lib/set/Set#set:entriesOffset - local.get $2 ->>>>>>> master - i32.const 8 - i32.mul - i32.add - local.set $3 - local.get $3 - local.get $1 -<<<<<<< HEAD - i32.store16 - local.get $0 - local.get $0 - i32.load offset=28 - i32.const 1 - i32.add - i32.store offset=28 - local.get $0 - i32.load - local.get $2 - local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - local.set $4 - local.get $3 - local.get $4 - i32.load - i32.store offset=4 - local.get $4 - local.get $3 - i32.store - end - local.get $0 - call $~lib/rt/pure/__retain - ) - (func $~lib/set/Set#get:size (param $0 i32) (result i32) - local.get $0 - i32.load offset=28 - ) - (func $~lib/array/Array#constructor (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.eqz - if - i32.const 16 - i32.const 8 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - 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 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 1073741820 - i32.const 1 - i32.shr_u - i32.gt_u - if - i32.const 224 - i32.const 384 - i32.const 57 - i32.const 60 - call $~lib/builtins/abort - unreachable -======= - call $~lib/set/SetEntry#set:key - i32.const 0 - drop - local.get $0 - local.get $0 - i32.load offset=20 - i32.const 1 - i32.add - call $~lib/set/Set#set:entriesCount - local.get $0 - i32.load - local.get $3 - local.get $0 - i32.load offset=4 - i32.and - i32.const 4 - i32.mul - i32.add - local.set $2 - local.get $4 - local.get $2 - i32.load - call $~lib/set/SetEntry#set:taggedNext - local.get $2 - local.get $4 - i32.store ->>>>>>> master - end - local.get $0 - local.set $5 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $5 - ) - (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u - if - local.get $1 - i32.const 0 - i32.lt_s - if - i32.const 224 - i32.const 592 - i32.const 108 - i32.const 22 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.const 1 - call $~lib/array/ensureSize - local.get $0 - local.get $1 - i32.const 1 - i32.add - call $~lib/array/Array#set:length_ - end - local.get $0 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - local.get $1 - local.get $2 - call $~lib/array/Array#__uset - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $~lib/set/Set#values (param $0 i32) (result i32) - (local $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) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - local.get $0 - i32.load offset=16 - local.set $1 - local.get $0 - i32.load offset=24 - local.set $2 - global.get $~lib/memory/__stack_pointer - i32.const 0 - local.get $2 - call $~lib/array/Array#constructor - local.tee $3 - i32.store - i32.const 0 - local.set $4 - i32.const 0 - local.set $5 - loop $for-loop|0 - local.get $5 - local.get $2 - i32.lt_s - local.set $6 - local.get $6 - if - local.get $1 - local.get $5 - i32.const 8 - i32.mul - i32.add - local.set $7 - local.get $7 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $3 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $4 - local.tee $8 - i32.const 1 - i32.add - local.set $4 - local.get $8 - local.get $7 - i32.load16_u - call $~lib/array/Array#__set - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end - local.get $3 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $4 - call $~lib/array/Array#set:length - local.get $3 - local.set $9 - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $9 - ) - (func $~lib/set/Set#delete (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store - local.get $6 - local.get $1 -<<<<<<< HEAD - local.get $1 - call $~lib/util/hash/HASH - call $~lib/set/Set#find - local.set $2 - local.get $2 -======= - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $2 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.3 - end - call $~lib/set/Set#find - local.set $3 - local.get $3 ->>>>>>> master - i32.eqz - if - i32.const 0 - local.set $6 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $6 - return - end -<<<<<<< HEAD - i32.const 0 - drop - local.get $2 - local.get $2 -======= - local.get $3 - local.get $3 ->>>>>>> master - i32.load offset=4 - i32.const 1 - i32.or - call $~lib/set/SetEntry#set:taggedNext - local.get $0 - local.get $0 - i32.load offset=28 - i32.const 1 - i32.sub -<<<<<<< HEAD - i32.store offset=28 -======= - call $~lib/set/Set#set:entriesCount ->>>>>>> master - local.get $0 - i64.load offset=8 - i64.const 1 - i64.shr_u - i32.wrap_i64 - local.set $3 - local.get $3 - i32.const 1 - i32.add -<<<<<<< HEAD - i32.const 4 - local.tee $4 - local.get $0 - i32.load offset=28 - local.tee $5 - local.get $4 - local.get $5 - i32.gt_u - select - i32.ge_u - if (result i32) - local.get $0 - i32.load offset=28 - local.get $0 - i32.load offset=20 - i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s - else - i32.const 0 - end - if - local.get $0 - local.get $3 - call $~lib/set/Set#rehash - end - i32.const 1 - ) - (func $~lib/set/Set#clear (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - local.tee $1 - i32.const 0 - i32.const 4 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $2 - local.get $1 - i32.load - call $~lib/rt/pure/__release - local.get $2 - i32.store - local.get $0 - i64.const 4 - i64.const 1 - i64.sub - i64.store offset=8 - local.get $0 - local.tee $2 - i32.const 0 - i32.const 4 - i32.const 8 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 - local.get $2 - i32.load offset=16 - call $~lib/rt/pure/__release - local.get $1 - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $0 - i32.const 0 - i32.store offset=28 -======= - i32.const 4 - local.tee $2 - local.get $0 - i32.load offset=20 - local.tee $5 - local.get $2 - local.get $5 - i32.gt_u - select - i32.ge_u - if (result i32) - local.get $0 - i32.load offset=20 - local.get $0 - i32.load offset=12 - i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s - else - i32.const 0 - end - if - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store - local.get $6 - local.get $4 - call $~lib/set/Set#rehash - end - i32.const 1 - local.set $6 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $6 ->>>>>>> master - ) - (func $std/set/testNumeric - (local $0 i32) - (local $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) - global.get $~lib/memory/__stack_pointer - i32.const 20 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store offset=16 - global.get $~lib/memory/__stack_pointer - i32.const 0 - call $~lib/set/Set#constructor - local.tee $0 - i32.store - i32.const 0 - local.set $1 - loop $for-loop|1 - local.get $1 - i32.const 65535 - i32.and - i32.const 100 - i32.lt_u - local.set $3 - local.get $3 - if - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/set/Set#has - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 6 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/set/Set#add - drop - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/set/Set#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 8 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|1 - end - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/set/Set#get:size - i32.const 100 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 10 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 50 - local.set $1 - loop $for-loop|3 - local.get $1 - i32.const 65535 - i32.and - i32.const 100 - i32.lt_u - local.set $4 - local.get $4 - if - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/set/Set#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 14 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/set/Set#add - drop - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - call $~lib/set/Set#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 16 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|3 - end - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/set/Set#get:size - i32.const 100 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 18 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/set/Set#values - local.tee $1 - i32.store offset=8 - global.get $~lib/memory/__stack_pointer - i32.const 0 - call $~lib/set/Set#constructor - local.tee $4 - i32.store offset=12 - i32.const 0 - local.set $5 - loop $for-loop|4 - local.get $5 - local.get $1 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/array/Array#get:length - i32.lt_s - local.set $6 - local.get $6 - if - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=16 - local.get $9 - local.get $5 - call $~lib/array/Array#__get - call $~lib/set/Set#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 24 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $4 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $1 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=16 - local.get $9 - local.get $5 - call $~lib/array/Array#__get - call $~lib/set/Set#add - drop - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|4 - end - end - local.get $4 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/set/Set#get:size - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/set/Set#get:size - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 27 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - local.set $5 - loop $for-loop|6 - local.get $5 - i32.const 65535 - i32.and - i32.const 50 - i32.lt_u - local.set $7 - local.get $7 - if - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $5 - call $~lib/set/Set#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 31 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $5 - call $~lib/set/Set#delete - drop - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $5 - call $~lib/set/Set#has - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 33 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|6 - end - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/set/Set#get:size - i32.const 50 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 35 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - local.set $5 - loop $for-loop|8 - local.get $5 - i32.const 65535 - i32.and - i32.const 50 - i32.lt_u - local.set $8 - local.get $8 - if - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $5 - call $~lib/set/Set#has - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 39 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $5 - call $~lib/set/Set#add - drop - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $5 - call $~lib/set/Set#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 41 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $5 - call $~lib/set/Set#delete - drop - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $5 - call $~lib/set/Set#has - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 43 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|8 - end - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/set/Set#get:size - i32.const 50 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 45 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/set/Set#clear - local.get $0 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - call $~lib/set/Set#get:size - i32.const 0 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 49 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - i32.const 20 - i32.add - global.set $~lib/memory/__stack_pointer - ) -<<<<<<< HEAD - (func $~lib/set/Set#constructor (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 32 - i32.const 9 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.set $0 - end - local.get $0 - i32.const 0 - i32.const 4 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store - local.get $0 - i64.const 4 - i64.const 1 - i64.sub - i64.store offset=8 - local.get $0 - i32.const 0 - i32.const 4 - i32.const 8 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $0 - i32.const 0 - i32.store offset=28 - local.get $0 - ) - (func $~lib/util/hash/HASH (param $0 i32) (result i64) - (local $1 i64) - (local $2 i32) - (local $3 i64) - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 4 - i32.le_u - drop - local.get $0 - i32.const 65535 - i32.and - local.set $2 - i64.const 2 - local.set $1 - i64.const 0 - i64.const 2870177450012600261 - i64.add - local.get $1 - i64.add - local.set $3 - local.get $3 - local.get $2 - i64.extend_i32_u - i64.const -7046029288634856825 - i64.mul - i64.xor - local.set $3 - local.get $3 - i64.const 23 - i64.rotl - i64.const -4417276706812531889 - i64.mul - i64.const 1609587929392839161 - i64.add - local.set $3 - local.get $3 - local.get $3 - i64.const 33 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const -4417276706812531889 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 29 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const 1609587929392839161 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 32 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - return - ) - (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.get $2 - local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - i32.load - local.set $3 - loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 - if - local.get $3 - i32.load offset=4 - local.set $5 - local.get $5 - i32.const 1 - i32.and - i32.eqz - if (result i32) - local.get $3 - i32.load16_u - local.get $1 - i32.const 65535 - i32.and - i32.eq - else - i32.const 0 - end - if - local.get $3 - return - end - local.get $5 - i32.const 1 - i32.const -1 - i32.xor - i32.and - local.set $3 - br $while-continue|0 - end - end - i32.const 0 - ) - (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - local.get $1 - call $~lib/util/hash/HASH - call $~lib/set/Set#find - i32.const 0 - i32.ne - ) - (func $~lib/set/Set#rehash (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 $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i64) - (local $14 i32) - local.get $1 - i32.const 1 - i32.add - local.set $2 - i32.const 0 - local.get $2 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $3 - local.get $2 - i32.const 8 - i32.mul - i32.const 3 - i32.div_s - local.set $4 - i32.const 0 - local.get $4 - i32.const 8 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $0 - i32.load offset=16 - local.set $6 - local.get $6 - local.get $0 - i32.load offset=24 - i32.const 8 - i32.mul - i32.add - local.set $7 - local.get $5 - local.set $8 - loop $while-continue|0 - local.get $6 - local.get $7 - i32.ne - local.set $9 - local.get $9 - if - local.get $6 - local.set $10 - local.get $10 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $8 - local.set $11 - local.get $10 - i32.load16_u - local.set $12 - local.get $11 - local.get $12 - i32.store16 - local.get $12 - call $~lib/util/hash/HASH - local.get $1 - i64.extend_i32_u - i64.and - local.set $13 - local.get $3 - local.get $13 - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - local.set $14 - local.get $11 - local.get $14 - i32.load - i32.store offset=4 - local.get $14 - local.get $8 - i32.store - local.get $8 - i32.const 8 - i32.add - local.set $8 - end - local.get $6 - i32.const 8 - i32.add - local.set $6 - br $while-continue|0 - end - end - local.get $0 - local.tee $11 - local.get $3 - local.tee $12 - local.get $11 - i32.load - local.tee $9 - i32.ne - if - local.get $12 - call $~lib/rt/pure/__retain - local.set $12 - local.get $9 - call $~lib/rt/pure/__release - end - local.get $12 - i32.store - local.get $0 - local.get $1 - i64.extend_i32_u - i64.store offset=8 - local.get $0 - local.tee $14 - local.get $5 - local.tee $9 - local.get $14 - i32.load offset=16 - local.tee $11 - i32.ne - if - local.get $9 - call $~lib/rt/pure/__retain - local.set $9 - local.get $11 - call $~lib/rt/pure/__release - end - local.get $9 - i32.store offset=16 - local.get $0 - local.get $4 - i32.store offset=20 - local.get $0 - local.get $0 - i32.load offset=28 - i32.store offset=24 -======= - (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - local.get $0 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end - call $~lib/set/Set#find + i32.store + local.get $0 + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store + local.get $2 + local.get $1 + local.get $1 + call $~lib/util/hash/HASH + call $~lib/set/Set#find i32.const 0 i32.ne - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer ->>>>>>> master - local.get $3 + local.get $2 ) -<<<<<<< HEAD (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) (local $2 i64) (local $3 i32) (local $4 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $2 -======= - (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) (local $5 i32) global.get $~lib/memory/__stack_pointer i32.const 4 @@ -13817,33 +11306,9 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 ->>>>>>> master + local.get $1 + call $~lib/util/hash/HASH + local.set $2 local.get $0 local.set $5 global.get $~lib/memory/__stack_pointer @@ -13851,17 +11316,10 @@ i32.store local.get $5 local.get $1 -<<<<<<< HEAD local.get $2 call $~lib/set/Set#find local.set $3 local.get $3 -======= - local.get $3 - call $~lib/set/Set#find - local.set $4 - local.get $4 ->>>>>>> master i32.eqz if local.get $0 @@ -13896,12 +11354,8 @@ i64.const 1 i64.or end -<<<<<<< HEAD i32.wrap_i64 call $~lib/set/Set#rehash -======= - call $~lib/set/Set#rehash ->>>>>>> master end local.get $0 i32.load offset=16 @@ -13911,20 +11365,15 @@ local.tee $4 i32.const 1 i32.add -<<<<<<< HEAD - i32.store offset=24 + call $~lib/set/Set#set:entriesOffset local.get $4 -======= - call $~lib/set/Set#set:entriesOffset - local.get $2 ->>>>>>> master i32.const 8 i32.mul i32.add local.set $3 local.get $3 local.get $1 - call $~lib/set/SetEntry#set:key + call $~lib/set/SetEntry#set:key i32.const 0 drop local.get $0 @@ -13932,11 +11381,7 @@ i32.load offset=28 i32.const 1 i32.add -<<<<<<< HEAD - i32.store offset=28 -======= - call $~lib/set/Set#set:entriesCount ->>>>>>> master + call $~lib/set/Set#set:entriesCount local.get $0 i32.load local.get $2 @@ -13951,33 +11396,20 @@ local.get $3 local.get $4 i32.load -<<<<<<< HEAD - i32.store offset=4 -======= - call $~lib/set/SetEntry#set:taggedNext - local.get $2 ->>>>>>> master + call $~lib/set/SetEntry#set:taggedNext local.get $4 local.get $3 i32.store end local.get $0 -<<<<<<< HEAD - call $~lib/rt/pure/__retain - ) - (func $~lib/set/Set#get:size (param $0 i32) (result i32) - local.get $0 - i32.load offset=28 -======= local.set $5 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer local.get $5 ->>>>>>> master ) - (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 4 @@ -14007,13 +11439,13 @@ local.get $1 i32.const 1 i32.add - i32.const 2 + i32.const 1 call $~lib/array/ensureSize local.get $0 local.get $1 i32.const 1 i32.add - call $~lib/array/Array#set:length_ + call $~lib/array/Array#set:length_ end local.get $0 local.set $3 @@ -14023,13 +11455,13 @@ local.get $3 local.get $1 local.get $2 - call $~lib/array/Array#__uset + call $~lib/array/Array#__uset global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/set/Set#values (param $0 i32) (result i32) + (func $~lib/set/Set#values (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -14056,7 +11488,7 @@ global.get $~lib/memory/__stack_pointer i32.const 0 local.get $2 - call $~lib/array/Array#constructor + call $~lib/array/Array#constructor local.tee $3 i32.store i32.const 0 @@ -14095,8 +11527,8 @@ local.set $4 local.get $8 local.get $7 - i32.load - call $~lib/array/Array#__set + i32.load16_u + call $~lib/array/Array#__set end local.get $5 i32.const 1 @@ -14112,7 +11544,7 @@ i32.store offset=4 local.get $9 local.get $4 - call $~lib/array/Array#set:length + call $~lib/array/Array#set:length local.get $3 local.set $9 global.get $~lib/memory/__stack_pointer @@ -14121,7 +11553,7 @@ global.set $~lib/memory/__stack_pointer local.get $9 ) - (func $~lib/set/Set#delete (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14142,42 +11574,11 @@ i32.store local.get $6 local.get $1 -<<<<<<< HEAD local.get $1 call $~lib/util/hash/HASH call $~lib/set/Set#find local.set $2 local.get $2 -======= - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end - call $~lib/set/Set#find - local.set $3 - local.get $3 ->>>>>>> master i32.eqz if i32.const 0 @@ -14189,29 +11590,18 @@ local.get $6 return end -<<<<<<< HEAD - i32.const 0 - drop local.get $2 local.get $2 -======= - local.get $3 - local.get $3 ->>>>>>> master i32.load offset=4 i32.const 1 i32.or - call $~lib/set/SetEntry#set:taggedNext + call $~lib/set/SetEntry#set:taggedNext local.get $0 local.get $0 i32.load offset=28 i32.const 1 i32.sub -<<<<<<< HEAD - i32.store offset=28 -======= - call $~lib/set/Set#set:entriesCount ->>>>>>> master + call $~lib/set/Set#set:entriesCount local.get $0 i64.load offset=8 i64.const 1 @@ -14246,63 +11636,13 @@ end if local.get $0 -<<<<<<< HEAD - local.get $3 - call $~lib/set/Set#rehash - end - i32.const 1 - ) - (func $~lib/set/Set#clear (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - local.tee $1 - i32.const 0 - i32.const 4 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $2 - local.get $1 - i32.load - call $~lib/rt/pure/__release - local.get $2 - i32.store - local.get $0 - i64.const 4 - i64.const 1 - i64.sub - i64.store offset=8 - local.get $0 - local.tee $2 - i32.const 0 - i32.const 4 - i32.const 8 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 - local.get $2 - i32.load offset=16 - call $~lib/rt/pure/__release - local.get $1 - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $0 - i32.const 0 - i32.store offset=28 -======= local.set $6 global.get $~lib/memory/__stack_pointer local.get $6 i32.store local.get $6 - local.get $4 - call $~lib/set/Set#rehash + local.get $3 + call $~lib/set/Set#rehash end i32.const 1 local.set $6 @@ -14311,15 +11651,18 @@ i32.add global.set $~lib/memory/__stack_pointer local.get $6 ->>>>>>> master ) - (func $std/set/testNumeric + (func $std/set/testNumeric (local $0 i32) (local $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) global.get $~lib/memory/__stack_pointer i32.const 20 i32.sub @@ -14336,26 +11679,28 @@ i32.store offset=16 global.get $~lib/memory/__stack_pointer i32.const 0 - call $~lib/set/Set#constructor + call $~lib/set/Set#constructor local.tee $0 i32.store i32.const 0 local.set $1 - loop $for-loop|0 + loop $for-loop|1 local.get $1 + i32.const 65535 + i32.and i32.const 100 - i32.lt_s - local.set $2 - local.get $2 + i32.lt_u + local.set $3 + local.get $3 if local.get $0 - local.set $5 + local.set $9 global.get $~lib/memory/__stack_pointer - local.get $5 + local.get $9 i32.store offset=4 - local.get $5 + local.get $9 local.get $1 - call $~lib/set/Set#has + call $~lib/set/Set#has i32.eqz i32.eqz if @@ -14367,22 +11712,22 @@ unreachable end local.get $0 - local.set $5 + local.set $9 global.get $~lib/memory/__stack_pointer - local.get $5 + local.get $9 i32.store offset=4 - local.get $5 + local.get $9 local.get $1 - call $~lib/set/Set#add + call $~lib/set/Set#add drop local.get $0 - local.set $5 + local.set $9 global.get $~lib/memory/__stack_pointer - local.get $5 + local.get $9 i32.store offset=4 - local.get $5 + local.get $9 local.get $1 - call $~lib/set/Set#has + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -14396,16 +11741,16 @@ i32.const 1 i32.add local.set $1 - br $for-loop|0 + br $for-loop|1 end end local.get $0 - local.set $5 + local.set $9 global.get $~lib/memory/__stack_pointer - local.get $5 + local.get $9 i32.store offset=4 - local.get $5 - call $~lib/set/Set#get:size + local.get $9 + call $~lib/set/Set#get:size i32.const 100 i32.eq i32.eqz @@ -14419,21 +11764,23 @@ end i32.const 50 local.set $1 - loop $for-loop|1 + loop $for-loop|3 local.get $1 + i32.const 65535 + i32.and i32.const 100 - i32.lt_s - local.set $2 - local.get $2 + i32.lt_u + local.set $4 + local.get $4 if local.get $0 - local.set $5 + local.set $9 global.get $~lib/memory/__stack_pointer - local.get $5 + local.get $9 i32.store offset=4 - local.get $5 + local.get $9 local.get $1 - call $~lib/set/Set#has + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -14444,22 +11791,22 @@ unreachable end local.get $0 - local.set $5 + local.set $9 global.get $~lib/memory/__stack_pointer - local.get $5 + local.get $9 i32.store offset=4 - local.get $5 + local.get $9 local.get $1 - call $~lib/set/Set#add + call $~lib/set/Set#add drop local.get $0 - local.set $5 + local.set $9 global.get $~lib/memory/__stack_pointer - local.get $5 + local.get $9 i32.store offset=4 - local.get $5 + local.get $9 local.get $1 - call $~lib/set/Set#has + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -14473,16 +11820,16 @@ i32.const 1 i32.add local.set $1 - br $for-loop|1 + br $for-loop|3 end end local.get $0 - local.set $5 + local.set $9 global.get $~lib/memory/__stack_pointer - local.get $5 + local.get $9 i32.store offset=4 - local.get $5 - call $~lib/set/Set#get:size + local.get $9 + call $~lib/set/Set#get:size i32.const 100 i32.eq i32.eqz @@ -14496,49 +11843,49 @@ end global.get $~lib/memory/__stack_pointer local.get $0 - local.set $5 + local.set $9 global.get $~lib/memory/__stack_pointer - local.get $5 + local.get $9 i32.store offset=4 - local.get $5 - call $~lib/set/Set#values + local.get $9 + call $~lib/set/Set#values local.tee $1 i32.store offset=8 global.get $~lib/memory/__stack_pointer i32.const 0 - call $~lib/set/Set#constructor - local.tee $2 + call $~lib/set/Set#constructor + local.tee $4 i32.store offset=12 i32.const 0 - local.set $3 - loop $for-loop|2 - local.get $3 + local.set $5 + loop $for-loop|4 + local.get $5 local.get $1 - local.set $5 + local.set $9 global.get $~lib/memory/__stack_pointer - local.get $5 + local.get $9 i32.store offset=4 - local.get $5 - call $~lib/array/Array#get:length + local.get $9 + call $~lib/array/Array#get:length i32.lt_s - local.set $4 - local.get $4 + local.set $6 + local.get $6 if local.get $0 - local.set $5 + local.set $9 global.get $~lib/memory/__stack_pointer - local.get $5 + local.get $9 i32.store offset=4 - local.get $5 + local.get $9 local.get $1 - local.set $5 + local.set $9 global.get $~lib/memory/__stack_pointer - local.get $5 + local.get $9 i32.store offset=16 + local.get $9 local.get $5 - local.get $3 - call $~lib/array/Array#__get - call $~lib/set/Set#has + call $~lib/array/Array#__get + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -14548,43 +11895,43 @@ call $~lib/builtins/abort unreachable end - local.get $2 - local.set $5 + local.get $4 + local.set $9 global.get $~lib/memory/__stack_pointer - local.get $5 + local.get $9 i32.store offset=4 - local.get $5 + local.get $9 local.get $1 - local.set $5 + local.set $9 global.get $~lib/memory/__stack_pointer - local.get $5 + local.get $9 i32.store offset=16 + local.get $9 local.get $5 - local.get $3 - call $~lib/array/Array#__get - call $~lib/set/Set#add + call $~lib/array/Array#__get + call $~lib/set/Set#add drop - local.get $3 + local.get $5 i32.const 1 i32.add - local.set $3 - br $for-loop|2 + local.set $5 + br $for-loop|4 end end - local.get $2 - local.set $5 + local.get $4 + local.set $9 global.get $~lib/memory/__stack_pointer - local.get $5 + local.get $9 i32.store offset=4 - local.get $5 - call $~lib/set/Set#get:size + local.get $9 + call $~lib/set/Set#get:size local.get $0 - local.set $5 + local.set $9 global.get $~lib/memory/__stack_pointer - local.get $5 + local.get $9 i32.store offset=4 - local.get $5 - call $~lib/set/Set#get:size + local.get $9 + call $~lib/set/Set#get:size i32.eq i32.eqz if @@ -14596,651 +11943,267 @@ unreachable end i32.const 0 - local.set $3 - loop $for-loop|3 - local.get $3 - i32.const 50 - i32.lt_s - local.set $4 - local.get $4 - if - local.get $0 - local.set $5 - global.get $~lib/memory/__stack_pointer - local.get $5 - i32.store offset=4 - local.get $5 - local.get $3 - call $~lib/set/Set#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 31 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $5 - global.get $~lib/memory/__stack_pointer - local.get $5 - i32.store offset=4 - local.get $5 - local.get $3 - call $~lib/set/Set#delete - drop - local.get $0 - local.set $5 - global.get $~lib/memory/__stack_pointer - local.get $5 - i32.store offset=4 - local.get $5 - local.get $3 - call $~lib/set/Set#has - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 33 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|3 - end - end - local.get $0 local.set $5 - global.get $~lib/memory/__stack_pointer - local.get $5 - i32.store offset=4 - local.get $5 - call $~lib/set/Set#get:size - i32.const 50 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 35 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - local.set $3 - loop $for-loop|4 - local.get $3 + loop $for-loop|6 + local.get $5 + i32.const 65535 + i32.and i32.const 50 - i32.lt_s - local.set $4 - local.get $4 + i32.lt_u + local.set $7 + local.get $7 if local.get $0 - local.set $5 - global.get $~lib/memory/__stack_pointer - local.get $5 - i32.store offset=4 - local.get $5 - local.get $3 - call $~lib/set/Set#has - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 39 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $5 - global.get $~lib/memory/__stack_pointer - local.get $5 - i32.store offset=4 - local.get $5 - local.get $3 - call $~lib/set/Set#add - drop - local.get $0 - local.set $5 + local.set $9 global.get $~lib/memory/__stack_pointer - local.get $5 + local.get $9 i32.store offset=4 + local.get $9 local.get $5 - local.get $3 - call $~lib/set/Set#has + call $~lib/set/Set#has i32.eqz if i32.const 0 i32.const 544 - i32.const 41 + i32.const 31 i32.const 5 call $~lib/builtins/abort unreachable end local.get $0 - local.set $5 + local.set $9 global.get $~lib/memory/__stack_pointer - local.get $5 + local.get $9 i32.store offset=4 + local.get $9 local.get $5 - local.get $3 - call $~lib/set/Set#delete + call $~lib/set/Set#delete drop local.get $0 - local.set $5 + local.set $9 global.get $~lib/memory/__stack_pointer - local.get $5 + local.get $9 i32.store offset=4 + local.get $9 local.get $5 - local.get $3 - call $~lib/set/Set#has + call $~lib/set/Set#has i32.eqz i32.eqz if i32.const 0 i32.const 544 - i32.const 43 + i32.const 33 i32.const 5 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $5 i32.const 1 i32.add - local.set $3 - br $for-loop|4 + local.set $5 + br $for-loop|6 end end local.get $0 - local.set $5 + local.set $9 global.get $~lib/memory/__stack_pointer - local.get $5 + local.get $9 i32.store offset=4 - local.get $5 - call $~lib/set/Set#get:size + local.get $9 + call $~lib/set/Set#get:size i32.const 50 i32.eq i32.eqz if i32.const 0 i32.const 544 - i32.const 45 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 -<<<<<<< HEAD - call $~lib/set/Set#clear - local.get $0 - call $~lib/set/Set#get:size - i32.const 0 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 336 - i32.const 49 + i32.const 35 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/set/Set#constructor (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 32 - i32.const 11 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.set $0 - end - local.get $0 i32.const 0 - i32.const 4 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store - local.get $0 - i64.const 4 - i64.const 1 - i64.sub - i64.store offset=8 -======= - local.set $5 - global.get $~lib/memory/__stack_pointer - local.get $5 - i32.store offset=4 - local.get $5 - call $~lib/set/Set#clear ->>>>>>> master - local.get $0 local.set $5 - global.get $~lib/memory/__stack_pointer - local.get $5 - i32.store offset=4 - local.get $5 - call $~lib/set/Set#get:size - i32.const 0 -<<<<<<< HEAD - i32.const 4 - i32.const 8 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $0 - i32.const 0 - i32.store offset=28 - local.get $0 - ) - (func $~lib/util/hash/HASH (param $0 i32) (result i64) - (local $1 i64) - (local $2 i32) - (local $3 i64) - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 4 - i32.le_u - drop - local.get $0 - local.set $2 - i64.const 4 - local.set $1 - i64.const 0 - i64.const 2870177450012600261 - i64.add - local.get $1 - i64.add - local.set $3 - local.get $3 - local.get $2 - i64.extend_i32_u - i64.const -7046029288634856825 - i64.mul - i64.xor - local.set $3 - local.get $3 - i64.const 23 - i64.rotl - i64.const -4417276706812531889 - i64.mul - i64.const 1609587929392839161 - i64.add - local.set $3 - local.get $3 - local.get $3 - i64.const 33 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const -4417276706812531889 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 29 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const 1609587929392839161 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 32 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - return - ) - (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.get $2 - local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - i32.load - local.set $3 - loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 + loop $for-loop|8 + local.get $5 + i32.const 65535 + i32.and + i32.const 50 + i32.lt_u + local.set $8 + local.get $8 if - local.get $3 - i32.load offset=4 - local.set $5 + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $5 + call $~lib/set/Set#has + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 39 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 local.get $5 - i32.const 1 - i32.and + call $~lib/set/Set#add + drop + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $5 + call $~lib/set/Set#has i32.eqz - if (result i32) - local.get $3 - i32.load - local.get $1 - i32.eq - else + if i32.const 0 + i32.const 544 + i32.const 41 + i32.const 5 + call $~lib/builtins/abort + unreachable end + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $5 + call $~lib/set/Set#delete + drop + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $5 + call $~lib/set/Set#has + i32.eqz + i32.eqz if - local.get $3 - return + i32.const 0 + i32.const 544 + i32.const 43 + i32.const 5 + call $~lib/builtins/abort + unreachable end local.get $5 i32.const 1 - i32.const -1 - i32.xor - i32.and - local.set $3 - br $while-continue|0 + i32.add + local.set $5 + br $for-loop|8 end end - i32.const 0 - ) - (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) -======= + local.get $0 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/set/Set#get:size + i32.const 50 i32.eq i32.eqz if i32.const 0 i32.const 544 - i32.const 49 + i32.const 45 i32.const 3 call $~lib/builtins/abort unreachable end - global.get $~lib/memory/__stack_pointer - i32.const 20 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store ->>>>>>> master local.get $0 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - local.get $1 -<<<<<<< HEAD - local.get $1 - call $~lib/util/hash/HASH - call $~lib/set/Set#find -======= - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end - call $~lib/set/Set#find ->>>>>>> master - i32.const 0 - i32.ne - local.set $3 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $3 - ) - (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) -<<<<<<< HEAD - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i64) - (local $14 i32) - local.get $1 - i32.const 1 - i32.add - local.set $2 - i32.const 0 - local.get $2 -======= + local.set $9 global.get $~lib/memory/__stack_pointer ->>>>>>> master - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/set/Set#clear + local.get $0 + local.set $9 global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + call $~lib/set/Set#get:size i32.const 0 -<<<<<<< HEAD - local.get $4 - i32.const 8 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $0 - i32.load offset=16 - local.set $6 - local.get $6 - local.get $0 - i32.load offset=24 - i32.const 8 - i32.mul - i32.add - local.set $7 - local.get $5 - local.set $8 - loop $while-continue|0 - local.get $6 - local.get $7 - i32.ne - local.set $9 - local.get $9 - if - local.get $6 - local.set $10 - local.get $10 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $8 - local.set $11 - local.get $10 - i32.load - local.set $12 - local.get $11 - local.get $12 - i32.store - local.get $12 - call $~lib/util/hash/HASH - local.get $1 - i64.extend_i32_u - i64.and - local.set $13 - local.get $3 - local.get $13 - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - local.set $14 - local.get $11 - local.get $14 - i32.load - i32.store offset=4 - local.get $14 - local.get $8 - i32.store - local.get $8 - i32.const 8 - i32.add - local.set $8 - end - local.get $6 - i32.const 8 - i32.add - local.set $6 - br $while-continue|0 - end - end - local.get $0 - local.tee $11 - local.get $3 - local.tee $12 - local.get $11 - i32.load - local.tee $9 - i32.ne + i32.eq + i32.eqz if - local.get $12 - call $~lib/rt/pure/__retain - local.set $12 - local.get $9 - call $~lib/rt/pure/__release + i32.const 0 + i32.const 544 + i32.const 49 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $12 + global.get $~lib/memory/__stack_pointer + i32.const 20 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 i32.store local.get $0 + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store + local.get $2 local.get $1 - i64.extend_i32_u - i64.store offset=8 - local.get $0 - local.tee $14 - local.get $5 - local.tee $9 - local.get $14 - i32.load offset=16 - local.tee $11 + local.get $1 + call $~lib/util/hash/HASH + call $~lib/set/Set#find + i32.const 0 i32.ne - if - local.get $9 - call $~lib/rt/pure/__retain - local.set $9 - local.get $11 - call $~lib/rt/pure/__release - end - local.get $9 - i32.store offset=16 - local.get $0 - local.get $4 - i32.store offset=20 - local.get $0 - local.get $0 - i32.load offset=28 - i32.store offset=24 - local.get $3 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) (local $2 i64) (local $3 i32) (local $4 i32) + (local $5 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store local.get $1 call $~lib/util/hash/HASH local.set $2 -======= - i32.store - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 ->>>>>>> master local.get $0 local.set $5 global.get $~lib/memory/__stack_pointer @@ -15248,17 +12211,10 @@ i32.store local.get $5 local.get $1 -<<<<<<< HEAD local.get $2 call $~lib/set/Set#find local.set $3 local.get $3 -======= - local.get $3 - call $~lib/set/Set#find - local.set $4 - local.get $4 ->>>>>>> master i32.eqz if local.get $0 @@ -15293,12 +12249,8 @@ i64.const 1 i64.or end -<<<<<<< HEAD i32.wrap_i64 call $~lib/set/Set#rehash -======= - call $~lib/set/Set#rehash ->>>>>>> master end local.get $0 i32.load offset=16 @@ -15308,20 +12260,15 @@ local.tee $4 i32.const 1 i32.add -<<<<<<< HEAD - i32.store offset=24 + call $~lib/set/Set#set:entriesOffset local.get $4 -======= - call $~lib/set/Set#set:entriesOffset - local.get $2 ->>>>>>> master i32.const 8 i32.mul i32.add local.set $3 local.get $3 local.get $1 - call $~lib/set/SetEntry#set:key + call $~lib/set/SetEntry#set:key i32.const 0 drop local.get $0 @@ -15329,11 +12276,7 @@ i32.load offset=28 i32.const 1 i32.add -<<<<<<< HEAD - i32.store offset=28 -======= - call $~lib/set/Set#set:entriesCount ->>>>>>> master + call $~lib/set/Set#set:entriesCount local.get $0 i32.load local.get $2 @@ -15347,69 +12290,13 @@ local.set $4 local.get $3 local.get $4 -<<<<<<< HEAD i32.load - i32.store offset=4 + call $~lib/set/SetEntry#set:taggedNext local.get $4 local.get $3 i32.store end local.get $0 - call $~lib/rt/pure/__retain - ) - (func $~lib/set/Set#get:size (param $0 i32) (result i32) - local.get $0 - i32.load offset=28 - ) - (func $~lib/array/Array#constructor (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.eqz - if - i32.const 16 - i32.const 12 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - 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 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 1073741820 - i32.const 2 - i32.shr_u - i32.gt_u - if - i32.const 224 - i32.const 384 - i32.const 57 - i32.const 60 - call $~lib/builtins/abort - unreachable -======= - local.get $2 - i32.load - call $~lib/set/SetEntry#set:taggedNext - local.get $2 - local.get $4 - i32.store ->>>>>>> master - end - local.get $0 local.set $5 global.get $~lib/memory/__stack_pointer i32.const 4 @@ -15417,7 +12304,7 @@ global.set $~lib/memory/__stack_pointer local.get $5 ) - (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 4 @@ -15453,7 +12340,7 @@ local.get $1 i32.const 1 i32.add - call $~lib/array/Array#set:length_ + call $~lib/array/Array#set:length_ end local.get $0 local.set $3 @@ -15463,13 +12350,13 @@ local.get $3 local.get $1 local.get $2 - call $~lib/array/Array#__uset + call $~lib/array/Array#__uset global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/set/Set#values (param $0 i32) (result i32) + (func $~lib/set/Set#values (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -15496,7 +12383,7 @@ global.get $~lib/memory/__stack_pointer i32.const 0 local.get $2 - call $~lib/array/Array#constructor + call $~lib/array/Array#constructor local.tee $3 i32.store i32.const 0 @@ -15536,7 +12423,7 @@ local.get $8 local.get $7 i32.load - call $~lib/array/Array#__set + call $~lib/array/Array#__set end local.get $5 i32.const 1 @@ -15552,7 +12439,7 @@ i32.store offset=4 local.get $9 local.get $4 - call $~lib/array/Array#set:length + call $~lib/array/Array#set:length local.get $3 local.set $9 global.get $~lib/memory/__stack_pointer @@ -15561,7 +12448,7 @@ global.set $~lib/memory/__stack_pointer local.get $9 ) - (func $~lib/set/Set#delete (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -15582,42 +12469,11 @@ i32.store local.get $6 local.get $1 -<<<<<<< HEAD local.get $1 call $~lib/util/hash/HASH call $~lib/set/Set#find local.set $2 local.get $2 -======= - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end - call $~lib/set/Set#find - local.set $3 - local.get $3 ->>>>>>> master i32.eqz if i32.const 0 @@ -15629,29 +12485,18 @@ local.get $6 return end -<<<<<<< HEAD - i32.const 0 - drop local.get $2 local.get $2 -======= - local.get $3 - local.get $3 ->>>>>>> master i32.load offset=4 i32.const 1 i32.or - call $~lib/set/SetEntry#set:taggedNext + call $~lib/set/SetEntry#set:taggedNext local.get $0 local.get $0 i32.load offset=28 i32.const 1 i32.sub -<<<<<<< HEAD - i32.store offset=28 -======= - call $~lib/set/Set#set:entriesCount ->>>>>>> master + call $~lib/set/Set#set:entriesCount local.get $0 i64.load offset=8 i64.const 1 @@ -15678,71 +12523,21 @@ i32.load offset=20 i32.const 3 i32.mul - i32.const 4 - i32.div_s - i32.lt_s - else - i32.const 0 - end - if - local.get $0 -<<<<<<< HEAD - local.get $3 - call $~lib/set/Set#rehash - end - i32.const 1 - ) - (func $~lib/set/Set#clear (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - local.tee $1 - i32.const 0 - i32.const 4 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $2 - local.get $1 - i32.load - call $~lib/rt/pure/__release - local.get $2 - i32.store - local.get $0 - i64.const 4 - i64.const 1 - i64.sub - i64.store offset=8 - local.get $0 - local.tee $2 - i32.const 0 - i32.const 4 - i32.const 8 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 - local.get $2 - i32.load offset=16 - call $~lib/rt/pure/__release - local.get $1 - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $0 - i32.const 0 - i32.store offset=28 -======= + i32.const 4 + i32.div_s + i32.lt_s + else + i32.const 0 + end + if + local.get $0 local.set $6 global.get $~lib/memory/__stack_pointer local.get $6 i32.store local.get $6 - local.get $4 - call $~lib/set/Set#rehash + local.get $3 + call $~lib/set/Set#rehash end i32.const 1 local.set $6 @@ -15751,9 +12546,8 @@ i32.add global.set $~lib/memory/__stack_pointer local.get $6 ->>>>>>> master ) - (func $std/set/testNumeric + (func $std/set/testNumeric (local $0 i32) (local $1 i32) (local $2 i32) @@ -15776,7 +12570,7 @@ i32.store offset=16 global.get $~lib/memory/__stack_pointer i32.const 0 - call $~lib/set/Set#constructor + call $~lib/set/Set#constructor local.tee $0 i32.store i32.const 0 @@ -15784,7 +12578,7 @@ loop $for-loop|0 local.get $1 i32.const 100 - i32.lt_u + i32.lt_s local.set $2 local.get $2 if @@ -15795,7 +12589,7 @@ i32.store offset=4 local.get $5 local.get $1 - call $~lib/set/Set#has + call $~lib/set/Set#has i32.eqz i32.eqz if @@ -15813,7 +12607,7 @@ i32.store offset=4 local.get $5 local.get $1 - call $~lib/set/Set#add + call $~lib/set/Set#add drop local.get $0 local.set $5 @@ -15822,7 +12616,7 @@ i32.store offset=4 local.get $5 local.get $1 - call $~lib/set/Set#has + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -15845,7 +12639,7 @@ local.get $5 i32.store offset=4 local.get $5 - call $~lib/set/Set#get:size + call $~lib/set/Set#get:size i32.const 100 i32.eq i32.eqz @@ -15862,7 +12656,7 @@ loop $for-loop|1 local.get $1 i32.const 100 - i32.lt_u + i32.lt_s local.set $2 local.get $2 if @@ -15873,7 +12667,7 @@ i32.store offset=4 local.get $5 local.get $1 - call $~lib/set/Set#has + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -15890,7 +12684,7 @@ i32.store offset=4 local.get $5 local.get $1 - call $~lib/set/Set#add + call $~lib/set/Set#add drop local.get $0 local.set $5 @@ -15899,7 +12693,7 @@ i32.store offset=4 local.get $5 local.get $1 - call $~lib/set/Set#has + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -15922,7 +12716,7 @@ local.get $5 i32.store offset=4 local.get $5 - call $~lib/set/Set#get:size + call $~lib/set/Set#get:size i32.const 100 i32.eq i32.eqz @@ -15941,12 +12735,12 @@ local.get $5 i32.store offset=4 local.get $5 - call $~lib/set/Set#values + call $~lib/set/Set#values local.tee $1 i32.store offset=8 global.get $~lib/memory/__stack_pointer i32.const 0 - call $~lib/set/Set#constructor + call $~lib/set/Set#constructor local.tee $2 i32.store offset=12 i32.const 0 @@ -15959,7 +12753,7 @@ local.get $5 i32.store offset=4 local.get $5 - call $~lib/array/Array#get:length + call $~lib/array/Array#get:length i32.lt_s local.set $4 local.get $4 @@ -15977,8 +12771,8 @@ i32.store offset=16 local.get $5 local.get $3 - call $~lib/array/Array#__get - call $~lib/set/Set#has + call $~lib/array/Array#__get + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -16001,8 +12795,8 @@ i32.store offset=16 local.get $5 local.get $3 - call $~lib/array/Array#__get - call $~lib/set/Set#add + call $~lib/array/Array#__get + call $~lib/set/Set#add drop local.get $3 i32.const 1 @@ -16017,14 +12811,14 @@ local.get $5 i32.store offset=4 local.get $5 - call $~lib/set/Set#get:size + call $~lib/set/Set#get:size local.get $0 local.set $5 global.get $~lib/memory/__stack_pointer local.get $5 i32.store offset=4 local.get $5 - call $~lib/set/Set#get:size + call $~lib/set/Set#get:size i32.eq i32.eqz if @@ -16040,7 +12834,7 @@ loop $for-loop|3 local.get $3 i32.const 50 - i32.lt_u + i32.lt_s local.set $4 local.get $4 if @@ -16051,7 +12845,7 @@ i32.store offset=4 local.get $5 local.get $3 - call $~lib/set/Set#has + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -16068,7 +12862,7 @@ i32.store offset=4 local.get $5 local.get $3 - call $~lib/set/Set#delete + call $~lib/set/Set#delete drop local.get $0 local.set $5 @@ -16077,7 +12871,7 @@ i32.store offset=4 local.get $5 local.get $3 - call $~lib/set/Set#has + call $~lib/set/Set#has i32.eqz i32.eqz if @@ -16101,7 +12895,7 @@ local.get $5 i32.store offset=4 local.get $5 - call $~lib/set/Set#get:size + call $~lib/set/Set#get:size i32.const 50 i32.eq i32.eqz @@ -16118,7 +12912,7 @@ loop $for-loop|4 local.get $3 i32.const 50 - i32.lt_u + i32.lt_s local.set $4 local.get $4 if @@ -16129,7 +12923,7 @@ i32.store offset=4 local.get $5 local.get $3 - call $~lib/set/Set#has + call $~lib/set/Set#has i32.eqz i32.eqz if @@ -16147,7 +12941,7 @@ i32.store offset=4 local.get $5 local.get $3 - call $~lib/set/Set#add + call $~lib/set/Set#add drop local.get $0 local.set $5 @@ -16156,7 +12950,7 @@ i32.store offset=4 local.get $5 local.get $3 - call $~lib/set/Set#has + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -16173,7 +12967,7 @@ i32.store offset=4 local.get $5 local.get $3 - call $~lib/set/Set#delete + call $~lib/set/Set#delete drop local.get $0 local.set $5 @@ -16182,7 +12976,7 @@ i32.store offset=4 local.get $5 local.get $3 - call $~lib/set/Set#has + call $~lib/set/Set#has i32.eqz i32.eqz if @@ -16201,226 +12995,37 @@ end end local.get $0 -<<<<<<< HEAD - call $~lib/set/Set#get:size -======= local.set $5 global.get $~lib/memory/__stack_pointer local.get $5 i32.store offset=4 local.get $5 - call $~lib/set/Set#get:size ->>>>>>> master + call $~lib/set/Set#get:size i32.const 50 i32.eq i32.eqz if i32.const 0 -<<<<<<< HEAD - i32.const 336 -======= i32.const 544 ->>>>>>> master - i32.const 45 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 -<<<<<<< HEAD - call $~lib/set/Set#clear - local.get $0 - call $~lib/set/Set#get:size - i32.const 0 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 336 - i32.const 49 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/set/Set#constructor (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 32 - i32.const 13 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.set $0 - end - local.get $0 - i32.const 0 - i32.const 4 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store - local.get $0 - i64.const 4 - i64.const 1 - i64.sub - i64.store offset=8 - local.get $0 - i32.const 0 - i32.const 4 - i32.const 8 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $0 - i32.const 0 - i32.store offset=28 - local.get $0 - ) - (func $~lib/util/hash/HASH (param $0 i32) (result i64) - (local $1 i64) - (local $2 i32) - (local $3 i64) - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 4 - i32.le_u - drop - local.get $0 - local.set $2 - i64.const 4 - local.set $1 - i64.const 0 - i64.const 2870177450012600261 - i64.add - local.get $1 - i64.add - local.set $3 - local.get $3 - local.get $2 - i64.extend_i32_u - i64.const -7046029288634856825 - i64.mul - i64.xor - local.set $3 - local.get $3 - i64.const 23 - i64.rotl - i64.const -4417276706812531889 - i64.mul - i64.const 1609587929392839161 - i64.add - local.set $3 - local.get $3 - local.get $3 - i64.const 33 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const -4417276706812531889 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 29 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const 1609587929392839161 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 32 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - return - ) - (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.get $2 - local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - i32.load - local.set $3 - loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 - if - local.get $3 - i32.load offset=4 - local.set $5 - local.get $5 - i32.const 1 - i32.and - i32.eqz - if (result i32) - local.get $3 - i32.load - local.get $1 - i32.eq - else - i32.const 0 - end - if - local.get $3 - return - end - local.get $5 - i32.const 1 - i32.const -1 - i32.xor - i32.and - local.set $3 - br $while-continue|0 - end + i32.const 45 + i32.const 3 + call $~lib/builtins/abort + unreachable end -======= + local.get $0 local.set $5 global.get $~lib/memory/__stack_pointer local.get $5 i32.store offset=4 local.get $5 - call $~lib/set/Set#clear + call $~lib/set/Set#clear local.get $0 local.set $5 global.get $~lib/memory/__stack_pointer local.get $5 i32.store offset=4 local.get $5 - call $~lib/set/Set#get:size ->>>>>>> master + call $~lib/set/Set#get:size i32.const 0 i32.eq i32.eqz @@ -16437,12 +13042,8 @@ i32.add global.set $~lib/memory/__stack_pointer ) -<<<<<<< HEAD (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) -======= - (func $~lib/set/Set#has (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) - (local $3 i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -16451,270 +13052,52 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store ->>>>>>> master local.get $0 - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $2 i32.store - local.get $3 + local.get $2 local.get $1 -<<<<<<< HEAD local.get $1 call $~lib/util/hash/HASH call $~lib/set/Set#find -======= - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.0 - end - call $~lib/set/Set#find ->>>>>>> master i32.const 0 i32.ne - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $2 ) - (func $~lib/set/Set#add (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) (local $2 i64) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) -<<<<<<< HEAD - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i64) - (local $14 i32) - local.get $1 - i32.const 1 - i32.add - local.set $2 - i32.const 0 - local.get $2 -======= global.get $~lib/memory/__stack_pointer ->>>>>>> master i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer i32.const 0 -<<<<<<< HEAD - local.get $4 - i32.const 8 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $0 - i32.load offset=16 - local.set $6 - local.get $6 - local.get $0 - i32.load offset=24 - i32.const 8 - i32.mul - i32.add - local.set $7 - local.get $5 - local.set $8 - loop $while-continue|0 - local.get $6 - local.get $7 - i32.ne - local.set $9 - local.get $9 - if - local.get $6 - local.set $10 - local.get $10 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $8 - local.set $11 - local.get $10 - i32.load - local.set $12 - local.get $11 - local.get $12 - i32.store - local.get $12 - call $~lib/util/hash/HASH - local.get $1 - i64.extend_i32_u - i64.and - local.set $13 - local.get $3 - local.get $13 - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - local.set $14 - local.get $11 - local.get $14 - i32.load - i32.store offset=4 - local.get $14 - local.get $8 - i32.store - local.get $8 - i32.const 8 - i32.add - local.set $8 - end - local.get $6 - i32.const 8 - i32.add - local.set $6 - br $while-continue|0 - end - end - local.get $0 - local.tee $11 - local.get $3 - local.tee $12 - local.get $11 - i32.load - local.tee $9 - i32.ne - if - local.get $12 - call $~lib/rt/pure/__retain - local.set $12 - local.get $9 - call $~lib/rt/pure/__release - end - local.get $12 i32.store - local.get $0 - local.get $1 - i64.extend_i32_u - i64.store offset=8 - local.get $0 - local.tee $14 - local.get $5 - local.tee $9 - local.get $14 - i32.load offset=16 - local.tee $11 - i32.ne - if - local.get $9 - call $~lib/rt/pure/__retain - local.set $9 - local.get $11 - call $~lib/rt/pure/__release - end - local.get $9 - i32.store offset=16 - local.get $0 - local.get $4 - i32.store offset=20 - local.get $0 - local.get $0 - i32.load offset=28 - i32.store offset=24 - local.get $3 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - ) - (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) - (local $2 i64) - (local $3 i32) - (local $4 i32) local.get $1 call $~lib/util/hash/HASH local.set $2 -======= - i32.store - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 ->>>>>>> master local.get $0 - local.set $6 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $6 + local.get $5 i32.store - local.get $6 + local.get $5 local.get $1 -<<<<<<< HEAD local.get $2 call $~lib/set/Set#find local.set $3 local.get $3 -======= - local.get $3 - call $~lib/set/Set#find - local.set $4 - local.get $4 ->>>>>>> master i32.eqz if local.get $0 @@ -16724,11 +13107,11 @@ i32.eq if local.get $0 - local.set $6 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $6 + local.get $5 i32.store - local.get $6 + local.get $5 local.get $0 i32.load offset=28 local.get $0 @@ -16749,40 +13132,26 @@ i64.const 1 i64.or end -<<<<<<< HEAD i32.wrap_i64 call $~lib/set/Set#rehash -======= - call $~lib/set/Set#rehash ->>>>>>> master end local.get $0 i32.load offset=16 local.get $0 local.get $0 -<<<<<<< HEAD i32.load offset=24 local.tee $4 i32.const 1 i32.add - i32.store offset=24 + call $~lib/set/Set#set:entriesOffset local.get $4 i32.const 8 -======= - i32.load offset=16 - local.tee $5 - i32.const 1 - i32.add - call $~lib/set/Set#set:entriesOffset - local.get $5 - i32.const 16 ->>>>>>> master i32.mul i32.add local.set $3 local.get $3 local.get $1 - call $~lib/set/SetEntry#set:key + call $~lib/set/SetEntry#set:key i32.const 0 drop local.get $0 @@ -16790,11 +13159,7 @@ i32.load offset=28 i32.const 1 i32.add -<<<<<<< HEAD - i32.store offset=28 -======= - call $~lib/set/Set#set:entriesCount ->>>>>>> master + call $~lib/set/Set#set:entriesCount local.get $0 i32.load local.get $2 @@ -16805,41 +13170,24 @@ i32.const 4 i32.mul i32.add -<<<<<<< HEAD local.set $4 local.get $3 local.get $4 i32.load - i32.store offset=4 -======= - local.set $5 - local.get $4 - local.get $5 - i32.load - call $~lib/set/SetEntry#set:taggedNext - local.get $5 ->>>>>>> master + call $~lib/set/SetEntry#set:taggedNext local.get $4 local.get $3 i32.store end local.get $0 -<<<<<<< HEAD - call $~lib/rt/pure/__retain - ) - (func $~lib/set/Set#get:size (param $0 i32) (result i32) - local.get $0 - i32.load offset=28 -======= - local.set $6 + local.set $5 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $6 ->>>>>>> master + local.get $5 ) - (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 4 @@ -16869,13 +13217,13 @@ local.get $1 i32.const 1 i32.add - i32.const 3 + i32.const 2 call $~lib/array/ensureSize local.get $0 local.get $1 i32.const 1 i32.add - call $~lib/array/Array#set:length_ + call $~lib/array/Array#set:length_ end local.get $0 local.set $3 @@ -16885,13 +13233,13 @@ local.get $3 local.get $1 local.get $2 - call $~lib/array/Array#__uset + call $~lib/array/Array#__uset global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/set/Set#values (param $0 i32) (result i32) + (func $~lib/set/Set#values (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16918,7 +13266,7 @@ global.get $~lib/memory/__stack_pointer i32.const 0 local.get $2 - call $~lib/array/Array#constructor + call $~lib/array/Array#constructor local.tee $3 i32.store i32.const 0 @@ -16934,12 +13282,12 @@ if local.get $1 local.get $5 - i32.const 16 + i32.const 8 i32.mul i32.add local.set $7 local.get $7 - i32.load offset=8 + i32.load offset=4 i32.const 1 i32.and i32.eqz @@ -16957,8 +13305,8 @@ local.set $4 local.get $8 local.get $7 - i64.load - call $~lib/array/Array#__set + i32.load + call $~lib/array/Array#__set end local.get $5 i32.const 1 @@ -16974,7 +13322,7 @@ i32.store offset=4 local.get $9 local.get $4 - call $~lib/array/Array#set:length + call $~lib/array/Array#set:length local.get $3 local.set $9 global.get $~lib/memory/__stack_pointer @@ -16983,13 +13331,12 @@ global.set $~lib/memory/__stack_pointer local.get $9 ) - (func $~lib/set/Set#delete (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) + (func $~lib/set/Set#delete (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) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -16999,87 +13346,40 @@ i32.const 0 i32.store local.get $0 - local.set $7 + local.set $6 global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $6 i32.store - local.get $7 + local.get $6 local.get $1 -<<<<<<< HEAD local.get $1 call $~lib/util/hash/HASH call $~lib/set/Set#find local.set $2 local.get $2 -======= - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.3 - end - call $~lib/set/Set#find - local.set $3 - local.get $3 ->>>>>>> master i32.eqz if i32.const 0 - local.set $7 + local.set $6 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $7 + local.get $6 return end -<<<<<<< HEAD - i32.const 0 - drop local.get $2 local.get $2 i32.load offset=4 -======= - local.get $3 - local.get $3 - i32.load offset=8 ->>>>>>> master i32.const 1 i32.or - call $~lib/set/SetEntry#set:taggedNext + call $~lib/set/SetEntry#set:taggedNext local.get $0 local.get $0 i32.load offset=28 i32.const 1 i32.sub -<<<<<<< HEAD - i32.store offset=28 -======= - call $~lib/set/Set#set:entriesCount ->>>>>>> master + call $~lib/set/Set#set:entriesCount local.get $0 i64.load offset=8 i64.const 1 @@ -17090,20 +13390,12 @@ i32.const 1 i32.add i32.const 4 -<<<<<<< HEAD local.tee $4 local.get $0 i32.load offset=28 local.tee $5 local.get $4 -======= - local.tee $5 - local.get $0 - i32.load offset=20 - local.tee $6 ->>>>>>> master local.get $5 - local.get $6 i32.gt_u select i32.ge_u @@ -17122,81 +13414,29 @@ end if local.get $0 -<<<<<<< HEAD - local.get $3 - call $~lib/set/Set#rehash - end - i32.const 1 - ) - (func $~lib/set/Set#clear (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - local.tee $1 - i32.const 0 - i32.const 4 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $2 - local.get $1 - i32.load - call $~lib/rt/pure/__release - local.get $2 - i32.store - local.get $0 - i64.const 4 - i64.const 1 - i64.sub - i64.store offset=8 - local.get $0 - local.tee $2 - i32.const 0 - i32.const 4 - i32.const 8 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 - local.get $2 - i32.load offset=16 - call $~lib/rt/pure/__release - local.get $1 - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $0 - i32.const 0 - i32.store offset=28 -======= - local.set $7 + local.set $6 global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $6 i32.store - local.get $7 - local.get $4 - call $~lib/set/Set#rehash + local.get $6 + local.get $3 + call $~lib/set/Set#rehash end i32.const 1 - local.set $7 + local.set $6 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $7 ->>>>>>> master + local.get $6 ) - (func $std/set/testNumeric + (func $std/set/testNumeric (local $0 i32) - (local $1 i64) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) global.get $~lib/memory/__stack_pointer i32.const 20 i32.sub @@ -17213,26 +13453,26 @@ i32.store offset=16 global.get $~lib/memory/__stack_pointer i32.const 0 - call $~lib/set/Set#constructor + call $~lib/set/Set#constructor local.tee $0 i32.store - i64.const 0 + i32.const 0 local.set $1 loop $for-loop|0 local.get $1 - i64.const 100 - i64.lt_s + i32.const 100 + i32.lt_u local.set $2 local.get $2 if local.get $0 - local.set $6 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $6 + local.get $5 i32.store offset=4 - local.get $6 + local.get $5 local.get $1 - call $~lib/set/Set#has + call $~lib/set/Set#has i32.eqz i32.eqz if @@ -17244,22 +13484,22 @@ unreachable end local.get $0 - local.set $6 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $6 + local.get $5 i32.store offset=4 - local.get $6 + local.get $5 local.get $1 - call $~lib/set/Set#add + call $~lib/set/Set#add drop local.get $0 - local.set $6 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $6 + local.get $5 i32.store offset=4 - local.get $6 + local.get $5 local.get $1 - call $~lib/set/Set#has + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -17270,365 +13510,225 @@ unreachable end local.get $1 - i64.const 1 - i64.add + i32.const 1 + i32.add local.set $1 br $for-loop|0 end end local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - call $~lib/set/Set#get:size - i32.const 100 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 10 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i64.const 50 - local.set $1 - loop $for-loop|1 - local.get $1 - i64.const 100 - i64.lt_s - local.set $2 - local.get $2 - if - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - local.get $1 - call $~lib/set/Set#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 14 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - local.get $1 - call $~lib/set/Set#add - drop - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - local.get $1 - call $~lib/set/Set#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 16 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i64.const 1 - i64.add - local.set $1 - br $for-loop|1 - end - end - local.get $0 - local.set $6 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $6 + local.get $5 i32.store offset=4 - local.get $6 - call $~lib/set/Set#get:size + local.get $5 + call $~lib/set/Set#get:size i32.const 100 i32.eq i32.eqz if i32.const 0 i32.const 544 - i32.const 18 + i32.const 10 i32.const 3 call $~lib/builtins/abort unreachable end - global.get $~lib/memory/__stack_pointer - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - call $~lib/set/Set#values - local.tee $2 - i32.store offset=8 - global.get $~lib/memory/__stack_pointer - i32.const 0 - call $~lib/set/Set#constructor - local.tee $3 - i32.store offset=12 - i32.const 0 - local.set $4 - loop $for-loop|2 - local.get $4 + i32.const 50 + local.set $1 + loop $for-loop|1 + local.get $1 + i32.const 100 + i32.lt_u + local.set $2 local.get $2 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - call $~lib/array/Array#get:length - i32.lt_s - local.set $5 - local.get $5 if local.get $0 - local.set $6 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $6 + local.get $5 i32.store offset=4 - local.get $6 - local.get $2 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=16 - local.get $6 - local.get $4 - call $~lib/array/Array#__get - call $~lib/set/Set#has + local.get $5 + local.get $1 + call $~lib/set/Set#has i32.eqz if i32.const 0 i32.const 544 - i32.const 24 + i32.const 14 i32.const 5 call $~lib/builtins/abort unreachable end - local.get $3 - local.set $6 + local.get $0 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $6 + local.get $5 i32.store offset=4 - local.get $6 - local.get $2 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=16 - local.get $6 - local.get $4 - call $~lib/array/Array#__get - call $~lib/set/Set#add + local.get $5 + local.get $1 + call $~lib/set/Set#add drop - local.get $4 + local.get $0 + local.set $5 + global.get $~lib/memory/__stack_pointer + local.get $5 + i32.store offset=4 + local.get $5 + local.get $1 + call $~lib/set/Set#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 16 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 i32.const 1 i32.add - local.set $4 - br $for-loop|2 + local.set $1 + br $for-loop|1 end end - local.get $3 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - call $~lib/set/Set#get:size local.get $0 - local.set $6 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $6 + local.get $5 i32.store offset=4 - local.get $6 - call $~lib/set/Set#get:size + local.get $5 + call $~lib/set/Set#get:size + i32.const 100 i32.eq i32.eqz if i32.const 0 i32.const 544 - i32.const 27 + i32.const 18 i32.const 3 call $~lib/builtins/abort unreachable end -<<<<<<< HEAD - local.get $1 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/set/Set#constructor (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 32 - i32.const 15 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.set $0 - end - local.get $0 - i32.const 0 - i32.const 4 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store - local.get $0 - i64.const 4 - i64.const 1 - i64.sub - i64.store offset=8 - local.get $0 - i32.const 0 - i32.const 4 - i32.const 16 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $0 - i32.const 0 - i32.store offset=28 - local.get $0 - ) - (func $~lib/util/hash/HASH (param $0 i64) (result i64) - (local $1 i64) - (local $2 i64) - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 4 - i32.le_u - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $0 - local.set $1 - i64.const 0 - i64.const 2870177450012600261 - i64.add - i64.const 8 - i64.add - local.set $2 - local.get $2 - local.get $1 - i64.const -4417276706812531889 - i64.mul - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - local.set $2 - local.get $2 - i64.const 27 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.set $2 - local.get $2 - local.get $2 - i64.const 33 - i64.shr_u - i64.xor - local.set $2 - local.get $2 - i64.const -4417276706812531889 - i64.mul - local.set $2 - local.get $2 - local.get $2 - i64.const 29 - i64.shr_u - i64.xor - local.set $2 - local.get $2 - i64.const 1609587929392839161 - i64.mul - local.set $2 - local.get $2 - local.get $2 - i64.const 32 - i64.shr_u - i64.xor - local.set $2 - local.get $2 - return - ) - (func $~lib/set/Set#find (param $0 i32) (param $1 i64) (param $2 i64) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.get $2 + global.get $~lib/memory/__stack_pointer local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - i32.load + local.set $5 + global.get $~lib/memory/__stack_pointer + local.get $5 + i32.store offset=4 + local.get $5 + call $~lib/set/Set#values + local.tee $1 + i32.store offset=8 + global.get $~lib/memory/__stack_pointer + i32.const 0 + call $~lib/set/Set#constructor + local.tee $2 + i32.store offset=12 + i32.const 0 local.set $3 - loop $while-continue|0 + loop $for-loop|2 local.get $3 -======= - i64.const 0 - local.set $1 - loop $for-loop|3 local.get $1 - i64.const 50 - i64.lt_s ->>>>>>> master + local.set $5 + global.get $~lib/memory/__stack_pointer + local.get $5 + i32.store offset=4 + local.get $5 + call $~lib/array/Array#get:length + i32.lt_s local.set $4 local.get $4 if local.get $0 - local.set $6 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $6 + local.get $5 i32.store offset=4 - local.get $6 + local.get $5 local.get $1 - call $~lib/set/Set#has + local.set $5 + global.get $~lib/memory/__stack_pointer + local.get $5 + i32.store offset=16 + local.get $5 + local.get $3 + call $~lib/array/Array#__get + call $~lib/set/Set#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 24 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.set $5 + global.get $~lib/memory/__stack_pointer + local.get $5 + i32.store offset=4 + local.get $5 + local.get $1 + local.set $5 + global.get $~lib/memory/__stack_pointer + local.get $5 + i32.store offset=16 + local.get $5 + local.get $3 + call $~lib/array/Array#__get + call $~lib/set/Set#add + drop + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|2 + end + end + local.get $2 + local.set $5 + global.get $~lib/memory/__stack_pointer + local.get $5 + i32.store offset=4 + local.get $5 + call $~lib/set/Set#get:size + local.get $0 + local.set $5 + global.get $~lib/memory/__stack_pointer + local.get $5 + i32.store offset=4 + local.get $5 + call $~lib/set/Set#get:size + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 27 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + local.set $3 + loop $for-loop|3 + local.get $3 + i32.const 50 + i32.lt_u + local.set $4 + local.get $4 + if + local.get $0 + local.set $5 + global.get $~lib/memory/__stack_pointer + local.get $5 + i32.store offset=4 + local.get $5 + local.get $3 + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -17639,22 +13739,22 @@ unreachable end local.get $0 - local.set $6 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $6 + local.get $5 i32.store offset=4 - local.get $6 - local.get $1 - call $~lib/set/Set#delete + local.get $5 + local.get $3 + call $~lib/set/Set#delete drop local.get $0 - local.set $6 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $6 + local.get $5 i32.store offset=4 - local.get $6 - local.get $1 - call $~lib/set/Set#has + local.get $5 + local.get $3 + call $~lib/set/Set#has i32.eqz i32.eqz if @@ -17665,88 +13765,20 @@ call $~lib/builtins/abort unreachable end - local.get $1 - i64.const 1 - i64.add - local.set $1 + local.get $3 + i32.const 1 + i32.add + local.set $3 br $for-loop|3 end end -<<<<<<< HEAD - i32.const 0 - ) - (func $~lib/set/Set#has (param $0 i32) (param $1 i64) (result i32) local.get $0 - local.get $1 - local.get $1 - call $~lib/util/hash/HASH - call $~lib/set/Set#find - i32.const 0 - i32.ne - ) - (func $~lib/set/Set#rehash (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 $10 i32) - (local $11 i32) - (local $12 i64) - (local $13 i64) - (local $14 i32) - local.get $1 - i32.const 1 - i32.add - local.set $2 - i32.const 0 - local.get $2 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $3 - local.get $2 - i32.const 8 - i32.mul - i32.const 3 - i32.div_s - local.set $4 - i32.const 0 - local.get $4 - i32.const 16 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 - local.get $0 - i32.load offset=16 -======= - local.get $0 ->>>>>>> master - local.set $6 global.get $~lib/memory/__stack_pointer - local.get $6 -<<<<<<< HEAD - local.get $0 - i32.load offset=24 - i32.const 16 - i32.mul - i32.add - local.set $7 local.get $5 - local.set $8 - loop $while-continue|0 - local.get $6 - local.get $7 - i32.ne - local.set $9 - local.get $9 -======= i32.store offset=4 - local.get $6 - call $~lib/set/Set#get:size + local.get $5 + call $~lib/set/Set#get:size i32.const 50 i32.eq i32.eqz @@ -17758,61 +13790,26 @@ call $~lib/builtins/abort unreachable end - i64.const 0 - local.set $1 + i32.const 0 + local.set $3 loop $for-loop|4 - local.get $1 - i64.const 50 - i64.lt_s - local.set $4 - local.get $4 ->>>>>>> master - if - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - local.get $1 - call $~lib/set/Set#has - i32.eqz - i32.eqz - if -<<<<<<< HEAD - local.get $8 - local.set $11 - local.get $10 - i64.load - local.set $12 - local.get $11 - local.get $12 - i64.store - local.get $12 - call $~lib/util/hash/HASH - local.get $1 - i64.extend_i32_u - i64.and - local.set $13 - local.get $3 - local.get $13 - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - local.set $14 - local.get $11 - local.get $14 - i32.load - i32.store offset=8 - local.get $14 - local.get $8 - i32.store - local.get $8 - i32.const 16 - i32.add - local.set $8 -======= + local.get $3 + i32.const 50 + i32.lt_u + local.set $4 + local.get $4 + if + local.get $0 + local.set $5 + global.get $~lib/memory/__stack_pointer + local.get $5 + i32.store offset=4 + local.get $5 + local.get $3 + call $~lib/set/Set#has + i32.eqz + i32.eqz + if i32.const 0 i32.const 544 i32.const 39 @@ -17821,22 +13818,22 @@ unreachable end local.get $0 - local.set $6 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $6 + local.get $5 i32.store offset=4 - local.get $6 - local.get $1 - call $~lib/set/Set#add + local.get $5 + local.get $3 + call $~lib/set/Set#add drop local.get $0 - local.set $6 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $6 + local.get $5 i32.store offset=4 - local.get $6 - local.get $1 - call $~lib/set/Set#has + local.get $5 + local.get $3 + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -17845,25 +13842,24 @@ i32.const 5 call $~lib/builtins/abort unreachable ->>>>>>> master end local.get $0 - local.set $6 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $6 + local.get $5 i32.store offset=4 - local.get $6 - local.get $1 - call $~lib/set/Set#delete + local.get $5 + local.get $3 + call $~lib/set/Set#delete drop local.get $0 - local.set $6 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $6 + local.get $5 i32.store offset=4 - local.get $6 - local.get $1 - call $~lib/set/Set#has + local.get $5 + local.get $3 + call $~lib/set/Set#has i32.eqz i32.eqz if @@ -17874,20 +13870,20 @@ call $~lib/builtins/abort unreachable end - local.get $1 - i64.const 1 - i64.add - local.set $1 + local.get $3 + i32.const 1 + i32.add + local.set $3 br $for-loop|4 end end local.get $0 - local.set $6 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $6 + local.get $5 i32.store offset=4 - local.get $6 - call $~lib/set/Set#get:size + local.get $5 + call $~lib/set/Set#get:size i32.const 50 i32.eq i32.eqz @@ -17900,48 +13896,19 @@ unreachable end local.get $0 -<<<<<<< HEAD - local.get $1 - i64.extend_i32_u - i64.store offset=8 - local.get $0 - local.tee $9 - local.get $5 - local.tee $14 - local.get $9 - i32.load offset=16 - local.tee $11 - i32.ne - if - local.get $14 - call $~lib/rt/pure/__retain - local.set $14 - local.get $11 - call $~lib/rt/pure/__release - end - local.get $14 - i32.store offset=16 - local.get $0 - local.get $4 - i32.store offset=20 - local.get $0 - local.get $0 - i32.load offset=28 - i32.store offset=24 -======= - local.set $6 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $6 + local.get $5 i32.store offset=4 - local.get $6 - call $~lib/set/Set#clear + local.get $5 + call $~lib/set/Set#clear local.get $0 - local.set $6 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $6 + local.get $5 i32.store offset=4 - local.get $6 - call $~lib/set/Set#get:size + local.get $5 + call $~lib/set/Set#get:size i32.const 0 i32.eq i32.eqz @@ -17958,9 +13925,8 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/set/Set#has (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) - (local $3 i32) + (func $~lib/set/Set#has (param $0 i32) (param $1 i64) (result i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -17970,63 +13936,29 @@ i32.const 0 i32.store local.get $0 - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $2 i32.store - local.get $3 + local.get $2 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.0 - end - call $~lib/set/Set#find + local.get $1 + call $~lib/util/hash/HASH + call $~lib/set/Set#find i32.const 0 i32.ne - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer ->>>>>>> master - local.get $3 + local.get $2 ) - (func $~lib/set/Set#add (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#add (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) (local $4 i32) -<<<<<<< HEAD - local.get $1 - call $~lib/util/hash/HASH - local.set $2 -======= (local $5 i32) - (local $6 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -18035,55 +13967,20 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 ->>>>>>> master + local.get $1 + call $~lib/util/hash/HASH + local.set $2 local.get $0 - local.set $6 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $6 + local.get $5 i32.store - local.get $6 + local.get $5 local.get $1 -<<<<<<< HEAD local.get $2 call $~lib/set/Set#find local.set $3 local.get $3 -======= - local.get $3 - call $~lib/set/Set#find - local.set $4 - local.get $4 ->>>>>>> master i32.eqz if local.get $0 @@ -18093,11 +13990,11 @@ i32.eq if local.get $0 - local.set $6 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $6 + local.get $5 i32.store - local.get $6 + local.get $5 local.get $0 i32.load offset=28 local.get $0 @@ -18118,12 +14015,8 @@ i64.const 1 i64.or end -<<<<<<< HEAD i32.wrap_i64 call $~lib/set/Set#rehash -======= - call $~lib/set/Set#rehash ->>>>>>> master end local.get $0 i32.load offset=16 @@ -18133,8 +14026,7 @@ local.tee $4 i32.const 1 i32.add -<<<<<<< HEAD - i32.store offset=24 + call $~lib/set/Set#set:entriesOffset local.get $4 i32.const 16 i32.mul @@ -18142,95 +14034,43 @@ local.set $3 local.get $3 local.get $1 - i64.store - local.get $0 - local.get $0 - i32.load offset=28 - i32.const 1 - i32.add - i32.store offset=28 - local.get $0 - i32.load - local.get $2 - local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - local.set $4 - local.get $3 - local.get $4 - i32.load - i32.store offset=8 - local.get $4 - local.get $3 - i32.store - end - local.get $0 - call $~lib/rt/pure/__retain - ) - (func $~lib/set/Set#get:size (param $0 i32) (result i32) - local.get $0 - i32.load offset=28 - ) - (func $~lib/array/Array#constructor (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.eqz - if - i32.const 16 -======= - call $~lib/set/Set#set:entriesOffset - local.get $5 ->>>>>>> master - i32.const 16 - i32.mul - i32.add - local.set $4 - local.get $4 - local.get $1 - call $~lib/set/SetEntry#set:key + call $~lib/set/SetEntry#set:key i32.const 0 drop local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - call $~lib/set/Set#set:entriesCount + call $~lib/set/Set#set:entriesCount local.get $0 i32.load - local.get $3 + local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add - local.set $5 + local.set $4 + local.get $3 local.get $4 - local.get $5 i32.load - call $~lib/set/SetEntry#set:taggedNext - local.get $5 + call $~lib/set/SetEntry#set:taggedNext local.get $4 + local.get $3 i32.store end local.get $0 - local.set $6 + local.set $5 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $6 + local.get $5 ) - (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i64) (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 4 @@ -18266,7 +14106,7 @@ local.get $1 i32.const 1 i32.add - call $~lib/array/Array#set:length_ + call $~lib/array/Array#set:length_ end local.get $0 local.set $3 @@ -18276,13 +14116,13 @@ local.get $3 local.get $1 local.get $2 - call $~lib/array/Array#__uset + call $~lib/array/Array#__uset global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/set/Set#values (param $0 i32) (result i32) + (func $~lib/set/Set#values (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -18309,7 +14149,7 @@ global.get $~lib/memory/__stack_pointer i32.const 0 local.get $2 - call $~lib/array/Array#constructor + call $~lib/array/Array#constructor local.tee $3 i32.store i32.const 0 @@ -18349,7 +14189,7 @@ local.get $8 local.get $7 i64.load - call $~lib/array/Array#__set + call $~lib/array/Array#__set end local.get $5 i32.const 1 @@ -18365,7 +14205,7 @@ i32.store offset=4 local.get $9 local.get $4 - call $~lib/array/Array#set:length + call $~lib/array/Array#set:length local.get $3 local.set $9 global.get $~lib/memory/__stack_pointer @@ -18374,20 +14214,12 @@ global.set $~lib/memory/__stack_pointer local.get $9 ) -<<<<<<< HEAD (func $~lib/set/Set#delete (param $0 i32) (param $1 i64) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) -======= - (func $~lib/set/Set#delete (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) - (local $3 i32) - (local $4 i32) - (local $5 i32) (local $6 i32) - (local $7 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -18396,88 +14228,41 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store ->>>>>>> master local.get $0 - local.set $7 + local.set $6 global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $6 i32.store - local.get $7 + local.get $6 local.get $1 -<<<<<<< HEAD local.get $1 call $~lib/util/hash/HASH call $~lib/set/Set#find local.set $2 local.get $2 -======= - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.3 - end - call $~lib/set/Set#find - local.set $3 - local.get $3 ->>>>>>> master i32.eqz if i32.const 0 - local.set $7 + local.set $6 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $7 + local.get $6 return end -<<<<<<< HEAD - i32.const 0 - drop local.get $2 local.get $2 -======= - local.get $3 - local.get $3 ->>>>>>> master i32.load offset=8 i32.const 1 i32.or - call $~lib/set/SetEntry#set:taggedNext + call $~lib/set/SetEntry#set:taggedNext local.get $0 local.get $0 i32.load offset=28 i32.const 1 i32.sub -<<<<<<< HEAD - i32.store offset=28 -======= - call $~lib/set/Set#set:entriesCount ->>>>>>> master + call $~lib/set/Set#set:entriesCount local.get $0 i64.load offset=8 i64.const 1 @@ -18512,74 +14297,23 @@ end if local.get $0 -<<<<<<< HEAD - local.get $3 - call $~lib/set/Set#rehash - end - i32.const 1 - ) - (func $~lib/set/Set#clear (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - local.tee $1 - i32.const 0 - i32.const 4 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $2 - local.get $1 - i32.load - call $~lib/rt/pure/__release - local.get $2 - i32.store - local.get $0 - i64.const 4 - i64.const 1 - i64.sub - i64.store offset=8 - local.get $0 - local.tee $2 - i32.const 0 - i32.const 4 - i32.const 16 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 - local.get $2 - i32.load offset=16 - call $~lib/rt/pure/__release - local.get $1 - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $0 - i32.const 0 - i32.store offset=28 -======= - local.set $7 + local.set $6 global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $6 i32.store - local.get $7 - local.get $4 - call $~lib/set/Set#rehash + local.get $6 + local.get $3 + call $~lib/set/Set#rehash end i32.const 1 - local.set $7 + local.set $6 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $7 ->>>>>>> master + local.get $6 ) - (func $std/set/testNumeric + (func $std/set/testNumeric (local $0 i32) (local $1 i64) (local $2 i32) @@ -18603,7 +14337,7 @@ i32.store offset=16 global.get $~lib/memory/__stack_pointer i32.const 0 - call $~lib/set/Set#constructor + call $~lib/set/Set#constructor local.tee $0 i32.store i64.const 0 @@ -18611,7 +14345,7 @@ loop $for-loop|0 local.get $1 i64.const 100 - i64.lt_u + i64.lt_s local.set $2 local.get $2 if @@ -18622,7 +14356,7 @@ i32.store offset=4 local.get $6 local.get $1 - call $~lib/set/Set#has + call $~lib/set/Set#has i32.eqz i32.eqz if @@ -18640,7 +14374,7 @@ i32.store offset=4 local.get $6 local.get $1 - call $~lib/set/Set#add + call $~lib/set/Set#add drop local.get $0 local.set $6 @@ -18649,7 +14383,7 @@ i32.store offset=4 local.get $6 local.get $1 - call $~lib/set/Set#has + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -18672,7 +14406,7 @@ local.get $6 i32.store offset=4 local.get $6 - call $~lib/set/Set#get:size + call $~lib/set/Set#get:size i32.const 100 i32.eq i32.eqz @@ -18689,7 +14423,7 @@ loop $for-loop|1 local.get $1 i64.const 100 - i64.lt_u + i64.lt_s local.set $2 local.get $2 if @@ -18700,7 +14434,7 @@ i32.store offset=4 local.get $6 local.get $1 - call $~lib/set/Set#has + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -18717,7 +14451,7 @@ i32.store offset=4 local.get $6 local.get $1 - call $~lib/set/Set#add + call $~lib/set/Set#add drop local.get $0 local.set $6 @@ -18726,7 +14460,7 @@ i32.store offset=4 local.get $6 local.get $1 - call $~lib/set/Set#has + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -18749,7 +14483,7 @@ local.get $6 i32.store offset=4 local.get $6 - call $~lib/set/Set#get:size + call $~lib/set/Set#get:size i32.const 100 i32.eq i32.eqz @@ -18768,12 +14502,12 @@ local.get $6 i32.store offset=4 local.get $6 - call $~lib/set/Set#values + call $~lib/set/Set#values local.tee $2 i32.store offset=8 global.get $~lib/memory/__stack_pointer i32.const 0 - call $~lib/set/Set#constructor + call $~lib/set/Set#constructor local.tee $3 i32.store offset=12 i32.const 0 @@ -18786,7 +14520,7 @@ local.get $6 i32.store offset=4 local.get $6 - call $~lib/array/Array#get:length + call $~lib/array/Array#get:length i32.lt_s local.set $5 local.get $5 @@ -18797,77 +14531,155 @@ local.get $6 i32.store offset=4 local.get $6 - local.get $2 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=16 - local.get $6 - local.get $4 - call $~lib/array/Array#__get - call $~lib/set/Set#has + local.get $2 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=16 + local.get $6 + local.get $4 + call $~lib/array/Array#__get + call $~lib/set/Set#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 24 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $3 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + local.get $2 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=16 + local.get $6 + local.get $4 + call $~lib/array/Array#__get + call $~lib/set/Set#add + drop + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $for-loop|2 + end + end + local.get $3 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + call $~lib/set/Set#get:size + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + call $~lib/set/Set#get:size + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 27 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i64.const 0 + local.set $1 + loop $for-loop|3 + local.get $1 + i64.const 50 + i64.lt_s + local.set $4 + local.get $4 + if + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + local.get $1 + call $~lib/set/Set#has i32.eqz if i32.const 0 i32.const 544 - i32.const 24 + i32.const 31 i32.const 5 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 local.set $6 global.get $~lib/memory/__stack_pointer local.get $6 i32.store offset=4 local.get $6 - local.get $2 + local.get $1 + call $~lib/set/Set#delete + drop + local.get $0 local.set $6 global.get $~lib/memory/__stack_pointer local.get $6 - i32.store offset=16 + i32.store offset=4 local.get $6 - local.get $4 - call $~lib/array/Array#__get - call $~lib/set/Set#add - drop - local.get $4 - i32.const 1 - i32.add - local.set $4 - br $for-loop|2 + local.get $1 + call $~lib/set/Set#has + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 33 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i64.const 1 + i64.add + local.set $1 + br $for-loop|3 end end - local.get $3 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - call $~lib/set/Set#get:size local.get $0 local.set $6 global.get $~lib/memory/__stack_pointer local.get $6 i32.store offset=4 local.get $6 - call $~lib/set/Set#get:size + call $~lib/set/Set#get:size + i32.const 50 i32.eq i32.eqz if i32.const 0 i32.const 544 - i32.const 27 + i32.const 35 i32.const 3 call $~lib/builtins/abort unreachable end i64.const 0 local.set $1 - loop $for-loop|3 + loop $for-loop|4 local.get $1 i64.const 50 - i64.lt_u + i64.lt_s local.set $4 local.get $4 if @@ -18878,12 +14690,13 @@ i32.store offset=4 local.get $6 local.get $1 - call $~lib/set/Set#has + call $~lib/set/Set#has + i32.eqz i32.eqz if i32.const 0 i32.const 544 - i32.const 31 + i32.const 39 i32.const 5 call $~lib/builtins/abort unreachable @@ -18895,7 +14708,7 @@ i32.store offset=4 local.get $6 local.get $1 - call $~lib/set/Set#delete + call $~lib/set/Set#add drop local.get $0 local.set $6 @@ -18904,13 +14717,39 @@ i32.store offset=4 local.get $6 local.get $1 - call $~lib/set/Set#has + call $~lib/set/Set#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 41 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + local.get $1 + call $~lib/set/Set#delete + drop + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + local.get $1 + call $~lib/set/Set#has i32.eqz i32.eqz if i32.const 0 i32.const 544 - i32.const 33 + i32.const 43 i32.const 5 call $~lib/builtins/abort unreachable @@ -18919,877 +14758,975 @@ i64.const 1 i64.add local.set $1 - br $for-loop|3 + br $for-loop|4 + end + end + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + call $~lib/set/Set#get:size + i32.const 50 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 45 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + call $~lib/set/Set#clear + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + call $~lib/set/Set#get:size + i32.const 0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 49 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + i32.const 20 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $~lib/set/Set#has (param $0 i32) (param $1 i64) (result i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $0 + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store + local.get $2 + local.get $1 + local.get $1 + call $~lib/util/hash/HASH + call $~lib/set/Set#find + i32.const 0 + i32.ne + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $2 + ) + (func $~lib/set/Set#add (param $0 i32) (param $1 i64) (result i32) + (local $2 i64) + (local $3 i32) + (local $4 i32) + (local $5 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $1 + call $~lib/util/hash/HASH + local.set $2 + local.get $0 + local.set $5 + global.get $~lib/memory/__stack_pointer + local.get $5 + i32.store + local.get $5 + local.get $1 + local.get $2 + call $~lib/set/Set#find + local.set $3 + local.get $3 + i32.eqz + if + local.get $0 + i32.load offset=24 + local.get $0 + i32.load offset=20 + i32.eq + if + local.get $0 + local.set $5 + global.get $~lib/memory/__stack_pointer + local.get $5 + i32.store + local.get $5 + local.get $0 + i32.load offset=28 + local.get $0 + i32.load offset=20 + i32.const 3 + i32.mul + i32.const 4 + i32.div_s + i32.lt_s + if (result i64) + local.get $0 + i64.load offset=8 + else + local.get $0 + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or + end + i32.wrap_i64 + call $~lib/set/Set#rehash end + local.get $0 + i32.load offset=16 + local.get $0 + local.get $0 + i32.load offset=24 + local.tee $4 + i32.const 1 + i32.add + call $~lib/set/Set#set:entriesOffset + local.get $4 + i32.const 16 + i32.mul + i32.add + local.set $3 + local.get $3 + local.get $1 + call $~lib/set/SetEntry#set:key + i32.const 0 + drop + local.get $0 + local.get $0 + i32.load offset=28 + i32.const 1 + i32.add + call $~lib/set/Set#set:entriesCount + local.get $0 + i32.load + local.get $2 + local.get $0 + i64.load offset=8 + i64.and + i32.wrap_i64 + i32.const 4 + i32.mul + i32.add + local.set $4 + local.get $3 + local.get $4 + i32.load + call $~lib/set/SetEntry#set:taggedNext + local.get $4 + local.get $3 + i32.store end local.get $0 - local.set $6 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - call $~lib/set/Set#get:size - i32.const 50 - i32.eq - i32.eqz + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $5 + ) + (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i64) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u if + local.get $1 i32.const 0 - i32.const 544 - i32.const 35 + i32.lt_s + if + i32.const 224 + i32.const 592 + i32.const 108 + i32.const 22 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add i32.const 3 - call $~lib/builtins/abort - unreachable + call $~lib/array/ensureSize + local.get $0 + local.get $1 + i32.const 1 + i32.add + call $~lib/array/Array#set:length_ end + local.get $0 + local.set $3 + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.store + local.get $3 + local.get $1 + local.get $2 + call $~lib/array/Array#__uset + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $~lib/set/Set#values (param $0 i32) (result i32) + (local $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) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer i64.const 0 + i64.store + local.get $0 + i32.load offset=16 local.set $1 - loop $for-loop|4 - local.get $1 - i64.const 50 - i64.lt_u - local.set $4 - local.get $4 + local.get $0 + i32.load offset=24 + local.set $2 + global.get $~lib/memory/__stack_pointer + i32.const 0 + local.get $2 + call $~lib/array/Array#constructor + local.tee $3 + i32.store + i32.const 0 + local.set $4 + i32.const 0 + local.set $5 + loop $for-loop|0 + local.get $5 + local.get $2 + i32.lt_s + local.set $6 + local.get $6 if - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - local.get $1 - call $~lib/set/Set#has - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 39 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - local.get $1 - call $~lib/set/Set#add - drop - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - local.get $1 - call $~lib/set/Set#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 41 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - local.get $1 - call $~lib/set/Set#delete - drop - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 local.get $1 - call $~lib/set/Set#has - i32.eqz + local.get $5 + i32.const 16 + i32.mul + i32.add + local.set $7 + local.get $7 + i32.load offset=8 + i32.const 1 + i32.and i32.eqz if - i32.const 0 - i32.const 544 - i32.const 43 - i32.const 5 - call $~lib/builtins/abort - unreachable + local.get $3 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $4 + local.tee $8 + i32.const 1 + i32.add + local.set $4 + local.get $8 + local.get $7 + i64.load + call $~lib/array/Array#__set end - local.get $1 - i64.const 1 - i64.add - local.set $1 - br $for-loop|4 + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|0 end end + local.get $3 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $4 + call $~lib/array/Array#set:length + local.get $3 + local.set $9 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $9 + ) + (func $~lib/set/Set#delete (param $0 i32) (param $1 i64) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store local.get $0 local.set $6 global.get $~lib/memory/__stack_pointer local.get $6 - i32.store offset=4 + i32.store local.get $6 - call $~lib/set/Set#get:size - i32.const 50 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 45 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 -<<<<<<< HEAD - call $~lib/set/Set#clear - local.get $0 - call $~lib/set/Set#get:size - i32.const 0 - i32.eq + local.get $1 + local.get $1 + call $~lib/util/hash/HASH + call $~lib/set/Set#find + local.set $2 + local.get $2 i32.eqz if i32.const 0 - i32.const 336 - i32.const 49 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.set $6 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $6 + return end local.get $2 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/set/Set#constructor (param $0 i32) (result i32) + local.get $2 + i32.load offset=8 + i32.const 1 + i32.or + call $~lib/set/SetEntry#set:taggedNext local.get $0 - i32.eqz - if - i32.const 32 - i32.const 17 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.set $0 - end local.get $0 - i32.const 0 - i32.const 4 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store + i32.load offset=28 + i32.const 1 + i32.sub + call $~lib/set/Set#set:entriesCount local.get $0 - i64.const 4 + i64.load offset=8 i64.const 1 - i64.sub - i64.store offset=8 -======= - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - call $~lib/set/Set#clear ->>>>>>> master + i64.shr_u + i32.wrap_i64 + local.set $3 + local.get $3 + i32.const 1 + i32.add + i32.const 4 + local.tee $4 local.get $0 + i32.load offset=28 + local.tee $5 + local.get $4 + local.get $5 + i32.gt_u + select + i32.ge_u + if (result i32) + local.get $0 + i32.load offset=28 + local.get $0 + i32.load offset=20 + i32.const 3 + i32.mul + i32.const 4 + i32.div_s + i32.lt_s + else + i32.const 0 + end + if + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store + local.get $6 + local.get $3 + call $~lib/set/Set#rehash + end + i32.const 1 local.set $6 global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - call $~lib/set/Set#get:size - i32.const 0 -<<<<<<< HEAD - i32.const 4 - i32.const 16 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=16 - local.get $0 i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $0 - i32.const 0 - i32.store offset=28 - local.get $0 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $6 ) - (func $~lib/util/hash/HASH (param $0 i64) (result i64) + (func $std/set/testNumeric + (local $0 i32) (local $1 i64) - (local $2 i64) - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 4 - i32.le_u - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $0 - local.set $1 - i64.const 0 - i64.const 2870177450012600261 - i64.add - i64.const 8 - i64.add - local.set $2 - local.get $2 - local.get $1 - i64.const -4417276706812531889 - i64.mul - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - local.set $2 - local.get $2 - i64.const 27 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.set $2 - local.get $2 - local.get $2 - i64.const 33 - i64.shr_u - i64.xor - local.set $2 - local.get $2 - i64.const -4417276706812531889 - i64.mul - local.set $2 - local.get $2 - local.get $2 - i64.const 29 - i64.shr_u - i64.xor - local.set $2 - local.get $2 - i64.const 1609587929392839161 - i64.mul - local.set $2 - local.get $2 - local.get $2 - i64.const 32 - i64.shr_u - i64.xor - local.set $2 - local.get $2 - return - ) - (func $~lib/set/Set#find (param $0 i32) (param $1 i64) (param $2 i64) (result i32) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - i32.load - local.get $2 - local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - i32.load - local.set $3 - loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 + (local $6 i32) + global.get $~lib/memory/__stack_pointer + i32.const 20 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=8 + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store offset=16 + global.get $~lib/memory/__stack_pointer + i32.const 0 + call $~lib/set/Set#constructor + local.tee $0 + i32.store + i64.const 0 + local.set $1 + loop $for-loop|0 + local.get $1 + i64.const 100 + i64.lt_u + local.set $2 + local.get $2 if - local.get $3 - i32.load offset=8 - local.set $5 - local.get $5 - i32.const 1 - i32.and + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + local.get $1 + call $~lib/set/Set#has i32.eqz - if (result i32) - local.get $3 - i64.load - local.get $1 - i64.eq - else + i32.eqz + if i32.const 0 + i32.const 544 + i32.const 6 + i32.const 5 + call $~lib/builtins/abort + unreachable end + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + local.get $1 + call $~lib/set/Set#add + drop + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + local.get $1 + call $~lib/set/Set#has + i32.eqz if - local.get $3 - return + i32.const 0 + i32.const 544 + i32.const 8 + i32.const 5 + call $~lib/builtins/abort + unreachable end - local.get $5 - i32.const 1 - i32.const -1 - i32.xor - i32.and - local.set $3 - br $while-continue|0 + local.get $1 + i64.const 1 + i64.add + local.set $1 + br $for-loop|0 end end - i32.const 0 - ) - (func $~lib/set/Set#has (param $0 i32) (param $1 i64) (result i32) -======= + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + call $~lib/set/Set#get:size + i32.const 100 i32.eq i32.eqz if i32.const 0 i32.const 544 - i32.const 49 + i32.const 10 i32.const 3 call $~lib/builtins/abort unreachable end - global.get $~lib/memory/__stack_pointer - i32.const 20 - i32.add - global.set $~lib/memory/__stack_pointer - ) - (func $~lib/set/Set#has (param $0 i32) (param $1 f32) (result i32) - (local $2 f32) - (local $3 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store ->>>>>>> master - local.get $0 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - local.get $1 -<<<<<<< HEAD - local.get $1 - call $~lib/util/hash/HASH - call $~lib/set/Set#find -======= - block $~lib/util/hash/HASH|inlined.0 (result i32) + i64.const 50 + local.set $1 + loop $for-loop|1 local.get $1 + i64.const 100 + i64.lt_u local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop local.get $2 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 + if + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + local.get $1 + call $~lib/set/Set#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 14 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + local.get $1 + call $~lib/set/Set#add + drop + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + local.get $1 + call $~lib/set/Set#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 16 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i64.const 1 + i64.add + local.set $1 + br $for-loop|1 + end end - call $~lib/set/Set#find ->>>>>>> master - i32.const 0 - i32.ne - local.set $3 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $3 - ) - (func $~lib/set/Set#add (param $0 i32) (param $1 f32) (result i32) - (local $2 f32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) -<<<<<<< HEAD - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i64) - (local $13 i64) - (local $14 i32) - local.get $1 - i32.const 1 - i32.add - local.set $2 - i32.const 0 - local.get $2 -======= - global.get $~lib/memory/__stack_pointer ->>>>>>> master - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 -<<<<<<< HEAD - local.get $4 - i32.const 16 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 local.get $0 - i32.load offset=16 local.set $6 + global.get $~lib/memory/__stack_pointer local.get $6 - local.get $0 - i32.load offset=24 - i32.const 16 - i32.mul - i32.add - local.set $7 - local.get $5 - local.set $8 - loop $while-continue|0 + i32.store offset=4 + local.get $6 + call $~lib/set/Set#get:size + i32.const 100 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 18 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + call $~lib/set/Set#values + local.tee $2 + i32.store offset=8 + global.get $~lib/memory/__stack_pointer + i32.const 0 + call $~lib/set/Set#constructor + local.tee $3 + i32.store offset=12 + i32.const 0 + local.set $4 + loop $for-loop|2 + local.get $4 + local.get $2 + local.set $6 + global.get $~lib/memory/__stack_pointer local.get $6 - local.get $7 - i32.ne - local.set $9 - local.get $9 + i32.store offset=4 + local.get $6 + call $~lib/array/Array#get:length + i32.lt_s + local.set $5 + local.get $5 if + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer local.get $6 - local.set $10 - local.get $10 - i32.load offset=8 - i32.const 1 - i32.and + i32.store offset=4 + local.get $6 + local.get $2 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=16 + local.get $6 + local.get $4 + call $~lib/array/Array#__get + call $~lib/set/Set#has i32.eqz if - local.get $8 - local.set $11 - local.get $10 - i64.load - local.set $12 - local.get $11 - local.get $12 - i64.store - local.get $12 - call $~lib/util/hash/HASH - local.get $1 - i64.extend_i32_u - i64.and - local.set $13 - local.get $3 - local.get $13 - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - local.set $14 - local.get $11 - local.get $14 - i32.load - i32.store offset=8 - local.get $14 - local.get $8 - i32.store - local.get $8 - i32.const 16 - i32.add - local.set $8 + i32.const 0 + i32.const 544 + i32.const 24 + i32.const 5 + call $~lib/builtins/abort + unreachable end + local.get $3 + local.set $6 + global.get $~lib/memory/__stack_pointer local.get $6 - i32.const 16 - i32.add + i32.store offset=4 + local.get $6 + local.get $2 local.set $6 - br $while-continue|0 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=16 + local.get $6 + local.get $4 + call $~lib/array/Array#__get + call $~lib/set/Set#add + drop + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $for-loop|2 end end - local.get $0 - local.tee $11 local.get $3 - local.tee $14 - local.get $11 - i32.load - local.tee $9 - i32.ne - if - local.get $14 - call $~lib/rt/pure/__retain - local.set $14 - local.get $9 - call $~lib/rt/pure/__release - end - local.get $14 - i32.store - local.get $0 - local.get $1 - i64.extend_i32_u - i64.store offset=8 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + call $~lib/set/Set#get:size local.get $0 - local.tee $9 - local.get $5 - local.tee $14 - local.get $9 - i32.load offset=16 - local.tee $11 - i32.ne + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + call $~lib/set/Set#get:size + i32.eq + i32.eqz if - local.get $14 - call $~lib/rt/pure/__retain - local.set $14 - local.get $11 - call $~lib/rt/pure/__release + i32.const 0 + i32.const 544 + i32.const 27 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $14 - i32.store offset=16 - local.get $0 - local.get $4 - i32.store offset=20 - local.get $0 - local.get $0 - i32.load offset=28 - i32.store offset=24 - local.get $3 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - ) - (func $~lib/set/Set#add (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) - (local $3 i32) - (local $4 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $2 -======= - i32.store - block $~lib/util/hash/HASH|inlined.1 (result i32) + i64.const 0 + local.set $1 + loop $for-loop|3 local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 + i64.const 50 + i64.lt_u + local.set $4 + local.get $4 + if + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + local.get $1 + call $~lib/set/Set#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 31 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + local.get $1 + call $~lib/set/Set#delete + drop + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + local.get $1 + call $~lib/set/Set#has + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 33 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i64.const 1 + i64.add + local.set $1 + br $for-loop|3 + end end - local.set $3 ->>>>>>> master local.get $0 local.set $6 global.get $~lib/memory/__stack_pointer local.get $6 - i32.store + i32.store offset=4 local.get $6 - local.get $1 -<<<<<<< HEAD - local.get $2 - call $~lib/set/Set#find - local.set $3 - local.get $3 -======= - local.get $3 - call $~lib/set/Set#find - local.set $4 - local.get $4 ->>>>>>> master - i32.eqz - if - local.get $0 - i32.load offset=24 - local.get $0 - i32.load offset=20 - i32.eq + call $~lib/set/Set#get:size + i32.const 50 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 35 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i64.const 0 + local.set $1 + loop $for-loop|4 + local.get $1 + i64.const 50 + i64.lt_u + local.set $4 + local.get $4 if local.get $0 local.set $6 global.get $~lib/memory/__stack_pointer local.get $6 - i32.store + i32.store offset=4 local.get $6 + local.get $1 + call $~lib/set/Set#has + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 39 + i32.const 5 + call $~lib/builtins/abort + unreachable + end local.get $0 - i32.load offset=28 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + local.get $1 + call $~lib/set/Set#add + drop local.get $0 - i32.load offset=20 - i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s - if (result i64) - local.get $0 - i64.load offset=8 - else - local.get $0 - i64.load offset=8 - i64.const 1 - i64.shl - i64.const 1 - i64.or + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + local.get $1 + call $~lib/set/Set#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 41 + i32.const 5 + call $~lib/builtins/abort + unreachable end -<<<<<<< HEAD - i32.wrap_i64 - call $~lib/set/Set#rehash -======= - call $~lib/set/Set#rehash ->>>>>>> master + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + local.get $1 + call $~lib/set/Set#delete + drop + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + local.get $1 + call $~lib/set/Set#has + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 43 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i64.const 1 + i64.add + local.set $1 + br $for-loop|4 end - local.get $0 - i32.load offset=16 - local.get $0 - local.get $0 - i32.load offset=24 - local.tee $4 - i32.const 1 - i32.add -<<<<<<< HEAD - i32.store offset=24 - local.get $4 - i32.const 16 -======= - call $~lib/set/Set#set:entriesOffset - local.get $5 - i32.const 8 ->>>>>>> master - i32.mul - i32.add - local.set $3 - local.get $3 - local.get $1 - call $~lib/set/SetEntry#set:key - i32.const 0 - drop - local.get $0 - local.get $0 - i32.load offset=28 - i32.const 1 - i32.add -<<<<<<< HEAD - i32.store offset=28 -======= - call $~lib/set/Set#set:entriesCount ->>>>>>> master - local.get $0 - i32.load - local.get $2 - local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - local.set $4 - local.get $3 - local.get $4 - i32.load -<<<<<<< HEAD - i32.store offset=8 -======= - call $~lib/set/SetEntry#set:taggedNext - local.get $5 ->>>>>>> master - local.get $4 - local.get $3 - i32.store end local.get $0 -<<<<<<< HEAD - call $~lib/rt/pure/__retain - ) - (func $~lib/set/Set#get:size (param $0 i32) (result i32) - local.get $0 - i32.load offset=28 -======= local.set $6 global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer local.get $6 ->>>>>>> master - ) - (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 f32) - (local $3 i32) + i32.store offset=4 + local.get $6 + call $~lib/set/Set#get:size + i32.const 50 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 45 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $6 global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check + local.get $6 + i32.store offset=4 + local.get $6 + call $~lib/set/Set#clear + local.get $0 + local.set $6 global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + call $~lib/set/Set#get:size i32.const 0 - i32.store - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u + i32.eq + i32.eqz if - local.get $1 i32.const 0 - i32.lt_s - if - i32.const 224 - i32.const 592 - i32.const 108 - i32.const 22 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.const 2 - call $~lib/array/ensureSize - local.get $0 - local.get $1 - i32.const 1 - i32.add - call $~lib/array/Array#set:length_ + i32.const 544 + i32.const 49 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $0 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - local.get $1 - local.get $2 - call $~lib/array/Array#__uset global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 20 i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/set/Set#values (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/set/Set#has (param $0 i32) (param $1 f32) (result 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) global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - local.get $0 - i32.load offset=16 - local.set $1 + i32.const 0 + i32.store local.get $0 - i32.load offset=24 local.set $2 global.get $~lib/memory/__stack_pointer - i32.const 0 local.get $2 - call $~lib/array/Array#constructor - local.tee $3 i32.store + local.get $2 + local.get $1 + local.get $1 + call $~lib/util/hash/HASH + call $~lib/set/Set#find i32.const 0 - local.set $4 - i32.const 0 - local.set $5 - loop $for-loop|0 - local.get $5 - local.get $2 - i32.lt_s - local.set $6 - local.get $6 - if - local.get $1 - local.get $5 - i32.const 8 - i32.mul - i32.add - local.set $7 - local.get $7 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $3 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $4 - local.tee $8 - i32.const 1 - i32.add - local.set $4 - local.get $8 - local.get $7 - f32.load - call $~lib/array/Array#__set - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end - local.get $3 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $4 - call $~lib/array/Array#set:length - local.get $3 - local.set $9 + i32.ne + local.set $2 global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $9 + local.get $2 ) -<<<<<<< HEAD - (func $~lib/set/Set#delete (param $0 i32) (param $1 i64) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) -======= - (func $~lib/set/Set#delete (param $0 i32) (param $1 f32) (result i32) - (local $2 f32) + (func $~lib/set/Set#add (param $0 i32) (param $1 f32) (result i32) + (local $2 i64) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - (local $7 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -19798,548 +15735,387 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store ->>>>>>> master + local.get $1 + call $~lib/util/hash/HASH + local.set $2 local.get $0 - local.set $7 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $5 i32.store - local.get $7 - local.get $1 -<<<<<<< HEAD + local.get $5 local.get $1 - call $~lib/util/hash/HASH - call $~lib/set/Set#find - local.set $2 local.get $2 -======= - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end call $~lib/set/Set#find local.set $3 local.get $3 ->>>>>>> master i32.eqz if - i32.const 0 - local.set $7 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $7 - return - end -<<<<<<< HEAD - i32.const 0 - drop - local.get $2 - local.get $2 - i32.load offset=8 -======= - local.get $3 - local.get $3 - i32.load offset=4 ->>>>>>> master - i32.const 1 - i32.or - call $~lib/set/SetEntry#set:taggedNext - local.get $0 - local.get $0 - i32.load offset=28 - i32.const 1 - i32.sub -<<<<<<< HEAD - i32.store offset=28 -======= - call $~lib/set/Set#set:entriesCount ->>>>>>> master - local.get $0 - i64.load offset=8 - i64.const 1 - i64.shr_u - i32.wrap_i64 - local.set $3 - local.get $3 - i32.const 1 - i32.add - i32.const 4 - local.tee $4 - local.get $0 - i32.load offset=28 - local.tee $5 - local.get $4 - local.get $5 - i32.gt_u - select - i32.ge_u - if (result i32) local.get $0 - i32.load offset=28 + i32.load offset=24 local.get $0 i32.load offset=20 - i32.const 3 + i32.eq + if + local.get $0 + local.set $5 + global.get $~lib/memory/__stack_pointer + local.get $5 + i32.store + local.get $5 + local.get $0 + i32.load offset=28 + local.get $0 + i32.load offset=20 + i32.const 3 + i32.mul + i32.const 4 + i32.div_s + i32.lt_s + if (result i64) + local.get $0 + i64.load offset=8 + else + local.get $0 + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or + end + i32.wrap_i64 + call $~lib/set/Set#rehash + end + local.get $0 + i32.load offset=16 + local.get $0 + local.get $0 + i32.load offset=24 + local.tee $4 + i32.const 1 + i32.add + call $~lib/set/Set#set:entriesOffset + local.get $4 + i32.const 8 i32.mul - i32.const 4 - i32.div_s - i32.lt_s - else + i32.add + local.set $3 + local.get $3 + local.get $1 + call $~lib/set/SetEntry#set:key i32.const 0 - end - if + drop + local.get $0 + local.get $0 + i32.load offset=28 + i32.const 1 + i32.add + call $~lib/set/Set#set:entriesCount local.get $0 -<<<<<<< HEAD + i32.load + local.get $2 + local.get $0 + i64.load offset=8 + i64.and + i32.wrap_i64 + i32.const 4 + i32.mul + i32.add + local.set $4 local.get $3 - call $~lib/set/Set#rehash - end - i32.const 1 - ) - (func $~lib/set/Set#clear (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - local.tee $1 - i32.const 0 - i32.const 4 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $2 - local.get $1 - i32.load - call $~lib/rt/pure/__release - local.get $2 - i32.store - local.get $0 - i64.const 4 - i64.const 1 - i64.sub - i64.store offset=8 + local.get $4 + i32.load + call $~lib/set/SetEntry#set:taggedNext + local.get $4 + local.get $3 + i32.store + end local.get $0 - local.tee $2 - i32.const 0 + local.set $5 + global.get $~lib/memory/__stack_pointer i32.const 4 - i32.const 16 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 - local.get $2 - i32.load offset=16 - call $~lib/rt/pure/__release - local.get $1 - i32.store offset=16 - local.get $0 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $5 + ) + (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 f32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer i32.const 4 - i32.store offset=20 - local.get $0 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer i32.const 0 - i32.store offset=24 + i32.store + local.get $1 local.get $0 - i32.const 0 - i32.store offset=28 -======= - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store - local.get $7 - local.get $4 - call $~lib/set/Set#rehash + i32.load offset=12 + i32.ge_u + if + local.get $1 + i32.const 0 + i32.lt_s + if + i32.const 224 + i32.const 592 + i32.const 108 + i32.const 22 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.const 2 + call $~lib/array/ensureSize + local.get $0 + local.get $1 + i32.const 1 + i32.add + call $~lib/array/Array#set:length_ end - i32.const 1 - local.set $7 + local.get $0 + local.set $3 + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.store + local.get $3 + local.get $1 + local.get $2 + call $~lib/array/Array#__uset global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $7 ->>>>>>> master ) - (func $std/set/testNumeric - (local $0 i32) - (local $1 f32) + (func $~lib/set/Set#values (param $0 i32) (result i32) + (local $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) global.get $~lib/memory/__stack_pointer - i32.const 20 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store offset=16 - global.get $~lib/memory/__stack_pointer - i32.const 0 - call $~lib/set/Set#constructor - local.tee $0 - i32.store - f32.const 0 - local.set $1 - loop $for-loop|0 - local.get $1 - f32.const 100 - f32.lt - local.set $2 - local.get $2 - if - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - local.get $1 - call $~lib/set/Set#has - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 6 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - local.get $1 - call $~lib/set/Set#add - drop - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - local.get $1 - call $~lib/set/Set#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 8 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - f32.const 1 - f32.add - local.set $1 - br $for-loop|0 - end - end local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - call $~lib/set/Set#get:size - i32.const 100 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 10 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - f32.const 50 + i32.load offset=16 local.set $1 - loop $for-loop|1 - local.get $1 - f32.const 100 - f32.lt - local.set $2 - local.get $2 - if - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - local.get $1 - call $~lib/set/Set#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 14 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - local.get $1 - call $~lib/set/Set#add - drop - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - local.get $1 - call $~lib/set/Set#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 16 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - f32.const 1 - f32.add - local.set $1 - br $for-loop|1 - end - end - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - call $~lib/set/Set#get:size - i32.const 100 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 18 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - call $~lib/set/Set#values - local.tee $2 - i32.store offset=8 + i32.load offset=24 + local.set $2 global.get $~lib/memory/__stack_pointer i32.const 0 - call $~lib/set/Set#constructor + local.get $2 + call $~lib/array/Array#constructor local.tee $3 - i32.store offset=12 + i32.store i32.const 0 local.set $4 - loop $for-loop|2 - local.get $4 + i32.const 0 + local.set $5 + loop $for-loop|0 + local.get $5 local.get $2 + i32.lt_s local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 local.get $6 - call $~lib/array/Array#get:length - i32.lt_s - local.set $5 - local.get $5 if - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - local.get $2 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=16 - local.get $6 - local.get $4 - call $~lib/array/Array#__get - call $~lib/set/Set#has + local.get $1 + local.get $5 + i32.const 8 + i32.mul + i32.add + local.set $7 + local.get $7 + i32.load offset=4 + i32.const 1 + i32.and i32.eqz if - i32.const 0 - i32.const 544 - i32.const 24 - i32.const 5 - call $~lib/builtins/abort - unreachable + local.get $3 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $4 + local.tee $8 + i32.const 1 + i32.add + local.set $4 + local.get $8 + local.get $7 + f32.load + call $~lib/array/Array#__set end - local.get $3 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - local.get $2 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=16 - local.get $6 - local.get $4 - call $~lib/array/Array#__get - call $~lib/set/Set#add - drop - local.get $4 + local.get $5 i32.const 1 i32.add - local.set $4 - br $for-loop|2 + local.set $5 + br $for-loop|0 end end local.get $3 - local.set $6 + local.set $9 global.get $~lib/memory/__stack_pointer - local.get $6 + local.get $9 i32.store offset=4 - local.get $6 - call $~lib/set/Set#get:size + local.get $9 + local.get $4 + call $~lib/array/Array#set:length + local.get $3 + local.set $9 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $9 + ) + (func $~lib/set/Set#delete (param $0 i32) (param $1 f32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store local.get $0 local.set $6 global.get $~lib/memory/__stack_pointer local.get $6 - i32.store offset=4 + i32.store local.get $6 - call $~lib/set/Set#get:size - i32.eq + local.get $1 + local.get $1 + call $~lib/util/hash/HASH + call $~lib/set/Set#find + local.set $2 + local.get $2 i32.eqz if i32.const 0 - i32.const 544 - i32.const 27 + local.set $6 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $6 + return + end + local.get $2 + local.get $2 + i32.load offset=4 + i32.const 1 + i32.or + call $~lib/set/SetEntry#set:taggedNext + local.get $0 + local.get $0 + i32.load offset=28 + i32.const 1 + i32.sub + call $~lib/set/Set#set:entriesCount + local.get $0 + i64.load offset=8 + i64.const 1 + i64.shr_u + i32.wrap_i64 + local.set $3 + local.get $3 + i32.const 1 + i32.add + i32.const 4 + local.tee $4 + local.get $0 + i32.load offset=28 + local.tee $5 + local.get $4 + local.get $5 + i32.gt_u + select + i32.ge_u + if (result i32) + local.get $0 + i32.load offset=28 + local.get $0 + i32.load offset=20 i32.const 3 - call $~lib/builtins/abort - unreachable + i32.mul + i32.const 4 + i32.div_s + i32.lt_s + else + i32.const 0 end - f32.const 0 - local.set $1 - loop $for-loop|3 - local.get $1 - f32.const 50 - f32.lt - local.set $4 - local.get $4 - if - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - local.get $1 - call $~lib/set/Set#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 31 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - local.get $1 - call $~lib/set/Set#delete - drop - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - local.get $1 - call $~lib/set/Set#has - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 33 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - f32.const 1 - f32.add - local.set $1 - br $for-loop|3 - end + if + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store + local.get $6 + local.get $3 + call $~lib/set/Set#rehash end - local.get $0 + i32.const 1 local.set $6 global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer local.get $6 - i32.store offset=4 - local.get $6 - call $~lib/set/Set#get:size - i32.const 50 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 35 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + ) + (func $std/set/testNumeric + (local $0 i32) + (local $1 f32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + global.get $~lib/memory/__stack_pointer + i32.const 20 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=8 + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store offset=16 + global.get $~lib/memory/__stack_pointer + i32.const 0 + call $~lib/set/Set#constructor + local.tee $0 + i32.store f32.const 0 local.set $1 - loop $for-loop|4 + loop $for-loop|0 local.get $1 - f32.const 50 + f32.const 100 f32.lt - local.set $4 - local.get $4 + local.set $2 + local.get $2 if local.get $0 local.set $6 @@ -20354,7 +16130,7 @@ if i32.const 0 i32.const 544 - i32.const 39 + i32.const 6 i32.const 5 call $~lib/builtins/abort unreachable @@ -20380,34 +16156,7 @@ if i32.const 0 i32.const 544 - i32.const 41 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - local.get $1 - call $~lib/set/Set#delete - drop - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - local.get $1 - call $~lib/set/Set#has - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 43 + i32.const 8 i32.const 5 call $~lib/builtins/abort unreachable @@ -20416,7 +16165,7 @@ f32.const 1 f32.add local.set $1 - br $for-loop|4 + br $for-loop|0 end end local.get $0 @@ -20426,756 +16175,442 @@ i32.store offset=4 local.get $6 call $~lib/set/Set#get:size - i32.const 50 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 45 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - call $~lib/set/Set#clear - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - call $~lib/set/Set#get:size - i32.const 0 + i32.const 100 i32.eq i32.eqz if i32.const 0 i32.const 544 - i32.const 49 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/memory/__stack_pointer - i32.const 20 - i32.add - global.set $~lib/memory/__stack_pointer - ) -<<<<<<< HEAD - (func $~lib/set/Set#constructor (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 32 - i32.const 19 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.set $0 - end - local.get $0 - i32.const 0 - i32.const 4 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store - local.get $0 - i64.const 4 - i64.const 1 - i64.sub - i64.store offset=8 - local.get $0 - i32.const 0 - i32.const 4 - i32.const 8 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $0 - i32.const 0 - i32.store offset=28 - local.get $0 - ) - (func $~lib/util/hash/HASH (param $0 f32) (result i64) - (local $1 i32) - (local $2 i64) - (local $3 i64) - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $0 - i32.reinterpret_f32 - local.set $1 - i64.const 4 - local.set $2 - i64.const 0 - i64.const 2870177450012600261 - i64.add - local.get $2 - i64.add - local.set $3 - local.get $3 - local.get $1 - i64.extend_i32_u - i64.const -7046029288634856825 - i64.mul - i64.xor - local.set $3 - local.get $3 - i64.const 23 - i64.rotl - i64.const -4417276706812531889 - i64.mul - i64.const 1609587929392839161 - i64.add - local.set $3 - local.get $3 - local.get $3 - i64.const 33 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const -4417276706812531889 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 29 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - i64.const 1609587929392839161 - i64.mul - local.set $3 - local.get $3 - local.get $3 - i64.const 32 - i64.shr_u - i64.xor - local.set $3 - local.get $3 - return - ) - (func $~lib/set/Set#find (param $0 i32) (param $1 f32) (param $2 i64) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.get $2 - local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - i32.load - local.set $3 - loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 + i32.const 10 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + f32.const 50 + local.set $1 + loop $for-loop|1 + local.get $1 + f32.const 100 + f32.lt + local.set $2 + local.get $2 if - local.get $3 - i32.load offset=4 - local.set $5 - local.get $5 - i32.const 1 - i32.and + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + local.get $1 + call $~lib/set/Set#has i32.eqz - if (result i32) - local.get $3 - f32.load - local.get $1 - f32.eq - else + if i32.const 0 + i32.const 544 + i32.const 14 + i32.const 5 + call $~lib/builtins/abort + unreachable end + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + local.get $1 + call $~lib/set/Set#add + drop + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + local.get $1 + call $~lib/set/Set#has + i32.eqz if - local.get $3 - return + i32.const 0 + i32.const 544 + i32.const 16 + i32.const 5 + call $~lib/builtins/abort + unreachable end - local.get $5 - i32.const 1 - i32.const -1 - i32.xor - i32.and - local.set $3 - br $while-continue|0 + local.get $1 + f32.const 1 + f32.add + local.set $1 + br $for-loop|1 end end - i32.const 0 - ) - (func $~lib/set/Set#has (param $0 i32) (param $1 f32) (result i32) - local.get $0 - local.get $1 - local.get $1 - call $~lib/util/hash/HASH - call $~lib/set/Set#find - i32.const 0 - i32.ne - ) - (func $~lib/set/Set#rehash (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 $10 i32) - (local $11 i32) - (local $12 f32) - (local $13 i64) - (local $14 i32) - local.get $1 - i32.const 1 - i32.add - local.set $2 - i32.const 0 - local.get $2 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $3 - local.get $2 - i32.const 8 - i32.mul - i32.const 3 - i32.div_s - local.set $4 - i32.const 0 - local.get $4 - i32.const 8 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 local.get $0 - i32.load offset=16 local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 local.get $6 + call $~lib/set/Set#get:size + i32.const 100 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 18 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer local.get $0 - i32.load offset=24 - i32.const 8 - i32.mul - i32.add - local.set $7 - local.get $5 - local.set $8 - loop $while-continue|0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + call $~lib/set/Set#values + local.tee $2 + i32.store offset=8 + global.get $~lib/memory/__stack_pointer + i32.const 0 + call $~lib/set/Set#constructor + local.tee $3 + i32.store offset=12 + i32.const 0 + local.set $4 + loop $for-loop|2 + local.get $4 + local.get $2 + local.set $6 + global.get $~lib/memory/__stack_pointer local.get $6 - local.get $7 - i32.ne - local.set $9 - local.get $9 + i32.store offset=4 + local.get $6 + call $~lib/array/Array#get:length + i32.lt_s + local.set $5 + local.get $5 if + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer local.get $6 - local.set $10 - local.get $10 - i32.load offset=4 - i32.const 1 - i32.and + i32.store offset=4 + local.get $6 + local.get $2 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=16 + local.get $6 + local.get $4 + call $~lib/array/Array#__get + call $~lib/set/Set#has i32.eqz if - local.get $8 - local.set $11 - local.get $10 - f32.load - local.set $12 - local.get $11 - local.get $12 - f32.store - local.get $12 - call $~lib/util/hash/HASH - local.get $1 - i64.extend_i32_u - i64.and - local.set $13 - local.get $3 - local.get $13 - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - local.set $14 - local.get $11 - local.get $14 - i32.load - i32.store offset=4 - local.get $14 - local.get $8 - i32.store - local.get $8 - i32.const 8 - i32.add - local.set $8 + i32.const 0 + i32.const 544 + i32.const 24 + i32.const 5 + call $~lib/builtins/abort + unreachable end + local.get $3 + local.set $6 + global.get $~lib/memory/__stack_pointer local.get $6 - i32.const 8 - i32.add + i32.store offset=4 + local.get $6 + local.get $2 local.set $6 - br $while-continue|0 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=16 + local.get $6 + local.get $4 + call $~lib/array/Array#__get + call $~lib/set/Set#add + drop + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $for-loop|2 end end - local.get $0 - local.tee $11 local.get $3 - local.tee $14 - local.get $11 - i32.load - local.tee $9 - i32.ne - if - local.get $14 - call $~lib/rt/pure/__retain - local.set $14 - local.get $9 - call $~lib/rt/pure/__release - end - local.get $14 - i32.store - local.get $0 - local.get $1 - i64.extend_i32_u - i64.store offset=8 - local.get $0 - local.tee $9 - local.get $5 - local.tee $14 - local.get $9 - i32.load offset=16 - local.tee $11 - i32.ne - if - local.get $14 - call $~lib/rt/pure/__retain - local.set $14 - local.get $11 - call $~lib/rt/pure/__release - end - local.get $14 - i32.store offset=16 - local.get $0 - local.get $4 - i32.store offset=20 - local.get $0 - local.get $0 - i32.load offset=28 - i32.store offset=24 -======= - (func $~lib/set/Set#has (param $0 i32) (param $1 f64) (result i32) - (local $2 f64) - (local $3 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check + local.set $6 global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store + local.get $6 + i32.store offset=4 + local.get $6 + call $~lib/set/Set#get:size local.get $0 - local.set $3 + local.set $6 global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop + local.get $6 + i32.store offset=4 + local.get $6 + call $~lib/set/Set#get:size + i32.eq + i32.eqz + if i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.0 + i32.const 544 + i32.const 27 + i32.const 3 + call $~lib/builtins/abort + unreachable end - call $~lib/set/Set#find - i32.const 0 - i32.ne - local.set $3 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer ->>>>>>> master - local.get $3 - ) -<<<<<<< HEAD - (func $~lib/set/Set#add (param $0 i32) (param $1 f32) (result i32) - (local $2 i64) - (local $3 i32) - (local $4 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $2 -======= - (func $~lib/set/Set#add (param $0 i32) (param $1 f64) (result i32) - (local $2 f64) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - block $~lib/util/hash/HASH|inlined.1 (result i32) + f32.const 0 + local.set $1 + loop $for-loop|3 local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.1 + f32.const 50 + f32.lt + local.set $4 + local.get $4 + if + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + local.get $1 + call $~lib/set/Set#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 31 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + local.get $1 + call $~lib/set/Set#delete + drop + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + local.get $1 + call $~lib/set/Set#has + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 33 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + f32.const 1 + f32.add + local.set $1 + br $for-loop|3 + end end - local.set $3 ->>>>>>> master local.get $0 local.set $6 global.get $~lib/memory/__stack_pointer local.get $6 - i32.store + i32.store offset=4 local.get $6 - local.get $1 -<<<<<<< HEAD - local.get $2 - call $~lib/set/Set#find - local.set $3 - local.get $3 -======= - local.get $3 - call $~lib/set/Set#find - local.set $4 - local.get $4 ->>>>>>> master + call $~lib/set/Set#get:size + i32.const 50 + i32.eq i32.eqz if - local.get $0 - i32.load offset=24 - local.get $0 - i32.load offset=20 - i32.eq + i32.const 0 + i32.const 544 + i32.const 35 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + f32.const 0 + local.set $1 + loop $for-loop|4 + local.get $1 + f32.const 50 + f32.lt + local.set $4 + local.get $4 if local.get $0 local.set $6 global.get $~lib/memory/__stack_pointer local.get $6 - i32.store + i32.store offset=4 + local.get $6 + local.get $1 + call $~lib/set/Set#has + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 39 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + local.get $1 + call $~lib/set/Set#add + drop + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + local.get $1 + call $~lib/set/Set#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 41 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 local.get $6 + local.get $1 + call $~lib/set/Set#delete + drop local.get $0 - i32.load offset=28 - local.get $0 - i32.load offset=20 - i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s - if (result i64) - local.get $0 - i64.load offset=8 - else - local.get $0 - i64.load offset=8 - i64.const 1 - i64.shl - i64.const 1 - i64.or + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + local.get $1 + call $~lib/set/Set#has + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 43 + i32.const 5 + call $~lib/builtins/abort + unreachable end -<<<<<<< HEAD - i32.wrap_i64 - call $~lib/set/Set#rehash -======= - call $~lib/set/Set#rehash ->>>>>>> master + local.get $1 + f32.const 1 + f32.add + local.set $1 + br $for-loop|4 end - local.get $0 - i32.load offset=16 - local.get $0 - local.get $0 - i32.load offset=24 - local.tee $4 - i32.const 1 - i32.add -<<<<<<< HEAD - i32.store offset=24 - local.get $4 - i32.const 8 -======= - call $~lib/set/Set#set:entriesOffset - local.get $5 - i32.const 16 ->>>>>>> master - i32.mul - i32.add - local.set $3 - local.get $3 - local.get $1 - call $~lib/set/SetEntry#set:key - i32.const 0 - drop - local.get $0 - local.get $0 - i32.load offset=28 - i32.const 1 - i32.add -<<<<<<< HEAD - i32.store offset=28 -======= - call $~lib/set/Set#set:entriesCount ->>>>>>> master - local.get $0 - i32.load - local.get $2 - local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - local.set $4 - local.get $3 - local.get $4 - i32.load -<<<<<<< HEAD - i32.store offset=4 -======= - call $~lib/set/SetEntry#set:taggedNext - local.get $5 ->>>>>>> master - local.get $4 - local.get $3 - i32.store end local.get $0 -<<<<<<< HEAD - call $~lib/rt/pure/__retain - ) - (func $~lib/set/Set#get:size (param $0 i32) (result i32) - local.get $0 - i32.load offset=28 -======= local.set $6 global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer local.get $6 ->>>>>>> master - ) - (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 f64) - (local $3 i32) + i32.store offset=4 + local.get $6 + call $~lib/set/Set#get:size + i32.const 50 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 45 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $6 global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check + local.get $6 + i32.store offset=4 + local.get $6 + call $~lib/set/Set#clear + local.get $0 + local.set $6 global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + call $~lib/set/Set#get:size i32.const 0 - i32.store - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u + i32.eq + i32.eqz if - local.get $1 i32.const 0 - i32.lt_s - if - i32.const 224 - i32.const 592 - i32.const 108 - i32.const 22 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add + i32.const 544 + i32.const 49 i32.const 3 - call $~lib/array/ensureSize - local.get $0 - local.get $1 - i32.const 1 - i32.add - call $~lib/array/Array#set:length_ + call $~lib/builtins/abort + unreachable end - local.get $0 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - local.get $1 - local.get $2 - call $~lib/array/Array#__uset global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 20 i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/set/Set#values (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/set/Set#has (param $0 i32) (param $1 f64) (result 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) global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 4 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - local.get $0 - i32.load offset=16 - local.set $1 - local.get $0 - i32.load offset=24 - local.set $2 - global.get $~lib/memory/__stack_pointer - i32.const 0 - local.get $2 - call $~lib/array/Array#constructor - local.tee $3 - i32.store - i32.const 0 - local.set $4 i32.const 0 - local.set $5 - loop $for-loop|0 - local.get $5 - local.get $2 - i32.lt_s - local.set $6 - local.get $6 - if - local.get $1 - local.get $5 - i32.const 16 - i32.mul - i32.add - local.set $7 - local.get $7 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $3 - local.set $9 - global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $4 - local.tee $8 - i32.const 1 - i32.add - local.set $4 - local.get $8 - local.get $7 - f64.load - call $~lib/array/Array#__set - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end - local.get $3 - local.set $9 + i32.store + local.get $0 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $9 - i32.store offset=4 - local.get $9 - local.get $4 - call $~lib/array/Array#set:length - local.get $3 - local.set $9 + local.get $2 + i32.store + local.get $2 + local.get $1 + local.get $1 + call $~lib/util/hash/HASH + call $~lib/set/Set#find + i32.const 0 + i32.ne + local.set $2 global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $9 + local.get $2 ) -<<<<<<< HEAD - (func $~lib/set/Set#delete (param $0 i32) (param $1 f32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) -======= - (func $~lib/set/Set#delete (param $0 i32) (param $1 f64) (result i32) - (local $2 f64) + (func $~lib/set/Set#add (param $0 i32) (param $1 f64) (result i32) + (local $2 i64) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - (local $7 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -21184,600 +16619,517 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store ->>>>>>> master + local.get $1 + call $~lib/util/hash/HASH + local.set $2 local.get $0 - local.set $7 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $5 i32.store - local.get $7 - local.get $1 -<<<<<<< HEAD + local.get $5 local.get $1 - call $~lib/util/hash/HASH - call $~lib/set/Set#find - local.set $2 local.get $2 -======= - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.3 - end call $~lib/set/Set#find local.set $3 local.get $3 ->>>>>>> master i32.eqz if - i32.const 0 - local.set $7 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $7 - return - end -<<<<<<< HEAD - i32.const 0 - drop - local.get $2 - local.get $2 - i32.load offset=4 -======= - local.get $3 - local.get $3 - i32.load offset=8 ->>>>>>> master - i32.const 1 - i32.or - call $~lib/set/SetEntry#set:taggedNext - local.get $0 - local.get $0 - i32.load offset=28 - i32.const 1 - i32.sub -<<<<<<< HEAD - i32.store offset=28 -======= - call $~lib/set/Set#set:entriesCount ->>>>>>> master - local.get $0 - i64.load offset=8 - i64.const 1 - i64.shr_u - i32.wrap_i64 - local.set $3 - local.get $3 - i32.const 1 - i32.add - i32.const 4 - local.tee $4 - local.get $0 - i32.load offset=28 - local.tee $5 - local.get $4 - local.get $5 - i32.gt_u - select - i32.ge_u - if (result i32) local.get $0 - i32.load offset=28 + i32.load offset=24 local.get $0 i32.load offset=20 - i32.const 3 + i32.eq + if + local.get $0 + local.set $5 + global.get $~lib/memory/__stack_pointer + local.get $5 + i32.store + local.get $5 + local.get $0 + i32.load offset=28 + local.get $0 + i32.load offset=20 + i32.const 3 + i32.mul + i32.const 4 + i32.div_s + i32.lt_s + if (result i64) + local.get $0 + i64.load offset=8 + else + local.get $0 + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or + end + i32.wrap_i64 + call $~lib/set/Set#rehash + end + local.get $0 + i32.load offset=16 + local.get $0 + local.get $0 + i32.load offset=24 + local.tee $4 + i32.const 1 + i32.add + call $~lib/set/Set#set:entriesOffset + local.get $4 + i32.const 16 i32.mul - i32.const 4 - i32.div_s - i32.lt_s - else + i32.add + local.set $3 + local.get $3 + local.get $1 + call $~lib/set/SetEntry#set:key i32.const 0 - end - if + drop + local.get $0 + local.get $0 + i32.load offset=28 + i32.const 1 + i32.add + call $~lib/set/Set#set:entriesCount local.get $0 -<<<<<<< HEAD + i32.load + local.get $2 + local.get $0 + i64.load offset=8 + i64.and + i32.wrap_i64 + i32.const 4 + i32.mul + i32.add + local.set $4 local.get $3 - call $~lib/set/Set#rehash + local.get $4 + i32.load + call $~lib/set/SetEntry#set:taggedNext + local.get $4 + local.get $3 + i32.store end - i32.const 1 - ) - (func $~lib/set/Set#clear (param $0 i32) - (local $1 i32) - (local $2 i32) local.get $0 - local.tee $1 - i32.const 0 + local.set $5 + global.get $~lib/memory/__stack_pointer i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $5 + ) + (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 f64) + (local $3 i32) + global.get $~lib/memory/__stack_pointer i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $2 - local.get $1 - i32.load - call $~lib/rt/pure/__release - local.get $2 - i32.store - local.get $0 - i64.const 4 - i64.const 1 - i64.sub - i64.store offset=8 - local.get $0 - local.tee $2 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer i32.const 0 - i32.const 4 - i32.const 8 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 - local.get $2 - i32.load offset=16 - call $~lib/rt/pure/__release + i32.store local.get $1 - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 local.get $0 - i32.const 0 - i32.store offset=28 -======= - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store - local.get $7 - local.get $4 - call $~lib/set/Set#rehash + i32.load offset=12 + i32.ge_u + if + local.get $1 + i32.const 0 + i32.lt_s + if + i32.const 224 + i32.const 592 + i32.const 108 + i32.const 22 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.const 3 + call $~lib/array/ensureSize + local.get $0 + local.get $1 + i32.const 1 + i32.add + call $~lib/array/Array#set:length_ end - i32.const 1 - local.set $7 + local.get $0 + local.set $3 + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.store + local.get $3 + local.get $1 + local.get $2 + call $~lib/array/Array#__uset global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $7 ->>>>>>> master ) - (func $std/set/testNumeric - (local $0 i32) - (local $1 f64) + (func $~lib/set/Set#values (param $0 i32) (result i32) + (local $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) global.get $~lib/memory/__stack_pointer - i32.const 20 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store offset=16 + local.get $0 + i32.load offset=16 + local.set $1 + local.get $0 + i32.load offset=24 + local.set $2 global.get $~lib/memory/__stack_pointer i32.const 0 - call $~lib/set/Set#constructor - local.tee $0 + local.get $2 + call $~lib/array/Array#constructor + local.tee $3 i32.store - f64.const 0 - local.set $1 + i32.const 0 + local.set $4 + i32.const 0 + local.set $5 loop $for-loop|0 - local.get $1 - f64.const 100 - f64.lt - local.set $2 + local.get $5 local.get $2 + i32.lt_s + local.set $6 + local.get $6 if - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - local.get $1 - call $~lib/set/Set#has - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 6 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - local.get $1 - call $~lib/set/Set#add - drop - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 local.get $1 - call $~lib/set/Set#has + local.get $5 + i32.const 16 + i32.mul + i32.add + local.set $7 + local.get $7 + i32.load offset=8 + i32.const 1 + i32.and i32.eqz if - i32.const 0 - i32.const 544 - i32.const 8 - i32.const 5 - call $~lib/builtins/abort - unreachable + local.get $3 + local.set $9 + global.get $~lib/memory/__stack_pointer + local.get $9 + i32.store offset=4 + local.get $9 + local.get $4 + local.tee $8 + i32.const 1 + i32.add + local.set $4 + local.get $8 + local.get $7 + f64.load + call $~lib/array/Array#__set end - local.get $1 - f64.const 1 - f64.add - local.set $1 + local.get $5 + i32.const 1 + i32.add + local.set $5 br $for-loop|0 end end - local.get $0 - local.set $6 + local.get $3 + local.set $9 global.get $~lib/memory/__stack_pointer - local.get $6 + local.get $9 i32.store offset=4 - local.get $6 - call $~lib/set/Set#get:size - i32.const 100 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 10 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - f64.const 50 - local.set $1 - loop $for-loop|1 - local.get $1 - f64.const 100 - f64.lt - local.set $2 - local.get $2 - if - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - local.get $1 - call $~lib/set/Set#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 14 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - local.get $1 - call $~lib/set/Set#add - drop - local.get $0 - local.set $6 - global.get $~lib/memory/__stack_pointer - local.get $6 - i32.store offset=4 - local.get $6 - local.get $1 - call $~lib/set/Set#has - i32.eqz - if - i32.const 0 - i32.const 544 - i32.const 16 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - f64.const 1 - f64.add - local.set $1 -<<<<<<< HEAD - br $for-loop|4 - end - end - local.get $0 - call $~lib/set/Set#get:size - i32.const 50 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 336 - i32.const 45 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/set/Set#clear - local.get $0 - call $~lib/set/Set#get:size + local.get $9 + local.get $4 + call $~lib/array/Array#set:length + local.get $3 + local.set $9 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $9 + ) + (func $~lib/set/Set#delete (param $0 i32) (param $1 f64) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer i32.const 0 - i32.eq + i32.store + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store + local.get $6 + local.get $1 + local.get $1 + call $~lib/util/hash/HASH + call $~lib/set/Set#find + local.set $2 + local.get $2 i32.eqz if i32.const 0 - i32.const 336 - i32.const 49 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.set $6 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $6 + return end local.get $2 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/set/Set#constructor (param $0 i32) (result i32) + local.get $2 + i32.load offset=8 + i32.const 1 + i32.or + call $~lib/set/SetEntry#set:taggedNext local.get $0 - i32.eqz - if - i32.const 32 - i32.const 21 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.set $0 - end local.get $0 - i32.const 0 - i32.const 4 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store + i32.load offset=28 + i32.const 1 + i32.sub + call $~lib/set/Set#set:entriesCount local.get $0 - i64.const 4 + i64.load offset=8 i64.const 1 - i64.sub - i64.store offset=8 - local.get $0 - i32.const 0 - i32.const 4 - i32.const 16 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=16 - local.get $0 + i64.shr_u + i32.wrap_i64 + local.set $3 + local.get $3 + i32.const 1 + i32.add i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $0 - i32.const 0 - i32.store offset=28 + local.tee $4 local.get $0 - ) - (func $~lib/util/hash/HASH (param $0 f64) (result i64) - (local $1 i64) - (local $2 i64) - i32.const 0 - drop - i32.const 0 - drop + i32.load offset=28 + local.tee $5 + local.get $4 + local.get $5 + i32.gt_u + select + i32.ge_u + if (result i32) + local.get $0 + i32.load offset=28 + local.get $0 + i32.load offset=20 + i32.const 3 + i32.mul + i32.const 4 + i32.div_s + i32.lt_s + else + i32.const 0 + end + if + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store + local.get $6 + local.get $3 + call $~lib/set/Set#rehash + end i32.const 1 - drop - i32.const 8 + local.set $6 + global.get $~lib/memory/__stack_pointer i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $0 - i64.reinterpret_f64 - local.set $1 - i64.const 0 - i64.const 2870177450012600261 - i64.add - i64.const 8 - i64.add - local.set $2 - local.get $2 - local.get $1 - i64.const -4417276706812531889 - i64.mul - i64.const 31 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.xor - local.set $2 - local.get $2 - i64.const 27 - i64.rotl - i64.const -7046029288634856825 - i64.mul - i64.const -8796714831421723037 - i64.add - local.set $2 - local.get $2 - local.get $2 - i64.const 33 - i64.shr_u - i64.xor - local.set $2 - local.get $2 - i64.const -4417276706812531889 - i64.mul - local.set $2 - local.get $2 - local.get $2 - i64.const 29 - i64.shr_u - i64.xor - local.set $2 - local.get $2 - i64.const 1609587929392839161 - i64.mul - local.set $2 - local.get $2 - local.get $2 - i64.const 32 - i64.shr_u - i64.xor - local.set $2 - local.get $2 - return + i32.add + global.set $~lib/memory/__stack_pointer + local.get $6 ) - (func $~lib/set/Set#find (param $0 i32) (param $1 f64) (param $2 i64) (result i32) + (func $std/set/testNumeric + (local $0 i32) + (local $1 f64) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - i32.load - local.get $2 - local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - i32.load - local.set $3 - loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 + (local $6 i32) + global.get $~lib/memory/__stack_pointer + i32.const 20 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store offset=8 + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store offset=16 + global.get $~lib/memory/__stack_pointer + i32.const 0 + call $~lib/set/Set#constructor + local.tee $0 + i32.store + f64.const 0 + local.set $1 + loop $for-loop|0 + local.get $1 + f64.const 100 + f64.lt + local.set $2 + local.get $2 if - local.get $3 - i32.load offset=8 - local.set $5 - local.get $5 - i32.const 1 - i32.and - i32.eqz - if (result i32) - local.get $3 - f64.load - local.get $1 - f64.eq - else + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + local.get $1 + call $~lib/set/Set#has + i32.eqz + i32.eqz + if i32.const 0 + i32.const 544 + i32.const 6 + i32.const 5 + call $~lib/builtins/abort + unreachable end + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + local.get $1 + call $~lib/set/Set#add + drop + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + local.get $1 + call $~lib/set/Set#has + i32.eqz if - local.get $3 - return + i32.const 0 + i32.const 544 + i32.const 8 + i32.const 5 + call $~lib/builtins/abort + unreachable end - local.get $5 - i32.const 1 - i32.const -1 - i32.xor - i32.and - local.set $3 - br $while-continue|0 + local.get $1 + f64.const 1 + f64.add + local.set $1 + br $for-loop|0 end end - i32.const 0 - ) - (func $~lib/set/Set#has (param $0 i32) (param $1 f64) (result i32) - local.get $0 - local.get $1 - local.get $1 - call $~lib/util/hash/HASH - call $~lib/set/Set#find - i32.const 0 - i32.ne - ) - (func $~lib/set/Set#rehash (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 $10 i32) - (local $11 i32) - (local $12 f64) - (local $13 i64) - (local $14 i32) - local.get $1 - i32.const 1 - i32.add - local.set $2 - i32.const 0 - local.get $2 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $3 - local.get $2 - i32.const 8 - i32.mul - i32.const 3 - i32.div_s - local.set $4 - i32.const 0 - local.get $4 - i32.const 16 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 local.get $0 - i32.load offset=16 -======= + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + call $~lib/set/Set#get:size + i32.const 100 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 10 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + f64.const 50 + local.set $1 + loop $for-loop|1 + local.get $1 + f64.const 100 + f64.lt + local.set $2 + local.get $2 + if + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + local.get $1 + call $~lib/set/Set#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 14 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + local.get $1 + call $~lib/set/Set#add + drop + local.get $0 + local.set $6 + global.get $~lib/memory/__stack_pointer + local.get $6 + i32.store offset=4 + local.get $6 + local.get $1 + call $~lib/set/Set#has + i32.eqz + if + i32.const 0 + i32.const 544 + i32.const 16 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + f64.const 1 + f64.add + local.set $1 br $for-loop|1 end end local.get $0 ->>>>>>> master local.set $6 global.get $~lib/memory/__stack_pointer local.get $6 @@ -21797,16 +17149,6 @@ end global.get $~lib/memory/__stack_pointer local.get $0 -<<<<<<< HEAD - i32.load offset=24 - i32.const 16 - i32.mul - i32.add - local.set $7 - local.get $5 - local.set $8 - loop $while-continue|0 -======= local.set $6 global.get $~lib/memory/__stack_pointer local.get $6 @@ -21827,7 +17169,6 @@ local.get $2 local.set $6 global.get $~lib/memory/__stack_pointer ->>>>>>> master local.get $6 i32.store offset=4 local.get $6 @@ -21853,47 +17194,12 @@ call $~lib/set/Set#has i32.eqz if -<<<<<<< HEAD - local.get $8 - local.set $11 - local.get $10 - f64.load - local.set $12 - local.get $11 - local.get $12 - f64.store - local.get $12 - call $~lib/util/hash/HASH - local.get $1 - i64.extend_i32_u - i64.and - local.set $13 - local.get $3 - local.get $13 - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - local.set $14 - local.get $11 - local.get $14 - i32.load - i32.store offset=8 - local.get $14 - local.get $8 - i32.store - local.get $8 - i32.const 16 - i32.add - local.set $8 -======= i32.const 0 i32.const 544 i32.const 24 i32.const 5 call $~lib/builtins/abort unreachable ->>>>>>> master end local.get $3 local.set $6 @@ -21996,67 +17302,13 @@ unreachable end local.get $1 - f64.const 1 - f64.add - local.set $1 - br $for-loop|3 - end - end - local.get $0 -<<<<<<< HEAD - local.get $1 - i64.extend_i32_u - i64.store offset=8 - local.get $0 - local.tee $9 - local.get $5 - local.tee $14 - local.get $9 - i32.load offset=16 - local.tee $11 - i32.ne - if - local.get $14 - call $~lib/rt/pure/__retain - local.set $14 - local.get $11 - call $~lib/rt/pure/__release - end - local.get $14 - i32.store offset=16 - local.get $0 - local.get $4 - i32.store offset=20 - local.get $0 - local.get $0 - i32.load offset=28 - i32.store offset=24 - local.get $3 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - ) - (func $~lib/set/Set#add (param $0 i32) (param $1 f64) (result i32) - (local $2 i64) - (local $3 i32) - (local $4 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $2 - local.get $0 - local.get $1 - local.get $2 - call $~lib/set/Set#find - local.set $3 - local.get $3 - i32.eqz - if - local.get $0 - i32.load offset=24 - local.get $0 - i32.load offset=20 - i32.eq -======= + f64.const 1 + f64.add + local.set $1 + br $for-loop|3 + end + end + local.get $0 local.set $6 global.get $~lib/memory/__stack_pointer local.get $6 @@ -22082,7 +17334,6 @@ f64.lt local.set $4 local.get $4 ->>>>>>> master if local.get $0 local.set $6 @@ -22103,71 +17354,6 @@ unreachable end local.get $0 -<<<<<<< HEAD - i32.load offset=28 - local.get $0 - i32.load offset=20 - i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s - if (result i64) - local.get $0 - i64.load offset=8 - else - local.get $0 - i64.load offset=8 - i64.const 1 - i64.shl - i64.const 1 - i64.or - end - i32.wrap_i64 - call $~lib/set/Set#rehash - end - local.get $0 - i32.load offset=16 - local.get $0 - local.get $0 - i32.load offset=24 - local.tee $4 - i32.const 1 - i32.add - i32.store offset=24 - local.get $4 - i32.const 16 - i32.mul - i32.add - local.set $3 - local.get $3 - local.get $1 - f64.store - local.get $0 - local.get $0 - i32.load offset=28 - i32.const 1 - i32.add - i32.store offset=28 - local.get $0 - i32.load - local.get $2 - local.get $0 - i64.load offset=8 - i64.and - i32.wrap_i64 - i32.const 4 - i32.mul - i32.add - local.set $4 - local.get $3 - local.get $4 - i32.load - i32.store offset=8 - local.get $4 - local.get $3 - i32.store -======= local.set $6 global.get $~lib/memory/__stack_pointer local.get $6 @@ -22226,7 +17412,6 @@ local.set $1 br $for-loop|4 end ->>>>>>> master end local.get $0 local.set $6 @@ -22247,23 +17432,12 @@ unreachable end local.get $0 -<<<<<<< HEAD - i32.load offset=28 - ) - (func $~lib/array/Array#constructor (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) -======= local.set $6 global.get $~lib/memory/__stack_pointer local.get $6 i32.store offset=4 local.get $6 call $~lib/set/Set#clear ->>>>>>> master local.get $0 local.set $6 global.get $~lib/memory/__stack_pointer @@ -22341,7 +17515,7 @@ i32.eqz if global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 3 call $~lib/rt/itcms/__new local.tee $0 @@ -22355,9 +17529,9 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/set/Set#set:bucketsMask local.get $0 i32.const 0 @@ -22367,23 +17541,9 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:entries local.get $0 -<<<<<<< HEAD - i32.load offset=16 - local.set $1 - local.get $0 - i32.load offset=24 - local.set $2 - i32.const 0 - local.get $2 - call $~lib/array/Array#constructor - local.set $3 - i32.const 0 - local.set $4 -======= i32.const 4 call $~lib/set/Set#set:entriesCapacity local.get $0 ->>>>>>> master i32.const 0 call $~lib/set/Set#set:entriesOffset local.get $0 @@ -22397,21 +17557,6 @@ global.set $~lib/memory/__stack_pointer local.get $1 ) -<<<<<<< HEAD - (func $~lib/set/Set#delete (param $0 i32) (param $1 f64) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - local.get $1 - local.get $1 - call $~lib/util/hash/HASH - call $~lib/set/Set#find - local.set $2 - local.get $2 - i32.eqz -======= (func $~lib/array/Array#constructor (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -22451,7 +17596,6 @@ i32.const 0 i32.shr_u i32.gt_u ->>>>>>> master if i32.const 432 i32.const 592 @@ -22462,15 +17606,6 @@ end local.get $1 i32.const 0 -<<<<<<< HEAD - drop - local.get $2 - local.get $2 - i32.load offset=8 - i32.const 1 - i32.or - i32.store offset=8 -======= i32.shl local.set $2 global.get $~lib/memory/__stack_pointer @@ -22486,25 +17621,10 @@ local.get $0 local.get $3 call $~lib/array/Array#set:buffer ->>>>>>> master local.get $0 local.get $3 call $~lib/array/Array#set:dataStart local.get $0 -<<<<<<< HEAD - i32.load offset=28 - i32.const 1 - i32.sub - i32.store offset=28 - local.get $0 - i64.load offset=8 - i64.const 1 - i64.shr_u - i32.wrap_i64 - local.set $3 - local.get $3 - i32.const 1 -======= local.get $2 call $~lib/array/Array#set:byteLength local.get $0 @@ -22514,7 +17634,6 @@ local.set $4 global.get $~lib/memory/__stack_pointer i32.const 8 ->>>>>>> master i32.add global.set $~lib/memory/__stack_pointer local.get $4 @@ -22523,34 +17642,6 @@ (local $1 i32) global.get $~lib/memory/__stack_pointer i32.const 4 -<<<<<<< HEAD - local.tee $4 - local.get $0 - i32.load offset=28 - local.tee $5 - local.get $4 - local.get $5 - i32.gt_u - select - i32.ge_u - if (result i32) - local.get $0 - i32.load offset=28 - local.get $0 - i32.load offset=20 - i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s - else - i32.const 0 - end - if - local.get $0 - local.get $3 - call $~lib/set/Set#rehash -======= i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check @@ -22561,12 +17652,11 @@ i32.eqz if global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 5 call $~lib/rt/itcms/__new local.tee $0 i32.store ->>>>>>> master end local.get $0 i32.const 0 @@ -22576,40 +17666,16 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:buckets local.get $0 -<<<<<<< HEAD i64.const 4 i64.const 1 i64.sub - i64.store offset=8 -======= - i32.const 4 - i32.const 1 - i32.sub call $~lib/set/Set#set:bucketsMask ->>>>>>> master local.get $0 i32.const 0 i32.const 4 i32.const 8 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor -<<<<<<< HEAD - local.set $1 - local.get $2 - i32.load offset=16 - call $~lib/rt/pure/__release - local.get $1 - i32.store offset=16 - local.get $0 - i32.const 4 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $0 - i32.const 0 - i32.store offset=28 -======= call $~lib/set/Set#set:entries local.get $0 i32.const 4 @@ -22627,7 +17693,6 @@ i32.add global.set $~lib/memory/__stack_pointer local.get $1 ->>>>>>> master ) (func $~lib/array/Array#constructor (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -22724,7 +17789,7 @@ i32.eqz if global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 7 call $~lib/rt/itcms/__new local.tee $0 @@ -22738,9 +17803,9 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/set/Set#set:bucketsMask local.get $0 i32.const 0 @@ -22861,7 +17926,7 @@ i32.eqz if global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 9 call $~lib/rt/itcms/__new local.tee $0 @@ -22875,9 +17940,9 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/set/Set#set:bucketsMask local.get $0 i32.const 0 @@ -22998,7 +18063,7 @@ i32.eqz if global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 11 call $~lib/rt/itcms/__new local.tee $0 @@ -23012,9 +18077,9 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/set/Set#set:bucketsMask local.get $0 i32.const 0 @@ -23135,7 +18200,7 @@ i32.eqz if global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 13 call $~lib/rt/itcms/__new local.tee $0 @@ -23149,9 +18214,9 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/set/Set#set:bucketsMask local.get $0 i32.const 0 @@ -23225,14 +18290,8 @@ unreachable end local.get $1 -<<<<<<< HEAD - call $~lib/rt/pure/__visit - local.get $0 - i32.load offset=16 -======= i32.const 2 i32.shl ->>>>>>> master local.set $2 global.get $~lib/memory/__stack_pointer local.get $2 @@ -23278,7 +18337,7 @@ i32.eqz if global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 15 call $~lib/rt/itcms/__new local.tee $0 @@ -23292,9 +18351,9 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/set/Set#set:bucketsMask local.get $0 i32.const 0 @@ -23343,9 +18402,6 @@ i32.store end local.get $0 -<<<<<<< HEAD - i32.load offset=16 -======= i32.const 0 call $~lib/array/Array#set:buffer local.get $0 @@ -23373,7 +18429,6 @@ local.get $1 i32.const 3 i32.shl ->>>>>>> master local.set $2 global.get $~lib/memory/__stack_pointer local.get $2 @@ -23419,7 +18474,7 @@ i32.eqz if global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 17 call $~lib/rt/itcms/__new local.tee $0 @@ -23433,9 +18488,9 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/set/Set#set:bucketsMask local.get $0 i32.const 0 @@ -23484,11 +18539,6 @@ i32.store end local.get $0 -<<<<<<< HEAD - i32.load offset=16 - local.set $2 -======= ->>>>>>> master i32.const 0 call $~lib/array/Array#set:buffer local.get $0 @@ -23514,14 +18564,8 @@ unreachable end local.get $1 -<<<<<<< HEAD - call $~lib/rt/pure/__visit - local.get $0 - i32.load offset=16 -======= i32.const 3 i32.shl ->>>>>>> master local.set $2 global.get $~lib/memory/__stack_pointer local.get $2 @@ -23567,7 +18611,7 @@ i32.eqz if global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 19 call $~lib/rt/itcms/__new local.tee $0 @@ -23581,16 +18625,11 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/set/Set#set:bucketsMask local.get $0 -<<<<<<< HEAD - i32.load offset=16 - local.set $2 -======= ->>>>>>> master i32.const 0 i32.const 4 i32.const 8 @@ -23637,11 +18676,6 @@ i32.store end local.get $0 -<<<<<<< HEAD - i32.load offset=16 - local.set $2 -======= ->>>>>>> master i32.const 0 call $~lib/array/Array#set:buffer local.get $0 @@ -23667,14 +18701,8 @@ unreachable end local.get $1 -<<<<<<< HEAD - call $~lib/rt/pure/__visit - local.get $0 - i32.load offset=16 -======= i32.const 2 i32.shl ->>>>>>> master local.set $2 global.get $~lib/memory/__stack_pointer local.get $2 @@ -23720,7 +18748,7 @@ i32.eqz if global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 21 call $~lib/rt/itcms/__new local.tee $0 @@ -23734,16 +18762,11 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/set/Set#set:bucketsMask local.get $0 -<<<<<<< HEAD - i32.load offset=16 - local.set $2 -======= ->>>>>>> master i32.const 0 i32.const 4 i32.const 16 @@ -23790,11 +18813,6 @@ i32.store end local.get $0 -<<<<<<< HEAD - i32.load offset=16 - local.set $2 -======= ->>>>>>> master i32.const 0 call $~lib/array/Array#set:buffer local.get $0 @@ -23820,14 +18838,8 @@ unreachable end local.get $1 -<<<<<<< HEAD - call $~lib/rt/pure/__visit - local.get $0 - i32.load offset=16 -======= i32.const 3 i32.shl ->>>>>>> master local.set $2 global.get $~lib/memory/__stack_pointer local.get $2 diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index bb8d2901c2..24a749c1fd 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -1,11 +1,12 @@ (module (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_=>_none (func (param i32))) (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i64 (func (param i32) (result i64))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i64_=>_i32 (func (param i32 i32 i64) (result i32))) (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) @@ -1919,50 +1920,55 @@ (func $~lib/map/Map<~lib/string/String,usize>#set:entries (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $1 i32.const 0 call $~lib/rt/itcms/__link ) - (func $~lib/util/hash/hash32 (param $0 i32) (result i32) - local.get $0 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - local.get $0 - i32.const 8 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) local.get $0 - i32.const 16 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.get $0 - i32.const 24 - i32.shr_u - i32.xor - i32.const 16777619 - i32.mul + i64.extend_i32_u + i64.const -7046029288634856825 + i64.mul + i64.const 2870177450012600265 + i64.xor + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.tee $1 + local.get $1 + i64.const 33 + i64.shr_u + i64.xor + i64.const -4417276706812531889 + i64.mul + local.tee $1 + local.get $1 + i64.const 29 + i64.shr_u + i64.xor + i64.const 1609587929392839161 + i64.mul + local.tee $1 + local.get $1 + i64.const 32 + i64.shr_u + i64.xor ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (local $3 i32) local.get $0 i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -1973,7 +1979,7 @@ if local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 i32.const 1 i32.and if (result i32) @@ -1988,7 +1994,7 @@ local.get $0 return end - local.get $2 + local.get $3 i32.const -2 i32.and local.set $0 @@ -2036,10 +2042,10 @@ local.tee $3 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $8 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 12 i32.mul i32.add @@ -2069,9 +2075,11 @@ local.get $2 local.get $6 local.get $7 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -2098,17 +2106,18 @@ call $~lib/map/Map<~lib/string/String,usize>#set:buckets local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.get $3 call $~lib/map/Map<~lib/string/String,usize>#set:entries local.get $0 local.get $5 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add @@ -2319,11 +2328,11 @@ i32.load call $~lib/rt/itcms/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $2 local.tee $1 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 12 i32.mul i32.add @@ -2358,11 +2367,11 @@ i32.load call $~lib/rt/itcms/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $2 local.tee $1 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 12 i32.mul i32.add @@ -2417,25 +2426,35 @@ unreachable end ) - (func $~lib/util/hash/hashStr (param $0 i32) (result i32) + (func $~lib/util/hash/HASH<~lib/string/String> (param $0 i32) (result i64) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i64) + (local $5 i64) + (local $6 i64) + (local $7 i64) + (local $8 i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - i32.const -2128831035 - local.set $1 - local.get $0 - if + i64.const 0 + i64.store + block $~lib/util/hash/hashStr|inlined.0 (result i64) global.get $~lib/memory/__stack_pointer local.get $0 i32.store + i64.const 0 + local.get $0 + i32.eqz + br_if $~lib/util/hash/hashStr|inlined.0 + drop + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=4 local.get $0 i32.const 20 i32.sub @@ -2549,8 +2568,8 @@ i64.xor i64.const -7046029288634856825 i64.mul - i64.const -8796714831421723037 - i64.add + i64.const 8796714831421723037 + i64.sub local.get $5 i64.const -4417276706812531889 i64.mul @@ -2561,8 +2580,8 @@ i64.xor i64.const -7046029288634856825 i64.mul - i64.const -8796714831421723037 - i64.add + i64.const 8796714831421723037 + i64.sub local.get $7 i64.const -4417276706812531889 i64.mul @@ -2573,8 +2592,8 @@ i64.xor i64.const -7046029288634856825 i64.mul - i64.const -8796714831421723037 - i64.add + i64.const 8796714831421723037 + i64.sub local.get $6 i64.const -4417276706812531889 i64.mul @@ -2585,8 +2604,8 @@ i64.xor i64.const -7046029288634856825 i64.mul - i64.const -8796714831421723037 - i64.add + i64.const 8796714831421723037 + i64.sub i64.add else local.get $2 @@ -2622,8 +2641,8 @@ i64.rotl i64.const -7046029288634856825 i64.mul - i64.const -8796714831421723037 - i64.add + i64.const 8796714831421723037 + i64.sub local.set $4 local.get $1 i32.const 8 @@ -2702,14 +2721,11 @@ i64.const 32 i64.shr_u i64.xor - else - i64.const 0 end global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $1 ) (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -2857,8 +2873,9 @@ global.set $~lib/memory/__stack_pointer i32.const 0 ) - (func $~lib/map/Map<~lib/string/String,usize>#find (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map<~lib/string/String,usize>#find (param $0 i32) (param $1 i64) (result i32) (local $2 i32) + (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -2893,12 +2910,12 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.load - local.tee $1 + local.tee $3 i32.store global.get $~lib/memory/__stack_pointer i32.const 1056 i32.store offset=4 - local.get $1 + local.get $3 i32.const 1056 call $~lib/string/String.__eq end @@ -2932,7 +2949,7 @@ (local $7 i32) (local $8 i32) global.get $~lib/memory/__stack_pointer - i32.const 20 + i32.const 16 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check @@ -2943,9 +2960,6 @@ i64.const 0 i64.store offset=8 global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store offset=16 - global.get $~lib/memory/__stack_pointer local.get $1 i32.const 1 i32.add @@ -3004,9 +3018,6 @@ global.get $~lib/memory/__stack_pointer local.get $7 i32.store offset=12 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=16 local.get $2 local.get $6 local.get $7 @@ -3041,25 +3052,26 @@ call $~lib/map/Map<~lib/string/String,usize>#set:buckets local.get $0 local.get $1 - i32.store offset=4 + i64.extend_i32_u + i64.store offset=8 local.get $0 local.get $3 call $~lib/map/Map<~lib/string/String,usize>#set:entries local.get $0 local.get $5 - i32.store offset=12 + i32.store offset=20 local.get $0 local.get $0 - i32.load offset=20 - i32.store offset=16 + i32.load offset=28 + i32.store offset=24 global.get $~lib/memory/__stack_pointer - i32.const 20 + i32.const 16 i32.add global.set $~lib/memory/__stack_pointer ) (func $~lib/map/Map<~lib/string/String,usize>#set (param $0 i32) (param $1 i32) (local $2 i32) - (local $3 i32) + (local $3 i64) (local $4 i32) global.get $~lib/memory/__stack_pointer i32.const 12 @@ -3075,18 +3087,15 @@ global.get $~lib/memory/__stack_pointer i32.const 1056 i32.store - global.get $~lib/memory/__stack_pointer - i32.const 1056 - i32.store offset=4 i32.const 1056 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String> local.set $3 global.get $~lib/memory/__stack_pointer local.get $0 - i32.store offset=4 + i32.store global.get $~lib/memory/__stack_pointer i32.const 1056 - i32.store offset=8 + i32.store offset=4 local.get $0 local.get $3 call $~lib/map/Map<~lib/string/String,usize>#find @@ -3097,49 +3106,50 @@ i32.store offset=4 else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if global.get $~lib/memory/__stack_pointer local.get $0 - i32.store offset=4 + i32.store local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map<~lib/string/String,usize>#rehash end global.get $~lib/memory/__stack_pointer local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $2 - i32.store + i32.store offset=8 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $4 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $2 local.get $4 i32.const 12 @@ -3157,17 +3167,18 @@ i32.store offset=4 local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add - i32.store offset=20 + i32.store offset=28 local.get $2 local.get $0 i32.load local.get $3 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 2 i32.shl i32.add @@ -3185,7 +3196,7 @@ ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (local $2 i32) - (local $3 i32) + (local $3 i64) (local $4 i32) global.get $~lib/memory/__stack_pointer i32.const 8 @@ -3196,7 +3207,7 @@ i64.const 0 i64.store local.get $1 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.set $3 global.get $~lib/memory/__stack_pointer local.get $0 @@ -3226,6 +3237,8 @@ i32.store local.get $0 local.get $0 + i32.load offset=28 + local.get $0 i32.load offset=20 i32.const 3 i32.mul @@ -3248,7 +3261,7 @@ end global.get $~lib/memory/__stack_pointer local.get $0 - i32.load offset=8 + i32.load offset=16 local.tee $2 i32.store offset=4 local.get $0 @@ -3257,7 +3270,7 @@ local.tee $4 i32.const 1 i32.add - i32.store offset=16 + i32.store offset=24 local.get $2 local.get $4 i32.const 12 @@ -3275,7 +3288,7 @@ call $~lib/rt/itcms/__link local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add i32.store offset=28 @@ -3326,7 +3339,7 @@ i32.const 1056 i32.store offset=4 global.get $~lib/memory/__stack_pointer - i32.const 16 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check @@ -3334,8 +3347,8 @@ i64.const 0 i64.store global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 + i32.const 0 + i32.store offset=8 global.get $~lib/memory/__stack_pointer local.get $0 i32.store @@ -3345,17 +3358,14 @@ global.get $~lib/memory/__stack_pointer i32.const 1056 i32.store offset=8 - global.get $~lib/memory/__stack_pointer - i32.const 1056 - i32.store offset=12 local.get $0 i32.const 1056 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String> call $~lib/map/Map<~lib/string/String,usize>#find i32.const 0 i32.ne global.get $~lib/memory/__stack_pointer - i32.const 16 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer if @@ -3367,7 +3377,7 @@ i32.const 1056 i32.store offset=4 global.get $~lib/memory/__stack_pointer - i32.const 16 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check @@ -3375,8 +3385,8 @@ i64.const 0 i64.store global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 + i32.const 0 + i32.store offset=8 global.get $~lib/memory/__stack_pointer local.get $0 i32.store @@ -3386,12 +3396,9 @@ global.get $~lib/memory/__stack_pointer i32.const 1056 i32.store offset=8 - global.get $~lib/memory/__stack_pointer - i32.const 1056 - i32.store offset=12 local.get $0 i32.const 1056 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String> call $~lib/map/Map<~lib/string/String,usize>#find local.tee $0 i32.eqz @@ -3406,7 +3413,7 @@ local.get $0 i32.load offset=4 global.get $~lib/memory/__stack_pointer - i32.const 16 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer @@ -3425,7 +3432,7 @@ i32.const 0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 3 call $~lib/rt/itcms/__new local.tee $0 @@ -3449,7 +3456,7 @@ i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add @@ -3465,7 +3472,7 @@ i32.const 0 i32.store global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 4 call $~lib/rt/itcms/__new local.tee $0 @@ -3489,7 +3496,7 @@ i32.store offset=24 local.get $0 i32.const 0 - i32.store offset=20 + i32.store offset=28 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index 31c21c6814..5e80258684 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -6,6 +6,9 @@ (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_none (func)) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_i64_=>_none (func (param i32 i64))) + (type $i32_i32_i64_=>_i32 (func (param i32 i32 i64) (result i32))) + (type $i32_=>_i64 (func (param i32) (result i64))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) @@ -2488,15 +2491,15 @@ i32.const 0 call $~lib/rt/itcms/__link ) - (func $~lib/map/Map<~lib/string/String,usize>#set:bucketsMask (param $0 i32) (param $1 i32) + (func $~lib/map/Map<~lib/string/String,usize>#set:bucketsMask (param $0 i32) (param $1 i64) local.get $0 local.get $1 - i32.store offset=4 + i64.store offset=8 ) (func $~lib/map/Map<~lib/string/String,usize>#set:entries (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $1 i32.const 0 @@ -2505,17 +2508,17 @@ (func $~lib/map/Map<~lib/string/String,usize>#set:entriesCapacity (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=12 + i32.store offset=20 ) (func $~lib/map/Map<~lib/string/String,usize>#set:entriesOffset (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=16 + i32.store offset=24 ) (func $~lib/map/Map<~lib/string/String,usize>#set:entriesCount (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=20 + i32.store offset=28 ) (func $~lib/map/Map#set:buckets (param $0 i32) (param $1 i32) local.get $0 @@ -2526,15 +2529,15 @@ i32.const 0 call $~lib/rt/itcms/__link ) - (func $~lib/map/Map#set:bucketsMask (param $0 i32) (param $1 i32) + (func $~lib/map/Map#set:bucketsMask (param $0 i32) (param $1 i64) local.get $0 local.get $1 - i32.store offset=4 + i64.store offset=8 ) (func $~lib/map/Map#set:entries (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=8 + i32.store offset=16 local.get $0 local.get $1 i32.const 0 @@ -2543,17 +2546,17 @@ (func $~lib/map/Map#set:entriesCapacity (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=12 + i32.store offset=20 ) (func $~lib/map/Map#set:entriesOffset (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=16 + i32.store offset=24 ) (func $~lib/map/Map#set:entriesCount (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=20 + i32.store offset=28 ) (func $~lib/string/String#get:length (param $0 i32) (result i32) local.get $0 @@ -2685,11 +2688,20 @@ local.get $1 i32.store offset=8 ) - (func $~lib/util/hash/hash32 (param $0 i32) (result i32) - (local $1 i32) - i32.const -2128831035 - local.set $1 - local.get $1 + (func $~lib/util/hash/HASH (param $0 i32) (result i64) + (local $1 i64) + (local $2 i32) + (local $3 i64) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 4 + i32.le_u + drop local.get $0 local.set $2 i64.const 4 @@ -2897,31 +2909,8 @@ local.get $10 i32.load offset=4 call $~lib/map/MapEntry#set:value - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i64.extend_i32_u i64.and @@ -2957,6 +2946,7 @@ call $~lib/map/Map#set:buckets local.get $0 local.get $1 + i64.extend_i32_u call $~lib/map/Map#set:bucketsMask local.get $0 local.get $5 @@ -2966,7 +2956,7 @@ call $~lib/map/Map#set:entriesCapacity local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 call $~lib/map/Map#set:entriesOffset global.get $~lib/memory/__stack_pointer i32.const 8 @@ -4306,7 +4296,7 @@ local.get $1 call $~lib/rt/itcms/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 1 if (result i32) @@ -4319,7 +4309,7 @@ local.set $3 local.get $3 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 12 i32.mul i32.add @@ -4380,7 +4370,7 @@ local.get $1 call $~lib/rt/itcms/__visit local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $2 i32.const 0 if (result i32) @@ -4393,7 +4383,7 @@ local.set $3 local.get $3 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 12 i32.mul i32.add @@ -4498,87 +4488,430 @@ unreachable end ) - (func $~lib/util/hash/hashStr (param $0 i32) (result i32) + (func $~lib/util/hash/HASH<~lib/string/String> (param $0 i32) (result i64) (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (local $3 i64) + (local $4 i64) + (local $5 i64) + (local $6 i64) + (local $7 i64) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i64) + (local $12 i64) + (local $13 i32) + (local $14 i64) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - i32.const -2128831035 - local.set $1 - local.get $0 - i32.const 0 - i32.ne - if - i32.const 0 - local.set $2 - local.get $0 - local.set $5 + i64.const 0 + i64.store + i32.const 1 + drop + block $~lib/util/hash/hashStr|inlined.0 (result i64) global.get $~lib/memory/__stack_pointer - local.get $5 + local.get $0 + local.tee $1 i32.store - local.get $5 + local.get $1 + i32.const 0 + i32.eq + if + i64.const 0 + br $~lib/util/hash/hashStr|inlined.0 + end + local.get $1 + local.set $13 + global.get $~lib/memory/__stack_pointer + local.get $13 + i32.store offset=4 + local.get $13 call $~lib/string/String#get:length i32.const 1 i32.shl + local.set $2 + i64.const 0 local.set $3 - loop $for-loop|0 + local.get $2 + i32.const 32 + i32.ge_s + if + i64.const 0 + i64.const -7046029288634856825 + i64.add + i64.const -4417276706812531889 + i64.add + local.set $4 + i64.const 0 + i64.const -4417276706812531889 + i64.add + local.set $5 + i64.const 0 + local.set $6 + i64.const 0 + i64.const -7046029288634856825 + i64.sub + local.set $7 local.get $2 - local.get $3 - i32.lt_u + local.set $8 + i32.const 0 + local.set $9 + local.get $2 + i32.const 32 + i32.sub + local.set $2 + loop $while-continue|0 + local.get $9 + local.get $2 + i32.le_s + local.set $10 + local.get $10 + if + local.get $4 + local.set $12 + local.get $1 + local.get $9 + i32.add + i64.load + local.set $11 + local.get $12 + local.get $11 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $4 + local.get $5 + local.set $12 + local.get $1 + local.get $9 + i32.add + i64.load offset=8 + local.set $11 + local.get $12 + local.get $11 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $5 + local.get $6 + local.set $12 + local.get $1 + local.get $9 + i32.add + i64.load offset=16 + local.set $11 + local.get $12 + local.get $11 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $6 + local.get $7 + local.set $12 + local.get $1 + local.get $9 + i32.add + i64.load offset=24 + local.set $11 + local.get $12 + local.get $11 + i64.const -4417276706812531889 + i64.mul + i64.add + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $7 + local.get $9 + i32.const 32 + i32.add + local.set $9 + br $while-continue|0 + end + end + local.get $4 + i64.const 1 + i64.rotl + local.get $5 + i64.const 7 + i64.rotl + i64.add + local.get $6 + i64.const 12 + i64.rotl + i64.add + local.get $7 + i64.const 18 + i64.rotl + i64.add + local.set $3 + local.get $4 + i64.const -4417276706812531889 + i64.mul local.set $4 + local.get $5 + i64.const -4417276706812531889 + i64.mul + local.set $5 + local.get $6 + i64.const -4417276706812531889 + i64.mul + local.set $6 + local.get $7 + i64.const -4417276706812531889 + i64.mul + local.set $7 + local.get $3 + local.set $12 local.get $4 + local.set $11 + local.get $12 + local.get $11 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $3 + local.get $3 + local.set $12 + local.get $5 + local.set $11 + local.get $12 + local.get $11 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $3 + local.get $3 + local.set $12 + local.get $6 + local.set $11 + local.get $12 + local.get $11 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $3 + local.get $3 + local.set $12 + local.get $7 + local.set $11 + local.get $12 + local.get $11 + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $3 + local.get $3 + local.get $8 + i64.extend_i32_s + i64.add + local.set $3 + local.get $2 + local.get $9 + i32.sub + local.set $2 + else + local.get $2 + i64.extend_i32_s + i64.const 0 + i64.add + i64.const 2870177450012600261 + i64.add + local.set $3 + end + i32.const 0 + local.set $9 + local.get $2 + i32.const 8 + i32.sub + local.set $2 + loop $while-continue|1 + local.get $9 + local.get $2 + i32.le_s + local.set $8 + local.get $8 if + local.get $3 local.get $1 - local.get $0 - local.get $2 + local.get $9 i32.add - i32.load8_u - i32.xor - i32.const 16777619 - i32.mul - local.set $1 - local.get $2 - i32.const 1 + i64.load + i64.const -4417276706812531889 + i64.mul + i64.const 31 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $3 + local.get $3 + i64.const 27 + i64.rotl + i64.const -7046029288634856825 + i64.mul + i64.const -8796714831421723037 + i64.add + local.set $3 + local.get $9 + i32.const 8 i32.add - local.set $2 - br $for-loop|0 + local.set $9 + br $while-continue|1 end end - end - local.get $1 - local.set $5 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $5 - ) - (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - local.get $0 - local.get $1 - i32.eq - if - i32.const 1 - local.set $3 + local.get $9 + i32.const 4 + i32.add + local.get $2 + i32.le_s + if + local.get $3 + local.get $1 + local.get $9 + i32.add + i64.load32_u + i64.const -7046029288634856825 + i64.mul + i64.xor + local.set $3 + local.get $3 + i64.const 23 + i64.rotl + i64.const -4417276706812531889 + i64.mul + i64.const 1609587929392839161 + i64.add + local.set $3 + local.get $9 + i32.const 4 + i32.add + local.set $9 + end + loop $while-continue|2 + local.get $9 + local.get $2 + i32.lt_s + local.set $8 + local.get $8 + if + local.get $3 + local.get $1 + local.get $9 + i32.add + i64.load8_u + i64.const 2870177450012600261 + i64.mul + i64.add + local.set $3 + local.get $3 + i64.const 11 + i64.rotl + i64.const -7046029288634856825 + i64.mul + local.set $3 + local.get $9 + i32.const 1 + i32.add + local.set $9 + br $while-continue|2 + end + end + local.get $3 + local.get $3 + i64.const 33 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const -4417276706812531889 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 29 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + i64.const 1609587929392839161 + i64.mul + local.set $3 + local.get $3 + local.get $3 + i64.const 32 + i64.shr_u + i64.xor + local.set $3 + local.get $3 + end + local.set $14 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $14 + return + ) + (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + local.set $3 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add @@ -4657,7 +4990,7 @@ global.set $~lib/memory/__stack_pointer local.get $3 ) - (func $~lib/map/Map<~lib/string/String,usize>#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map<~lib/string/String,usize>#find (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4674,8 +5007,9 @@ i32.load local.get $2 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add @@ -4740,9 +5074,8 @@ ) (func $~lib/map/Map<~lib/string/String,usize>#has (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) global.get $~lib/memory/__stack_pointer - i32.const 16 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check @@ -4750,52 +5083,42 @@ i64.const 0 i64.store global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 + i32.const 0 + i32.store offset=8 local.get $0 - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $2 i32.store - local.get $3 + local.get $2 local.get $1 - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $2 i32.store offset=4 - local.get $3 - block $~lib/util/hash/HASH<~lib/string/String>|inlined.0 (result i32) - global.get $~lib/memory/__stack_pointer - local.get $1 - local.tee $2 - i32.store offset=8 - i32.const 1 - drop - local.get $2 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store offset=12 - local.get $3 - call $~lib/util/hash/hashStr - br $~lib/util/hash/HASH<~lib/string/String>|inlined.0 - end + local.get $2 + local.get $1 + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $2 + call $~lib/util/hash/HASH<~lib/string/String> call $~lib/map/Map<~lib/string/String,usize>#find i32.const 0 i32.ne - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer - i32.const 16 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $2 ) (func $~lib/map/Map<~lib/string/String,usize>#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) global.get $~lib/memory/__stack_pointer - i32.const 16 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check @@ -4803,39 +5126,30 @@ i64.const 0 i64.store global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 + i32.const 0 + i32.store offset=8 local.get $0 - local.set $4 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $4 + local.get $3 i32.store - local.get $4 + local.get $3 local.get $1 - local.set $4 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $4 + local.get $3 i32.store offset=4 - local.get $4 - block $~lib/util/hash/HASH<~lib/string/String>|inlined.1 (result i32) - global.get $~lib/memory/__stack_pointer - local.get $1 - local.tee $2 - i32.store offset=8 - i32.const 1 - drop - local.get $2 - local.set $4 - global.get $~lib/memory/__stack_pointer - local.get $4 - i32.store offset=12 - local.get $4 - call $~lib/util/hash/hashStr - br $~lib/util/hash/HASH<~lib/string/String>|inlined.1 - end - call $~lib/map/Map<~lib/string/String,usize>#find + local.get $3 + local.get $1 local.set $3 + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.store offset=8 local.get $3 + call $~lib/util/hash/HASH<~lib/string/String> + call $~lib/map/Map<~lib/string/String,usize>#find + local.set $2 + local.get $2 i32.eqz if i32.const 624 @@ -4845,14 +5159,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=4 - local.set $4 + local.set $3 global.get $~lib/memory/__stack_pointer - i32.const 16 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer - local.get $4 + local.get $3 ) (func $~lib/map/Map<~lib/string/String,usize>#rehash (param $0 i32) (param $1 i32) (local $2 i32) @@ -4870,7 +5184,7 @@ (local $14 i32) (local $15 i32) global.get $~lib/memory/__stack_pointer - i32.const 20 + i32.const 16 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check @@ -4880,9 +5194,6 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store offset=16 local.get $1 i32.const 1 i32.add @@ -4910,11 +5221,11 @@ local.tee $5 i32.store offset=4 local.get $0 - i32.load offset=8 + i32.load offset=16 local.set $6 local.get $6 local.get $0 - i32.load offset=16 + i32.load offset=24 i32.const 12 i32.mul i32.add @@ -4950,24 +5261,17 @@ local.get $10 i32.load offset=4 call $~lib/map/MapEntry<~lib/string/String,usize>#set:value - block $~lib/util/hash/HASH<~lib/string/String>|inlined.3 (result i32) - global.get $~lib/memory/__stack_pointer - local.get $12 - local.tee $13 - i32.store offset=12 - i32.const 1 - drop - local.get $13 - local.set $15 - global.get $~lib/memory/__stack_pointer - local.get $15 - i32.store offset=16 - local.get $15 - call $~lib/util/hash/hashStr - br $~lib/util/hash/HASH<~lib/string/String>|inlined.3 - end + local.get $12 + local.set $15 + global.get $~lib/memory/__stack_pointer + local.get $15 + i32.store offset=12 + local.get $15 + call $~lib/util/hash/HASH<~lib/string/String> local.get $1 - i32.and + i64.extend_i32_u + i64.and + i32.wrap_i64 local.set $13 local.get $3 local.get $13 @@ -4999,6 +5303,7 @@ call $~lib/map/Map<~lib/string/String,usize>#set:buckets local.get $0 local.get $1 + i64.extend_i32_u call $~lib/map/Map<~lib/string/String,usize>#set:bucketsMask local.get $0 local.get $5 @@ -5008,15 +5313,15 @@ call $~lib/map/Map<~lib/string/String,usize>#set:entriesCapacity local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 call $~lib/map/Map<~lib/string/String,usize>#set:entriesOffset global.get $~lib/memory/__stack_pointer - i32.const 20 + i32.const 16 i32.add global.set $~lib/memory/__stack_pointer ) (func $~lib/map/Map<~lib/string/String,usize>#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) + (local $3 i64) (local $4 i32) (local $5 i32) (local $6 i32) @@ -5032,89 +5337,81 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store offset=8 - block $~lib/util/hash/HASH<~lib/string/String>|inlined.2 (result i32) - global.get $~lib/memory/__stack_pointer - local.get $1 - local.tee $3 - i32.store - i32.const 1 - drop - local.get $3 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=4 - local.get $7 - call $~lib/util/hash/hashStr - br $~lib/util/hash/HASH<~lib/string/String>|inlined.2 - end - local.set $4 + local.get $1 + local.set $7 + global.get $~lib/memory/__stack_pointer + local.get $7 + i32.store + local.get $7 + call $~lib/util/hash/HASH<~lib/string/String> + local.set $3 local.get $0 local.set $7 global.get $~lib/memory/__stack_pointer local.get $7 - i32.store offset=4 + i32.store local.get $7 local.get $1 local.set $7 global.get $~lib/memory/__stack_pointer local.get $7 - i32.store offset=8 + i32.store offset=4 local.get $7 - local.get $4 + local.get $3 call $~lib/map/Map<~lib/string/String,usize>#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry<~lib/string/String,usize>#set:value i32.const 0 drop else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 local.set $7 global.get $~lib/memory/__stack_pointer local.get $7 - i32.store offset=4 + i32.store local.get $7 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map<~lib/string/String,usize>#rehash end global.get $~lib/memory/__stack_pointer local.get $0 - i32.load offset=8 - local.tee $3 - i32.store - local.get $3 + i32.load offset=16 + local.tee $5 + i32.store offset=8 + local.get $5 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $6 i32.const 1 i32.add @@ -5123,8 +5420,8 @@ i32.const 12 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 call $~lib/map/MapEntry<~lib/string/String,usize>#set:key i32.const 1 @@ -5133,33 +5430,34 @@ local.get $1 i32.const 1 call $~lib/rt/itcms/__link - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry<~lib/string/String,usize>#set:value i32.const 0 drop local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add call $~lib/map/Map<~lib/string/String,usize>#set:entriesCount local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load call $~lib/map/MapEntry<~lib/string/String,usize>#set:taggedNext local.get $6 - local.get $5 + local.get $4 i32.store end local.get $0 @@ -5171,7 +5469,7 @@ local.get $7 ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) + (local $3 i64) (local $4 i32) (local $5 i32) (local $6 i32) @@ -5184,32 +5482,9 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $3 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.set $7 global.get $~lib/memory/__stack_pointer @@ -5217,12 +5492,12 @@ i32.store local.get $7 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 1 @@ -5233,9 +5508,9 @@ call $~lib/rt/itcms/__link else local.get $0 - i32.load offset=16 + i32.load offset=24 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.eq if local.get $0 @@ -5245,36 +5520,37 @@ i32.store local.get $7 local.get $0 - i32.load offset=20 + i32.load offset=28 local.get $0 - i32.load offset=12 + i32.load offset=20 i32.const 3 i32.mul i32.const 4 i32.div_s i32.lt_s - if (result i32) + if (result i64) local.get $0 - i32.load offset=4 + i64.load offset=8 else local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or + i64.load offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.or end + i32.wrap_i64 call $~lib/map/Map#rehash end global.get $~lib/memory/__stack_pointer local.get $0 - i32.load offset=8 - local.tee $3 + i32.load offset=16 + local.tee $5 i32.store offset=4 - local.get $3 + local.get $5 local.get $0 local.get $0 - i32.load offset=16 + i32.load offset=24 local.tee $6 i32.const 1 i32.add @@ -5283,13 +5559,13 @@ i32.const 12 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 call $~lib/map/MapEntry#set:key i32.const 0 drop - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 1 @@ -5300,26 +5576,27 @@ call $~lib/rt/itcms/__link local.get $0 local.get $0 - i32.load offset=20 + i32.load offset=28 i32.const 1 i32.add call $~lib/map/Map#set:entriesCount local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 - i32.load offset=4 - i32.and + i64.load offset=8 + i64.and + i32.wrap_i64 i32.const 4 i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load call $~lib/map/MapEntry#set:taggedNext local.get $6 - local.get $5 + local.get $4 i32.store end local.get $0 @@ -5443,7 +5720,6 @@ ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -5453,51 +5729,27 @@ i32.const 0 i32.store local.get $0 - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $2 i32.store - local.get $3 + local.get $2 local.get $1 - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $2 ) (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -5507,40 +5759,17 @@ i32.const 0 i32.store local.get $0 - local.set $4 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $4 + local.get $3 i32.store - local.get $4 + local.get $3 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 624 @@ -5550,14 +5779,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=4 - local.set $4 + local.set $3 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $4 + local.get $3 ) (func $~lib/symbol/_Symbol.keyFor (param $0 i32) (result i32) (local $1 i32) @@ -6286,7 +6515,7 @@ i32.eqz if global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 3 call $~lib/rt/itcms/__new local.tee $0 @@ -6300,9 +6529,9 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map<~lib/string/String,usize>#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/map/Map<~lib/string/String,usize>#set:bucketsMask local.get $0 i32.const 0 @@ -6342,7 +6571,7 @@ i32.eqz if global.get $~lib/memory/__stack_pointer - i32.const 24 + i32.const 32 i32.const 4 call $~lib/rt/itcms/__new local.tee $0 @@ -6356,9 +6585,9 @@ call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets local.get $0 - i32.const 4 - i32.const 1 - i32.sub + i64.const 4 + i64.const 1 + i64.sub call $~lib/map/Map#set:bucketsMask local.get $0 i32.const 0 From 2ddba95f85944e188818ac272fa414718e6c592c Mon Sep 17 00:00:00 2001 From: Max Graey Date: Sat, 6 Feb 2021 18:26:22 +0200 Subject: [PATCH 08/10] Update std/assembly/util/hash.ts Co-authored-by: Daniel Wirtz --- std/assembly/util/hash.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/std/assembly/util/hash.ts b/std/assembly/util/hash.ts index 1869d53c75..574adde9da 100644 --- a/std/assembly/util/hash.ts +++ b/std/assembly/util/hash.ts @@ -14,7 +14,7 @@ export function HASH(key: T): u64 { return unreachable(); } -// XXHash 32-bit as a starting point, see: https://cyan4973.github.io/xxHash +// XXHash 64-bit, see: https://cyan4973.github.io/xxHash // primes // @ts-ignore: decorator From cb7c91052aa3d1b4bb2654b78091ac6cc73dd145 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sat, 6 Feb 2021 22:46:29 +0200 Subject: [PATCH 09/10] fix --- std/assembly/util/hash.ts | 8 +- tests/compiler/std/hash.optimized.wat | 80 +++++----- tests/compiler/std/hash.untouched.wat | 202 ++++++++++++------------ tests/compiler/std/symbol.optimized.wat | 58 +++---- tests/compiler/std/symbol.untouched.wat | 101 ++++++------ 5 files changed, 226 insertions(+), 223 deletions(-) diff --git a/std/assembly/util/hash.ts b/std/assembly/util/hash.ts index 574adde9da..168cd7dfec 100644 --- a/std/assembly/util/hash.ts +++ b/std/assembly/util/hash.ts @@ -87,9 +87,9 @@ function hashStr(key: string): u64 { let ln = len; let i = 0; - len -= 32; + let n = len - 32; - while (i <= len) { + while (i <= n) { s1 = mix1(s1, load(changetype(key) + i )); s2 = mix1(s2, load(changetype(key) + i, 8)); s3 = mix1(s3, load(changetype(key) + i, 16)); @@ -115,9 +115,9 @@ function hashStr(key: string): u64 { } var i = 0; - len -= 8; + var n = len - 8; - while (i <= len) { + while (i <= n) { h ^= rotl(load(changetype(key) + i) * XXH64_P2, 31) * XXH64_P1; h = rotl(h, 27) * XXH64_P1 + XXH64_P4; i += 8; diff --git a/tests/compiler/std/hash.optimized.wat b/tests/compiler/std/hash.optimized.wat index 6bcd6f2476..a6f633da09 100644 --- a/tests/compiler/std/hash.optimized.wat +++ b/tests/compiler/std/hash.optimized.wat @@ -50,8 +50,8 @@ (local $4 i64) (local $5 i64) (local $6 i64) - (local $7 i64) - (local $8 i32) + (local $7 i32) + (local $8 i64) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -81,24 +81,24 @@ i32.ge_s if (result i64) i64.const 6983438078262162902 - local.set $4 + local.set $8 i64.const -4417276706812531889 - local.set $5 - i64.const 7046029288634856825 local.set $6 + i64.const 7046029288634856825 + local.set $5 local.get $2 - local.tee $3 + local.tee $1 i32.const 32 i32.sub - local.set $8 + local.set $3 loop $while-continue|0 - local.get $1 - local.get $8 - i32.le_s + local.get $3 + local.get $7 + i32.ge_s if - local.get $4 + local.get $8 local.get $0 - local.get $1 + local.get $7 i32.add local.tee $2 i64.load @@ -109,8 +109,8 @@ i64.rotl i64.const -7046029288634856825 i64.mul - local.set $4 - local.get $5 + local.set $8 + local.get $6 local.get $2 i64.load offset=8 i64.const -4417276706812531889 @@ -120,8 +120,8 @@ i64.rotl i64.const -7046029288634856825 i64.mul - local.set $5 - local.get $7 + local.set $6 + local.get $4 local.get $2 i64.load offset=16 i64.const -4417276706812531889 @@ -131,8 +131,8 @@ i64.rotl i64.const -7046029288634856825 i64.mul - local.set $7 - local.get $6 + local.set $4 + local.get $5 local.get $2 i64.load offset=24 i64.const -4417276706812531889 @@ -142,36 +142,36 @@ i64.rotl i64.const -7046029288634856825 i64.mul - local.set $6 - local.get $1 + local.set $5 + local.get $7 i32.const 32 i32.add - local.set $1 + local.set $7 br $while-continue|0 end end - local.get $8 local.get $1 + local.get $7 i32.sub local.set $2 - local.get $3 + local.get $1 i64.extend_i32_s - local.get $4 + local.get $8 i64.const 1 i64.rotl - local.get $5 + local.get $6 i64.const 7 i64.rotl i64.add - local.get $7 + local.get $4 i64.const 12 i64.rotl i64.add - local.get $6 + local.get $5 i64.const 18 i64.rotl i64.add - local.get $4 + local.get $8 i64.const -4417276706812531889 i64.mul i64.const 31 @@ -183,7 +183,7 @@ i64.mul i64.const 8796714831421723037 i64.sub - local.get $5 + local.get $6 i64.const -4417276706812531889 i64.mul i64.const 31 @@ -195,7 +195,7 @@ i64.mul i64.const 8796714831421723037 i64.sub - local.get $7 + local.get $4 i64.const -4417276706812531889 i64.mul i64.const 31 @@ -207,7 +207,7 @@ i64.mul i64.const 8796714831421723037 i64.sub - local.get $6 + local.get $5 i64.const -4417276706812531889 i64.mul i64.const 31 @@ -226,19 +226,19 @@ i64.const 2870177450012600261 i64.add end - local.set $4 + local.set $8 i32.const 0 local.set $1 local.get $2 i32.const 8 i32.sub - local.set $2 + local.set $7 loop $while-continue|1 local.get $1 - local.get $2 + local.get $7 i32.le_s if - local.get $4 + local.get $8 local.get $0 local.get $1 i32.add @@ -256,7 +256,7 @@ i64.mul i64.const 8796714831421723037 i64.sub - local.set $4 + local.set $8 local.get $1 i32.const 8 i32.add @@ -270,7 +270,7 @@ i32.add i32.ge_s if - local.get $4 + local.get $8 local.get $0 local.get $1 i32.add @@ -284,7 +284,7 @@ i64.mul i64.const 1609587929392839161 i64.add - local.set $4 + local.set $8 local.get $1 i32.const 4 i32.add @@ -295,7 +295,7 @@ local.get $2 i32.lt_s if - local.get $4 + local.get $8 local.get $0 local.get $1 i32.add @@ -307,7 +307,7 @@ i64.rotl i64.const -7046029288634856825 i64.mul - local.set $4 + local.set $8 local.get $1 i32.const 1 i32.add diff --git a/tests/compiler/std/hash.untouched.wat b/tests/compiler/std/hash.untouched.wat index 38bc76e58b..fad5218742 100644 --- a/tests/compiler/std/hash.untouched.wat +++ b/tests/compiler/std/hash.untouched.wat @@ -204,10 +204,11 @@ (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 i64) + (local $11 i32) (local $12 i64) - (local $13 i32) - (local $14 i64) + (local $13 i64) + (local $14 i32) + (local $15 i64) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -231,11 +232,11 @@ br $~lib/util/hash/hashStr|inlined.0 end local.get $1 - local.set $13 + local.set $14 global.get $~lib/memory/__stack_pointer - local.get $13 + local.get $14 i32.store offset=4 - local.get $13 + local.get $14 call $~lib/string/String#get:length i32.const 1 i32.shl @@ -269,23 +270,23 @@ local.get $2 i32.const 32 i32.sub - local.set $2 + local.set $10 loop $while-continue|0 local.get $9 - local.get $2 - i32.le_s - local.set $10 local.get $10 + i32.le_s + local.set $11 + local.get $11 if local.get $4 - local.set $12 + local.set $13 local.get $1 local.get $9 i32.add i64.load - local.set $11 + local.set $12 + local.get $13 local.get $12 - local.get $11 i64.const -4417276706812531889 i64.mul i64.add @@ -295,14 +296,14 @@ i64.mul local.set $4 local.get $5 - local.set $12 + local.set $13 local.get $1 local.get $9 i32.add i64.load offset=8 - local.set $11 + local.set $12 + local.get $13 local.get $12 - local.get $11 i64.const -4417276706812531889 i64.mul i64.add @@ -312,14 +313,14 @@ i64.mul local.set $5 local.get $6 - local.set $12 + local.set $13 local.get $1 local.get $9 i32.add i64.load offset=16 - local.set $11 + local.set $12 + local.get $13 local.get $12 - local.get $11 i64.const -4417276706812531889 i64.mul i64.add @@ -329,14 +330,14 @@ i64.mul local.set $6 local.get $7 - local.set $12 + local.set $13 local.get $1 local.get $9 i32.add i64.load offset=24 - local.set $11 + local.set $12 + local.get $13 local.get $12 - local.get $11 i64.const -4417276706812531889 i64.mul i64.add @@ -385,11 +386,11 @@ i64.mul local.set $7 local.get $3 - local.set $12 + local.set $13 local.get $4 - local.set $11 + local.set $12 + local.get $13 local.get $12 - local.get $11 i64.const 31 i64.rotl i64.const -7046029288634856825 @@ -401,11 +402,11 @@ i64.add local.set $3 local.get $3 - local.set $12 + local.set $13 local.get $5 - local.set $11 + local.set $12 + local.get $13 local.get $12 - local.get $11 i64.const 31 i64.rotl i64.const -7046029288634856825 @@ -417,11 +418,11 @@ i64.add local.set $3 local.get $3 - local.set $12 + local.set $13 local.get $6 - local.set $11 + local.set $12 + local.get $13 local.get $12 - local.get $11 i64.const 31 i64.rotl i64.const -7046029288634856825 @@ -433,11 +434,11 @@ i64.add local.set $3 local.get $3 - local.set $12 + local.set $13 local.get $7 - local.set $11 + local.set $12 + local.get $13 local.get $12 - local.get $11 i64.const 31 i64.rotl i64.const -7046029288634856825 @@ -467,21 +468,21 @@ local.set $3 end i32.const 0 - local.set $9 + local.set $10 local.get $2 i32.const 8 i32.sub - local.set $2 + local.set $9 loop $while-continue|1 + local.get $10 local.get $9 - local.get $2 i32.le_s local.set $8 local.get $8 if local.get $3 local.get $1 - local.get $9 + local.get $10 i32.add i64.load i64.const -4417276706812531889 @@ -500,14 +501,14 @@ i64.const -8796714831421723037 i64.add local.set $3 - local.get $9 + local.get $10 i32.const 8 i32.add - local.set $9 + local.set $10 br $while-continue|1 end end - local.get $9 + local.get $10 i32.const 4 i32.add local.get $2 @@ -515,7 +516,7 @@ if local.get $3 local.get $1 - local.get $9 + local.get $10 i32.add i64.load32_u i64.const -7046029288634856825 @@ -530,13 +531,13 @@ i64.const 1609587929392839161 i64.add local.set $3 - local.get $9 + local.get $10 i32.const 4 i32.add - local.set $9 + local.set $10 end loop $while-continue|2 - local.get $9 + local.get $10 local.get $2 i32.lt_s local.set $8 @@ -544,7 +545,7 @@ if local.get $3 local.get $1 - local.get $9 + local.get $10 i32.add i64.load8_u i64.const 2870177450012600261 @@ -557,10 +558,10 @@ i64.const -7046029288634856825 i64.mul local.set $3 - local.get $9 + local.get $10 i32.const 1 i32.add - local.set $9 + local.set $10 br $while-continue|2 end end @@ -592,12 +593,12 @@ local.set $3 local.get $3 end - local.set $14 + local.set $15 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $14 + local.get $15 return ) (func $~lib/util/hash/HASH<~lib/string/String> (param $0 i32) (result i64) @@ -611,10 +612,11 @@ (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 i64) + (local $11 i32) (local $12 i64) - (local $13 i32) - (local $14 i64) + (local $13 i64) + (local $14 i32) + (local $15 i64) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -638,11 +640,11 @@ br $~lib/util/hash/hashStr|inlined.1 end local.get $1 - local.set $13 + local.set $14 global.get $~lib/memory/__stack_pointer - local.get $13 + local.get $14 i32.store offset=4 - local.get $13 + local.get $14 call $~lib/string/String#get:length i32.const 1 i32.shl @@ -676,23 +678,23 @@ local.get $2 i32.const 32 i32.sub - local.set $2 + local.set $10 loop $while-continue|0 local.get $9 - local.get $2 - i32.le_s - local.set $10 local.get $10 + i32.le_s + local.set $11 + local.get $11 if local.get $4 - local.set $12 + local.set $13 local.get $1 local.get $9 i32.add i64.load - local.set $11 + local.set $12 + local.get $13 local.get $12 - local.get $11 i64.const -4417276706812531889 i64.mul i64.add @@ -702,14 +704,14 @@ i64.mul local.set $4 local.get $5 - local.set $12 + local.set $13 local.get $1 local.get $9 i32.add i64.load offset=8 - local.set $11 + local.set $12 + local.get $13 local.get $12 - local.get $11 i64.const -4417276706812531889 i64.mul i64.add @@ -719,14 +721,14 @@ i64.mul local.set $5 local.get $6 - local.set $12 + local.set $13 local.get $1 local.get $9 i32.add i64.load offset=16 - local.set $11 + local.set $12 + local.get $13 local.get $12 - local.get $11 i64.const -4417276706812531889 i64.mul i64.add @@ -736,14 +738,14 @@ i64.mul local.set $6 local.get $7 - local.set $12 + local.set $13 local.get $1 local.get $9 i32.add i64.load offset=24 - local.set $11 + local.set $12 + local.get $13 local.get $12 - local.get $11 i64.const -4417276706812531889 i64.mul i64.add @@ -792,11 +794,11 @@ i64.mul local.set $7 local.get $3 - local.set $12 + local.set $13 local.get $4 - local.set $11 + local.set $12 + local.get $13 local.get $12 - local.get $11 i64.const 31 i64.rotl i64.const -7046029288634856825 @@ -808,11 +810,11 @@ i64.add local.set $3 local.get $3 - local.set $12 + local.set $13 local.get $5 - local.set $11 + local.set $12 + local.get $13 local.get $12 - local.get $11 i64.const 31 i64.rotl i64.const -7046029288634856825 @@ -824,11 +826,11 @@ i64.add local.set $3 local.get $3 - local.set $12 + local.set $13 local.get $6 - local.set $11 + local.set $12 + local.get $13 local.get $12 - local.get $11 i64.const 31 i64.rotl i64.const -7046029288634856825 @@ -840,11 +842,11 @@ i64.add local.set $3 local.get $3 - local.set $12 + local.set $13 local.get $7 - local.set $11 + local.set $12 + local.get $13 local.get $12 - local.get $11 i64.const 31 i64.rotl i64.const -7046029288634856825 @@ -874,21 +876,21 @@ local.set $3 end i32.const 0 - local.set $9 + local.set $10 local.get $2 i32.const 8 i32.sub - local.set $2 + local.set $9 loop $while-continue|1 + local.get $10 local.get $9 - local.get $2 i32.le_s local.set $8 local.get $8 if local.get $3 local.get $1 - local.get $9 + local.get $10 i32.add i64.load i64.const -4417276706812531889 @@ -907,14 +909,14 @@ i64.const -8796714831421723037 i64.add local.set $3 - local.get $9 + local.get $10 i32.const 8 i32.add - local.set $9 + local.set $10 br $while-continue|1 end end - local.get $9 + local.get $10 i32.const 4 i32.add local.get $2 @@ -922,7 +924,7 @@ if local.get $3 local.get $1 - local.get $9 + local.get $10 i32.add i64.load32_u i64.const -7046029288634856825 @@ -937,13 +939,13 @@ i64.const 1609587929392839161 i64.add local.set $3 - local.get $9 + local.get $10 i32.const 4 i32.add - local.set $9 + local.set $10 end loop $while-continue|2 - local.get $9 + local.get $10 local.get $2 i32.lt_s local.set $8 @@ -951,7 +953,7 @@ if local.get $3 local.get $1 - local.get $9 + local.get $10 i32.add i64.load8_u i64.const 2870177450012600261 @@ -964,10 +966,10 @@ i64.const -7046029288634856825 i64.mul local.set $3 - local.get $9 + local.get $10 i32.const 1 i32.add - local.set $9 + local.set $10 br $while-continue|2 end end @@ -999,12 +1001,12 @@ local.set $3 local.get $3 end - local.set $14 + local.set $15 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $14 + local.get $15 return ) (func $start:std/hash diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index 24a749c1fd..2052a82fbf 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -2429,8 +2429,8 @@ (func $~lib/util/hash/HASH<~lib/string/String> (param $0 i32) (result i64) (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i64) + (local $3 i64) + (local $4 i32) (local $5 i64) (local $6 i64) (local $7 i64) @@ -2468,24 +2468,24 @@ i32.ge_s if (result i64) i64.const 6983438078262162902 - local.set $4 + local.set $3 i64.const -4417276706812531889 local.set $5 i64.const 7046029288634856825 local.set $6 local.get $2 - local.tee $3 + local.tee $1 i32.const 32 i32.sub local.set $8 loop $while-continue|0 - local.get $1 + local.get $4 local.get $8 i32.le_s if - local.get $4 + local.get $3 local.get $0 - local.get $1 + local.get $4 i32.add local.tee $2 i64.load @@ -2496,7 +2496,7 @@ i64.rotl i64.const -7046029288634856825 i64.mul - local.set $4 + local.set $3 local.get $5 local.get $2 i64.load offset=8 @@ -2530,20 +2530,20 @@ i64.const -7046029288634856825 i64.mul local.set $6 - local.get $1 + local.get $4 i32.const 32 i32.add - local.set $1 + local.set $4 br $while-continue|0 end end - local.get $8 local.get $1 + local.get $4 i32.sub local.set $2 - local.get $3 + local.get $1 i64.extend_i32_s - local.get $4 + local.get $3 i64.const 1 i64.rotl local.get $5 @@ -2558,7 +2558,7 @@ i64.const 18 i64.rotl i64.add - local.get $4 + local.get $3 i64.const -4417276706812531889 i64.mul i64.const 31 @@ -2613,19 +2613,19 @@ i64.const 2870177450012600261 i64.add end - local.set $4 + local.set $3 i32.const 0 local.set $1 local.get $2 i32.const 8 i32.sub - local.set $2 + local.set $4 loop $while-continue|1 local.get $1 - local.get $2 + local.get $4 i32.le_s if - local.get $4 + local.get $3 local.get $0 local.get $1 i32.add @@ -2643,7 +2643,7 @@ i64.mul i64.const 8796714831421723037 i64.sub - local.set $4 + local.set $3 local.get $1 i32.const 8 i32.add @@ -2657,7 +2657,7 @@ i32.add i32.ge_s if - local.get $4 + local.get $3 local.get $0 local.get $1 i32.add @@ -2671,7 +2671,7 @@ i64.mul i64.const 1609587929392839161 i64.add - local.set $4 + local.set $3 local.get $1 i32.const 4 i32.add @@ -2682,7 +2682,7 @@ local.get $2 i32.lt_s if - local.get $4 + local.get $3 local.get $0 local.get $1 i32.add @@ -2694,7 +2694,7 @@ i64.rotl i64.const -7046029288634856825 i64.mul - local.set $4 + local.set $3 local.get $1 i32.const 1 i32.add @@ -2702,22 +2702,22 @@ br $while-continue|2 end end - local.get $4 - local.get $4 + local.get $3 + local.get $3 i64.const 33 i64.shr_u i64.xor i64.const -4417276706812531889 i64.mul - local.tee $4 - local.get $4 + local.tee $3 + local.get $3 i64.const 29 i64.shr_u i64.xor i64.const 1609587929392839161 i64.mul - local.tee $4 - local.get $4 + local.tee $3 + local.get $3 i64.const 32 i64.shr_u i64.xor diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index 5e80258684..591ce8e98a 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -4499,10 +4499,11 @@ (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 i64) + (local $11 i32) (local $12 i64) - (local $13 i32) - (local $14 i64) + (local $13 i64) + (local $14 i32) + (local $15 i64) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -4526,11 +4527,11 @@ br $~lib/util/hash/hashStr|inlined.0 end local.get $1 - local.set $13 + local.set $14 global.get $~lib/memory/__stack_pointer - local.get $13 + local.get $14 i32.store offset=4 - local.get $13 + local.get $14 call $~lib/string/String#get:length i32.const 1 i32.shl @@ -4564,23 +4565,23 @@ local.get $2 i32.const 32 i32.sub - local.set $2 + local.set $10 loop $while-continue|0 local.get $9 - local.get $2 - i32.le_s - local.set $10 local.get $10 + i32.le_s + local.set $11 + local.get $11 if local.get $4 - local.set $12 + local.set $13 local.get $1 local.get $9 i32.add i64.load - local.set $11 + local.set $12 + local.get $13 local.get $12 - local.get $11 i64.const -4417276706812531889 i64.mul i64.add @@ -4590,14 +4591,14 @@ i64.mul local.set $4 local.get $5 - local.set $12 + local.set $13 local.get $1 local.get $9 i32.add i64.load offset=8 - local.set $11 + local.set $12 + local.get $13 local.get $12 - local.get $11 i64.const -4417276706812531889 i64.mul i64.add @@ -4607,14 +4608,14 @@ i64.mul local.set $5 local.get $6 - local.set $12 + local.set $13 local.get $1 local.get $9 i32.add i64.load offset=16 - local.set $11 + local.set $12 + local.get $13 local.get $12 - local.get $11 i64.const -4417276706812531889 i64.mul i64.add @@ -4624,14 +4625,14 @@ i64.mul local.set $6 local.get $7 - local.set $12 + local.set $13 local.get $1 local.get $9 i32.add i64.load offset=24 - local.set $11 + local.set $12 + local.get $13 local.get $12 - local.get $11 i64.const -4417276706812531889 i64.mul i64.add @@ -4680,11 +4681,11 @@ i64.mul local.set $7 local.get $3 - local.set $12 + local.set $13 local.get $4 - local.set $11 + local.set $12 + local.get $13 local.get $12 - local.get $11 i64.const 31 i64.rotl i64.const -7046029288634856825 @@ -4696,11 +4697,11 @@ i64.add local.set $3 local.get $3 - local.set $12 + local.set $13 local.get $5 - local.set $11 + local.set $12 + local.get $13 local.get $12 - local.get $11 i64.const 31 i64.rotl i64.const -7046029288634856825 @@ -4712,11 +4713,11 @@ i64.add local.set $3 local.get $3 - local.set $12 + local.set $13 local.get $6 - local.set $11 + local.set $12 + local.get $13 local.get $12 - local.get $11 i64.const 31 i64.rotl i64.const -7046029288634856825 @@ -4728,11 +4729,11 @@ i64.add local.set $3 local.get $3 - local.set $12 + local.set $13 local.get $7 - local.set $11 + local.set $12 + local.get $13 local.get $12 - local.get $11 i64.const 31 i64.rotl i64.const -7046029288634856825 @@ -4762,21 +4763,21 @@ local.set $3 end i32.const 0 - local.set $9 + local.set $10 local.get $2 i32.const 8 i32.sub - local.set $2 + local.set $9 loop $while-continue|1 + local.get $10 local.get $9 - local.get $2 i32.le_s local.set $8 local.get $8 if local.get $3 local.get $1 - local.get $9 + local.get $10 i32.add i64.load i64.const -4417276706812531889 @@ -4795,14 +4796,14 @@ i64.const -8796714831421723037 i64.add local.set $3 - local.get $9 + local.get $10 i32.const 8 i32.add - local.set $9 + local.set $10 br $while-continue|1 end end - local.get $9 + local.get $10 i32.const 4 i32.add local.get $2 @@ -4810,7 +4811,7 @@ if local.get $3 local.get $1 - local.get $9 + local.get $10 i32.add i64.load32_u i64.const -7046029288634856825 @@ -4825,13 +4826,13 @@ i64.const 1609587929392839161 i64.add local.set $3 - local.get $9 + local.get $10 i32.const 4 i32.add - local.set $9 + local.set $10 end loop $while-continue|2 - local.get $9 + local.get $10 local.get $2 i32.lt_s local.set $8 @@ -4839,7 +4840,7 @@ if local.get $3 local.get $1 - local.get $9 + local.get $10 i32.add i64.load8_u i64.const 2870177450012600261 @@ -4852,10 +4853,10 @@ i64.const -7046029288634856825 i64.mul local.set $3 - local.get $9 + local.get $10 i32.const 1 i32.add - local.set $9 + local.set $10 br $while-continue|2 end end @@ -4887,12 +4888,12 @@ local.set $3 local.get $3 end - local.set $14 + local.set $15 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $14 + local.get $15 return ) (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) From c38f10d07e21de56f77ccbcd5859659b92bc48e0 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sun, 7 Feb 2021 00:23:52 +0200 Subject: [PATCH 10/10] fix --- std/assembly/util/hash.ts | 8 +- tests/compiler/std/hash.optimized.wat | 105 ++++++----- tests/compiler/std/hash.untouched.wat | 224 +++++++++++------------- tests/compiler/std/symbol.optimized.wat | 77 ++++---- tests/compiler/std/symbol.untouched.wat | 112 ++++++------ 5 files changed, 245 insertions(+), 281 deletions(-) diff --git a/std/assembly/util/hash.ts b/std/assembly/util/hash.ts index 168cd7dfec..e9808bed99 100644 --- a/std/assembly/util/hash.ts +++ b/std/assembly/util/hash.ts @@ -76,8 +76,10 @@ function hashStr(key: string): u64 { if (key === null) { return XXH64_SEED; } + var len = key.length << 1; var h: u64 = 0; + let i = 0; if (len >= 32) { let s1 = XXH64_SEED + XXH64_P1 + XXH64_P2; @@ -86,9 +88,7 @@ function hashStr(key: string): u64 { let s4 = XXH64_SEED - XXH64_P1; let ln = len; - let i = 0; let n = len - 32; - while (i <= n) { s1 = mix1(s1, load(changetype(key) + i )); s2 = mix1(s2, load(changetype(key) + i, 8)); @@ -108,15 +108,11 @@ function hashStr(key: string): u64 { h = mix2(h, s3); h = mix2(h, s4); h += ln; - - len -= i; } else { h = len + XXH64_SEED + XXH64_P5; } - var i = 0; var n = len - 8; - while (i <= n) { h ^= rotl(load(changetype(key) + i) * XXH64_P2, 31) * XXH64_P1; h = rotl(h, 27) * XXH64_P1 + XXH64_P4; diff --git a/tests/compiler/std/hash.optimized.wat b/tests/compiler/std/hash.optimized.wat index a6f633da09..3f355dda16 100644 --- a/tests/compiler/std/hash.optimized.wat +++ b/tests/compiler/std/hash.optimized.wat @@ -45,13 +45,13 @@ ) (func $~lib/util/hash/HASH<~lib/string/String|null> (param $0 i32) (local $1 i32) - (local $2 i32) + (local $2 i64) (local $3 i32) - (local $4 i64) + (local $4 i32) (local $5 i64) (local $6 i64) - (local $7 i32) - (local $8 i64) + (local $7 i64) + (local $8 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -76,31 +76,30 @@ i32.shr_u i32.const 1 i32.shl - local.tee $2 + local.tee $3 i32.const 32 i32.ge_s if (result i64) i64.const 6983438078262162902 - local.set $8 + local.set $2 i64.const -4417276706812531889 - local.set $6 - i64.const 7046029288634856825 local.set $5 - local.get $2 - local.tee $1 + i64.const 7046029288634856825 + local.set $6 + local.get $3 i32.const 32 i32.sub - local.set $3 + local.set $8 loop $while-continue|0 - local.get $3 - local.get $7 - i32.ge_s + local.get $1 + local.get $8 + i32.le_s if - local.get $8 + local.get $2 local.get $0 - local.get $7 + local.get $1 i32.add - local.tee $2 + local.tee $4 i64.load i64.const -4417276706812531889 i64.mul @@ -109,9 +108,9 @@ i64.rotl i64.const -7046029288634856825 i64.mul - local.set $8 - local.get $6 - local.get $2 + local.set $2 + local.get $5 + local.get $4 i64.load offset=8 i64.const -4417276706812531889 i64.mul @@ -120,9 +119,9 @@ i64.rotl i64.const -7046029288634856825 i64.mul - local.set $6 + local.set $5 + local.get $7 local.get $4 - local.get $2 i64.load offset=16 i64.const -4417276706812531889 i64.mul @@ -131,9 +130,9 @@ i64.rotl i64.const -7046029288634856825 i64.mul - local.set $4 - local.get $5 - local.get $2 + local.set $7 + local.get $6 + local.get $4 i64.load offset=24 i64.const -4417276706812531889 i64.mul @@ -142,36 +141,32 @@ i64.rotl i64.const -7046029288634856825 i64.mul - local.set $5 - local.get $7 + local.set $6 + local.get $1 i32.const 32 i32.add - local.set $7 + local.set $1 br $while-continue|0 end end - local.get $1 - local.get $7 - i32.sub - local.set $2 - local.get $1 + local.get $3 i64.extend_i32_s - local.get $8 + local.get $2 i64.const 1 i64.rotl - local.get $6 + local.get $5 i64.const 7 i64.rotl i64.add - local.get $4 + local.get $7 i64.const 12 i64.rotl i64.add - local.get $5 + local.get $6 i64.const 18 i64.rotl i64.add - local.get $8 + local.get $2 i64.const -4417276706812531889 i64.mul i64.const 31 @@ -183,7 +178,7 @@ i64.mul i64.const 8796714831421723037 i64.sub - local.get $6 + local.get $5 i64.const -4417276706812531889 i64.mul i64.const 31 @@ -195,7 +190,7 @@ i64.mul i64.const 8796714831421723037 i64.sub - local.get $4 + local.get $7 i64.const -4417276706812531889 i64.mul i64.const 31 @@ -207,7 +202,7 @@ i64.mul i64.const 8796714831421723037 i64.sub - local.get $5 + local.get $6 i64.const -4417276706812531889 i64.mul i64.const 31 @@ -221,24 +216,22 @@ i64.sub i64.add else - local.get $2 + local.get $3 i64.extend_i32_s i64.const 2870177450012600261 i64.add end - local.set $8 - i32.const 0 - local.set $1 - local.get $2 + local.set $2 + local.get $3 i32.const 8 i32.sub - local.set $7 + local.set $4 loop $while-continue|1 local.get $1 - local.get $7 + local.get $4 i32.le_s if - local.get $8 + local.get $2 local.get $0 local.get $1 i32.add @@ -256,7 +249,7 @@ i64.mul i64.const 8796714831421723037 i64.sub - local.set $8 + local.set $2 local.get $1 i32.const 8 i32.add @@ -264,13 +257,13 @@ br $while-continue|1 end end - local.get $2 + local.get $3 local.get $1 i32.const 4 i32.add i32.ge_s if - local.get $8 + local.get $2 local.get $0 local.get $1 i32.add @@ -284,7 +277,7 @@ i64.mul i64.const 1609587929392839161 i64.add - local.set $8 + local.set $2 local.get $1 i32.const 4 i32.add @@ -292,10 +285,10 @@ end loop $while-continue|2 local.get $1 - local.get $2 + local.get $3 i32.lt_s if - local.get $8 + local.get $2 local.get $0 local.get $1 i32.add @@ -307,7 +300,7 @@ i64.rotl i64.const -7046029288634856825 i64.mul - local.set $8 + local.set $2 local.get $1 i32.const 1 i32.add diff --git a/tests/compiler/std/hash.untouched.wat b/tests/compiler/std/hash.untouched.wat index fad5218742..a89bc952f4 100644 --- a/tests/compiler/std/hash.untouched.wat +++ b/tests/compiler/std/hash.untouched.wat @@ -197,11 +197,11 @@ (local $1 i32) (local $2 i32) (local $3 i64) - (local $4 i64) + (local $4 i32) (local $5 i64) (local $6 i64) (local $7 i64) - (local $8 i32) + (local $8 i64) (local $9 i32) (local $10 i32) (local $11 i32) @@ -243,6 +243,8 @@ local.set $2 i64.const 0 local.set $3 + i32.const 0 + local.set $4 local.get $2 i32.const 32 i32.ge_s @@ -252,36 +254,34 @@ i64.add i64.const -4417276706812531889 i64.add - local.set $4 + local.set $5 i64.const 0 i64.const -4417276706812531889 i64.add - local.set $5 - i64.const 0 local.set $6 i64.const 0 + local.set $7 + i64.const 0 i64.const -7046029288634856825 i64.sub - local.set $7 - local.get $2 local.set $8 - i32.const 0 + local.get $2 local.set $9 local.get $2 i32.const 32 i32.sub local.set $10 loop $while-continue|0 - local.get $9 + local.get $4 local.get $10 i32.le_s local.set $11 local.get $11 if - local.get $4 + local.get $5 local.set $13 local.get $1 - local.get $9 + local.get $4 i32.add i64.load local.set $12 @@ -294,11 +294,11 @@ i64.rotl i64.const -7046029288634856825 i64.mul - local.set $4 - local.get $5 + local.set $5 + local.get $6 local.set $13 local.get $1 - local.get $9 + local.get $4 i32.add i64.load offset=8 local.set $12 @@ -311,11 +311,11 @@ i64.rotl i64.const -7046029288634856825 i64.mul - local.set $5 - local.get $6 + local.set $6 + local.get $7 local.set $13 local.get $1 - local.get $9 + local.get $4 i32.add i64.load offset=16 local.set $12 @@ -328,11 +328,11 @@ i64.rotl i64.const -7046029288634856825 i64.mul - local.set $6 - local.get $7 + local.set $7 + local.get $8 local.set $13 local.get $1 - local.get $9 + local.get $4 i32.add i64.load offset=24 local.set $12 @@ -345,34 +345,30 @@ i64.rotl i64.const -7046029288634856825 i64.mul - local.set $7 - local.get $9 + local.set $8 + local.get $4 i32.const 32 i32.add - local.set $9 + local.set $4 br $while-continue|0 end end - local.get $4 + local.get $5 i64.const 1 i64.rotl - local.get $5 + local.get $6 i64.const 7 i64.rotl i64.add - local.get $6 + local.get $7 i64.const 12 i64.rotl i64.add - local.get $7 + local.get $8 i64.const 18 i64.rotl i64.add local.set $3 - local.get $4 - i64.const -4417276706812531889 - i64.mul - local.set $4 local.get $5 i64.const -4417276706812531889 i64.mul @@ -385,9 +381,13 @@ i64.const -4417276706812531889 i64.mul local.set $7 + local.get $8 + i64.const -4417276706812531889 + i64.mul + local.set $8 local.get $3 local.set $13 - local.get $4 + local.get $5 local.set $12 local.get $13 local.get $12 @@ -403,7 +403,7 @@ local.set $3 local.get $3 local.set $13 - local.get $5 + local.get $6 local.set $12 local.get $13 local.get $12 @@ -419,7 +419,7 @@ local.set $3 local.get $3 local.set $13 - local.get $6 + local.get $7 local.set $12 local.get $13 local.get $12 @@ -435,7 +435,7 @@ local.set $3 local.get $3 local.set $13 - local.get $7 + local.get $8 local.set $12 local.get $13 local.get $12 @@ -450,14 +450,10 @@ i64.add local.set $3 local.get $3 - local.get $8 + local.get $9 i64.extend_i32_s i64.add local.set $3 - local.get $2 - local.get $9 - i32.sub - local.set $2 else local.get $2 i64.extend_i32_s @@ -467,22 +463,20 @@ i64.add local.set $3 end - i32.const 0 - local.set $10 local.get $2 i32.const 8 i32.sub - local.set $9 + local.set $10 loop $while-continue|1 + local.get $4 local.get $10 - local.get $9 i32.le_s - local.set $8 - local.get $8 + local.set $9 + local.get $9 if local.get $3 local.get $1 - local.get $10 + local.get $4 i32.add i64.load i64.const -4417276706812531889 @@ -501,14 +495,14 @@ i64.const -8796714831421723037 i64.add local.set $3 - local.get $10 + local.get $4 i32.const 8 i32.add - local.set $10 + local.set $4 br $while-continue|1 end end - local.get $10 + local.get $4 i32.const 4 i32.add local.get $2 @@ -516,7 +510,7 @@ if local.get $3 local.get $1 - local.get $10 + local.get $4 i32.add i64.load32_u i64.const -7046029288634856825 @@ -531,21 +525,21 @@ i64.const 1609587929392839161 i64.add local.set $3 - local.get $10 + local.get $4 i32.const 4 i32.add - local.set $10 + local.set $4 end loop $while-continue|2 - local.get $10 + local.get $4 local.get $2 i32.lt_s - local.set $8 - local.get $8 + local.set $9 + local.get $9 if local.get $3 local.get $1 - local.get $10 + local.get $4 i32.add i64.load8_u i64.const 2870177450012600261 @@ -558,10 +552,10 @@ i64.const -7046029288634856825 i64.mul local.set $3 - local.get $10 + local.get $4 i32.const 1 i32.add - local.set $10 + local.set $4 br $while-continue|2 end end @@ -605,11 +599,11 @@ (local $1 i32) (local $2 i32) (local $3 i64) - (local $4 i64) + (local $4 i32) (local $5 i64) (local $6 i64) (local $7 i64) - (local $8 i32) + (local $8 i64) (local $9 i32) (local $10 i32) (local $11 i32) @@ -651,6 +645,8 @@ local.set $2 i64.const 0 local.set $3 + i32.const 0 + local.set $4 local.get $2 i32.const 32 i32.ge_s @@ -660,36 +656,34 @@ i64.add i64.const -4417276706812531889 i64.add - local.set $4 + local.set $5 i64.const 0 i64.const -4417276706812531889 i64.add - local.set $5 - i64.const 0 local.set $6 i64.const 0 + local.set $7 + i64.const 0 i64.const -7046029288634856825 i64.sub - local.set $7 - local.get $2 local.set $8 - i32.const 0 + local.get $2 local.set $9 local.get $2 i32.const 32 i32.sub local.set $10 loop $while-continue|0 - local.get $9 + local.get $4 local.get $10 i32.le_s local.set $11 local.get $11 if - local.get $4 + local.get $5 local.set $13 local.get $1 - local.get $9 + local.get $4 i32.add i64.load local.set $12 @@ -702,11 +696,11 @@ i64.rotl i64.const -7046029288634856825 i64.mul - local.set $4 - local.get $5 + local.set $5 + local.get $6 local.set $13 local.get $1 - local.get $9 + local.get $4 i32.add i64.load offset=8 local.set $12 @@ -719,11 +713,11 @@ i64.rotl i64.const -7046029288634856825 i64.mul - local.set $5 - local.get $6 + local.set $6 + local.get $7 local.set $13 local.get $1 - local.get $9 + local.get $4 i32.add i64.load offset=16 local.set $12 @@ -736,11 +730,11 @@ i64.rotl i64.const -7046029288634856825 i64.mul - local.set $6 - local.get $7 + local.set $7 + local.get $8 local.set $13 local.get $1 - local.get $9 + local.get $4 i32.add i64.load offset=24 local.set $12 @@ -753,34 +747,30 @@ i64.rotl i64.const -7046029288634856825 i64.mul - local.set $7 - local.get $9 + local.set $8 + local.get $4 i32.const 32 i32.add - local.set $9 + local.set $4 br $while-continue|0 end end - local.get $4 + local.get $5 i64.const 1 i64.rotl - local.get $5 + local.get $6 i64.const 7 i64.rotl i64.add - local.get $6 + local.get $7 i64.const 12 i64.rotl i64.add - local.get $7 + local.get $8 i64.const 18 i64.rotl i64.add local.set $3 - local.get $4 - i64.const -4417276706812531889 - i64.mul - local.set $4 local.get $5 i64.const -4417276706812531889 i64.mul @@ -793,9 +783,13 @@ i64.const -4417276706812531889 i64.mul local.set $7 + local.get $8 + i64.const -4417276706812531889 + i64.mul + local.set $8 local.get $3 local.set $13 - local.get $4 + local.get $5 local.set $12 local.get $13 local.get $12 @@ -811,7 +805,7 @@ local.set $3 local.get $3 local.set $13 - local.get $5 + local.get $6 local.set $12 local.get $13 local.get $12 @@ -827,7 +821,7 @@ local.set $3 local.get $3 local.set $13 - local.get $6 + local.get $7 local.set $12 local.get $13 local.get $12 @@ -843,7 +837,7 @@ local.set $3 local.get $3 local.set $13 - local.get $7 + local.get $8 local.set $12 local.get $13 local.get $12 @@ -858,14 +852,10 @@ i64.add local.set $3 local.get $3 - local.get $8 + local.get $9 i64.extend_i32_s i64.add local.set $3 - local.get $2 - local.get $9 - i32.sub - local.set $2 else local.get $2 i64.extend_i32_s @@ -875,22 +865,20 @@ i64.add local.set $3 end - i32.const 0 - local.set $10 local.get $2 i32.const 8 i32.sub - local.set $9 + local.set $10 loop $while-continue|1 + local.get $4 local.get $10 - local.get $9 i32.le_s - local.set $8 - local.get $8 + local.set $9 + local.get $9 if local.get $3 local.get $1 - local.get $10 + local.get $4 i32.add i64.load i64.const -4417276706812531889 @@ -909,14 +897,14 @@ i64.const -8796714831421723037 i64.add local.set $3 - local.get $10 + local.get $4 i32.const 8 i32.add - local.set $10 + local.set $4 br $while-continue|1 end end - local.get $10 + local.get $4 i32.const 4 i32.add local.get $2 @@ -924,7 +912,7 @@ if local.get $3 local.get $1 - local.get $10 + local.get $4 i32.add i64.load32_u i64.const -7046029288634856825 @@ -939,21 +927,21 @@ i64.const 1609587929392839161 i64.add local.set $3 - local.get $10 + local.get $4 i32.const 4 i32.add - local.set $10 + local.set $4 end loop $while-continue|2 - local.get $10 + local.get $4 local.get $2 i32.lt_s - local.set $8 - local.get $8 + local.set $9 + local.get $9 if local.get $3 local.get $1 - local.get $10 + local.get $4 i32.add i64.load8_u i64.const 2870177450012600261 @@ -966,10 +954,10 @@ i64.const -7046029288634856825 i64.mul local.set $3 - local.get $10 + local.get $4 i32.const 1 i32.add - local.set $10 + local.set $4 br $while-continue|2 end end diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index 2052a82fbf..54e741cfab 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -2428,8 +2428,8 @@ ) (func $~lib/util/hash/HASH<~lib/string/String> (param $0 i32) (result i64) (local $1 i32) - (local $2 i32) - (local $3 i64) + (local $2 i64) + (local $3 i32) (local $4 i32) (local $5 i64) (local $6 i64) @@ -2463,31 +2463,30 @@ i32.shr_u i32.const 1 i32.shl - local.tee $2 + local.tee $3 i32.const 32 i32.ge_s if (result i64) i64.const 6983438078262162902 - local.set $3 + local.set $2 i64.const -4417276706812531889 local.set $5 i64.const 7046029288634856825 local.set $6 - local.get $2 - local.tee $1 + local.get $3 i32.const 32 i32.sub local.set $8 loop $while-continue|0 - local.get $4 + local.get $1 local.get $8 i32.le_s if - local.get $3 + local.get $2 local.get $0 - local.get $4 + local.get $1 i32.add - local.tee $2 + local.tee $4 i64.load i64.const -4417276706812531889 i64.mul @@ -2496,9 +2495,9 @@ i64.rotl i64.const -7046029288634856825 i64.mul - local.set $3 + local.set $2 local.get $5 - local.get $2 + local.get $4 i64.load offset=8 i64.const -4417276706812531889 i64.mul @@ -2509,7 +2508,7 @@ i64.mul local.set $5 local.get $7 - local.get $2 + local.get $4 i64.load offset=16 i64.const -4417276706812531889 i64.mul @@ -2520,7 +2519,7 @@ i64.mul local.set $7 local.get $6 - local.get $2 + local.get $4 i64.load offset=24 i64.const -4417276706812531889 i64.mul @@ -2530,20 +2529,16 @@ i64.const -7046029288634856825 i64.mul local.set $6 - local.get $4 + local.get $1 i32.const 32 i32.add - local.set $4 + local.set $1 br $while-continue|0 end end - local.get $1 - local.get $4 - i32.sub - local.set $2 - local.get $1 - i64.extend_i32_s local.get $3 + i64.extend_i32_s + local.get $2 i64.const 1 i64.rotl local.get $5 @@ -2558,7 +2553,7 @@ i64.const 18 i64.rotl i64.add - local.get $3 + local.get $2 i64.const -4417276706812531889 i64.mul i64.const 31 @@ -2608,15 +2603,13 @@ i64.sub i64.add else - local.get $2 + local.get $3 i64.extend_i32_s i64.const 2870177450012600261 i64.add end - local.set $3 - i32.const 0 - local.set $1 - local.get $2 + local.set $2 + local.get $3 i32.const 8 i32.sub local.set $4 @@ -2625,7 +2618,7 @@ local.get $4 i32.le_s if - local.get $3 + local.get $2 local.get $0 local.get $1 i32.add @@ -2643,7 +2636,7 @@ i64.mul i64.const 8796714831421723037 i64.sub - local.set $3 + local.set $2 local.get $1 i32.const 8 i32.add @@ -2651,13 +2644,13 @@ br $while-continue|1 end end - local.get $2 + local.get $3 local.get $1 i32.const 4 i32.add i32.ge_s if - local.get $3 + local.get $2 local.get $0 local.get $1 i32.add @@ -2671,7 +2664,7 @@ i64.mul i64.const 1609587929392839161 i64.add - local.set $3 + local.set $2 local.get $1 i32.const 4 i32.add @@ -2679,10 +2672,10 @@ end loop $while-continue|2 local.get $1 - local.get $2 + local.get $3 i32.lt_s if - local.get $3 + local.get $2 local.get $0 local.get $1 i32.add @@ -2694,7 +2687,7 @@ i64.rotl i64.const -7046029288634856825 i64.mul - local.set $3 + local.set $2 local.get $1 i32.const 1 i32.add @@ -2702,22 +2695,22 @@ br $while-continue|2 end end - local.get $3 - local.get $3 + local.get $2 + local.get $2 i64.const 33 i64.shr_u i64.xor i64.const -4417276706812531889 i64.mul - local.tee $3 - local.get $3 + local.tee $2 + local.get $2 i64.const 29 i64.shr_u i64.xor i64.const 1609587929392839161 i64.mul - local.tee $3 - local.get $3 + local.tee $2 + local.get $2 i64.const 32 i64.shr_u i64.xor diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index 591ce8e98a..c0cafd691c 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -4492,11 +4492,11 @@ (local $1 i32) (local $2 i32) (local $3 i64) - (local $4 i64) + (local $4 i32) (local $5 i64) (local $6 i64) (local $7 i64) - (local $8 i32) + (local $8 i64) (local $9 i32) (local $10 i32) (local $11 i32) @@ -4538,6 +4538,8 @@ local.set $2 i64.const 0 local.set $3 + i32.const 0 + local.set $4 local.get $2 i32.const 32 i32.ge_s @@ -4547,36 +4549,34 @@ i64.add i64.const -4417276706812531889 i64.add - local.set $4 + local.set $5 i64.const 0 i64.const -4417276706812531889 i64.add - local.set $5 - i64.const 0 local.set $6 i64.const 0 + local.set $7 + i64.const 0 i64.const -7046029288634856825 i64.sub - local.set $7 - local.get $2 local.set $8 - i32.const 0 + local.get $2 local.set $9 local.get $2 i32.const 32 i32.sub local.set $10 loop $while-continue|0 - local.get $9 + local.get $4 local.get $10 i32.le_s local.set $11 local.get $11 if - local.get $4 + local.get $5 local.set $13 local.get $1 - local.get $9 + local.get $4 i32.add i64.load local.set $12 @@ -4589,11 +4589,11 @@ i64.rotl i64.const -7046029288634856825 i64.mul - local.set $4 - local.get $5 + local.set $5 + local.get $6 local.set $13 local.get $1 - local.get $9 + local.get $4 i32.add i64.load offset=8 local.set $12 @@ -4606,11 +4606,11 @@ i64.rotl i64.const -7046029288634856825 i64.mul - local.set $5 - local.get $6 + local.set $6 + local.get $7 local.set $13 local.get $1 - local.get $9 + local.get $4 i32.add i64.load offset=16 local.set $12 @@ -4623,11 +4623,11 @@ i64.rotl i64.const -7046029288634856825 i64.mul - local.set $6 - local.get $7 + local.set $7 + local.get $8 local.set $13 local.get $1 - local.get $9 + local.get $4 i32.add i64.load offset=24 local.set $12 @@ -4640,34 +4640,30 @@ i64.rotl i64.const -7046029288634856825 i64.mul - local.set $7 - local.get $9 + local.set $8 + local.get $4 i32.const 32 i32.add - local.set $9 + local.set $4 br $while-continue|0 end end - local.get $4 + local.get $5 i64.const 1 i64.rotl - local.get $5 + local.get $6 i64.const 7 i64.rotl i64.add - local.get $6 + local.get $7 i64.const 12 i64.rotl i64.add - local.get $7 + local.get $8 i64.const 18 i64.rotl i64.add local.set $3 - local.get $4 - i64.const -4417276706812531889 - i64.mul - local.set $4 local.get $5 i64.const -4417276706812531889 i64.mul @@ -4680,9 +4676,13 @@ i64.const -4417276706812531889 i64.mul local.set $7 + local.get $8 + i64.const -4417276706812531889 + i64.mul + local.set $8 local.get $3 local.set $13 - local.get $4 + local.get $5 local.set $12 local.get $13 local.get $12 @@ -4698,7 +4698,7 @@ local.set $3 local.get $3 local.set $13 - local.get $5 + local.get $6 local.set $12 local.get $13 local.get $12 @@ -4714,7 +4714,7 @@ local.set $3 local.get $3 local.set $13 - local.get $6 + local.get $7 local.set $12 local.get $13 local.get $12 @@ -4730,7 +4730,7 @@ local.set $3 local.get $3 local.set $13 - local.get $7 + local.get $8 local.set $12 local.get $13 local.get $12 @@ -4745,14 +4745,10 @@ i64.add local.set $3 local.get $3 - local.get $8 + local.get $9 i64.extend_i32_s i64.add local.set $3 - local.get $2 - local.get $9 - i32.sub - local.set $2 else local.get $2 i64.extend_i32_s @@ -4762,22 +4758,20 @@ i64.add local.set $3 end - i32.const 0 - local.set $10 local.get $2 i32.const 8 i32.sub - local.set $9 + local.set $10 loop $while-continue|1 + local.get $4 local.get $10 - local.get $9 i32.le_s - local.set $8 - local.get $8 + local.set $9 + local.get $9 if local.get $3 local.get $1 - local.get $10 + local.get $4 i32.add i64.load i64.const -4417276706812531889 @@ -4796,14 +4790,14 @@ i64.const -8796714831421723037 i64.add local.set $3 - local.get $10 + local.get $4 i32.const 8 i32.add - local.set $10 + local.set $4 br $while-continue|1 end end - local.get $10 + local.get $4 i32.const 4 i32.add local.get $2 @@ -4811,7 +4805,7 @@ if local.get $3 local.get $1 - local.get $10 + local.get $4 i32.add i64.load32_u i64.const -7046029288634856825 @@ -4826,21 +4820,21 @@ i64.const 1609587929392839161 i64.add local.set $3 - local.get $10 + local.get $4 i32.const 4 i32.add - local.set $10 + local.set $4 end loop $while-continue|2 - local.get $10 + local.get $4 local.get $2 i32.lt_s - local.set $8 - local.get $8 + local.set $9 + local.get $9 if local.get $3 local.get $1 - local.get $10 + local.get $4 i32.add i64.load8_u i64.const 2870177450012600261 @@ -4853,10 +4847,10 @@ i64.const -7046029288634856825 i64.mul local.set $3 - local.get $10 + local.get $4 i32.const 1 i32.add - local.set $10 + local.set $4 br $while-continue|2 end end