Skip to content

Commit

Permalink
Revert changes
Browse files Browse the repository at this point in the history
  • Loading branch information
raviqqe committed May 25, 2022
1 parent 001f7f3 commit 1bbd8d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
10 changes: 2 additions & 8 deletions lib/mir-fmm/src/type_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,8 @@ pub fn is_record_boxed(
) -> bool {
let body_type = &types[record.name()];

// Unbox small records.
// TODO Try unboxing 2-field records.
// TODO Check recursivity.
body_type.fields().len() > 1
|| body_type
.fields()
.iter()
.any(|type_| matches!(type_, mir::types::Type::Record(_)))
// TODO
!body_type.fields().is_empty()
}

pub fn compile_boxed_record() -> fmm::types::Type {
Expand Down
10 changes: 2 additions & 8 deletions lib/mir-fmm/src/type_/variant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,6 @@ fn is_record_boxed(
) -> bool {
let body_type = &types[record.name()];

body_type.fields().len() > 1
|| body_type.fields().iter().any(|type_| {
// Variants always take two words.
matches!(
type_,
mir::types::Type::Record(_) | mir::types::Type::Variant
)
})
// TODO
!body_type.fields().is_empty()
}

0 comments on commit 1bbd8d2

Please sign in to comment.