aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
AgeCommit message (Collapse)Author
2020-01-16zig ir.cpp details: remove the mem_slot mechanismAndrew Kelley
Previously, there was hacky code to deal with result locations and how they work with regards to comptime values and runtime values. In addition, there was a hacky "mem_slot" mechanism that managed the memory for local variables, and acted differently depending on comptime vs runtime situations. All that is deleted in this commit, and as a result, result locations code has one less complication. Importantly, this means that a comptime result location is now passed to a function when it is evaluated at comptime. This test causes many regressions, and some of the behavior tests are disabled (commented out) in this commit. Future commits will re-enable the tests before merging the branch.
2020-01-16implement `@bitSizeOf`Vexu
2020-01-15stage1: move local native_libc.txt to globalMichael Dusan
Automatic creation of `native_libc.txt` now occurs only in global cache. Manual creation/placement into local cache is supported. closes #3975
2020-01-14Fix codegen error for some union initializersLemonBoy
Closes #3377
2020-01-13Allow switching on pointer typesLemonBoy
Closes #4074
2020-01-11Stop dropping errors from clangLemonBoy
* Refactor the error-writing code to be more compact and flexible
2020-01-10Inform the debugger about the effective type sizesLemonBoy
Makes every debugger happy and closes #2685
2020-01-09New @export() handlingLemonBoy
Use a struct as second parameter to be future proof (and also allows to specify default values for the parameters) Closes #2679 as it was just a matter of a few lines of code.
2020-01-07cleanups related to --eh-frame-hdrAndrew Kelley
2020-01-07add --eh-frame-hdr conditionallyDavid Cao
2020-01-06remove stdcallcc, extern, nakedcc from stage1; zig fmt rewritesAndrew Kelley
2020-01-06Merge branch 'cc-work' of https://github.com/LemonBoy/zig into LemonBoy-cc-workAndrew Kelley
2020-01-03translate-c supports --cache onAndrew Kelley
this will be used to provide a zig build step
2020-01-02fix comptime vector float ops and add test coverageAndrew Kelley
also rename `@ln` to `@log` to match libc convention.
2020-01-02Use the LLVM C++ APILemonBoy
2020-01-02Implement Thiscall CCLemonBoy
2020-01-02Catch more errors during the type resolution phaseLemonBoy
Returning the uninitialized/stale error condition made the compiler turn a blind eye to some problems.
2020-01-02Implement the callconv() annotationLemonBoy
2020-01-01fix float ops with respect to vectorsAndrew Kelley
also remove the redundant type parameter
2019-12-31Merge branch 'stage-2-cimport' of https://github.com/Vexu/zig into ↵Andrew Kelley
Vexu-stage-2-cimport
2019-12-30Merge pull request #3683 from Vexu/atomic-floatAndrew Kelley
Support floats with some atomic operations
2019-12-30Resolve more types as neededLemonBoy
Closes #3994
2019-12-29use self hosted translate-c for cimportsVexu
2019-12-23add zig llvm wrapper for atomicrmwVexu
2019-12-23support some atomic operations with floatsVexu
2019-12-20fix safety for sentinel-slicing floatsAndrew Kelley
2019-12-20sentinel slicing improvementsAndrew Kelley
* add runtime safety for slicing pointers, arrays, and slices. * slicing without a sentinel value results in non-sentineled slice * improved `std.debug.panic` handling of panic-during-panic
2019-12-16expose the ability to disable C sanitizationAndrew Kelley
and disable C sanitization when building libcs. Empirically, they seem to trigger undef-sanitization.
2019-12-16use -fsanitize=undefined for C code in safe build modesAndrew Kelley
closes #3569
2019-12-15improve extern enumVexu
2019-12-15Generate the fn pointers into the correct address spaceLemonBoy
Fixes #3645
2019-12-15Make sure the address is aligned for intToPtr opsLemonBoy
Closes #773
2019-12-13Merge pull request #3896 from Vexu/translate-c-2Andrew Kelley
Translate-c self-hosted var decl and remove translate mode
2019-12-13revert removal of translate mode in stage 1Vexu
2019-12-12un-special-case startup code in the std libAndrew Kelley
Previously, the compiler had special logic to determine whether to include the startup code, which was in `std/special/start.zig`. Now, the file is moved to `std/start.zig`, and there is no special logic in the compiler. Instead, the standard library unconditionally imports the `start.zig` file, which then has a `comptime` block that does the logic of determining what, if any, start symbols to export. Instead of `start.zig` being in its own special package, it is just another normal file that is part of the standard library. `std.builtin.TestFn` is now part of the standard library rather than specially generated by the compiler.
2019-12-12remove concept of translate modeVexu
2019-12-10Replace typeOf with TypeOf in stage0Robin Voetter
2019-12-09remove var args from the languageAndrew Kelley
closes #208
2019-12-08tuple detection does not require AST nodeAndrew Kelley
2019-12-06Merge pull request #3856 from ziglang/builtin-callAndrew Kelley
introduce `@call` and remove other builtin calls
2019-12-06remove `@inlineCall` from zigAndrew Kelley
2019-12-05private linkage for unnamed internal constantsAndrew Kelley
2019-12-05remove `@noInlineCall` from zigAndrew Kelley
2019-12-05implement `@call`Andrew Kelley
closes #3732
2019-12-03fix `zig builtin`Andrew Kelley
2019-12-03WinMainCRTStartup implies defaulting to console subsystemAndrew Kelley
2019-12-03activate start code when pub main existsAndrew Kelley
and rename LinkType->LinkMode, OutType->OutputMode
2019-12-03correct caching and add test for missing fn nameVexu
2019-12-03move more startup code to std libVexu
2019-12-02Accept comptime-known expression for asmLemonBoy