mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 07:41:12 +00:00
Merge branch 'trunk' into gen-dev/mem
This commit is contained in:
commit
08aa3d31d4
32 changed files with 652 additions and 428 deletions
|
@ -8,7 +8,9 @@ use roc_collections::all::{MutMap, MutSet};
|
|||
use roc_module::ident::{ModuleName, TagName};
|
||||
use roc_module::low_level::LowLevel;
|
||||
use roc_module::symbol::{Interns, Symbol};
|
||||
use roc_mono::ir::{BranchInfo, CallType, Expr, JoinPointId, Literal, Proc, Stmt};
|
||||
use roc_mono::ir::{
|
||||
BranchInfo, CallType, Expr, JoinPointId, ListLiteralElement, Literal, Proc, Stmt,
|
||||
};
|
||||
use roc_mono::layout::{Builtin, Layout, LayoutIds};
|
||||
use target_lexicon::Triple;
|
||||
|
||||
|
@ -150,7 +152,7 @@ where
|
|||
match expr {
|
||||
Expr::Literal(lit) => {
|
||||
if self.env().lazy_literals {
|
||||
self.literal_map().insert(*sym, lit.clone());
|
||||
self.literal_map().insert(*sym, *lit);
|
||||
} else {
|
||||
self.load_literal(sym, lit)?;
|
||||
}
|
||||
|
@ -618,8 +620,10 @@ where
|
|||
owning_symbol.insert(*sym, *structure);
|
||||
}
|
||||
Expr::Array { elems, .. } => {
|
||||
for sym in *elems {
|
||||
self.set_last_seen(*sym, stmt, &owning_symbol);
|
||||
for elem in *elems {
|
||||
if let ListLiteralElement::Symbol(sym) = elem {
|
||||
self.set_last_seen(*sym, stmt, &owning_symbol);
|
||||
}
|
||||
}
|
||||
}
|
||||
Expr::Reuse {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue