zig/src-self-hosted
Andrew Kelley 130c7fd23b self-hosted: working towards conditional branching test case
New features:
 * Functions can have parameters in semantic analysis. Codegen
   is not implemented yet.
 * Support for i8, i16, i32, i64, u8, u16, u32, u64 primitive
   identifiers.
 * New ZIR instructions: arg, block, and breakvoid

Implementation details:

 * Move Module.Body to ir.Body
 * Scope.Block gains a parent field and an optional Label field
 * Fix bug in integer type equality comparison.

Here's the test case I'm working towards:

```
@void = primitive(void)
@i32 = primitive(i32)
@fnty = fntype([@i32, @i32], @void)

@0 = str("entry")
@1 = export(@0, "entry")

@entry = fn(@fnty, {
  %0 = arg(0)
  %1 = arg(1)
  %2 = add(%0, %1)
  %3 = int(7)
  %4 = block("if", {
    %neq = cmp(%2, neq, %3)
    %5 = condbr(%neq, {
      %6 = unreachable()
    }, {
      %7 = breakvoid("if")
    })
  })
  %11 = returnvoid()
})
```

$ ./zig-cache/bin/zig build-obj test.zir
test.zir:9:12: error: TODO implement function parameters for Arch.x86_64

That's where I left off.
2020-06-26 02:30:14 -04:00
..
codegen [Stage2/x86] Fix 8-bit register order 2020-06-08 02:28:39 -04:00
clang.zig translate-c: fix decl statement regression 2020-05-23 17:50:35 -04:00
clang_options.zig zig cc: fix ambiguity with -MT 2020-04-02 21:15:36 -04:00
clang_options_data.zig zig cc looks for native include directories unless -nostdinc 2020-04-04 14:58:24 -04:00
codegen.zig self-hosted: working towards conditional branching test case 2020-06-26 02:30:14 -04:00
dep_tokenizer.zig (breaking) std.Buffer => std.ArrayListSentineled(u8, 0) 2020-04-01 13:30:07 -04:00
introspect.zig self-hosted: use fs.selfExePathAlloc 2020-03-25 18:40:28 -04:00
ir.zig self-hosted: working towards conditional branching test case 2020-06-26 02:30:14 -04:00
libc_installation.zig rework self-hosted compiler for incremental builds 2020-05-10 02:05:54 -04:00
link.zig self-hosted: fix test regressions 2020-06-24 20:28:52 -04:00
llvm.zig fix stage2 build 2019-12-29 11:04:58 +02:00
main.zig self-hosted: add compare output test for new AST->ZIR code 2020-06-24 21:28:42 -04:00
Module.zig self-hosted: working towards conditional branching test case 2020-06-26 02:30:14 -04:00
Package.zig self-hosted: link: global offset table support for decls 2020-05-12 20:11:47 -04:00
print_targets.zig windows: don't hard-code forward-slash paths 2020-03-27 21:28:52 -04:00
stage2.zig Merge remote-tracking branch 'origin/master' into self-hosted-incremental-compilation 2020-05-16 01:26:18 -04:00
test.zig self-hosted: add compare output test for new AST->ZIR code 2020-06-24 21:28:42 -04:00
tracy.zig self-hosted: fix test regressions 2020-06-24 20:28:52 -04:00
translate_c.zig Compacts switch statements and string literal 2020-06-21 21:48:12 +01:00
type.zig self-hosted: working towards conditional branching test case 2020-06-26 02:30:14 -04:00
TypedValue.zig self-hosted: implement Decl lookup 2020-06-18 17:12:56 -04:00
value.zig self-hosted: working towards conditional branching test case 2020-06-26 02:30:14 -04:00
windows_sdk.zig self-hosted libc detection 2020-02-16 13:25:30 -05:00
zir.zig self-hosted: working towards conditional branching test case 2020-06-26 02:30:14 -04:00