Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
All Refs created by their owning Name
This change enforces that GlobalNamespace.Ref objects will always be created by the GlobalNamespace.Name object to which they belong. This allows us to enforce several invariants such as: * Ref.name will always == the owning Name object * Ref.node will never be null when initially created except in unit tests * Ref.scope will never be null except in unit tests It also allows Name to control the creation of "twin" Refs, which have several restrictions and are supposed to be the only way for two Refs to refer to the same Node. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=232874810
- Loading branch information
Showing
3 changed files
with
100 additions
and
82 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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