mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 16:21:11 +00:00
Drop unused mono::Expr::Pointer
This commit is contained in:
parent
bfe7c1b330
commit
f9e013793c
3 changed files with 2 additions and 6 deletions
|
@ -10,7 +10,7 @@ pub fn type_from_layout(cfg: TargetFrontendConfig, layout: &Layout<'_>) -> Type
|
|||
use roc_mono::layout::Layout::*;
|
||||
|
||||
match layout {
|
||||
Pointer(_) | FunctionPointer(_, _) | Struct(_) | Tag(_) => cfg.pointer_type(),
|
||||
FunctionPointer(_, _) | Struct(_) | Tag(_) => cfg.pointer_type(),
|
||||
Builtin(builtin) => match builtin {
|
||||
Int64 => types::I64,
|
||||
Float64 => types::F64,
|
||||
|
|
|
@ -71,9 +71,6 @@ pub fn basic_type_from_layout<'ctx>(
|
|||
Tag(_fields) => {
|
||||
panic!("TODO layout_to_basic_type for Tag");
|
||||
}
|
||||
Pointer(_layout) => {
|
||||
panic!("TODO layout_to_basic_type for Pointer");
|
||||
}
|
||||
Builtin(builtin) => match builtin {
|
||||
Int64 => context.i64_type().as_basic_type_enum(),
|
||||
Float64 => context.f64_type().as_basic_type_enum(),
|
||||
|
|
|
@ -11,7 +11,6 @@ pub enum Layout<'a> {
|
|||
Builtin(Builtin<'a>),
|
||||
Struct(&'a [(Lowercase, Layout<'a>)]),
|
||||
Tag(&'a [Layout<'a>]),
|
||||
Pointer(&'a Layout<'a>),
|
||||
/// A function. The types of its arguments, then the type of its return value.
|
||||
FunctionPointer(&'a [Layout<'a>], &'a Layout<'a>),
|
||||
}
|
||||
|
@ -103,7 +102,7 @@ impl<'a> Layout<'a> {
|
|||
|
||||
sum
|
||||
}
|
||||
Pointer(_) | FunctionPointer(_, _) => pointer_size,
|
||||
FunctionPointer(_, _) => pointer_size,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue