mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
Wrap layouts in a LayoutRepr
constructor
Part 1 of support semantic layout representations.
This commit is contained in:
parent
c2d2bd4bb9
commit
c3eeb5e2cc
32 changed files with 1254 additions and 1021 deletions
|
@ -10,7 +10,7 @@ use crate::ir::{
|
|||
BranchInfo, Expr, JoinPointId, ModifyRc, Param, Proc, ProcLayout, Stmt, UpdateModeId,
|
||||
UpdateModeIds,
|
||||
};
|
||||
use crate::layout::{InLayout, Layout, LayoutInterner, STLayoutInterner, UnionLayout};
|
||||
use crate::layout::{InLayout, LayoutInterner, LayoutRepr, STLayoutInterner, UnionLayout};
|
||||
|
||||
use bumpalo::Bump;
|
||||
|
||||
|
@ -1133,8 +1133,8 @@ fn symbol_layout_reusability<'a>(
|
|||
symbol: &Symbol,
|
||||
layout: &InLayout<'a>,
|
||||
) -> Reuse {
|
||||
match layout_interner.get(*layout) {
|
||||
Layout::Union(union_layout) => {
|
||||
match layout_interner.get(*layout).repr {
|
||||
LayoutRepr::Union(union_layout) => {
|
||||
can_reuse_union_layout_tag(&union_layout, environment.get_symbol_tag(symbol))
|
||||
}
|
||||
// Strings literals are constants.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue