aboutsummaryrefslogtreecommitdiff
path: root/src/Compilation.zig
diff options
context:
space:
mode:
authorJimmi Holst Christensen <jhc@dismail.de>2022-01-01 17:36:53 +0100
committerAndrew Kelley <andrew@ziglang.org>2022-01-01 15:40:24 -0500
commita41ad639a85218130f80956ce0c2e59ff322a1af (patch)
tree7d1da86468fe9257e6c2ea1c7c752a418fce7f52 /src/Compilation.zig
parent0662f1d52204b9c3bce22b3bd72bf4faf2df3559 (diff)
downloadzig-a41ad639a85218130f80956ce0c2e59ff322a1af.tar.gz
zig-a41ad639a85218130f80956ce0c2e59ff322a1af.zip
fmt: Refactor parsing of placeholders into its own function
This saves on comptime format string parsing, as the compiler caches comptime calls. The catch here, is that parsePlaceHolder cannot take the placeholder string as a slice. It must take it as an array by value for the caching to occure. There is also some logic in here that ensures that the specifier_arg is always them same slice when the items they contain are the same. This makes the compiler stamp out less copies of formatType.
Diffstat (limited to 'src/Compilation.zig')
0 files changed, 0 insertions, 0 deletions