Commit c6f5bb5f authored by Sapphie's avatar Sapphie
Browse files

Temporarily simplify halt representation

parent aa303d4e
...@@ -81,27 +81,28 @@ object CPSValueRepresenter extends (H.Tree => L.Tree) { ...@@ -81,27 +81,28 @@ object CPSValueRepresenter extends (H.Tree => L.Tree) {
val untagUnitCont = mkeUntagCont("unit_untag", 2) val untagUnitCont = mkeUntagCont("unit_untag", 2)
// If it's a unit, untag it, otherwise, immediately skip to halt // If it's a unit, untag it, otherwise, immediately skip to halt
val unitCheckCont = mkeCheckCont("unit_check", // val unitCheckCont = mkeCheckCont("unit_check",
transformIf(L3.UnitP, Seq(v), untagUnitCont.name, haltCont)) // transformIf(L3.UnitP, Seq(v), untagUnitCont.name, haltCont))
// If it's a boolean, untag it, otherwise check if it's a unit // If it's a boolean, untag it, otherwise check if it's a unit
val boolCheckCont = mkeCheckCont("bool_check", // val boolCheckCont = mkeCheckCont("bool_check",
transformIf(L3.BoolP, Seq(v), untagBoolCont.name, unitCheckCont.name)) // transformIf(L3.BoolP, Seq(v), untagBoolCont.name, unitCheckCont.name))
// if it's a character, untag it, otherwise check if it's a boolean // if it's a character, untag it, otherwise check if it's a boolean
val charCheckCont = mkeCheckCont("char_check", //val charCheckCont = mkeCheckCont("char_check",
transformIf(L3.CharP, Seq(v), untagCharCont.name, boolCheckCont.name)) // transformIf(L3.CharP, Seq(v), untagCharCont.name, boolCheckCont.name))
//etc //etc
val letCBody = transformIf(L3.IntP, Seq(v), untagIntCont.name, charCheckCont.name) val letCBody = transformIf(L3.IntP, Seq(v), untagIntCont.name, haltCont)
val conts = Seq(untagIntCont, val conts = Seq(untagIntCont,
untagCharCont, // untagCharCont,
untagBoolCont, // untagBoolCont,
untagUnitCont, // untagUnitCont,
unitCheckCont, // unitCheckCont,
charCheckCont, // charCheckCont,
boolCheckCont) // boolCheckCont
)
L.LetC(conts, letCBody) L.LetC(conts, letCBody)
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment