Skip to content

refactor(r8): Replace no-line resolution with base entry grouping#85

Merged
romtsn merged 7 commits intorz/feat/r8-tests-line-number-handlingfrom
rz/fix/r8-tests-no-line-resolution
Feb 16, 2026
Merged

refactor(r8): Replace no-line resolution with base entry grouping#85
romtsn merged 7 commits intorz/feat/r8-tests-line-number-handlingfrom
rz/fix/r8-tests-no-line-resolution

Conversation

@romtsn
Copy link
Copy Markdown
Member

@romtsn romtsn commented Feb 9, 2026

Summary

  • Rewrites no-line frame resolution in both mapper and cache paths to properly handle different base entry types (0:0 range vs bare method vs single-line mappings)
  • Extracts resolution logic into resolve_no_line_frames / resolve_base_entries helper functions that use Option field presence (startline.is_some(), original_startline.is_some()) instead of the removed
    boolean flags
  • Simplifies resolve_base_entries from a two-pass Vec collection to a single-pass approach
  • Adds pending_frames buffer to cache RemappedFrameIter for multi-frame base entry resolution
  • Removes unused resolve_no_line_output_line from utils

Test plan

  • All existing tests pass (50 unit + all integration tests)
  • 3 pre-existing failures in r8-line-number-handling remain (targeted by subsequent PRs)
  • No new warnings

@romtsn romtsn requested a review from loewenheim February 9, 2026 16:33
@romtsn romtsn force-pushed the rz/fix/r8-tests-member-metadata branch from 169af30 to c22e0f9 Compare February 10, 2026 09:55
@romtsn romtsn force-pushed the rz/fix/r8-tests-no-line-resolution branch 3 times, most recently from 9672efd to bc97cdb Compare February 10, 2026 12:45
@romtsn romtsn force-pushed the rz/fix/r8-tests-no-line-resolution branch 4 times, most recently from 58326db to 0007c72 Compare February 13, 2026 17:04
Copy link
Copy Markdown
Contributor

@loewenheim loewenheim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small improvement, otherwise this looks good

@romtsn romtsn force-pushed the rz/fix/r8-tests-member-metadata branch 2 times, most recently from b5f6e46 to f99aade Compare February 16, 2026 10:29
Base automatically changed from rz/fix/r8-tests-member-metadata to rz/feat/r8-tests-line-number-handling February 16, 2026 12:39
romtsn and others added 6 commits February 16, 2026 13:41
Rewrite the no-line frame resolution logic in both mapper and cache
paths to properly handle different types of base entries (0:0 range
vs bare method vs single-line mappings). This replaces the simple
NoLineSelection enum with richer grouping that considers
has_minified_range and has_line_mapping flags to determine correct
output lines.

- Remove NoLineSelection enum and select_no_line_members from cache
- Add pending_frames buffer to cache RemappedFrameIter for multi-frame
  base entry resolution
- Add resolve_base_entries method to mapper for grouped base entry
  handling
- Update iterate_with_lines in cache to use has_line_mapping for
  endline==0 output line determination
- Remove unused resolve_no_line_output_line from utils

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Rename cache_member_output_line to compute_member_output_line
- Collapse any_has_range if-else into single loop with conditional line
- Collapse no_range len==1 / all_same_name into single all_same_name check
- Remove separate zero_zero/no_range vectors; pre-compute aggregates
  in a single pass and use one emission loop over base_entries

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Reverse pending_frames and pop from end instead of remove(0)
- Add comment explaining intentional Some(0)/None asymmetry
- Use let-else with .first() instead of is_empty + indexing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@romtsn romtsn force-pushed the rz/fix/r8-tests-no-line-resolution branch from 0007c72 to a9ec960 Compare February 16, 2026 12:43
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@romtsn romtsn merged commit 0a53eb0 into rz/feat/r8-tests-line-number-handling Feb 16, 2026
4 of 6 checks passed
@romtsn romtsn deleted the rz/fix/r8-tests-no-line-resolution branch February 16, 2026 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants