Simplify hasOwnProperty shim binding#347
Conversation
- Replace helper class with inline object method binding - Preserve the non-enumerable prototype shim behavior
|
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)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
- Define the shim method directly on the prototype - Return the installed prototype method instead of a detached function
Suite Timing
Measured on ubuntu-latest x64. |
Benchmark Results386 benchmarks Interpreted: 🟢 172 improved · 🔴 44 regressed · 170 unchanged · avg +3.9% arraybuffer.js — Interp: 🟢 6, 🔴 2, 6 unch. · avg +2.2% · Bytecode: 🔴 13, 1 unch. · avg -23.3%
arrays.js — Interp: 🟢 5, 🔴 2, 12 unch. · avg +1.2% · Bytecode: 🔴 19 · avg -22.8%
async-await.js — Interp: 🟢 5, 1 unch. · avg +8.1% · Bytecode: 🔴 5, 1 unch. · avg -20.8%
base64.js — Interp: 🟢 3, 🔴 1, 6 unch. · avg +1.8% · Bytecode: 🔴 9, 1 unch. · avg -21.9%
classes.js — Interp: 🟢 23, 8 unch. · avg +3.7% · Bytecode: 🔴 31 · avg -18.2%
closures.js — Interp: 🟢 6, 5 unch. · avg +2.7% · Bytecode: 🔴 11 · avg -20.9%
collections.js — Interp: 🟢 10, 2 unch. · avg +6.7% · Bytecode: 🔴 12 · avg -23.5%
csv.js — Interp: 🟢 1, 🔴 3, 9 unch. · avg -1.2% · Bytecode: 🔴 13 · avg -20.7%
destructuring.js — Interp: 🟢 6, 16 unch. · avg +2.0% · Bytecode: 🔴 22 · avg -20.8%
fibonacci.js — Interp: 🟢 5, 3 unch. · avg +2.9% · Bytecode: 🔴 8 · avg -22.3%
float16array.js — Interp: 🟢 5, 🔴 7, 20 unch. · avg +0.3% · Bytecode: 🔴 32 · avg -23.0%
for-of.js — Interp: 🟢 1, 🔴 2, 4 unch. · avg -0.3% · Bytecode: 🔴 7 · avg -20.7%
helpers/bench-module.js — Interp: 0 · Bytecode: 0
iterators.js — Interp: 🟢 17, 🔴 2, 23 unch. · avg +1.9% · Bytecode: 🔴 42 · avg -19.4%
json.js — Interp: 🟢 19, 1 unch. · avg +6.8% · Bytecode: 🔴 20 · avg -18.9%
jsx.jsx — Interp: 🟢 1, 🔴 8, 12 unch. · avg -1.3% · Bytecode: 🔴 21 · avg -20.4%
modules.js — Interp: 🟢 2, 7 unch. · avg +1.8% · Bytecode: 🔴 9 · avg -23.9%
numbers.js — Interp: 🟢 6, 5 unch. · avg +2.9% · Bytecode: 🔴 11 · avg -23.0%
objects.js — Interp: 🟢 1, 🔴 5, 1 unch. · avg -4.2% · Bytecode: 🔴 7 · avg -18.7%
promises.js — Interp: 🟢 1, 🔴 2, 9 unch. · avg -0.3% · Bytecode: 🔴 12 · avg -19.3%
regexp.js — Interp: 🟢 8, 🔴 1, 2 unch. · avg +2.1% · Bytecode: 🔴 11 · avg -19.8%
strings.js — Interp: 🟢 10, 🔴 2, 7 unch. · avg +17.6% · Bytecode: 🔴 17, 2 unch. · avg -23.6%
tsv.js — Interp: 🟢 1, 🔴 3, 5 unch. · avg -1.1% · Bytecode: 🔴 9 · avg -17.7%
typed-arrays.js — Interp: 🟢 22 · avg +9.6% · Bytecode: 🔴 22 · avg -20.1%
uint8array-encoding.js — Interp: 🟢 8, 🔴 4, 6 unch. · avg +18.5% · Bytecode: 🟢 1, 🔴 16, 1 unch. · avg -20.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. |
Summary
hasOwnPropertyshim by replacing the temporary class with an inline object literal binding.Goccia.Shims.pas.