aboutsummaryrefslogtreecommitdiff
path: root/src/Module.zig
AgeCommit message (Collapse)Author
2020-12-29stage2: C backend improvementsAndrew Kelley
* Module: improve doc comments * C backend: improve const-correctness * C backend: introduce renderTypeAndName * C backend: put `static` on functions when appropriate * C backend: fix not handling errors in genBinOp * C backend: handle more IR instructions - alloc, store, boolean comparisons, ret_ptr * C backend: call instruction properly stores its result * test harness: ensure execution tests have empty stderr
2020-12-28stage2: add extern functionsAndrew Kelley
and improve the C backend enough to support Hello World (almost)
2020-12-28Revert "stage2: add compile log statement (#7191)"Andrew Kelley
The addition of `addDeclErr` introduced a memory leak at every call site, and I also would like to push back on having more than 1 compilation error per `Decl`. This reverts commit 1634d45f1d53c8d7bfefa56ab4d2fa4cc8218b6d.
2020-12-26Merge pull request #7552 from Vexu/stage2-continueVeikka Tuominen
stage2 continue
2020-12-26stage2: add compile log statement (#7191)g-w1
2020-12-26stage2: add error for unused labelsVeikka Tuominen
2020-12-26stage2: break and continue out of loopsVeikka Tuominen
2020-12-04stage2: introduce Module.failed_root_source_fileAndrew Kelley
Use case: zig build-exe non_existent_file.zig Previous behavior: error.FileNotFound, followed by an error return trace Behavior after this commit: error: unable to read non_existent_file.zig: FileNotFound (end of stderr, exit code 1) This turns AllErrors.Message into a tagged union which now has the capability to represent both "plain" errors as well as source-based errors (with file, line, column, byte offset). The "no entry point found" error has moved to be a plain error message.
2020-11-19Add builtin.Signedness, use it instead of is_signedTadeo Kondrak
2020-10-30stage2: switch comptime executionVexu
2020-10-30stage2: redesign switchbrVexu
Switchbr now only handles single item prongs. Ranges and multi item prongs are checked with condbrs after the switchbr.
2020-10-30stage2: dump generated zir with --verbose-irVexu
2020-10-30stage2: switch emit zirVexu
2020-10-30stage2: support imports inside packagesVexu
2020-10-30stage2: detect import outside file pathVexu
2020-10-17Merge pull request #6291 from pixelherodev/cbe_arithmeticAndrew Kelley
CBE: addition and subtraction
2020-10-07Fix improper reuse of global symbols in MachOJakub Konka
Signed-off-by: Jakub Konka <kubkon@jakubkonka.com>
2020-10-07Rename variables in resolvePeerTypes for clarityNoam Preil
2020-10-07Fix peer type resolutionNoam Preil
2020-10-06Peer type resolution: comptime_int decay to other intNoam Preil
2020-10-06Stage2 peer type resolution: comptime_int + other_int_typeNoam Preil
2020-09-30stage2: use directory handles for importsVexu
2020-09-30stage2: detect changes in imported filesVexu
2020-09-30stage2: very basic importsVexu
2020-09-30stage2: add import builtin stubVexu
2020-09-28store stage1 flags in a trailing byte in the hash id symlinkAndrew Kelley
When we get a cache hit for a stage1 compilation, we need to know about some of the flags such as have_winmain or have_dllmain to know which subsystem to infer during linking. To do this, we append a hex-encoded byte into the intentionally-dangling symlink which contains the cache hash digest rather than a filename. The hex-encoded byte contains the flags we need to infer the subsystem during linking.
2020-09-28stage2: building mingw-w64 and COFF LDD linkingAndrew Kelley
still TODO is the task of creating import .lib files for DLLs on the fly both for -lfoo and for e.g. `extern "kernel32"`
2020-09-21rename src-self-hosted/ to src/Andrew Kelley