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

Fix bug with unboxed refs #241

Closed
wants to merge 1 commit into from
Closed

Conversation

btwj
Copy link
Contributor

@btwj btwj commented Apr 23, 2024

We should not be using u32[R32]/u64[R64] at all while packed refs are not supported.
Fixes bug so type Operand #unboxed #packed can bootstrap.

@@ -17,7 +17,10 @@ def getScalarFromSet(s: Scalar.set) -> Scalar {
return Scalar.B32; // should be unreachable
}
def getTypeFromScalarSet(s: Scalar.set, usePacking: bool) -> Type {
for (i in s) return if(usePacking, IntRep.getType(i), i.ty);
for (i in s) {
if (i.tag >= Scalar.R32.tag) return AnyRef.TYPE;
Copy link
Owner

Choose a reason for hiding this comment

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

Checking the tag here is somewhat brittle; I think a match would be best here.

@titzer
Copy link
Owner

titzer commented May 4, 2024

Fixed this in a separate CL. If you have a testcase that fails, please share.

@titzer titzer closed this May 4, 2024
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.

None yet

2 participants