zig/src
Andrew Kelley f4e051e35d Sema: fix comptime break semantics
Previously, breaking from an outer block at comptime would result in
incorrect control flow. Now there is a mechanism, `error.ComptimeBreak`,
similar to `error.ComptimeReturn`, to send comptime control flow further
up the stack, to its matching block.

This commit also introduces a new log scope. To use it, pass
`--debug-log sema_zir` and you will see 1 line per ZIR instruction
semantically analyzed. This is useful when you want to understand what
comptime control flow is doing while debugging the compiler.

One more `switch` test case is passing.
2022-01-17 15:23:50 -07:00
..
arch stage2: implement airCondBr for immediate MCValue in x86_64 2022-01-17 16:35:41 +01:00
codegen stage2: implement @prefetch 2022-01-15 15:18:25 -07:00
link stage2: implement @prefetch 2022-01-15 15:18:25 -07:00
stage1 stage1: fix bigint_init_bigfloat for single-limb negative floats 2022-01-14 13:29:58 -05:00
translate_c allocgate: std Allocator interface refactor 2021-11-30 23:32:47 +00:00
Air.zig stage2: implement @prefetch 2022-01-15 15:18:25 -07:00
AstGen.zig stage2: do not interpret identifier containing underscores (eg: u3_2) as int primitive type 2022-01-17 16:54:48 +02:00
BuiltinFn.zig AstGen: implement @prefetch() builtin 2021-12-10 23:09:02 +01:00
Cache.zig stage2: add @import and @embedFile to CacheHash 2022-01-02 13:16:17 -07:00
clang_options_data.zig zig cc: integration with sysroot arg (#10568) 2022-01-11 12:41:26 -05:00
clang_options.zig zig cc: honor all -m and -mno- CPU feature flags 2021-11-26 19:59:33 -07:00
clang.zig stage1, stage2: rename c_void to anyopaque (#10316) 2021-12-19 00:24:45 -05:00
codegen.zig stage2: fix Decl garbage collection not marking enough 2022-01-15 00:17:25 -07:00
Compilation.zig Introduce LinkObject with must_link field 2022-01-13 20:02:11 +01:00
config.zig.in macho: dump linker's state as JSON 2021-10-22 12:50:25 +02:00
crash_report.zig stage1, stage2: rename c_void to anyopaque (#10316) 2021-12-19 00:24:45 -05:00
DepTokenizer.zig allocgate: renamed getAllocator function to allocator 2021-11-30 23:32:47 +00:00
empty.zig fix wrong entrypoint, undefined package, and wrong build option 2020-12-07 17:27:09 -07:00
glibc.zig glibc: clean up build logic 2022-01-14 12:39:06 -07:00
introspect.zig allocgate: std Allocator interface refactor 2021-11-30 23:32:47 +00:00
libc_installation.zig allocgate: std Allocator interface refactor 2021-11-30 23:32:47 +00:00
libcxx.zig Build fs/filesystem libcxx module when targeting GNU Win 2022-01-10 23:40:15 +01:00
libtsan.zig stage2: fix path to cache artifacts in libcxx, 2022-01-02 13:16:17 -07:00
libunwind.zig stage2: fix path to cache artifacts in libcxx, 2022-01-02 13:16:17 -07:00
link.zig Introduce LinkObject with must_link field 2022-01-13 20:02:11 +01:00
Liveness.zig stage2: implement @prefetch 2022-01-15 15:18:25 -07:00
main.zig Introduce LinkObject with must_link field 2022-01-13 20:02:11 +01:00
mingw.zig lint: duplicate import (#10519) 2022-01-07 00:06:06 -05:00
Module.zig Sema: fix comptime break semantics 2022-01-17 15:23:50 -07:00
musl.zig stage2: introduce CacheMode 2022-01-02 13:16:17 -07:00
Package.zig allocgate: std Allocator interface refactor 2021-11-30 23:32:47 +00:00
print_air.zig stage2: implement @prefetch 2022-01-15 15:18:25 -07:00
print_env.zig allocgate: std Allocator interface refactor 2021-11-30 23:32:47 +00:00
print_targets.zig allocgate: std Allocator interface refactor 2021-11-30 23:32:47 +00:00
print_zir.zig stage2: detection of comptime array literals 2022-01-13 22:13:44 -07:00
RangeSet.zig allocgate: std Allocator interface refactor 2021-11-30 23:32:47 +00:00
register_manager.zig stage2 ARM: implement struct_field_ptr and struct_field_val 2021-12-30 14:39:06 +01:00
Sema.zig Sema: fix comptime break semantics 2022-01-17 15:23:50 -07:00
stage1.zig dupe sym name from stage1 before passing to stage2 2022-01-11 13:33:53 +01:00
target.zig glibc: fix inconsistency of powerpc ABI mapping 2021-12-16 03:01:13 -07:00
test.zig stage2: use Target.Abi instead of introducing Target.TargetAbi 2021-12-03 17:33:20 -07:00
ThreadPool.zig allocgate: std Allocator interface refactor 2021-11-30 23:32:47 +00:00
tracy.zig lint: duplicate import (#10519) 2022-01-07 00:06:06 -05:00
translate_c.zig translate-c: improve error messages when expecting specific tokens 2022-01-17 17:16:48 +02:00
type.zig Sema: fix array_init with runtime element 2022-01-14 23:08:11 -07:00
TypedValue.zig allocgate: std Allocator interface refactor 2021-11-30 23:32:47 +00:00
value.zig stage2: fix Decl garbage collection not marking enough 2022-01-15 00:17:25 -07:00
WaitGroup.zig std.Thread.Mutex: change API to lock() and unlock() 2021-11-09 18:31:03 -07:00
wasi_libc.zig allocgate: renamed getAllocator function to allocator 2021-11-30 23:32:47 +00:00
windows_com.hpp Spelling corrections (#9833) 2021-09-24 13:39:20 -04:00
windows_sdk.cpp finalize windows_sdk paths based on snickler suggestions 2021-09-07 21:49:08 -06:00
windows_sdk.h fix regressed stage2 test harness 2020-09-21 21:14:01 -07:00
windows_sdk.zig stage2: update for new usingnamespace semantics 2021-09-01 17:54:07 -07:00
zig_clang_cc1_main.cpp update clang tools to 13 rc1 2021-08-15 18:06:29 -07:00
zig_clang_cc1as_main.cpp update clang tools to 13 rc1 2021-08-15 18:06:29 -07:00
zig_clang_driver.cpp update clang tools to 13 rc1 2021-08-15 18:06:29 -07:00
zig_clang.cpp translate-c: create inline fn for always_inline 2021-10-20 17:58:30 -04:00
zig_clang.h translate-c: create inline fn for always_inline 2021-10-20 17:58:30 -04:00
zig_llvm-ar.cpp Merge remote-tracking branch 'origin/master' into llvm13 2021-09-30 21:38:04 -07:00
zig_llvm.cpp stage2: LLVM backend: fix lowering of union constants 2021-12-28 01:53:58 -07:00
zig_llvm.h stage2: LLVM backend: fix lowering of union constants 2021-12-28 01:53:58 -07:00
Zir.zig stage2: detection of comptime array literals 2022-01-13 22:13:44 -07:00