Commit Graph

34 Commits

Author SHA1 Message Date
Andrew Kelley
06c4b35eb1 std: improve rand implementation and API 2016-07-26 23:51:58 -07:00
Andrew Kelley
404defd99b add div_exact builtin fn
closes #149
2016-05-07 20:53:16 -07:00
Andrew Kelley
100802cdc0 add debug safety for left shifting
See #46
2016-05-06 15:46:38 -07:00
Andrew Kelley
c95e497857 add cmpxchg builtin function 2016-05-04 18:19:49 -07:00
Andrew Kelley
a299de2265 better alignment value for stack variables
fixes debug info sometimes not being available for parameters
2016-04-28 15:10:27 -07:00
Andrew Kelley
4815c03caa better parameter codegen
* ability to take address of a parameter (closes #97)
 * debug symbols work for parameters
2016-04-27 17:34:53 -07:00
Andrew Kelley
7026bed462 fix debug symbols regression after llvm 3.8.0 2016-04-09 14:21:55 -07:00
Andrew Kelley
76e1541803 update to llvm 3.8.0 2016-03-08 18:56:14 -07:00
Andrew Kelley
58c13aa949 rename 'environ' to 'env_type'
environ appears to clash with another symbol in mingw land
2016-02-16 20:03:41 -07:00
Andrew Kelley
2bf6c28bc3 ability to cross compile
hello_libc.zig can produce a windows build
2016-02-11 01:33:27 -07:00
Andrew Kelley
54a8b6a110 cleanup target data organization 2016-02-10 16:58:15 -07:00
Andrew Kelley
b642604691 targets command shows which ones are native 2016-02-10 16:35:07 -07:00
Andrew Kelley
1ff2edf67e add "targets" command to list architectures, oses, abis 2016-02-10 15:41:50 -07:00
Andrew Kelley
2ee80858b4 codegen: use gen_index for nonnull attribute
also put nonnull on sret params

closes #82
2016-02-05 14:48:23 -07:00
realazthat
54fbe7560e Added code for generating nonnull attributes 2016-02-05 16:29:26 -05:00
Andrew Kelley
b87d0abefe fix debug info for bool type 2016-02-04 14:02:37 -07:00
Andrew Kelley
41b95cc237 parseh: correct debug for forward decls
also C typedefs emit simply `const Foo = Bar;`
since in C you can implicitly cast from a typedef
child to parent but in zig you can't.
2016-01-31 17:48:19 -07:00
Andrew Kelley
32821e7098 add function pointer support
See #14
2016-01-18 16:42:45 -07:00
Andrew Kelley
3a326d5005 pave the road for function pointers
See #14
2016-01-18 08:50:10 -07:00
Andrew Kelley
2061cd50c0 resolve enum types and emit debug info 2016-01-11 00:25:17 -07:00
Andrew Kelley
fb1e3a5be9 codegen: emit debug metadata for parameters 2016-01-02 20:42:32 -07:00
Andrew Kelley
e4cb28dbf2 structs have debug information 2015-12-16 17:11:35 -07:00
Andrew Kelley
a10277bd94 prepare codebase for struct and string support
parsing code for structs, strings, and c string literals
partial semantic analyzing code for structs, strings, and c string literals
2015-12-12 00:10:37 -07:00
Andrew Kelley
2f0e4e9cb2 codegen does signed, unsigned, and floating point math 2015-12-08 12:25:30 -07:00
Andrew Kelley
113f0c9450 add local variables to debug info 2015-12-07 23:09:48 -07:00
Andrew Kelley
9c9ea93519 integrate debug scopes with block context 2015-12-07 22:11:04 -07:00
Andrew Kelley
b66fb607bf add debugging info for array type 2015-12-07 20:07:46 -07:00
Andrew Kelley
f8ca6c70c7 add labels and goto 2015-12-03 00:47:35 -07:00
Andrew Kelley
b77c423f77 all LLVM C++ API contained to one file 2015-11-30 14:43:23 -07:00
Andrew Kelley
4ccb98bdce analyze no longer depends on llvm C++ API 2015-11-30 14:10:07 -07:00
Andrew Kelley
855d51840d remove LLVMZigTargetMachineEmitToFile
The llvm C API provided function is adequate.
2015-11-29 11:12:40 -07:00
Andrew Kelley
f6529341a2 ability to export .o file 2015-11-27 22:13:39 -07:00
Andrew Kelley
024052b448 add pub and export visibility modifiers and optimization 2015-11-27 15:46:06 -07:00
Andrew Kelley
c2e5d50027 write object file and fix void return type 2015-11-24 13:00:38 -07:00