aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
AgeCommit message (Collapse)Author
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
2019-12-01inline ConstGlobalRefs into ZigValueAndrew Kelley
Having ConstGlobalRefs be a pointer in ZigValue was a hack that caused plenty of bugs. It was used to work around difficulties in type coercing array values into slices. However, after #3787 is merged, array values no longer type coerce into slices, and so this provided an opportunity to clean up the code. This has the nice effect of reducing stage1 peak RAM usage during the std lib tests from 3.443 GiB to 3.405 GiB (saving 39 MiB). There is one behavior test failing in this branch, which I plan to debug after merging #3787.
2019-11-30Merge pull request #3284 from Sahnvour/export_variablesAndrew Kelley
Improved support for exporting variables
2019-11-25stage1: consolodate interningMichael Dusan
- merge const_void_val → intern.x_void - move const_zero_byte → intern.zero_byte - wrap intern access
2019-11-25const interning for 1-possible-value typesMichael Dusan
2019-11-25unembed ZigValue from IrInstructionMichael Dusan
2019-11-25rename ConstExprValue → ZigValueMichael Dusan
2019-11-24Merge remote-tracking branch 'origin/master' into null-terminated-pointersAndrew Kelley
2019-11-24gen-h: register the need for stdbool.h and stdint.h when exploring types ↵Sahnvour
recursively otherwise they wouldn't be included when only a struct contains them