Skip to content

Refactor and improve caching in getTypeOfSymbol callees #25842

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

Merged
merged 2 commits into from
Jul 31, 2018

Conversation

sandersn
Copy link
Member

  1. Always cache calls to getTypeOfSymbol, even in the error case.
  2. JS expando types are now cached on the original symbol as well as the cloned symbol. Previously they were only cached on the cloned symbol.
  3. Large callees of getTypeOfSymbol (variable/param/property, func/class/enum/module, and accessors) now handle only caching and delegate to -Worker functions whose return values are cached
    unconditionally (unlike previously). This makes the code in the -Worker functions easier to write and reason about.
  4. Previously, successfully obtaining a type from a js special property declaration would forget to pop the circularity detection stack and check its value.

sandersn added 2 commits July 20, 2018 15:22
1. Always cache calls to getTypeOfSymbol, even in the error case.
2. JS expando types are now cached on the original symbol as well as the
cloned symbol. Previously they were only cached on the cloned symbol.
3. Large callees of getTypeOfSymbol (variable/param/property,
func/class/enum/module, and accessors) now handle only caching and
delegate to -Worker functions whose return values are cached
unconditionally (unlike previously).
Previously, successfully obtaining a type from a js special property
declaration would forget to pop the circularity detection stack and
check its value.
@sandersn sandersn requested review from weswigham, mhegazy and a user July 20, 2018 22:40
@sandersn
Copy link
Member Author

Note: Turning on 'Ignore whitespace' is practically a requirement for reading this review.

@sandersn sandersn merged commit 4821f81 into master Jul 31, 2018
@sandersn sandersn deleted the refactor-getTypeOfSymbol-callees branch July 31, 2018 20:07
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.

3 participants