Fix ArrayBuffer length conversion to use ConstructorToIndex#316
Conversation
- Replace custom numeric validation with shared constructor index conversion - Align ArrayBuffer length handling with other constructors
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughRefactored ArrayBuffer constructor's Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
Benchmark Results364 benchmarks Interpreted: 🟢 80 improved · 🔴 142 regressed · 142 unchanged · avg +0.3% arraybuffer.js — Interp: 🟢 3, 🔴 5, 6 unch. · avg -0.2% · Bytecode: 🟢 8, 🔴 1, 5 unch. · avg +4.1%
arrays.js — Interp: 🔴 13, 6 unch. · avg -4.4% · Bytecode: 🟢 17, 2 unch. · avg +8.9%
async-await.js — Interp: 🔴 1, 5 unch. · avg -1.0% · Bytecode: 🟢 5, 1 unch. · avg +5.2%
base64.js — Interp: 🔴 8, 2 unch. · avg -3.3% · Bytecode: 🟢 10 · avg +9.1%
classes.js — Interp: 🟢 8, 🔴 3, 20 unch. · avg +1.1% · Bytecode: 🟢 9, 🔴 3, 19 unch. · avg +0.9%
closures.js — Interp: 🔴 9, 2 unch. · avg -3.5% · Bytecode: 🟢 11 · avg +11.7%
collections.js — Interp: 🟢 4, 🔴 3, 5 unch. · avg +0.9% · Bytecode: 🟢 11, 1 unch. · avg +14.8%
destructuring.js — Interp: 🔴 12, 10 unch. · avg -3.0% · Bytecode: 🟢 16, 6 unch. · avg +3.8%
fibonacci.js — Interp: 🔴 6, 2 unch. · avg -4.1% · Bytecode: 🟢 8 · avg +15.3%
float16array.js — Interp: 🟢 6, 🔴 7, 19 unch. · avg +3.1% · Bytecode: 🟢 26, 🔴 4, 2 unch. · avg +6.3%
for-of.js — Interp: 🟢 2, 🔴 1, 4 unch. · avg +0.1% · Bytecode: 🟢 7 · avg +12.9%
helpers/bench-module.js — Interp: 0 · Bytecode: 0
iterators.js — Interp: 🔴 34, 8 unch. · avg -5.3% · Bytecode: 🟢 30, 12 unch. · avg +5.3%
json.js — Interp: 🟢 5, 🔴 4, 11 unch. · avg -0.3% · Bytecode: 🟢 17, 3 unch. · avg +6.4%
jsx.jsx — Interp: 🟢 4, 🔴 2, 15 unch. · avg +0.5% · Bytecode: 🟢 4, 🔴 2, 15 unch. · avg +1.0%
modules.js — Interp: 🔴 7, 2 unch. · avg -7.4% · Bytecode: 🟢 7, 2 unch. · avg +12.2%
numbers.js — Interp: 🔴 9, 2 unch. · avg -6.1% · Bytecode: 🟢 8, 3 unch. · avg +7.1%
objects.js — Interp: 🟢 4, 🔴 1, 2 unch. · avg +5.4% · Bytecode: 🟢 2, 5 unch. · avg +4.0%
promises.js — Interp: 🟢 6, 6 unch. · avg +3.0% · Bytecode: 🟢 3, 🔴 1, 8 unch. · avg +0.8%
regexp.js — Interp: 🟢 5, 🔴 1, 5 unch. · avg +0.7% · Bytecode: 🟢 7, 4 unch. · avg +3.8%
strings.js — Interp: 🟢 5, 🔴 8, 6 unch. · avg +16.8% · Bytecode: 🟢 10, 🔴 7, 2 unch. · avg -3.2%
typed-arrays.js — Interp: 🟢 19, 🔴 2, 1 unch. · avg +7.6% · Bytecode: 🟢 13, 🔴 7, 2 unch. · avg +3.3%
uint8array-encoding.js — Interp: 🟢 9, 🔴 6, 3 unch. · avg +1.0% · Bytecode: 🟢 3, 🔴 6, 9 unch. · avg -5.5%
Measured on ubuntu-latest x64. Benchmark ranges compare cached main-branch min/max ops/sec with the PR run; overlapping ranges are treated as unchanged noise. Percentage deltas are secondary context. |
Suite Timing
Measured on ubuntu-latest x64. |
Summary
ToNumberLiteralvalidation inArrayBufferConstructorFnwithConstructorToIndex.ArrayBuffer(length[, options])length handling with the shared constructor index conversion path.Fixes #311