Repository navigation
Conversation
robhogan
marked this pull request as ready for review
October 23, 2026 20:02
`hermesc` emits several mappings at some bytecode offsets, eg a function's declaration, then its first instruction. #1981 keeps all of them, but: - Only the last covers any code. The others can't answer a lookup by position. - Consumers that take the first, like `metro-symbolicate` and `trace-mapping`, resolve these to the wrong place, or nowhere: ``` $ metro-symbolicate composed.map < trace.txt at anonymous (address at …/js-polyfills/console.js:576:run) # 0.87.1 at anonymous (address at null:null:null) # main ``` On an RN 0.88 Android release build, 2,060 of 137,616 lookups at function entries change, 426 to `null`. This keeps only the last mapping, as Metro's `Consumer` resolves it, and keeps #1981's speedup. #1981's changelog line should come out of the 0.87.2 notes. Changelog: Internal Test plan: - The test from #1981 now expects only the last mapping. - RN 0.88 release maps composed with their `hermesc -O` maps (Android, minified iOS) are byte-identical to 0.87.1. - Timing against `main` is within noise.
Open
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Undoes a behaviour change from #1981 that, while not a technical regression, in practice reduced effectiveness of symbolication.
hermescemits several mappings at some bytecode offsets, eg at a function's entry: its declaration, then its first instruction. #1981 madecomposeSourceMapskeep all of them, but:metro-symbolicateandtrace-mapping, now resolve these offsets to the wrong place, or to nothing.For example, a frame in
return {run: cb => cb()};in RN'sconsole.jspolyfill:On an RN 0.88 Android release build, 2,060 of 137,616 lookups at function entries change, 426 of them to
null.This keeps only the last mapping at each position, as Metro's
Consumerresolves it, and keeps #1981's speedup. #1981 is unreleased, so its changelog line should come out of the 0.87.2 notes.Changelog: Internal
Test plan:
hermesc -Omaps (Android, minified iOS) gives output byte-identical to 0.87.1.mainis within noise.