aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
AgeCommit message (Collapse)Author
2020-01-27Merge branch 'master' into ir-clean-up-varsAndrew Kelley
2020-01-27Merge branch 'fx-4274' of https://github.com/LemonBoy/zig into LemonBoy-fix-4274Andrew Kelley
2020-01-26fix compilation errorAndrew Kelley
2020-01-25Merge remote-tracking branch 'origin/master' into layneson-cpus_and_featuresAndrew Kelley
2020-01-25fix memory profilingAndrew Kelley
2020-01-25split IrInstruction into IrInst, IrInstSrc, IrInstGenAndrew Kelley
This makes it so that less memory is used for IR instructions, as well as catching bugs when one expected one kind of instruction and received the other.
2020-01-23More error checking for unresolved TLDsLemonBoy
Closes #4274
2020-01-20improve `zig targets`Andrew Kelley
2020-01-18Merge pull request #4222 from LemonBoy/eutwouwthAndrew Kelley
Prevent crash with empty non-exhaustive enum
2020-01-18Fix edge case in tagName handling of unionsLemonBoy
Closes #4226
2020-01-18Get rid of some dead logicLemonBoy
2020-01-18Prevent crash with empty non-exhaustive enumLemonBoy
2020-01-18Allow @tagName on enum literalsLemonBoy
Closes #4214
2020-01-17Merge pull request #4191 from Vexu/non-exhaustive-enumsAndrew Kelley
Implement non-exhaustive enums
2020-01-16revert one part of ir get_elem_ptr analysisAndrew Kelley
this reverts one part of 4c3bfeca. it solves some behavior regressions but introduces new ones. This change was incorrect to make however, and this commit takes the code in a better direction.
2020-01-16fix regression with optionals and globalsAndrew Kelley
2020-01-16fix regressions double implicit casting return ptrAndrew Kelley
2020-01-16fix regression with inferred struct fieldsAndrew Kelley
2020-01-16fix regressions in get_elem_ptr related to undefinedAndrew Kelley
2020-01-16fix implicit cast regressionAndrew Kelley
2020-01-16fix regression with var ptrs not being constAndrew Kelley
2020-01-16fix regression in global const alignmentAndrew Kelley
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-16add struct field default value to typeinfoVexu
2020-01-16implement `@bitSizeOf`Vexu
2020-01-16turn panics into compile errors, require at least 1 field in non-exhaustive enumVexu
2020-01-15small fixesVexu
* error for '_' prong on exhaustive enum * todo panic for `@tagName` on non-exhaustive enum * don't require '_' field on tagged unions
2020-01-15add is_exhaustive field to typeinfoVexu
2020-01-15implement non-exhaustive enumsVexu
2020-01-14Make sure @export symbol name is not emptyLemonBoy
2020-01-13Validate switch range endpointsLemonBoy
2020-01-12Fix @call being too eager to resolve the fn argumentLemonBoy
Closes #4020
2020-01-12Propagate errors in for loop bodiesLemonBoy
Closes #3819
2020-01-09Merge pull request #3955 from LemonBoy/fix-1528Andrew Kelley
Pointer arithmetic affects the alignment factor
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-09Correct alignment calculation for runtime addendsLemonBoy
2020-01-08Propagate more failures upwardsLemonBoy
Fixes #4112
2020-01-08Fix calculation of new alignment factorLemonBoy
2020-01-08Pointer arithmetic affects the alignment factorLemonBoy
Closes #1528
2020-01-07Fix crash with unresolved locLemonBoy
Fixes #4099
2020-01-07Fix crash in struct initializer evaluationLemonBoy
Closes #4100
2020-01-06Prevent bitCast to enum typesLemonBoy
Stop the user from creating invalid enum values.
2020-01-06fix regression with `@TypeInfo`Andrew Kelley
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-03Correct evaluation of optional type alignmentLemonBoy
The lazy logic was too oversimplified and produced a different result than the one computed later causing all kinds of problems. Closes #4013
2020-01-02Merge pull request #4027 from ziglang/fix-float-opsAndrew Kelley
fix float ops with respect to vectors
2020-01-02fix comptime vector float ops and add test coverageAndrew Kelley
also rename `@ln` to `@log` to match libc convention.
2020-01-02Implement Thiscall CCLemonBoy
2020-01-02Implement the callconv() annotationLemonBoy