Commit 21d5c808 authored by Albert Chen's avatar Albert Chen Committed by mergify[bot]
Browse files

Fix renaming of annotations with paths (#967)

* check isLocal before removing target tokens in RenameMap

* add fix for Adam's test case, add more test cases

* fix multiple renaming bug

* call componentGet before checking underlying for ReferenceTargets in recursiveGet

* add ModuleGet that implements new instance rename order

* normalize target before renaming

* fix forall/exists bug

* add guards for isLocal cases

* fix circuit renaming, fix traverseHierarchy, add debug prints

* remove sensitivity stuff

* add more tests

* reapply parent path to renamed subpath, fix reference -> instance renames

* remove debug prints

* add instance as reference test case

* fix Ref->IsMod, IsMod->Ref renamed, fix extra test cases

* fix ofModule renaming for refs/instances

* fix renaming of ofModules, change tests

* fix more InstanceTarget rename bugs

* remove bad ReferenceTarget test case

* cleanup midRename of recursiveGet

* fix comments

* fix multiple ModuleTarget renames for InstanceTargets

* dis-allow renaming of ModuleTargets to References

* add back removed lines in RemoveCHIRRTL

* fix indents

* only add ofModule to refs if renaming an inst as a ref

* change .moduleOpt.get to .module

* disallow renaming ReferenceTarget->ModuleTarget

* disallow ref->mod renames in tests, add inst as ref test cases

* cache results of get functions

* fix bot/mid/top renames, add andThen

* fix andThen, add test case

* add more test cases, fix ++

* fix comments, make things private

* dont quit if earlier returns None, add dedup/inline rename tests

* don't rename OfModules to instances paths

* update dedup test

* don't treat references as instances, don't reapply parents to absolute paths

* fix more test cases

* short-circuit OfModule renames if an absolute path is found

* update andThen, remove orElse, deprecate ++

* removed commented code

* update comments

* respond to comments
parent 5ae94e61
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment