diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-07-15 01:38:31 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-07-15 02:07:30 -0700 |
| commit | 804b51b179bf7af689d308a092d1b02e94674570 (patch) | |
| tree | ebc4cb661d0bbe4556de0a1659fc0dab99a8114d /test | |
| parent | eac628024177434563d348272165d4e3a0a281af (diff) | |
| download | zig-804b51b179bf7af689d308a092d1b02e94674570.tar.gz zig-804b51b179bf7af689d308a092d1b02e94674570.zip | |
stage2: VarDecl and FnProto take advantage of TrailerFlags API
These AST nodes now have a flags field and then a bunch of optional
trailing objects. The end result is lower memory usage and consequently
better performance. This is part of an ongoing effort to reduce the
amount of memory parsed ASTs take up.
Running `zig fmt` on the std lib:
* cache-misses: 2,554,321 => 2,534,745
* instructions: 3,293,220,119 => 3,302,479,874
* peak memory: 74.0 MiB => 73.0 MiB
Holding the entire std lib AST in memory at the same time:
93.9 MiB => 88.5 MiB
Diffstat (limited to 'test')
| -rw-r--r-- | test/translate_c.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/translate_c.zig b/test/translate_c.zig index 738f9523ad..905c74bca2 100644 --- a/test/translate_c.zig +++ b/test/translate_c.zig @@ -2797,7 +2797,7 @@ pub fn addCases(cases: *tests.TranslateCContext) void { \\pub fn a() callconv(.C) void {} \\pub fn b() callconv(.C) void {} \\pub export fn c() void {} - \\pub fn foo() callconv(.C) void {} + \\pub fn foo(...) callconv(.C) void {} }); cases.add("casting away const and volatile", |
