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

[compiler] explicitly provide type infos for array loads #11331

Merged
merged 3 commits into from
Feb 9, 2022

Conversation

tpoterba
Copy link
Contributor

@tpoterba tpoterba commented Feb 8, 2022

No description provided.

@tpoterba tpoterba changed the title [query] Fix encoder correctness bug; I2B is a byte [compiler] explicitly provide type infos for array loads Feb 8, 2022
@@ -1090,7 +1090,7 @@ class CodeString(val lhs: Code[String]) extends AnyVal {

class CodeArray[T](val lhs: Code[Array[T]])(implicit tti: TypeInfo[T]) {
def apply(i: Code[Int]): Code[T] =
Code(lhs, i, lir.insn2(tti.aloadOp))
Code(lhs, i, { case (v1: ValueX, v2: ValueX) => lir.insn(tti.aloadOp, tti, FastIndexedSeq(v1, v2)) })
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could we add some typechecking here that tti == v1.tti.tti? (I think that is the right check...)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we should add this on the CodeArray constructor if anywhere, not in the body here. I'll do that.

@johnc1231 johnc1231 mentioned this pull request Feb 9, 2022
@johnc1231
Copy link
Contributor

Seems like review can be dismissed?

@tpoterba
Copy link
Contributor Author

tpoterba commented Feb 9, 2022

yes, thanks.

@danking danking merged commit 34eff58 into hail-is:main Feb 9, 2022
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

4 participants