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

Fixing Bug in Lowering: Handling Op.Copy for ClassOf Transformation #3447

Merged
merged 1 commit into from Aug 25, 2023

Conversation

tanishiking
Copy link
Member

fix #3442

Previously, we didn't exhaustiely
Prior to this change, there was an issue in the lowering process where the value of Op.Copy was not being appropriately adjusted during the lowering procedure. This issue became clear when attempting to lower a value represented as Val.ClassOf

For instance, the transformation of ClassOf(Top(scala.scalanative.runtime.DoubleArray)) needed to be lowered to Global(Member(Top(scala.scalanative.runtime.DoubleArray), G4type), Ptr).

However, this transformation was failing with the error message 'Lowering ClassOf needs nir.Buffer' because the value represented by Val.ClassOf was not being properly lowered, especially with SCALANATIVE_OPTIMIZE=false.

fix scala-native#3442

Previously, we didn't exhaustiely
Prior to this change, there was an issue in the lowering process where the value of `Op.Copy` was not being
appropriately adjusted during the lowering procedure.
This issue became clear when attempting to lower a value represented as `Val.ClassOf`

For instance, the transformation of `ClassOf(Top(scala.scalanative.runtime.DoubleArray))` needed to be
lowered to `Global(Member(Top(scala.scalanative.runtime.DoubleArray), G4type), Ptr)`.

However, this transformation was failing with the error message
'Lowering ClassOf needs nir.Buffer' because the value represented by
`Val.ClassOf` was not being properly lowered, especially with `SCALANATIVE_OPTIMIZE=false`.
@WojciechMazur WojciechMazur merged commit 4c4006c into scala-native:main Aug 25, 2023
79 checks passed
WojciechMazur pushed a commit to WojciechMazur/scala-native that referenced this pull request Sep 1, 2023
…cala-native#3447)

fix scala-native#3442

Previously, we didn't exhaustiely
Prior to this change, there was an issue in the lowering process where the value of `Op.Copy` was not being
appropriately adjusted during the lowering procedure.
This issue became clear when attempting to lower a value represented as `Val.ClassOf`

For instance, the transformation of `ClassOf(Top(scala.scalanative.runtime.DoubleArray))` needed to be
lowered to `Global(Member(Top(scala.scalanative.runtime.DoubleArray), G4type), Ptr)`.

However, this transformation was failing with the error message
'Lowering ClassOf needs nir.Buffer' because the value represented by
`Val.ClassOf` was not being properly lowered, especially with `SCALANATIVE_OPTIMIZE=false`.

(cherry picked from commit 4c4006c)
WojciechMazur pushed a commit that referenced this pull request Sep 4, 2023
…3447)

fix #3442

Previously, we didn't exhaustiely
Prior to this change, there was an issue in the lowering process where the value of `Op.Copy` was not being
appropriately adjusted during the lowering procedure.
This issue became clear when attempting to lower a value represented as `Val.ClassOf`

For instance, the transformation of `ClassOf(Top(scala.scalanative.runtime.DoubleArray))` needed to be
lowered to `Global(Member(Top(scala.scalanative.runtime.DoubleArray), G4type), Ptr)`.

However, this transformation was failing with the error message
'Lowering ClassOf needs nir.Buffer' because the value represented by
`Val.ClassOf` was not being properly lowered, especially with `SCALANATIVE_OPTIMIZE=false`.

(cherry picked from commit 4c4006c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nativeLink fails with SCALANATIVE_OPTIMIZE=false saying "Lowering ClassOf needs nir.Buffer"
2 participants