Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename baseOf to avoid overloading the term #1685

Open
deelawn opened this issue Feb 23, 2024 · 0 comments
Open

Rename baseOf to avoid overloading the term #1685

deelawn opened this issue Feb 23, 2024 · 0 comments
Labels
📦 🤖 gnovm Issues or PRs gnovm related 🌟 improvement performance improvements, refactors ...

Comments

@deelawn
Copy link
Contributor

deelawn commented Feb 23, 2024

Currently the term base has two meanings:

  1. the baseOf function returns the base of a declared type
  2. pointers have a Base field that returns to the container of the value they point to (struct, array, block)

Look at the comment here and rename baseOf to something like underlyingOf or underlyingTypeOf to differentiate between the two different scenarios and make the code easier for others to understand.

... This is all made additionally confusing by the overloading of the term "base".
baseOf() is only about getting the underlying type for a DeclaredType,
while PointerValues also have a "base" which is the base object within which the pointer points to.

The solution to this overloading is to rename baseOf() and similar references to base
(when referring to the underlying type of a declared type) to underlyingOf(),
while keeping PointerValue.base as base. ...

#1606 (comment)

@deelawn deelawn moved this to 🔵 Not Needed for Launch in 🚀 The Launch [DEPRECATED] Feb 23, 2024
@deelawn deelawn added 📦 🤖 gnovm Issues or PRs gnovm related 🌟 improvement performance improvements, refactors ... labels Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 🤖 gnovm Issues or PRs gnovm related 🌟 improvement performance improvements, refactors ...
Projects
Status: 🔵 Not Needed for Launch
Development

No branches or pull requests

1 participant