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: Add isStackFrame/isHidden bits and make 'kind' optional #147

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

szuend
Copy link
Collaborator

@szuend szuend commented Nov 4, 2024

This PR is the result of presenting the "Scopes - missing bits" slides to TG4 and incorporating the feedback and follow-up discussion.

Specifically this PR changes the following:

  • Make OriginalScope.kind optional. The free-form text can't really be used by consumers in algorithms that apply the scopes info to stack traces. As such it serves mostly as a user-facing label in debuggers/stack trace processors.
  • Add OriginalScope.isStackFrame and GeneratedRange.isStackFrame to signify whether a scope/range corresponds to the semantic equivalent of a function call in the authored/generated language respectively. For GeneratedRange.isStackFrame we re-use the existing GeneratedRange.isScope flag that is not required. This change makes the open PR Scopes: Re-purpose isScope as isFunctionScope for stack trace processing #114 obsolete.
  • Add GeneratedRange.isHidden flag to mark outlined functions that have a GeneratedRange.definition. This allows debuggers to remove transpiler inserted functions from stack traces, while still enabling variable/values if the transpiler inserted function corresponds to actual original source code.

@szuend szuend changed the title [scopes] Add isStackFrame/isHidden bits and make 'kind' optional Scopes: Add isStackFrame/isHidden bits and make 'kind' optional Nov 4, 2024
@szuend szuend merged commit 41e2132 into tc39:main Nov 12, 2024
2 checks passed
@szuend szuend deleted the scope-missing-bits branch November 12, 2024 08:12
github-actions bot added a commit that referenced this pull request Nov 12, 2024
… optional (#147)

SHA: 41e2132
Reason: push, by szuend

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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