31 Commits

Author SHA1 Message Date
Andrew Kelley
f50bfb94b5
fix bad LLVM IR when for target expr needs to be spilled
Also reduce the size of ZigVar in memory by making the name
a `const char *` rather than a `Buf`.
2019-09-09 15:59:16 -04:00
Andrew Kelley
eaf545e24c fix build on windows 2019-07-15 19:50:56 -04:00
Shawn Landden
4d3356435f stage1: check for null in buf_len and buf_ptr
follow up for f4b8850002d5
2019-06-16 14:26:38 -04:00
Andrew Kelley
ff3cdbc3a0
stage1 assertions always on, and have stack traces 2019-04-17 15:58:20 -04:00
Andrew Kelley
02f3a834b0
struct types get fully qualified names
and function symbol names become fully qualified
2019-02-28 15:40:57 -05:00
Andrew Kelley
ade10387a5
breaking changes to the way targets work in zig
* CLI: `-target [name]` instead of `--target-*` args.
   This matches clang's API.
 * `builtin.Environ` renamed to `builtin.Abi`
   - likewise `builtin.environ` renamed to `builtin.abi`
 * stop hiding the concept of sub-arch. closes #1526
 * `zig targets` only shows available targets. closes #438
 * include all targets in readme, even those that don't
   print with `zig targets` but note they are Tier 4
 * refactor target.cpp and make the naming conventions
   more consistent
 * introduce the concept of a "default C ABI" for a given
   OS/Arch combo. As a rule of thumb, if the system compiler
   is clang or gcc then the default C ABI is the gnu ABI.
2019-02-26 15:58:10 -05:00
Sahnvour
703c6684d1 Crash fixes and small improvements to inline asm. (#1756)
* codegen: LLVMConstInlineAsm is deprecated.

* codegen: replace commas in asm constraint strings by pipes as required by LLVM.

* ir: enforce usage of '=' constraint modifier for inline assembly outputs.

Others are not currently supported and this was just asserted alter in `ir_render_asm`.

* asm: forbid comptime_int/floats as inputs in favor of explicitely sized constants.

Fixes a crash due to comptime_int/floats having no type_ref.

* asm: handle inputs with integers of <8 or non power of 2 bitsize.

We widen them to the next highest power of two.
2018-11-19 16:22:21 -05:00
Andrew Kelley
173fc842c4
basic compiler id hash working 2018-09-09 18:38:41 -04:00
Andrew Kelley
2bf1b6840d
port std.os.path.resolve to stage1 2018-09-04 22:45:20 -04:00
Andrew Kelley
57ea6e8c9f fix up msvc stuff to make it work on linux and macos too 2017-09-13 02:40:02 -04:00
Jonathan Marler
7c81cd30de Add support for MSVC 2017-09-11 09:26:26 -06:00
Andrew Kelley
11a6550324 fix some -Wconversion errors 2017-04-10 20:02:39 -04:00
Andrew Kelley
3239b3cb69 use size_t for indexes
protect against incorrect copies in debug mode
2016-09-19 11:54:01 -04:00
Andrew Kelley
d5d5fd928c link: don't put -l in front of .a or .so files 2016-05-07 01:58:18 -07:00
Andrew Kelley
474340a003 parseh recognizes C enums 2016-01-28 11:03:44 -07:00
Andrew Kelley
ad3f98c615 parseh command, parses a C .h file and produces extern decls 2015-12-03 16:00:14 -07:00
Andrew Kelley
257cf09472 colored error messages that tell the source file 2015-12-01 00:50:11 -07:00
Josh Wolfe
9e0ff6faa2 factor analysis code out of codegen 2015-11-30 09:14:58 -07:00
Andrew Kelley
9b477230e0 ability to generate shared library and h file 2015-11-29 18:02:20 -07:00
Andrew Kelley
22421447fb fix the remaining TODOs in the source 2015-11-25 16:36:03 -07:00
Andrew Kelley
a600df073a fix invalid memory write 2015-11-25 15:17:19 -07:00
Andrew Kelley
ca836191e1 debug information for functions 2015-11-24 19:07:33 -07:00
Andrew Kelley
baf5167171 fix not using subtarget features 2015-11-24 15:01:37 -07:00
Andrew Kelley
3b4a2afb65 semantic analysis checks for multiple definitions of functions 2015-11-23 22:47:25 -07:00
Andrew Kelley
72be61fc0a generated parser understands tuples 2015-11-06 22:11:47 -07:00
Andrew Kelley
7cfceeca2d parser generator beginnings 2015-11-03 22:39:35 -07:00
Andrew Kelley
303823b6b8 building part of the hello world AST 2015-11-02 03:39:36 -07:00
Andrew Kelley
34f8d80eac tokenizing hello.zig 2015-11-01 22:21:33 -07:00
Andrew Kelley
5f48463bdd some half done thing I forgot about ¯\_(ツ)_/¯ 2015-08-23 22:45:20 -07:00
Andrew Kelley
d519ce87dd preprocessor runs once 2015-08-05 21:47:08 -07:00
Andrew Kelley
e71521335a preprocessor detects #include directives 2015-08-05 20:26:58 -07:00