Skip to content

feat!: encode and decode RangeDefinition as (sourceIdx, scopeIdx) - #18

Merged
szuend merged 1 commit into
mainfrom
pr-2-range-definition-source-scope-idx
Sep 28, 2026
Merged

szuend merged 1 commit into
mainfrom
pr-2-range-definition-source-scope-idx

Conversation

@szuend

@szuend szuend commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator

Per tc39/ecma426#266, a GeneratedRangeStart item with the HAS_DEFINITION flag now encodes its definition scope using two VLQs: a signed source index delta followed by a scope index within that source. When the source index delta is 0, the scope index is encoded as a signed delta relative to the previous definition scope index; otherwise, the scope index state resets to 0 and is encoded as an unsigned VLQ.

Per tc39/ecma426#266, a GeneratedRangeStart item with the HAS_DEFINITION flag now encodes its definition scope using two VLQs: a signed source index delta followed by a scope index within that source. When the source index delta is 0, the scope index is encoded as a signed delta relative to the previous definition scope index; otherwise, the scope index state resets to 0 and is encoded as an unsigned VLQ.
@szuend
szuend requested a review from OrKoN September 28, 2026 09:14
@szuend
szuend added this pull request to stack #20 September 28, 2026 09:25
@szuend
szuend merged commit afc7fe3 into main Sep 28, 2026
12 checks passed
@szuend
szuend deleted the pr-2-range-definition-source-scope-idx branch September 28, 2026 09:35
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