Skip to content

Commit

Permalink
builtins/object: revert compare symbols as i32
Browse files Browse the repository at this point in the history
fixes (unrelated?) test262 regressions

test262: 55.44% | 🧪 50257 | 🤠 27862 | ❌ 7132 | 💀 14044 | 🏗️ 32 | 💥 177 | ⏰ 11 | 📝 999
  • Loading branch information
CanadaHonk committed Dec 30, 2024
1 parent d723e9e commit 5747f0c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions compiler/builtins/_internal_object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,12 @@ export const __Porffor_object_lookup = (obj: any, target: any): i32 => {
const endPtr: i32 = ptr + size * 14;

if (targetType == Porffor.TYPES.symbol) {
const targetSym: /* symbol */ i32 = target;
const targetSym: symbol = target;
for (; ptr < endPtr; ptr += 14) {
const keyRaw: i32 = Porffor.wasm.i32.load(ptr, 0, 0);
if (keyRaw == 0) break; // ran out of keys
if (keyRaw >>> 30 == 3) { // MSB 1 and 2 set, symbol
const keySym: /* symbol */ i32 = keyRaw & 0x3FFFFFFF; // unset MSB
const keySym: symbol = keyRaw & 0x3FFFFFFF; // unset MSB
if (keySym == targetSym) return ptr;
}
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/builtins_precompiled.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "porffor",
"description": "a basic experimental wip aot optimizing js -> wasm engine/compiler/runtime in js",
"version": "0.55.11",
"version": "0.55.12",
"author": "CanadaHonk",
"license": "MIT",
"scripts": {},
Expand Down
2 changes: 1 addition & 1 deletion runner/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env node
import fs from 'node:fs';
globalThis.version = '0.55.11';
globalThis.version = '0.55.12';

// deno compat
if (typeof process === 'undefined' && typeof Deno !== 'undefined') {
Expand Down
2 changes: 1 addition & 1 deletion test262/history.json

Large diffs are not rendered by default.

0 comments on commit 5747f0c

Please sign in to comment.