Get low-level ops compiling

This commit is contained in:
Richard Feldman 2020-06-19 17:52:16 -04:00
parent b75f061f4f
commit dec5c3a062
19 changed files with 447 additions and 296 deletions

View file

@ -765,6 +765,13 @@ fn to_expr_report<'b>(
None,
)
}
Reason::LowLevelOpArg { op, arg_index } => {
panic!(
"Compiler bug: argument #{} to low-level operation {:?} was the wrong type!",
arg_index.ordinal(),
op
);
}
Reason::FloatLiteral | Reason::IntLiteral | Reason::NumLiteral => {
unreachable!("I don't think these can be reached")
}
@ -892,6 +899,12 @@ fn add_category<'b>(
alloc.text(" call produces:"),
]),
CallResult(None) => alloc.concat(vec![this_is, alloc.text(":")]),
LowLevelOpResult(op) => {
panic!(
"Compiler bug: invalid return type from low-level op {:?}",
op
);
}
Uniqueness => alloc.concat(vec![
this_is,