Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scopes: Inconsistent use of "relative" decoding #77

Open
jridgewell opened this issue Mar 10, 2024 · 1 comment
Open

Scopes: Inconsistent use of "relative" decoding #77

jridgewell opened this issue Mar 10, 2024 · 1 comment
Labels

Comments

@jridgewell
Copy link
Member

jridgewell commented Mar 10, 2024

I've only worked on the original scopes so far, but my understanding of the spec appears to be different than @hbenl and @szuend's implementations.

Fields:

  1. Line
    • Says relative: Note: this is the point in the original code where the scope starts. line is relative to the line of the preceding "start/end original scope" item.
    • hbenl agrees
    • szuend agrees
  2. Column
  3. Kind
    • Absolute, everyone agrees
  4. Field Flags
    • Absolute, everyone agrees
  5. Name
    • Says relative: Note: This offset is relative to the offset of the last scope name or absolute if this is the first name
    • hbenl treats it as absolute
    • szuend treats it as absolute 1, 2
  6. Vars
    • Says relative, but meaning is unclear: DATA relative offset into names field for the original symbol name defined in this scope
    • I interpret this to mean Scope 2's vars are relative to Scope 1's (if there were any). Not just that Scope 2's 2nd var is relative to Scope 2's 1st var.
    • hbenl treats them as absolute
    • szuend treats them as absolute 1, 2
@hbenl
Copy link
Collaborator

hbenl commented Mar 11, 2024

I've used absolute indices into the names array so far because of #70.

@jkup jkup added the Scopes label Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants