aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
AgeCommit message (Collapse)Author
2020-02-25ir: Fix array to slice conversion for zero-sized arraysLemonBoy
Closes #3848
2020-02-25ir: Various fixes for comptime ptr handlingLemonBoy
* Correctly fold ptrToInt on optional types * Generate null as ConstPtrSpecialNull in intToPtr * Correctly stop ptrToInt on ?*T where T is zero-sized Closes #4535
2020-02-25Merge remote-tracking branch 'origin/master' into llvm10Andrew Kelley
2020-02-25Merge pull request #4515 from mikdusan/stage1-gen-constantsMichael Dusan
stage1: free more heap after analysis
2020-02-25remove `@IntType` and `@ArgType` (mostly) from the compilerVexu
2020-02-24remove `@typeId`, `@memberCount`, `@memberName` and `@memberType` from the ↵Vexu
compiler
2020-02-23nuke @bytesToSlice, @sliceToBytes in stage1xackus
2020-02-20stage1: free more heap after analysisMichael Dusan
- immediately free dangling IrInstGenConst after analysis - fixup mem::List params `&Allocator` → `*Allocator`
2020-02-20ir: Compile error on result_loc type mismatch w/ slicingLemonBoy
Closes #4508
2020-02-18Merge pull request #4474 from LemonBoy/saukerkrautAndrew Kelley
Patches
2020-02-18Makes the declaration slice resolve lazely when using `@typeInfo`Timon Kruiper
This way all the declarations in a container won't be resolved untill the user actually uses the decls slice in the builtin TypeInfo union.
2020-02-16ir: Avoid invalidating the decl_table iteratorLemonBoy
Collect the declarations to resolve first and run resolve_top_level_decl on them later. Closes #4310
2020-02-16ir: Prevent crash when indexing undefined ptr to arrayLemonBoy
Closes #4471
2020-02-16Implement noasync awaitsAndrew Kelley
Note that there is not yet runtime safety for this. See #3157
2020-02-14Merge remote-tracking branch 'origin/master' into llvm10Andrew Kelley
2020-02-14ir: Make all the payload captures do a copyLemonBoy
The payload doesn't alias anymore the same memory it comes from and is instead a fresh copy of the original object.
2020-02-13ir: Don't crash when converting undefined ptrsLemonBoy
2020-02-13ir: Allow implicit conversion between vector typesLemonBoy
Only valid when the number of elements match and the types are compatible. Fixes #4334
2020-02-11ir: Fix erroneous error message for ptr castsLemonBoy
Don't blindly throw an error if two integer types are checked for compatibility. Bug reported in #4430
2020-02-10Merge pull request #4389 from mikdusan/stage1-memMichael Dusan
stage1: memory/report overhaul
2020-02-10stage1: memory/report overhaulMichael Dusan
- split util_base.hpp from util.hpp - new namespaces: `mem` and `heap` - new `mem::Allocator` interface - new `heap::CAllocator` impl with global `heap::c_allocator` - new `heap::ArenaAllocator` impl - new `mem::TypeInfo` extracts names without RTTI - name extraction is enabled w/ ZIG_ENABLE_MEM_PROFILE=1 - new `mem::List` takes explicit `Allocator&` parameter - new `mem::HashMap` takes explicit `Allocator&` parameter - add Codegen.pass1_arena and use for all `ZigValue` allocs - deinit Codegen.pass1_arena early in `zig_llvm_emit_output()`
2020-02-10Add cast between [*c]T and ?[*:0]T on fn parameterTimon Kruiper
Fixes #4176
2020-02-10compile error instead of abort for unimplemented `@typeInfo`Andrew Kelley
of `@Frame(func)`. Closes #3995
2020-02-10fix compiler assertion when duplicating fields...Andrew Kelley
...in nested anonymous struct literals closes #4391
2020-02-10Merge remote-tracking branch 'origin/master' into llvm10Andrew Kelley
2020-02-10Merge pull request #4404 from ziglang/async-stdAndrew Kelley
a big step towards std lib integration with async I/O
2020-02-09fix not checking type of return pointerAndrew Kelley
Thanks to Vexu for the test cases. Closes #3422 Closes #3646 Closes #3224 Closes #3327 Closes #3269
2020-02-09fix defer interfering with return value spillAndrew Kelley
2020-02-08solve previous commit a better wayAndrew Kelley
2020-02-08Revert "properly spill optional payload capture value"Andrew Kelley
This reverts commit 80ba21b83cd13849c1d1d9cdebfa070b03f334d3.
2020-02-08properly spill optional payload capture valueAndrew Kelley
2020-02-05Fix edge case in cast between fn with varargsLemonBoy
* Prevent the next_param_index to become greater than the param_count one as it's expected by every other function. * Fix a typo in a error message. Closes #4381
2020-01-30drop @newStackCallAndrew Kelley
this was causing unrelated behavior tests to fail. if this commit is reverted, the docs are good, but `@newStackCall` is already deprecated in favor of `@call`, supplying the `stack` property.
2020-01-29simplify int/float comparisonAndrew Kelley
2020-01-29Fix comptime float-int comparisonsLemonBoy
Closes #4259
2020-01-29Fix edge case in switch with single elseLemonBoy
ir_gen_switch_expr doesn't set the switch_br field at all if there are zero cases, detect this situation and handle it gracefully. Closes #4322
2020-01-29Add a spill to while error unionBenjamin Feng
2020-01-28Add a spill to while optionalBenjamin Feng
2020-01-28fix more compile error test regressionsAndrew Kelley
2020-01-28fix result locations not handling undefined correctlyAndrew Kelley
2020-01-28fix error message column/line number regressionsAndrew Kelley
2020-01-28fix regression of storing optional with 0-bit payloadAndrew Kelley
2020-01-28fix 0-bit child type coerced to optional return ptr result locationAndrew Kelley
by un-special-casing 0 bit types in result locations
2020-01-27fix line, column numbers of compile errorsAndrew Kelley
2020-01-27add missing spill for for loops with pointer elemsAndrew Kelley
2020-01-27fix auto created variables not having correct alignmentAndrew Kelley
2020-01-27fix not handling undefined u0 correctlyAndrew Kelley
2020-01-27fix triple level result location with bitcast sandwichAndrew Kelley
...passed as tuple element
2020-01-27`@bitCast` result location: fix passing invalid alignmentAndrew Kelley
when the value has 0 bits
2020-01-27fix nested bitcast passed as tuple elementAndrew Kelley