Skip to content

Commit

Permalink
builtins/array: compliant Array.from object length
Browse files Browse the repository at this point in the history
test262: 55.41% (+0.30) | 🧪 50257 | 🤠 27848 (+149) | ❌ 7133 (-65) | 💀 14011 | 🏗️ 32 | 💥 177 | ⏰ 57 (-84) | 📝 999
  • Loading branch information
CanadaHonk committed Dec 23, 2024
1 parent bb37a23 commit 2d49500
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion compiler/builtins/array.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export const __Array_from = (arg: any, mapFn: any): any[] => {
const obj: object = arg;

const lengthKey: bytestring = 'length';
len = obj[lengthKey];
len = ecma262.ToIntegerOrInfinity(obj[lengthKey]);

for (let i: i32 = 0; i < len; i++) {
out[i] = obj[i];
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.9",
"version": "0.55.10",
"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.9';
globalThis.version = '0.55.10';

// 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 2d49500

Please sign in to comment.