@@ -67,6 +67,9 @@ src_hash_deps: std.AutoArrayHashMapUnmanaged(TrackedInst.Index, DepEntry.Index)
67
67
/// Dependencies on the value of a Decl.
68
68
/// Value is index into `dep_entries` of the first dependency on this Decl value.
69
69
decl_val_deps : std .AutoArrayHashMapUnmanaged (DeclIndex , DepEntry .Index ) = .{},
70
+ /// Dependencies on the IES of a runtime function.
71
+ /// Value is index into `dep_entries` of the first dependency on this Decl value.
72
+ func_ies_deps : std .AutoArrayHashMapUnmanaged (Index , DepEntry .Index ) = .{},
70
73
/// Dependencies on the full set of names in a ZIR namespace.
71
74
/// Key refers to a `struct_decl`, `union_decl`, etc.
72
75
/// Value is index into `dep_entries` of the first dependency on this namespace.
@@ -167,6 +170,7 @@ pub const Depender = enum(u32) {
167
170
pub const Dependee = union (enum ) {
168
171
src_hash : TrackedInst.Index ,
169
172
decl_val : DeclIndex ,
173
+ func_ies : Index ,
170
174
namespace : TrackedInst.Index ,
171
175
namespace_name : NamespaceNameKey ,
172
176
};
@@ -212,6 +216,7 @@ pub fn dependencyIterator(ip: *const InternPool, dependee: Dependee) DependencyI
212
216
const first_entry = switch (dependee ) {
213
217
.src_hash = > | x | ip .src_hash_deps .get (x ),
214
218
.decl_val = > | x | ip .decl_val_deps .get (x ),
219
+ .func_ies = > | x | ip .func_ies_deps .get (x ),
215
220
.namespace = > | x | ip .namespace_deps .get (x ),
216
221
.namespace_name = > | x | ip .namespace_name_deps .get (x ),
217
222
} orelse return .{
@@ -251,6 +256,7 @@ pub fn addDependency(ip: *InternPool, gpa: Allocator, depender: Depender, depend
251
256
const gop = try switch (tag ) {
252
257
.src_hash = > ip .src_hash_deps ,
253
258
.decl_val = > ip .decl_val_deps ,
259
+ .func_ies = > ip .func_ies_deps ,
254
260
.namespace = > ip .namespace_deps ,
255
261
.namespace_name = > ip .namespace_name_deps ,
256
262
}.getOrPut (gpa , dependee_payload );
@@ -4324,6 +4330,7 @@ pub fn deinit(ip: *InternPool, gpa: Allocator) void {
4324
4330
4325
4331
ip .src_hash_deps .deinit (gpa );
4326
4332
ip .decl_val_deps .deinit (gpa );
4333
+ ip .func_ies_deps .deinit (gpa );
4327
4334
ip .namespace_deps .deinit (gpa );
4328
4335
ip .namespace_name_deps .deinit (gpa );
4329
4336
@@ -7103,7 +7110,7 @@ pub fn getGeneratedTagEnumType(ip: *InternPool, gpa: Allocator, ini: GeneratedTa
7103
7110
return @enumFromInt (gop .index );
7104
7111
}
7105
7112
7106
- pub const OpaqueTypeIni = struct {
7113
+ pub const OpaqueTypeInit = struct {
7107
7114
has_namespace : bool ,
7108
7115
key : union (enum ) {
7109
7116
declared : struct {
@@ -7117,7 +7124,7 @@ pub const OpaqueTypeIni = struct {
7117
7124
},
7118
7125
};
7119
7126
7120
- pub fn getOpaqueType (ip : * InternPool , gpa : Allocator , ini : OpaqueTypeIni ) Allocator.Error ! WipNamespaceType.Result {
7127
+ pub fn getOpaqueType (ip : * InternPool , gpa : Allocator , ini : OpaqueTypeInit ) Allocator.Error ! WipNamespaceType.Result {
7121
7128
const adapter : KeyAdapter = .{ .intern_pool = ip };
7122
7129
const gop = try ip .map .getOrPutAdapted (gpa , Key { .opaque_type = switch (ini .key ) {
7123
7130
.declared = > | d | .{ .declared = .{
@@ -9216,7 +9223,7 @@ pub fn funcTypeParamsLen(ip: *const InternPool, i: Index) u32 {
9216
9223
return ip .extra .items [start + std .meta .fieldIndex (Tag .TypeFunction , "params_len" ).? ];
9217
9224
}
9218
9225
9219
- fn unwrapCoercedFunc (ip : * const InternPool , i : Index ) Index {
9226
+ pub fn unwrapCoercedFunc (ip : * const InternPool , i : Index ) Index {
9220
9227
const tags = ip .items .items (.tag );
9221
9228
return switch (tags [@intFromEnum (i )]) {
9222
9229
.func_coerced = > {
0 commit comments