-
Notifications
You must be signed in to change notification settings - Fork 28
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
Llir Builder for HKMC2 #261
Conversation
It looks like the CI failed for the same reason as in #257 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks mostly good, but I found some worrying cases. Sometimes the LLIR generates references to parameter names from outside the join point:
:sllir
:scpp
let x = 10
if true do
set x += 1
x
//│ = 11
//│ x = 11
//│ LLIR:
//│
//│ def j$0(x$2) =
//│ x$2
//│ let x$0 = 10 in
//│ let x$1 = true in
//│ case x$1 of
//│ BoolLit(true) =>
//│ let x$3 = +(x$2,1) in
//│ let x$4 = undefined in
//│ jump j$0(x$3)
//│ _ =>
//│ let x$5 = undefined in
//│ jump j$0(x$2)
If you don't want to support mutation, it's fine, but then you should cleanly abort compilation.
But the fact that it generates a reference to a parameter that's not in scope also hints at a deeper logic problem in the IR builder, which should probably be fixed as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
No description provided.