aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
AgeCommit message (Collapse)Author
2018-08-02src/codegen.cpp: @handle(): replace hacky ref chain with llvm intrinsic;kristopher tate
Tracking Issue #1296 ;
2018-08-02src/codegen.cpp: return promise instead of null promise;kristopher tate
Tracking Issue #1296 ;
2018-08-02src/codegen.cpp: reassert that there are no generated errors in codegen;kristopher tate
Tracking Issue #1296 ; Thanks @andrewrk ;
2018-08-02src/codegen.cpp: remove `add_node_error` from `ir_render_handle`;kristopher tate
Tracking Issue #1296 ; Thanks @andrewrk ;
2018-08-02src/codegen.cpp: add/throw error for @handle() in a non async context;kristopher tate
Tracking Issue #1296 ; I removed/commented-out the assert checking for no errors since we now have some errors rendered.
2018-08-02src/codegen.cpp: return null if calling convention is not async;kristopher tate
Tracking Issue #1296 ;
2018-08-02src/codegen.cpp: base handle builtin on `@frameAddress()`;kristopher tate
Tracking Issue #1296 ;
2018-07-19prevent non-export symbols from clobbering builtinsAndrew Kelley
closes #1263
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-16codegen: remove unused variableAndrew Kelley
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-14codegen: Store returned value if type is 'handle_is_ptr' and function is not ↵Eduardo Sánchez Muñoz
'first_arg_ret'. Seems to fix #1230, includes test.
2018-07-13allow == for comparing optional pointersAndrew Kelley
closes #658
2018-07-07add @popCount intrinsicAndrew Kelley
2018-07-06fix iterating over a void sliceAndrew Kelley
closes #1203
2018-07-02add runtime safety for `@intToEnum`; add docs for runtime safetyAndrew Kelley
See #367
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-27dry floating-point type definitionsBen Noordhuis
2018-06-20fix runtime fn ptr equality codegenAndrew Kelley
closes #1140
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