Separate the IR evaluator, add an interesting stack-breaking case.
This commit is contained in:
@@ -500,7 +500,7 @@ impl<M: Module> Backend<M> {
|
||||
.into_iter()
|
||||
.unzip();
|
||||
|
||||
match *function {
|
||||
match function {
|
||||
ValueOrRef::Value(_, _, _) => {
|
||||
panic!("Can't use a value for a function")
|
||||
}
|
||||
@@ -568,10 +568,7 @@ impl<M: Module> Backend<M> {
|
||||
|
||||
Primitive::Negate => {
|
||||
assert_eq!(1, arguments.len());
|
||||
Ok((
|
||||
builder.ins().ineg(arguments[0]),
|
||||
argument_types[0],
|
||||
))
|
||||
Ok((builder.ins().ineg(arguments[0]), argument_types[0]))
|
||||
}
|
||||
|
||||
Primitive::Print => {
|
||||
|
||||
Reference in New Issue
Block a user