Commit Graph

8815 Commits (24a01eed90b60a1e57172ae5a5305bc437bfeaba)

Author SHA1 Message Date
Andrew Kelley 24a01eed90 basics of writing ELF and machine code generation 2020-04-23 16:41:20 -04:00
Andrew Kelley a3dfe36ca1 zir-to-elf skeleton 2020-04-22 23:42:58 -04:00
Andrew Kelley e8545db9d4
Merge pull request #5130 from ziglang/stage2-ir
beginnings of non-LLVM self-hosted backend
2020-04-22 14:42:46 -04:00
LemonBoy b5e72c0148 stage1: Prevent the creation of illegal pointer types
Changing the pointer length from Unknown to Single/C now resets the
sentinel value too.

Closes #5134
2020-04-22 14:40:57 -04:00
Andrew Kelley 173a143dd0
Merge pull request #5133 from LemonBoy/win-progress
Progressbar for Windows
2020-04-22 12:52:48 -04:00
LemonBoy 0a2519fafb stage2: Allow \t in string literals
Lift the ban on literal tab chars in string literals as they have
nothing to do with code formatting.
2020-04-22 12:48:45 -04:00
LemonBoy 155e631aa6 std: Implement progress for Windows
Use the Win32 API instead of using the VT escape sequences.
2020-04-22 12:58:02 +02:00
LemonBoy 395b530387 stage1: Another hack for the C ABI compatibility
Applying the wrong ABI is slightly better than using the Zig ABI, the
whole thing is so wrong it should be burned to the ground.
2020-04-22 12:52:24 +02:00
Andrew Kelley 1eda2ada9a std.math.big.Int: don't rely on the allocator when printing 2020-04-22 03:49:50 -04:00
Andrew Kelley d58233b361 ir: improve ZIR emission enough to emit hello world 2020-04-22 03:08:50 -04:00
Andrew Kelley b1a86040dd ir: emit zir for fntype 2020-04-22 00:26:37 -04:00
Andrew Kelley 993e654554 emit zir skeleton 2020-04-22 00:04:52 -04:00
Andrew Kelley 2e6ccec100 ir: analyze asm instruction 2020-04-21 22:19:32 -04:00
Andrew Kelley 8d3e4147d5 ir: analyze deref instruction 2020-04-21 21:33:55 -04:00
Andrew Kelley 2c11acf807 ir: analyze fieldptr instruction 2020-04-21 21:14:56 -04:00
Andrew Kelley c12bc8652e ir: analyze ptrtoint 2020-04-21 20:34:40 -04:00
Andrew Kelley 2cdbb5f472 ir: analyze int casting 2020-04-21 19:48:59 -04:00
elucent 48dc3b6fe9 Added peer type resolution for [*]T and *[N]T. 2020-04-21 18:09:03 -04:00
Michael Dusan 412aac8a70 cleanup: IrBasicBlockGen
remove unused param from `ir_ref_inst_gen`
2020-04-21 18:07:48 -04:00
Michael Dusan 73677e178d cleanup: IrBasicBlockGen
remove unused members { parent, index, ref_count }
2020-04-21 18:07:48 -04:00
Haze Booth 78e2a203e3 Remove std.lazyInit 2020-04-21 18:04:37 -04:00
Andrew Kelley 0746028a2a ir: analyze int instruction 2020-04-21 17:54:00 -04:00
Andrew Kelley 69878207e7 ir: analyze `as` instruction 2020-04-21 17:33:41 -04:00
Andrew Kelley 25679b63eb ir: analyze primitive instruction 2020-04-21 17:11:42 -04:00
Andrew Kelley 8671e8d6d4 ir: analyze fntype instruction 2020-04-21 17:06:09 -04:00
Andrew Kelley 22e7ca5613 ir: analysis of fn instruction 2020-04-21 16:06:15 -04:00
Andrew Kelley 9a2ea5ca42 ir: comptime coerceArrayPtrToSlice 2020-04-21 13:50:04 -04:00
Andrew Kelley fb63ba2577 ir: type coercion skeleton 2020-04-21 13:24:25 -04:00
Andrew Kelley 8e0bcaca9b ir: analyze str instruction 2020-04-21 01:20:01 -04:00
Andrew Kelley 4c7507cceb ir: semantic analysis skeleton 2020-04-21 00:56:30 -04:00
LemonBoy aca6b70184 stage1: Handle errors when generating block IR
Closes #5005
2020-04-20 22:39:34 -04:00
Robin Voetter 32e5248820 Remove old-style @typeOf compatibility 2020-04-20 22:38:29 -04:00
Andrew Kelley cc1c2bd568 simplify ZIR spec; separate parsing/rendering from analysis 2020-04-20 19:21:03 -04:00
LemonBoy 5eaf948e62 stage1: Fix wrong union access
Thanks to @frett27 on irc for reporting the compiler would segfault when
run on ARM.
2020-04-20 13:43:14 -04:00
Andrew Kelley af4ccf34c1 ir: render keyword parameters 2020-04-19 23:59:00 -04:00
Andrew Kelley f7786d0ca8 ir: render function body 2020-04-19 23:39:34 -04:00
Andrew Kelley e74c5a7c24 ir: nice rendering of string literal constants 2020-04-19 20:44:18 -04:00
Andrew Kelley 91ca0e4b02 implement rendering escaped zig string literals 2020-04-19 20:33:15 -04:00
Andrew Kelley ded6e0326d ir: rendering skeleton 2020-04-19 20:04:11 -04:00
Andrew Kelley 1f3eeb5443 ir: parse type noreturn 2020-04-19 19:31:50 -04:00
Andrew Kelley 104ae419e4 ir: parse export instruction 2020-04-19 19:31:50 -04:00
Andrew Kelley f020999ca3 ir: parse asm instructions 2020-04-19 19:31:50 -04:00
Andrew Kelley 82e294cf09 ir: parse deref instruction 2020-04-19 19:31:50 -04:00
Andrew Kelley 730dd887e4 ir: parse string literals as parameters 2020-04-19 19:31:50 -04:00
Andrew Kelley bd37c8d8ed ir: parse ptrtoint 2020-04-19 19:31:50 -04:00
Andrew Kelley 49e2f3ca36 ir: more foolproof way to organize instruction parsing 2020-04-19 19:31:50 -04:00
Andrew Kelley 4cb203db92 ir: parsing integer literals 2020-04-19 19:31:50 -04:00
Andrew Kelley 7127c07f68 ir: parse types 2020-04-19 19:31:50 -04:00
Andrew Kelley 59154a1c51 ir: parse fn body 2020-04-19 19:31:50 -04:00
Andrew Kelley 018daa028e rework types and values data layout 2020-04-19 19:31:50 -04:00