mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
Adding Decimals work!!
This commit is contained in:
parent
4d6e5a1a4f
commit
0827123c88
8 changed files with 108 additions and 71 deletions
|
@ -82,7 +82,7 @@ pub fn basic_type_from_builtin<'a, 'ctx, 'env>(
|
|||
Int8 => context.i8_type().as_basic_type_enum(),
|
||||
Int1 => context.bool_type().as_basic_type_enum(),
|
||||
Usize => ptr_int(context, ptr_bytes).as_basic_type_enum(),
|
||||
Decimal => zig_dec_type(env).into(),
|
||||
Decimal => context.i128_type().as_basic_type_enum(),
|
||||
Float128 => context.f128_type().as_basic_type_enum(),
|
||||
Float64 => context.f64_type().as_basic_type_enum(),
|
||||
Float32 => context.f32_type().as_basic_type_enum(),
|
||||
|
@ -182,8 +182,8 @@ pub fn zig_str_type<'a, 'ctx, 'env>(
|
|||
env.module.get_struct_type("str.RocStr").unwrap()
|
||||
}
|
||||
|
||||
pub fn zig_dec_type<'a, 'ctx, 'env>(
|
||||
env: &crate::llvm::build::Env<'a, 'ctx, 'env>,
|
||||
) -> StructType<'ctx> {
|
||||
env.module.get_struct_type("dec.RocDec").unwrap()
|
||||
}
|
||||
// pub fn zig_dec_type<'a, 'ctx, 'env>(
|
||||
// env: &crate::llvm::build::Env<'a, 'ctx, 'env>,
|
||||
// ) -> StructType<'ctx> {
|
||||
// env.module.get_struct_type("dec.RocDec").unwrap()
|
||||
// }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue