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

Remove unnecessary comments #250

Merged
merged 1 commit into from
Feb 13, 2025
Merged

Conversation

filipeom
Copy link
Member

Remove unnecessary comments.

Currently the most used (by code references) global variables are |Intrinsics|, |global|, and |realm|. I think only having these three is acceptable. Although we could probably reduce this even further and only use |realm| since it has pointers to the same objects |Intrinsics| and |global| point to. But I think this is good enough to close #219.

Then we also have a couple implementation global variables to maintain the state of the interpreter, but these we cannot get rid of. Some of them are:

  • |ElementTable|
  • |ctxStack|
  • |ScriptJobQueue|
  • |PromiseJobQueue|
  • ...

@filipeom filipeom added the no changelog Skip changelog CI check label Feb 13, 2025
@filipeom filipeom enabled auto-merge (rebase) February 13, 2025 09:52
@filipeom filipeom merged commit c7e7c33 into formalsec:main Feb 13, 2025
3 checks passed
@filipeom filipeom deleted the reduce-global-vars branch February 13, 2025 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no changelog Skip changelog CI check
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Try to reduce global references to objects in ECMARef interpreters
1 participant