Implement Intl formatToParts decomposition#690
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
📝 WalkthroughWalkthroughThis PR extends ChangesIntl formatToParts for List and Relative Time
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related issues
Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
Benchmark Results407 benchmarks Interpreted: 🟢 359 improved · 🔴 17 regressed · 31 unchanged · avg +13.2% arraybuffer.js — Interp: 🟢 12, 2 unch. · avg +14.3% · Bytecode: 🟢 7, 🔴 1, 6 unch. · avg +4.0%
arrays.js — Interp: 🟢 13, 6 unch. · avg +12.2% · Bytecode: 🟢 2, 🔴 3, 14 unch. · avg -1.1%
async-await.js — Interp: 🟢 5, 1 unch. · avg +14.0% · Bytecode: 🟢 1, 5 unch. · avg +1.0%
async-generators.js — Interp: 🟢 1, 1 unch. · avg +15.6% · Bytecode: 2 unch. · avg -0.5%
base64.js — Interp: 🟢 2, 🔴 5, 3 unch. · avg +2.3% · Bytecode: 🔴 2, 8 unch. · avg -0.9%
classes.js — Interp: 🟢 31 · avg +12.1% · Bytecode: 🟢 2, 🔴 3, 26 unch. · avg -0.5%
closures.js — Interp: 🟢 10, 1 unch. · avg +12.3% · Bytecode: 🟢 5, 6 unch. · avg +2.8%
collections.js — Interp: 🟢 12 · avg +13.4% · Bytecode: 12 unch. · avg +0.2%
csv.js — Interp: 🟢 13 · avg +12.2% · Bytecode: 🟢 2, 11 unch. · avg +0.9%
destructuring.js — Interp: 🟢 21, 1 unch. · avg +12.6% · Bytecode: 🟢 1, 21 unch. · avg -0.0%
fibonacci.js — Interp: 🟢 8 · avg +14.1% · Bytecode: 🟢 2, 6 unch. · avg +2.6%
float16array.js — Interp: 🟢 29, 3 unch. · avg +10.0% · Bytecode: 🟢 7, 25 unch. · avg +1.4%
for-of.js — Interp: 🟢 7 · avg +9.6% · Bytecode: 🟢 1, 6 unch. · avg +2.6%
generators.js — Interp: 🟢 4 · avg +13.7% · Bytecode: 4 unch. · avg +1.1%
iterators.js — Interp: 🟢 41, 1 unch. · avg +13.9% · Bytecode: 🟢 2, 🔴 23, 17 unch. · avg -3.5%
json.js — Interp: 🟢 19, 1 unch. · avg +11.4% · Bytecode: 🟢 8, 12 unch. · avg +3.5%
jsx.jsx — Interp: 🟢 21 · avg +13.7% · Bytecode: 🟢 2, 19 unch. · avg +0.1%
modules.js — Interp: 🟢 9 · avg +12.3% · Bytecode: 🟢 4, 5 unch. · avg +2.8%
numbers.js — Interp: 🟢 11 · avg +13.4% · Bytecode: 🟢 1, 10 unch. · avg +0.6%
objects.js — Interp: 🟢 7 · avg +14.2% · Bytecode: 7 unch. · avg +0.4%
promises.js — Interp: 🟢 11, 1 unch. · avg +9.6% · Bytecode: 🟢 2, 10 unch. · avg +1.2%
regexp.js — Interp: 🟢 3, 🔴 7, 1 unch. · avg -1.0% · Bytecode: 🟢 1, 10 unch. · avg -0.0%
strings.js — Interp: 🟢 19 · avg +17.7% · Bytecode: 🟢 6, 🔴 5, 8 unch. · avg +0.8%
tsv.js — Interp: 🟢 8, 1 unch. · avg +11.0% · Bytecode: 🟢 4, 5 unch. · avg +1.9%
typed-arrays.js — Interp: 🟢 17, 🔴 4, 1 unch. · avg +14.0% · Bytecode: 🟢 6, 🔴 2, 14 unch. · avg +3.1%
uint8array-encoding.js — Interp: 🟢 13, 5 unch. · avg +4.5% · Bytecode: 🟢 7, 🔴 3, 8 unch. · avg +22.7%
weak-collections.js — Interp: 🟢 12, 🔴 1, 2 unch. · avg +50.0% · Bytecode: 🔴 12, 3 unch. · avg -23.6%
Deterministic profile diffDeterministic profile diff: no significant changes. 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 TimingTest Runner (interpreted: 9,841 passed; bytecode: 9,841 passed)
MemoryGC rows aggregate the main thread plus all worker thread-local GCs. Test runner worker shutdown frees thread-local heaps in bulk; that shutdown reclamation is not counted as GC collections or collected objects.
Benchmarks (interpreted: 407; bytecode: 407)
MemoryGC rows aggregate the main thread plus all worker thread-local GCs. Benchmark runner performs explicit between-file collections, so collection and collected-object counts can be much higher than the test runner.
Measured on ubuntu-latest x64. |
test262 Conformance
Areas closest to 100%
Per-test deltas (+3 / -0)Newly passing (3):
Steady-state failures are non-blocking; regressions vs the cached main baseline (lower total pass count, or any PASS → non-PASS transition) fail the conformance gate. Measured on ubuntu-latest x64, bytecode mode. Areas grouped by the first two test262 path components; minimum 25 attempted tests, areas already at 100% excluded. Δ vs main compares against the most recent cached |
9b63d46 to
6a31094
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@source/units/Goccia.Values.IntlListFormat.pas`:
- Around line 178-207: AppendListPart currently returns early when AValue = ''
which causes FormatListElementPart to omit element parts for empty-string list
items; modify AppendListPart (or alternatively modify FormatListElementPart) so
that element parts are always emitted: remove or guard the early Exit in
AppendListPart so that when AType = 'element' it still appends a part with Value
= '' (i.e., only skip appending for empty AValue when AType is not 'element'),
keeping the rest of the field assignments (PartType, Value, Source,
UnitIdentifier) intact.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 39886939-d162-4a9e-b949-6d219806daee
📒 Files selected for processing (8)
source/shared/IntlICU.passource/shared/IntlTypes.passource/units/Goccia.Constants.PropertyNames.passource/units/Goccia.Intl.Helpers.passource/units/Goccia.Values.IntlListFormat.passource/units/Goccia.Values.IntlRelativeTimeFormat.pastests/built-ins/Intl/ListFormat/prototype/formatToParts.jstests/built-ins/Intl/RelativeTimeFormat/prototype/formatToParts.js
Summary
formatToPartspaths forIntl.ListFormatandIntl.RelativeTimeFormat.Testing
Commands run:
./build.pas clean testrunner && ./build.pas testrunner./build.pas loader./build.pas testrunner && ./build/GocciaTestRunner tests/built-ins/Intl/ListFormat/prototype/formatToParts.js tests/built-ins/Intl/RelativeTimeFormat/prototype/formatToParts.js tests/built-ins/Intl/NumberFormat/prototype/formatToParts.js tests/built-ins/Intl/DateTimeFormat/prototype/formatToParts.js./format.pas --check./fixtures/ffi/build.sh && ./build.pas testrunner && ./build/GocciaTestRunner tests