Documentation ¶
Index ¶
- func AssignNestedScopeSlots(moduleScope *ast.Scope, symbols []ast.Symbol) (slotCounts ast.SlotCounts)
- func ComputeReservedNames(moduleScopes []*ast.Scope, symbols ast.SymbolMap) map[string]uint32
- type ExportRenamer
- type MinifyRenamer
- func (r *MinifyRenamer) AccumulateSymbolCount(ref ast.Ref, count uint32)
- func (r *MinifyRenamer) AccumulateSymbolUseCounts(symbolUses map[ast.Ref]ast.SymbolUse, stableSourceIndices []uint32)
- func (r *MinifyRenamer) AssignNamesByFrequency(minifier *ast.NameMinifier)
- func (r *MinifyRenamer) NameForSymbol(ref ast.Ref) string
- type NumberRenamer
- type Renamer
- type StableRef
- type StableRefArray
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssignNestedScopeSlots ¶
func AssignNestedScopeSlots(moduleScope *ast.Scope, symbols []ast.Symbol) (slotCounts ast.SlotCounts)
Returns the number of nested slots
Types ¶
type ExportRenamer ¶
type ExportRenamer struct {
// contains filtered or unexported fields
}
func (*ExportRenamer) NextMinifiedName ¶
func (r *ExportRenamer) NextMinifiedName() string
func (*ExportRenamer) NextRenamedName ¶
func (r *ExportRenamer) NextRenamedName(name string) string
type MinifyRenamer ¶
type MinifyRenamer struct {
// contains filtered or unexported fields
}
func NewMinifyRenamer ¶
func NewMinifyRenamer(symbols ast.SymbolMap, firstTopLevelSlots ast.SlotCounts, reservedNames map[string]uint32) *MinifyRenamer
func (*MinifyRenamer) AccumulateSymbolCount ¶
func (r *MinifyRenamer) AccumulateSymbolCount(ref ast.Ref, count uint32)
func (*MinifyRenamer) AccumulateSymbolUseCounts ¶
func (*MinifyRenamer) AssignNamesByFrequency ¶
func (r *MinifyRenamer) AssignNamesByFrequency(minifier *ast.NameMinifier)
func (*MinifyRenamer) NameForSymbol ¶
func (r *MinifyRenamer) NameForSymbol(ref ast.Ref) string
type NumberRenamer ¶
type NumberRenamer struct {
// contains filtered or unexported fields
}
func NewNumberRenamer ¶
func NewNumberRenamer(symbols ast.SymbolMap, reservedNames map[string]uint32) *NumberRenamer
func (*NumberRenamer) AddTopLevelSymbol ¶
func (r *NumberRenamer) AddTopLevelSymbol(ref ast.Ref)
func (*NumberRenamer) AssignNamesByScope ¶
func (r *NumberRenamer) AssignNamesByScope(nestedScopes map[uint32][]*ast.Scope)
func (*NumberRenamer) NameForSymbol ¶
func (r *NumberRenamer) NameForSymbol(ref ast.Ref) string
type Renamer ¶
func NewNoOpRenamer ¶
type StableRefArray ¶
type StableRefArray []StableRef
This type is just so we can use Go's native sort function
func (StableRefArray) Len ¶
func (a StableRefArray) Len() int
func (StableRefArray) Swap ¶
func (a StableRefArray) Swap(i int, j int)
Click to show internal directories.
Click to hide internal directories.