Skip to content

VLQ tests for values > 32 bits in long VLQs and -0 - #45

Open
0xe wants to merge 1 commit into
tc39:mainfrom
0xe:scratch/s/missing-cases
Open

0xe wants to merge 1 commit into
tc39:mainfrom
0xe:scratch/s/missing-cases

Conversation

@0xe

@0xe 0xe commented Nov 6, 2026

Copy link
Copy Markdown

Tests for clauses in https://tc39.es/ecma426/#sec-VLQSignedValue

6.1 VLQSignedValue
The syntax-directed operation VLQSignedValue takes no arguments and returns an integer. It is defined piecewise over the following productions:

Vlq :: VlqDigitList

  1. Let unsigned be the VLQUnsignedValue of VlqDigitList.
  2. If unsigned modulo 2 = 1, let sign be -1.
  3. Else, let sign be 1.
  4. Let value be floor(unsigned / 2).
  5. If value is 0 and sign is -1, return -2**31.
  6. If value is ≥ 2**31, throw an error.
  7. Return sign × value.

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.

1 participant