diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-05-17 15:35:24 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-05-17 16:09:20 -0700 |
| commit | 731c35f15a1469c9523b71476f1e069d5bcfd979 (patch) | |
| tree | 00b0244c86df035ff721cb45216594426007ce96 /src/Module.zig | |
| parent | 3d99fb3352eca9da68b6033ad22a166ed68ed36a (diff) | |
| download | zig-731c35f15a1469c9523b71476f1e069d5bcfd979.tar.gz zig-731c35f15a1469c9523b71476f1e069d5bcfd979.zip | |
stage2: get rid of NameHash
Previously, stage2 used a global decl_table for all Decl objects, keyed
by a 16-byte name hash that was hopefully unique. Now, there is a tree
of Namespace objects that own their named Decl objects.
Diffstat (limited to 'src/Module.zig')
| -rw-r--r-- | src/Module.zig | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/src/Module.zig b/src/Module.zig index afa29d65fd..54a3c86aed 100644 --- a/src/Module.zig +++ b/src/Module.zig @@ -798,8 +798,6 @@ pub const Var = struct { pub const Scope = struct { tag: Tag, - pub const NameHash = [16]u8; - pub fn cast(base: *Scope, comptime T: type) ?*T { if (base.tag != T.base_tag) return null; @@ -839,7 +837,6 @@ pub const Scope = struct { .namespace => return @fieldParentPtr(Namespace, "base", base).file_scope.sub_file_path, .file => return @fieldParentPtr(File, "base", base).sub_file_path, .block => unreachable, - .decl_ref => unreachable, } } @@ -861,10 +858,6 @@ pub const Scope = struct { /// Namespace owned by structs, enums, unions, and opaques for decls. namespace, block, - /// Used for simple error reporting. Only contains a reference to a - /// `Decl` for use with `srcDecl` and `ownerDecl`. - /// Has no parents or children. - decl_ref, }; /// The container that structs, enums, unions, and opaques have. |
