aboutsummaryrefslogtreecommitdiff
path: root/src/analyze.cpp
AgeCommit message (Collapse)Author
2019-10-09Merge pull request #3389 from LemonBoy/win32Andrew Kelley
Win32
2019-10-08generated docs: functions with inferred error sets display nicelyAndrew Kelley
infrastructure in place for displaying error sets
2019-10-08generated docs contain generic instantiations and comptime callsAndrew Kelley
2019-10-07generated docs: show doc comments on functionsAndrew Kelley
2019-10-06stage1 parser supports doc commentsAndrew Kelley
2019-10-06Initial support for i386-windows-msvc targetLemonBoy
2019-10-03add -fdump-analysis to dump type information to jsonAndrew Kelley
This commit adds -fdump-analysis which creates a `$NAME-analysis.json` file with all of the finished semantic analysis that the stage1 compiler produced. It contains types, packages, declarations, and files. This is an initial implementation; some data will be missing. However it's easy to improve the implementation, which is in `src/dump_analysis.cpp`. The next step for #21 will be to create Zig code which parses this json file and creates user-facing HTML documentation. This feature has other uses, however; for example, it could be used for IDE integration features until the self-hosted compiler is available.
2019-09-29RISC-V: get to the linking phase of behavior testsAndrew Kelley
See #3338 and #3339
2019-09-27fully specify padding bytes when necessaryAndrew Kelley
This is what I was going for originally - either we understand that LLVM's padding is sufficient, or we do the entire padding ourselves.
2019-09-27Correct calculation of padding length in structLemonBoy
Make sure the resulting type is in-sync with the one produced and used by LLVM. Fixes #3138
2019-09-26Merge pull request #3311 from LemonBoy/mipsAndrew Kelley
Initial support for mipsel architecture
2019-09-26Don't warn about redeclaration for the same var nodeLemonBoy
Closes #3316
2019-09-26Initial support for mipsel architecture¬LemonBoy
2019-09-23Prevent crash with invalid extern typeLemonBoy
Fixes #3240
2019-09-23make type_allowed_in_extern more robustAndrew Kelley
Previously if the type parameter was a pointer, it would assert that the size of the type was resolved. It used to be that the size of pointers was always resolved, however with lazy values, pointers gained the possibility of not having their size resolved. Now, type_allowed_in_extern triggers the resolution of whether a pointer is zero bits, and returns a possible error if the resolution fails. This fixes a compiler assertion when building the [zootdeck project](https://github.com/donpdonp/zootdeck). I do not have a test case reduction for the issue.
2019-09-21add behavior test for float widening f16 to f128Andrew Kelley
it's disabled on aarch64, see #3282
2019-09-21Merge pull request #3278 from LemonBoy/struct-genAndrew Kelley
A few steps towards AArch64 & ARM passing the behavior tests
2019-09-21Fix generation of tail fields for packed structLemonBoy
2019-09-20Merge pull request #3183 from LemonBoy/fix-3128Andrew Kelley
Don't forget to resolve the pointee type
2019-09-20reject types of automatic container layout in packed unionsSahnvour
2019-09-19implement runtime `@byteSwap` and other fixupsAndrew Kelley
* update docs for `@byteSwap`. * fix hash & eql functions for ZigLLVMFnIdBswap not updated to include vector len. this was causing incorrect bswap function being called in unrelated code * fix `@byteSwap` behavior tests only testing comptime and not runtime operations * implement runtime `@byteSwap` * fix incorrect logic in ir_render_vector_to_array and ir_render_array_to_vector with regards to whether or not to bitcast * `@byteSwap` accepts an array operand which it will cast to vector * simplify `@byteSwap` semantic analysis code and various fixes
2019-09-18Fix array->vector and vector->array for many types. Allow vector of bool.Shawn Landden
Vectors do not have the same packing as arrays, and just bitcasting is not the correct way to convert them.
2019-09-16fix tripping llvm assertAndrew Kelley
``` Assertion `!isa<DIType>(Scope) && "shouldn't make a namespace scope for a type" ``` We've had this problem and solved it before; see #579.
2019-09-13Make single-element enum default to u0LemonBoy
* Allow comptime_int as explicit enum tag type Closes #2997
2019-09-10async function calls re-use frame buffersAndrew Kelley
See #3069
2019-09-10Don't forget to resolve the pointee typeLemonBoy
Fixes #3128
2019-09-10make the std lib support event-based I/OAndrew Kelley
also add -fstack-report
2019-09-10Force LLVM to generate byte-aligned packed unionsLemonBoy
Sometimes the frontend and LLVM would disagree on the ABI alignment of a packed union. Solve the problem by telling LLVM we're gonna manage the struct layout by ourselves. Closes #3184
2019-09-10forbid opaque types in function return typesSahnvour
2019-09-09fix a var decl in scope preventing for loop spillsAndrew Kelley
2019-09-09fix bad LLVM IR when for target expr needs to be spilledAndrew Kelley
Also reduce the size of ZigVar in memory by making the name a `const char *` rather than a `Buf`.
2019-09-07fix suspensions inside for loops generating invalid LLVM IRAndrew Kelley
closes #3076
2019-09-07properly spill expressions with async function callsAndrew Kelley
2019-09-07implement spills when expressions used across suspend pointsAndrew Kelley
closes #3077
2019-09-07fix await used in an expression generating bad LLVMAndrew Kelley
2019-09-05implement `noasync` function callsAndrew Kelley
See #3157
2019-09-05Always resolve the struct field typesLemonBoy
Packed structs used to skip the zero-sized types and trip some assertions that expected the type reference not to be null. Fixes #3143
2019-09-05stage1 enhance IR printMichael Dusan
- print fn name in pass1 - replace scalar with enum IrPass for clarity
2019-09-05Add the noinline keyword for function declarationsLemonBoy
2019-09-03emit a compile error if a test becomes asyncAndrew Kelley
See #3117
2019-09-03error message and test for alignment of variables of zero-bit typesSahnvour
2019-09-03Merge branch 'fixSegfault' of https://github.com/marler8997/zig into ↵Andrew Kelley
marler8997-fixSegfault
2019-08-31stage1 enhance IR printMichael Dusan
- pass2 now prints missing instructions in a trailing fashion - instruction struct name added to print as column 2
2019-08-31improvements to `@asyncCall`Andrew Kelley
* `await @asyncCall` generates better code. See #3065 * `@asyncCall` works with a real `@Frame(func)` in addition to a byte slice. Closes #3072 * `@asyncCall` allows passing `{}` (a void value) as the result pointer, which uses the result location inside the frame. Closes #3068 * support `await @asyncCall` on a non-async function. This is in preparation for safe recursion (#1006).
2019-08-31`@typeOf` now guarantees no runtime side effectsAndrew Kelley
related: #1627
2019-08-30support recursive async and non-async functionsAndrew Kelley
which heap allocate their own frames related: #1006
2019-08-29fix regressionsAndrew Kelley
2019-08-29await does not force async if callee is blockingAndrew Kelley
closes #3067
2019-08-29comparing against zero participates in lazy valuesAndrew Kelley
2019-08-29make `@sizeOf` lazyAndrew Kelley