DependencyRecorder
Record dependencies using addUsedName/addClassDependency and inform Zinc using sendToZinc().
Note: As an alternative design choice, we could directly call the appropriate callback as we record each dependency, this way we wouldn't need to record them locally and we could get rid of sendToZinc(), but this may be less efficient since it would mean calling classNameAsString on each call to addUsedName rather than once per class.
Attributes
- Graph
-
- Supertypes
Members list
Type members
Classlikes
An object that maintain the set of used names and class dependencies from within a class
An object that maintain the set of used names and class dependencies from within a class
Attributes
- Supertypes
Value members
Concrete methods
Record a dependency to the class to in a given context from the current non-local enclosing class.
Record a dependency to the class to in a given context from the current non-local enclosing class.
Attributes
Record a reference to the name of sym from the current non-local enclosing class.
Record a reference to the name of sym from the current non-local enclosing class.
Value parameters
- includeSealedChildren
-
See documentation of
addUsedRawName.
Attributes
Record a reference to name from the current non-local enclosing class (aka, "from class").
Record a reference to name from the current non-local enclosing class (aka, "from class").
Most of the time, prefer to use addUsedName which takes care of name mangling.
Zinc will use this information to invalidate the current non-local enclosing class if something changes in the set of definitions named name among the possible dependencies of the from class.
Value parameters
- includeSealedChildren
-
If true, the addition or removal of children to a sealed class called
namewill also invalidate the from class. Note that this only has an effect if zinc'sIncOptions.useOptimizedSealedis enabled, otherwise the addition or removal of children always lead to invalidation. TODO: If the compiler reported to zinc all usages ofSymDenotation#{children,sealedDescendants}(including from macro code), we should be able to turnIncOptions.useOptimizedSealedon by default safely.
Attributes
A map from a non-local class to the names and classes it uses, this does not include names which are only defined and not referenced.
A map from a non-local class to the names and classes it uses, this does not include names which are only defined and not referenced.
Attributes
Send the collected dependency information to Zinc and clear the local caches.
Send the collected dependency information to Zinc and clear the local caches.