aboutsummaryrefslogtreecommitdiff
path: root/src/analyze.cpp
AgeCommit message (Collapse)Author
2018-07-27remove ability to break from suspend blocksAndrew Kelley
closes #803
2018-07-26coroutines have 3 more bits of atomic stateAndrew Kelley
2018-07-26add compile error for ignoring return value of while loop bodiesAndrew Kelley
closes #1049
2018-07-24self-hosted: function types use table lookupAndrew Kelley
2018-07-24fix logic for determining whether param requires comptimeAndrew Kelley
closes #778 closes #1213
2018-07-20self-hosted: share C++ code for finding libc on windowsAndrew Kelley
2018-07-18Allow pointers to anything in extern/exported declarations (#1258)Jimmi Holst Christensen
* type_allowed_in_extern accepts all ptr not size 0 * Generate correct headers for none extern structs/unions/enums
2018-07-16all integer sizes are available as primitivesAndrew Kelley
* fix wrong implicit cast for `@IntType` bit_count parameter. * fix incorrect docs for `@IntType` bit_count parameter. closes #1242 closes #745 closes #1240
2018-07-11add compile error for disallowed types in extern structsAndrew Kelley
closes #1218
2018-07-07add @popCount intrinsicAndrew Kelley
2018-07-06add compile error notes for where struct definitions areAndrew Kelley
closes #1202
2018-07-03fix runtime libc detection depending on localeAndrew Kelley
closes #1165
2018-06-30Merge pull request #1167 from ziglang/comptime-array-by-valueJimmi Holst Christensen
Implement const_values_equal for arrays
2018-06-30Revert "ir_resolve_const now checks recursivly for undef values"Jimmi Holst Christensen
This reverts commit 4c3f27ce1ea17b5236a022971ebace73a02b7c2b.
2018-06-30Revert "contains_comptime_undefined_value should not follow pointers"Jimmi Holst Christensen
This reverts commit 58b1692182dc2f8da5b535f59e9a89cfab10a7b6.
2018-06-29contains_comptime_undefined_value should not follow pointersJimmi HC
2018-06-29ir_resolve_const now checks recursivly for undef valuesJimmi HC
2018-06-29Assert that array is not ConstArraySpecialUndef in const_values_equalJimmi HC
2018-06-28Implement const_values_equal for array typeJimmi HC
* This allows arrays to be passed by value at comptime
2018-06-27fix coroutine accessing freed memoryAndrew Kelley
closes #1164
2018-06-27fix comptime @tagName crashing sometimesAndrew Kelley
closes #1118
2018-06-27add f16 typeBen Noordhuis
Add support for half-precision floating point operations. Introduce `__extendhfsf2` and `__truncsfhf2` in std/special/compiler_rt. Add `__gnu_h2f_ieee` and `__gnu_f2h_ieee` as aliases that are used in Windows builds. The logic in std/special/compiler_rt/extendXfYf2.zig has been reworked and can now operate on 16 bits floating point types. `extendXfYf2()` and `truncXfYf2()` are marked `inline` to work around a not entirely understood stack alignment issue on Windows when calling the f16 versions of the builtins. closes #1122
2018-06-26rename get_maybe_type to get_optional_typeAndrew Kelley
2018-06-21fix compiler crash for invalid enumAndrew Kelley
closes #1079 closes #1147
2018-06-19fix calling method with comptime pass-by-non-copyign-value self argAndrew Kelley
closes #1124
2018-06-18disallow opaque as a return type of fn type syntaxAndrew Kelley
closes #1115
2018-06-16allow passing by non-copying valueAndrew Kelley
closes #733
2018-06-14Enabled optional types of zero bit types with no LLVM DI type. (#1110)Alexandros Naskos
* Zero bit optional types do not need a LLVM DI type
2018-06-10breaking syntax change: orelse keyword instead of ?? (#1096)Andrew Kelley
use the `zig-fmt-optional-default` branch to have zig fmt automatically do the changes. closes #1023
2018-06-09breaking syntax change: ??x to x.? (#1095)Andrew Kelley
See #1023 This also renames Nullable/Maybe to Optional
2018-06-09nullable pointers follow const-casting rulesAndrew Kelley
any *T -> ?*T cast is allowed implicitly, even when it occurs deep inside the type, and the cast is a no-op at runtime. in order to add this I had to make the comptime value representation of nullable pointers the same as the comptime value representation of normal pointers, so that we don't have to do any recursive transformation of values when doing this kind of cast.
2018-06-08Allow access of array.len through a pointerJimmi HC
2018-06-07fix structs that contain types which require comptimeAndrew Kelley
Now, if a struct has any fields which require comptime, such as `type`, then the struct is marked as requiring comptime as well. Same goes for unions. This means that a function will implicitly be called at comptime if the return type is a struct which contains a field of type `type`. closes #586
2018-06-06Pointer Reform: update @typeInfoAndrew Kelley
* add assertion for trying to do @typeInfo on global error set * remove TypeInfo.Slice * add TypeInfo.Pointer.Size with possible values - One - Many - Slice See #770
2018-06-05disable field access for unknown length pointersAndrew Kelley
See #770
2018-06-05disallow unknown-length pointer to opaqueAndrew Kelley
This also means that translate-c has to detect when a pointer to opaque is happening, and use `*` instead of `[*]`. See #1059
2018-06-05fix crash when evaluating return type has compile errorAndrew Kelley
closes #1058
2018-06-05Renamed UndefinedLiteral to UndefinedJimmi HC
2018-06-05Removed NullLiteral to NullJimmi HC
2018-06-05Renamed "(int/float literal)" to "comptime_int/float"Jimmi HC
2018-06-04Pointer Reform: proper slicing and indexing (#1053)Andrew Kelley
* enable slicing for single-item ptr to arrays * disable slicing for other single-item pointers * enable indexing for single-item ptr to arrays * disable indexing for other single-item pointers see #770 closes #386
2018-06-04never call malloc with size 0Andrew Kelley
instead we return nullptr. this makes the behavior consistent across all platforms. closes #1044 closes #1045
2018-06-04disallow single-item pointer indexingAndrew Kelley
add pointer arithmetic for unknown length pointer
2018-05-31use * for pointer type instead of &Andrew Kelley
See #770 To help automatically translate code, see the zig-fmt-pointer-reform-2 branch. This will convert all & into *. Due to the syntax ambiguity (which is why we are making this change), even address-of & will turn into *, so you'll have to manually fix thes instances. You will be guaranteed to get compile errors for them - expected 'type', found 'foo'
2018-05-30Removed copy-pasted resolve_inferred_error_setJimmi HC
both ir.cpp and analyze.cpp have a function resolve_inferred_error_set, which is a nearly exact copy-paste. This commit removes the one in ir.cpp and exposes then one in analyze.cpp. This also allows us to make analyze_fn_body local to analyze.cpp, as it is not used anywhere in ir.cpp after this change
2018-05-24update github.com/zig-lang to github.com/ziglangAndrew Kelley
2018-05-09Merge branch 'master' into pointer-reformAndrew Kelley
2018-05-09Added Slice as it's own type info in userlandJimmi HC
2018-05-03Fixed extern enums having the wrong size (#970)Jimmi Holst Christensen
Fixed extern enums having the wrong size See #977
2018-04-30support foo.* for ptr derefAndrew Kelley
See #770