diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-05-19 21:11:30 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-05-19 21:22:52 -0400 |
| commit | 93384f7428c5186a1b44c6f5f8891ce40bc46e72 (patch) | |
| tree | 2baa7d2fcfc0ba0b088d45ccdb01543d480f42ff /src/analyze.cpp | |
| parent | ed137d25ef0fb94f2ea0db4f993a0adfcaf63b58 (diff) | |
| download | zig-93384f7428c5186a1b44c6f5f8891ce40bc46e72.tar.gz zig-93384f7428c5186a1b44c6f5f8891ce40bc46e72.zip | |
use singly linked lists for std.zig.parse
std.ast uses a singly linked list for lists of things. This is a
breaking change to the self-hosted parser API.
std.ast.Tree has been separated into a private "Parser" type which
represents in-progress parsing, and std.ast.Tree which has only
"output" data. This means cleaner, but breaking, API for parse results.
Specifically, `tokens` and `errors` are no longer SegmentedList but a
slice.
The way to iterate over AST nodes has necessarily changed since lists of
nodes are now singly linked lists rather than SegmentedList.
From these changes, I observe the following on the
self-hosted-parser benchmark from ziglang/gotta-go-fast:
throughput: 45.6 MiB/s => 55.6 MiB/s
maxrss: 359 KB => 342 KB
This commit breaks the build; more updates are necessary to fix API
usage of the self-hosted parser.
Diffstat (limited to 'src/analyze.cpp')
0 files changed, 0 insertions, 0 deletions
