Drop unused mono::Expr::Pointer

This commit is contained in:
Richard Feldman 2020-03-16 21:47:08 -04:00
parent bfe7c1b330
commit f9e013793c
3 changed files with 2 additions and 6 deletions

View file

@ -10,7 +10,7 @@ pub fn type_from_layout(cfg: TargetFrontendConfig, layout: &Layout<'_>) -> Type
use roc_mono::layout::Layout::*; use roc_mono::layout::Layout::*;
match layout { match layout {
Pointer(_) | FunctionPointer(_, _) | Struct(_) | Tag(_) => cfg.pointer_type(), FunctionPointer(_, _) | Struct(_) | Tag(_) => cfg.pointer_type(),
Builtin(builtin) => match builtin { Builtin(builtin) => match builtin {
Int64 => types::I64, Int64 => types::I64,
Float64 => types::F64, Float64 => types::F64,

View file

@ -71,9 +71,6 @@ pub fn basic_type_from_layout<'ctx>(
Tag(_fields) => { Tag(_fields) => {
panic!("TODO layout_to_basic_type for Tag"); panic!("TODO layout_to_basic_type for Tag");
} }
Pointer(_layout) => {
panic!("TODO layout_to_basic_type for Pointer");
}
Builtin(builtin) => match builtin { Builtin(builtin) => match builtin {
Int64 => context.i64_type().as_basic_type_enum(), Int64 => context.i64_type().as_basic_type_enum(),
Float64 => context.f64_type().as_basic_type_enum(), Float64 => context.f64_type().as_basic_type_enum(),

View file

@ -11,7 +11,6 @@ pub enum Layout<'a> {
Builtin(Builtin<'a>), Builtin(Builtin<'a>),
Struct(&'a [(Lowercase, Layout<'a>)]), Struct(&'a [(Lowercase, Layout<'a>)]),
Tag(&'a [Layout<'a>]), Tag(&'a [Layout<'a>]),
Pointer(&'a Layout<'a>),
/// A function. The types of its arguments, then the type of its return value. /// A function. The types of its arguments, then the type of its return value.
FunctionPointer(&'a [Layout<'a>], &'a Layout<'a>), FunctionPointer(&'a [Layout<'a>], &'a Layout<'a>),
} }
@ -103,7 +102,7 @@ impl<'a> Layout<'a> {
sum sum
} }
Pointer(_) | FunctionPointer(_, _) => pointer_size, FunctionPointer(_, _) => pointer_size,
} }
} }
} }