Skip to content

Refactor and improve caching in getTypeOfSymbol callees#25842

Merged
sandersn merged 2 commits into
masterfrom
refactor-getTypeOfSymbol-callees
Jul 31, 2018
Merged

Refactor and improve caching in getTypeOfSymbol callees#25842
sandersn merged 2 commits into
masterfrom
refactor-getTypeOfSymbol-callees

Conversation

@sandersn
Copy link
Copy Markdown
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 a user, mhegazy and weswigham July 20, 2018 22:40
@sandersn
Copy link
Copy Markdown
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
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants