aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
AgeCommit message (Collapse)Author
2018-06-19`@floatToInt` now has safety-checked undefined behaviorAndrew Kelley
when the integer part does not fit in the destination integer type * Also fix incorrect safety triggered for integer casting an `i32` to a `u7`. closes #1138 * adds compiler-rt function: `__floatuntidf`
2018-06-19Merge pull request #1136 from alexnask/typeinfo_improvementsAndrew Kelley
@typeInfo now uses optional types instead of @typeOf(undefined)
2018-06-19@typeInfo now uses optional types instead of @typeOf(undefined)Alexandros Naskos
2018-06-19remove enum to/from int casting syntax; add `@enumToInt`/`@intToEnum`Andrew Kelley
see #1061
2018-06-18remove error to/from int casting syntax; add `@errorToInt`/`@intToError`Andrew Kelley
See #1061
2018-06-18remove []u8 casting syntax. add `@bytesToSlice` and `@sliceToBytes`Andrew Kelley
See #1061
2018-06-18remove error set casting syntax. add `@errSetCast`Andrew Kelley
See #1061
2018-06-18remove bool to int syntax. add @boolToIntAndrew Kelley
add missing docs See #1061
2018-06-17remove integer and float casting syntaxAndrew Kelley
* add `@intCast` * add `@floatCast` * add `@floatToInt` * add `@intToFloat` See #1061
2018-06-16disable byvalAndrew Kelley
2018-06-16add basic std lib code for loading dynamic librariesAndrew Kelley
this is going to only work for very basic libraries; I plan to slowly add more features over time to support more complicated libraries
2018-06-11implement @tagName as a switch instead of table lookupAndrew Kelley
closes #976 closes #1080
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-07add implicit casts from `*[N]T`Andrew Kelley
* to `[]T` * to `[*]T` See #770
2018-06-07remove @canImplicitCast builtinAndrew Kelley
nobody will miss it
2018-06-07langref: automatic update of builtin.zigAndrew Kelley
now the docs can't get out of date for this See #367
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-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-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-24update github.com/zig-lang to github.com/ziglangAndrew Kelley
2018-05-12add @newStackCall builtin functionAndrew Kelley
See #1006
2018-05-09Added Slice as it's own type info in userlandJimmi HC
2018-04-29Finished FnDef TypeInfo generation (warning: may be buggy).Alexandros Naskos
2018-04-29More FnDef TypeInfo generation.Alexandros Naskos
2018-04-28Started work on function definition TypeInfo generation.Alexandros Naskos
2018-04-28Added definition TypeInfo generation, except for function definitions.Alexandros Naskos
2018-04-27Added BoundFn TypeInfo generation.Alexandros Naskos
2018-04-27Added Fn TypeInfo generation.Alexandros Naskos
2018-04-27Added struct TypeInfo generation.Alexandros Naskos
2018-04-27Fixed enum tag type detection in TypeInfo generation.Alexandros Naskos
2018-04-26Added ErrorUnion, Union TypeInfo generationAlexandros Naskos
2018-04-26Switched to shallow TypeInfo.Alexandros Naskos
2018-04-26Added ErrorSet TypeInfo generation.Alexandros Naskos
2018-04-26Added Enum TypeInfo except for methodsAlexandros Naskos
2018-04-26Reset parent on cached TypeInfo values if we need to.Alexandros Naskos
2018-04-26Added TypeInfo cacheAlexandros Naskos
2018-04-25Changed TypeInfo layout.Alexandros Naskos
2018-04-24Added ArrayInfo, NullableInfo, PromiseInfo generationAlexandros Naskos
2018-04-24Attempt at adding comptime union field accessAlexandros Naskos
2018-04-24One step towards @typeInfoAlexandros Naskos
2018-04-22exit(1) instead of abort() for file not foundAndrew Kelley
2018-04-22linux: support VDSO for clock_gettimeAndrew Kelley
also fix a compiler crash when using cmpxchg with nullable pointer
2018-04-19Added field builtin functionJimmi Holst Christensen
2018-04-18support break in suspend blocksAndrew Kelley
* you can label suspend blocks * labeled break supports suspend blocks See #803
2018-04-18improve cmpxchgAndrew Kelley
* remove @cmpxchg, add @cmpxchgWeak and @cmpxchgStrong - See explanations in the langref. * add operand type as first parameter * return type is ?T where T is the operand type closes #461