FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Cache one nodebuilder per emit resolver, make emit resolver emit context scoped by weswigham · Pull Request #64649 · microsoft/TypeScript · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .go  (20) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
12 changes: 4 additions & 8 deletions tsc/internal/checker/checker.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"github.com/microsoft/TypeScript/tsc/internal/jsnum"
"github.com/microsoft/TypeScript/tsc/internal/module"
"github.com/microsoft/TypeScript/tsc/internal/modulespecifiers"
"github.com/microsoft/TypeScript/tsc/internal/printer"
"github.com/microsoft/TypeScript/tsc/internal/scanner"
"github.com/microsoft/TypeScript/tsc/internal/stringutil"
"github.com/microsoft/TypeScript/tsc/internal/tracing"
Expand Down Expand Up @@ -888,8 +889,7 @@ type Checker struct {
isStringIndexSignatureOnlyType func(*Type) bool
markNodeAssignments func(*ast.Node) bool
compareTypesAssignable TypeComparer
emitResolver *EmitResolver
emitResolverOnce sync.Once
emitResolverLinks EmitResolverLinks
_jsxNamespace string
_jsxFactoryEntity *ast.Node
skipDirectInferenceNodes collections.Set[*ast.Node]
Expand Down Expand Up @@ -32687,12 +32687,8 @@ func (c *Checker) GetTypeAtLocation(node *ast.Node) *Type {
return c.getTypeOfNode(ast.GetReparsedNodeForNode(node))
}

func (c *Checker) GetEmitResolver() *EmitResolver {
c.emitResolverOnce.Do(func() {
c.emitResolver = newEmitResolver(c)
})

return c.emitResolver
func (c *Checker) NewEmitResolver(emitContext *printer.EmitContext) *EmitResolver {
return newEmitResolver(c, emitContext)
}

func (c *Checker) GetAliasedSymbol(symbol *ast.Symbol) *ast.Symbol {
Expand Down
Loading
Loading

Back | FazBrowse Home | New Git URL