Skip to content

Conversation

@azidar
Copy link
Contributor

@azidar azidar commented Feb 16, 2022

Contributor Checklist

  • [N/A] Did you add Scaladoc to every public function/method?
  • Did you add at least one test demonstrating the PR?
  • Did you delete any extraneous printlns/debugging code?
  • Did you specify the type of improvement?
  • [N/A] Did you add appropriate documentation in docs/src?
  • Did you state the API impact?
  • Did you specify the code generation impact?
  • Did you request a desired merge strategy?
  • Did you add text to be included in the Release Notes for this change?

Type of Improvement

  • bug fix

API Impact

No change to APIs, just fixes a bug where looking up the same value from the same Hierarchy[T] object returned a new object every time.

Release Notes

Bugfix: looking up the same value from the same Hierarchy[T] object now returns the same object, rather than a new object every time.

Reviewer Checklist (only modified by reviewer)

  • Did you add the appropriate labels?
  • Did you mark the proper milestone (Bug fix: 3.4.x, [small] API extension: 3.5.x, API modification or big change: 3.6.0)?
  • Did you review?
  • Did you check whether all relevant Contributor checkboxes have been checked?
  • Did you mark as Please Merge?

@azidar azidar requested a review from jackkoenig February 16, 2022 15:56
@mwachs5 mwachs5 added this to the 3.5.x milestone Feb 16, 2022
/** Updated by calls to [[_lookup]], to avoid recloning returned Data's */
private[chisel3] val cache = HashMap[Data, Data]()
/** Updated by calls to [[_lookup]], to avoid recloning returned values */
private val cache = HashMap[Any, Any]()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if I can construct the case where it will matter, but my intuition is still that this should be an IdentityHashMap

jackkoenig pushed a commit that referenced this pull request Feb 28, 2023
Co-authored-by: sinofp <sinofp@tuta.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants