aboutsummaryrefslogtreecommitdiff
path: root/src/Module.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-04-15 20:34:21 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-04-15 20:34:21 -0700
commit8387307807434cf151d72a7dfb5b7da4863b2192 (patch)
tree9795185b63245e1a820b1614858726f5ce494e56 /src/Module.zig
parent7818586a2bc24252468977f8304d3c5b870a932a (diff)
downloadzig-8387307807434cf151d72a7dfb5b7da4863b2192.tar.gz
zig-8387307807434cf151d72a7dfb5b7da4863b2192.zip
AstGen: implement global variable decls
Diffstat (limited to 'src/Module.zig')
-rw-r--r--src/Module.zig7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Module.zig b/src/Module.zig
index bcb4b8dc99..2baa064255 100644
--- a/src/Module.zig
+++ b/src/Module.zig
@@ -2457,6 +2457,9 @@ fn freeExportList(gpa: *Allocator, export_list: []*Export) void {
}
pub fn astGenFile(mod: *Module, file: *Scope.File, prog_node: *std.Progress.Node) !void {
+ const tracy = trace(@src());
+ defer tracy.end();
+
const comp = mod.comp;
const gpa = mod.gpa;
@@ -2468,7 +2471,9 @@ pub fn astGenFile(mod: *Module, file: *Scope.File, prog_node: *std.Progress.Node
// Determine whether we need to reload the file from disk and redo parsing and AstGen.
switch (file.status) {
- .never_loaded, .retryable_failure => {},
+ .never_loaded, .retryable_failure => {
+ log.debug("first-time AstGen: {s}", .{file.sub_file_path});
+ },
.parse_failure, .astgen_failure, .success => {
const unchanged_metadata =
stat.size == file.stat_size and