mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 11:52:19 +00:00
Always start off with an empty cache
Adding a cache layer can only be done with a snapshot and rollback. This is necessary to prevent extra variables just lying around on the toplevel of the layout cache.
This commit is contained in:
parent
1e22a2bbcd
commit
a16ea95a04
2 changed files with 6 additions and 4 deletions
|
@ -120,10 +120,8 @@ pub struct LayoutCache<'a> {
|
|||
|
||||
impl<'a> LayoutCache<'a> {
|
||||
pub fn new(interner: TLLayoutInterner<'a>, target_info: TargetInfo) -> Self {
|
||||
let mut cache = std::vec::Vec::with_capacity(4);
|
||||
cache.push(CacheLayer::default());
|
||||
let mut raw_cache = std::vec::Vec::with_capacity(4);
|
||||
raw_cache.push(CacheLayer::default());
|
||||
let cache = std::vec::Vec::with_capacity(4);
|
||||
let raw_cache = std::vec::Vec::with_capacity(4);
|
||||
Self {
|
||||
target_info,
|
||||
cache,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue