uncomment cranelift tests

This commit is contained in:
Folkert 2020-03-18 21:39:39 +01:00
parent 99db336033
commit f906c9b4b4
3 changed files with 5 additions and 5 deletions

View file

@ -14,7 +14,7 @@ use cranelift_codegen::Context;
use cranelift_module::{Backend, FuncId, Linkage, Module}; use cranelift_module::{Backend, FuncId, Linkage, Module};
use crate::crane::convert::{sig_from_layout, type_from_layout}; use crate::crane::convert::{sig_from_layout, type_from_layout};
use roc_collections::all::{ImMap, MutMap}; use roc_collections::all::ImMap;
use roc_module::symbol::{Interns, Symbol}; use roc_module::symbol::{Interns, Symbol};
use roc_mono::expr::{Expr, Proc, Procs}; use roc_mono::expr::{Expr, Proc, Procs};
use roc_mono::layout::{Builtin, Layout}; use roc_mono::layout::{Builtin, Layout};
@ -256,7 +256,7 @@ pub fn build_expr<'a, B: Backend>(
)); ));
// put the discriminant in the first slot // put the discriminant in the first slot
let discriminant = (Expr::Byte(*tag_id), Layout::Builtin(Builtin::Byte(MutMap::default()))); let discriminant = (Expr::Int(*tag_id as i64), Layout::Builtin(Builtin::Int64));
let it = std::iter::once(&discriminant).chain(arguments.iter()); let it = std::iter::once(&discriminant).chain(arguments.iter());
// Create instructions for storing each field's expression // Create instructions for storing each field's expression

View file

@ -11,7 +11,7 @@ use inkwell::{AddressSpace, FloatPredicate, IntPredicate};
use crate::llvm::convert::{ use crate::llvm::convert::{
basic_type_from_layout, collection_wrapper, get_array_type, get_fn_type, basic_type_from_layout, collection_wrapper, get_array_type, get_fn_type,
}; };
use roc_collections::all::{ImMap, MutMap}; use roc_collections::all::ImMap;
use roc_module::symbol::{Interns, Symbol}; use roc_module::symbol::{Interns, Symbol};
use roc_mono::expr::{Expr, Proc, Procs}; use roc_mono::expr::{Expr, Proc, Procs};
use roc_mono::layout::{Builtin, Layout}; use roc_mono::layout::{Builtin, Layout};

View file

@ -446,7 +446,7 @@ mod test_gen {
// parsing the source, so that there's no chance their passing // parsing the source, so that there's no chance their passing
// or failing depends on leftover state from the previous one. // or failing depends on leftover state from the previous one.
{ {
// assert_crane_evals_to!($src, $expected, $ty, (|val| val)); assert_crane_evals_to!($src, $expected, $ty, (|val| val));
} }
{ {
assert_llvm_evals_to!($src, $expected, $ty, (|val| val)); assert_llvm_evals_to!($src, $expected, $ty, (|val| val));
@ -458,7 +458,7 @@ mod test_gen {
($src:expr, $expected:expr, $ty:ty, $transform:expr) => { ($src:expr, $expected:expr, $ty:ty, $transform:expr) => {
// Same as above, except with an additional transformation argument. // Same as above, except with an additional transformation argument.
{ {
// assert_crane_evals_to!($src, $expected, $ty, $transform); assert_crane_evals_to!($src, $expected, $ty, $transform);
} }
{ {
assert_llvm_evals_to!($src, $expected, $ty, $transform); assert_llvm_evals_to!($src, $expected, $ty, $transform);