aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
AgeCommit message (Collapse)Author
2020-03-19fix alignment when slicing with comptime start and end indexAndrew Kelley
2020-03-19`@ptrCast` supports casting a slice to pointerAndrew Kelley
2020-03-19fix slice of string literal having the wrong typeAndrew Kelley
2020-03-19fixes in semantic analysis needed to support this featureAndrew Kelley
2020-03-19slicing with comptime start and end results in arrayAndrew Kelley
implements #863
2020-03-19ir: More changes to sentinel-terminated const arraysLemonBoy
* Don't add an extra slot for the sentinel. Most of the code keeps using the constant value from the type descriptor, let's harmonize all the code dealing with sentinels. * Properly write out sentinel values when reinterpreting pointers at comptime. * Allow the reading of the 0th element in a `[0:S]T` type.
2020-03-13Merge remote-tracking branch 'origin/master' into llvm10Andrew Kelley
2020-03-12Merge pull request #4707 from Vexu/small-atomicsAndrew Kelley
Support atomic operations with bools and non power of two integers
2020-03-12add note to disabled tests, improve comptime cmpxchgVexu
2020-03-12Simplify stores, use sext for signed intsVexu
2020-03-12support `@atomicRmw` at comptimeVexu
2020-03-11Move abi size checking to codegenVexu
2020-03-11support cmpxchg at comptimeVexu
2020-03-11special case atomic operations on zero bit typesVexu
2020-03-11support non power of two integers in atomic opsVexu
2020-03-10ir: Fix shift code for u0 operandsLemonBoy
2020-03-10use atomic bools in std libVexu
2020-03-10support atomic operations with boolsVexu
2020-03-10ir: Implement more safety checks for shl/shrLemonBoy
The checks are now valid on types whose size is not a power of two. Closes #2096
2020-03-09Merge pull request #4590 from xackus/fix-4587Andrew Kelley
fix failed assert on generic fn opaque return type
2020-03-09ir: Fix codegen of ?*T types where T is zero-sizedLemonBoy
* Fix codegen for optional types that decay to a pointer, the type behaves as a boolean * Fix comptime evaluation of zero-sized arrays, always initialize the internal array elements Closes #4673
2020-03-09Merge pull request #4700 from Vexu/noasyncAndrew Kelley
Implement new noasync syntax
2020-03-09better error messages and more testsxackus
2020-03-09lazy_cmp_zero only resolves type is zero bits for alignofAndrew Kelley
2020-03-09ir: Fix lazy comparison between @alignOf and zeroLemonBoy
Closes #4527
2020-03-09disallow resume and suspend in noasync scopesVexu
2020-03-09implement noasync scopesVexu
2020-03-08ir: Create usize result_loc for array subscript exprLemonBoy
Allow the subscript expression to infer the resulting type. Closes #4169
2020-03-08fix failed assert on generic fn opaque return typexackus
2020-03-08Strip trailing whitespace from src/ir.cppdaurnimator
2020-03-08Fix grammar in error messagedaurnimator
2020-03-07Merge remote-tracking branch 'origin/master' into llvm10Andrew Kelley
2020-03-06stage1: make get_optional_type more robustAndrew Kelley
Now it will emit a compile error rather than crashing when the child type has not been resolved properly. Introduces `get_optional_type2` which should be used generally inside ir.cpp. Fix some std lib compile errors noticed by the provided test case. Thanks @LemonBoy for the test case. Closes #4377. Fixes #4374.
2020-03-06ir: remove pointless and misleading code in `@embedFile`Andrew Kelley
2020-03-05Revert "Allow constant struct val to reallocate its fields when resolving an ↵Andrew Kelley
inferred struct field with a comptime value." This reverts commit debcc79d56a40f77b92e243b4e344fc9385bd405. This caused a regression when building self-hosted
2020-03-05Allow constant struct val to reallocate its fields when resolving an ↵Alexandros Naskos
inferred struct field with a comptime value.
2020-03-04`@TypeOf` avoids heap allocation for only 1 parameterAndrew Kelley
2020-03-04ir: Implement @TypeOf with multiple argumentsLemonBoy
Closes #439
2020-03-04Merge pull request #4573 from alexnask/tuple_concatAndrew Kelley
Allow concatenation of tuples that contain a mix of runtime and comptime values
2020-03-04get_codegen_ptr_type returns possible errorAndrew Kelley
And fix most of the fallout. This also makes optional pointers not require resolving zero bits, because the comptime value struct layout no longer depends on whether the type has zero bits. Thanks to @LemonBoy for the behavior test case Closes #4357 Closes #4359
2020-03-03Merge remote-tracking branch 'origin/master' into llvm10Andrew Kelley
2020-03-02Merge branch 'master' of https://github.com/ziglang/zig into tuple_concatAlexandros Naskos
2020-03-02Removed unused variableAlexandros Naskos
2020-02-29C pointer slices are no longer allowzero (#4462)Alexandros Naskos
* Slices from C pointers are no longer allowzero but instead insert a runtime assertion. * Added a test, fixed code for cases with non-allowzero C pointers * Create new type when flipping allow_zero, sometimes we get a cached value back from adjust_ptr_len. * Added comments, changed panic message * Added runtime safety test.
2020-02-28Removed unused variableAlexandros Naskos
2020-02-28More fixes, removed debug printsAlexandros Naskos
2020-02-28Fixed tuple concatenation with runtime and comptime values.Alexandros Naskos
2020-02-27fix exported variable not respecting linkageAndrew Kelley
2020-02-27ir: Robust checking for init expr typeLemonBoy
Closes #3979
2020-02-26fix `@tagName` on extern and non-exhaustive enumsVexu