zig/test
Andrew Kelley f8fe517d12
better string literal caching implementation
We were caching the ConstExprValue of string literals,
which works if you can never modify ConstExprValues.
This premise is broken with `comptime var ...`.

So I implemented an optimization in ConstExprValue
arrays, where it stores a `Buf *` directly rather
than an array of ConstExprValues for the elements,
and then similar to array of undefined, it is
expanded into the canonical form when necessary.
However many operations can happen directly on the
`Buf *`, which is faster.

Furthermore, before a ConstExprValue array is expanded
into canonical form, it removes itself from the string
literal cache. This fixes the issue, because before an
array element is modified it would have to be expanded.

closes #1076
2018-09-20 11:04:31 -04:00
..
cases better string literal caching implementation 2018-09-20 11:04:31 -04:00
stage1/c_abi C ABI: support returning large structs on x86_64 2018-09-07 20:09:33 -04:00
stage2
standalone Fix additional regressions calling FileOutStream/FileInStream init() 2018-09-14 12:07:21 -04:00
assemble_and_link.zig
behavior.zig better string literal caching implementation 2018-09-20 11:04:31 -04:00
build_examples.zig add C ABI tests 2018-09-06 16:29:35 -04:00
cli.zig remove zig build --init. add zig init-lib and zig init-exe 2018-09-17 17:11:18 -04:00
compare_output.zig
compile_errors.zig add compile error for slice.*.len 2018-09-18 16:32:40 -04:00
gen_h.zig add C ABI tests 2018-09-06 16:29:35 -04:00
runtime_safety.zig fix codegen for @intCast to u0 2018-09-17 20:33:42 -04:00
tests.zig remove zig build --init. add zig init-lib and zig init-exe 2018-09-17 17:11:18 -04:00
translate_c.zig