mirror of
https://github.com/roc-lang/roc.git
synced 2025-12-23 08:48:03 +00:00
Don't lazily initialize
This commit is contained in:
parent
9cb8fe4451
commit
4e6c2ec00b
1 changed files with 1 additions and 5 deletions
|
|
@ -147,7 +147,7 @@ pub const Store = struct {
|
|||
.tuple_data = try collections.SafeList(TupleData).initCapacity(env.gpa, 256),
|
||||
.layouts_by_var = layouts_by_var,
|
||||
.work = try Work.initCapacity(env.gpa, 32),
|
||||
.list_ident = null, // Lazily initialized on first use
|
||||
.list_ident = env.common.findIdent("List"),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -886,10 +886,6 @@ pub const Store = struct {
|
|||
},
|
||||
.nominal_type => |nominal_type| {
|
||||
// Special handling for Builtin.List
|
||||
// Lazily initialize list_ident if not yet cached
|
||||
if (self.list_ident == null) {
|
||||
self.list_ident = self.env.common.findIdent("List");
|
||||
}
|
||||
const is_builtin_list = if (self.list_ident) |list_ident|
|
||||
nominal_type.origin_module == self.env.builtin_module_ident and
|
||||
nominal_type.ident.ident_idx == list_ident
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue