Commit Graph

114 Commits

Author SHA1 Message Date
Andrew Kelley
8c79438f6b better array concatenation semantics
closes #87
2016-05-07 10:05:59 -07:00
Andrew Kelley
094336f07c add integer wrapping
see #46
2016-05-05 17:19:01 -07:00
Andrew Kelley
f2bc5ccbc2 more networking standard library code 2016-05-04 14:52:15 -07:00
Andrew Kelley
66ed7a5eb5 beginnings of network standard library code 2016-05-03 20:48:53 -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
d1fa5692c6 add array bounds checking in debug mode
closes #27
2016-04-26 11:36:11 -07:00
Andrew Kelley
a25307c0a1 add optional continue expression to while loop
closes #139
2016-04-19 20:28:44 -07:00
Andrew Kelley
9658c05fd4 std: remove broken windows random implementation 2016-04-19 17:15:23 -07:00
Andrew Kelley
f4c7e1bf49 rearrange standard library a bit 2016-04-18 16:42:56 -07:00
Andrew Kelley
be4df96e4b passing all tests 2016-04-12 13:30:52 -07:00
Andrew Kelley
7a05e18efb implement @err_name builtin function 2016-04-09 08:55:53 -07:00
Andrew Kelley
5dbc21b511 update cat example, refactor std
partial implementation of @err_name
2016-04-08 16:21:30 -07:00
Andrew Kelley
1d4c66b56b support multiple generic function instances
See #22
2016-04-07 10:34:54 -07:00
Andrew Kelley
9c3d7b628c rename syscall.zig to linux.zig 2016-03-01 14:11:38 -07:00
Andrew Kelley
f1d338194e rewrite how importing works
* Introduce the concept of packages. Closes #3
 * Add support for error notes.
 * Introduce `@import` and `@c_import` builtin functions and
   remove the `import` and `c_import` top level declarations.
 * Introduce the `use` top level declaration.
 * Add `--check-unused` parameter to perform semantic
   analysis and codegen on all top level declarations, not
   just exported ones and ones referenced by exported ones.
 * Delete the root export node and add `--library` argument.
2016-03-01 03:13:40 -07:00
notkild
8a827fafa6 Add support to open, create and close file 2016-02-28 23:12:58 +01:00
Andrew Kelley
77ffb5075b update bootstrap to work for macos too
* Directives can have arbitrary expressions as parameters
 * Fix switch statement not generating code sometimes
 * Rename "main" fn in bootstrap.zig to "zig_user_main" to
   avoid name collisions
 * codegen: fix badref when unreachable is last thing in an
   expression
 * support #condition directive on exported functions
2016-02-16 16:41:56 -07:00
Andrew Kelley
01fda6199e dummy implementation of os_get_random_bytes for windows 2016-02-13 22:59:49 -07:00
Andrew Kelley
c8376af92d add @ctz, @clz and compiler_rt implementation 2016-02-13 12:50:13 -07:00
Andrew Kelley
7828456b30 std: delete malloc and free
later we'll add a full featured allocator instead of this
2016-02-12 02:23:22 -07:00
Andrew Kelley
592210a173 i386 support
closes #115

Thanks to Seo Sanghyeon for the port code.
2016-02-12 02:04:46 -07:00
Andrew Kelley
d8f6388b63 if statements can be const expr evaluated
also introduce error for unnecessary if statement
but if the condition depends on a compile variable, then
the if statement is OK
2016-02-09 18:53:28 -07:00
Andrew Kelley
207862647c std: fix parse_u64 implementation and add test
also codegen implement comparision with pure errors
2016-02-09 09:51:25 -07:00
Andrew Kelley
6b3ce918db array.len generates a constant number literal expression 2016-02-07 15:52:52 -07:00
Andrew Kelley
42fe4e3cc8 remove ptr field access of arrays
use &array[0] instead
2016-02-07 15:43:19 -07:00
Andrew Kelley
94ed9f622a blocks with one statement pass constant expression eval 2016-02-07 12:38:51 -07:00
Andrew Kelley
4c8f26e9f6 std: remove auto flushing of stderr. use printf 2016-02-06 19:48:42 -07:00
Andrew Kelley
6a2ede5a6e parsing code for defer and more
* disable goto and label support see #44
 * refactor the way block contexts work
2016-02-05 23:20:34 -07:00
Andrew Kelley
4339d55562 update for loop syntax
it matches more closely the %% binary operator syntax

See #51
2016-02-05 17:15:19 -07:00
Andrew Kelley
ff5673ae1b add rand.float32 to standard library 2016-02-05 04:30:19 -07:00
Andrew Kelley
bb4a532785 move os_get_random_bytes to os.zig 2016-02-04 01:00:54 -07:00
Andrew Kelley
a6d4335217 fix running tests when linking with libc 2016-02-03 23:07:55 -07:00
Andrew Kelley
2521afef69 add ability to call function pointer field
also introduce the self hosted tests

closes #108
2016-02-03 21:34:09 -07:00
Andrew Kelley
c3123158b7 fix handling of implicit casts in binary operators 2016-02-03 19:07:15 -07:00
Andrew Kelley
39223c1847 test runner prints test names 2016-02-03 18:38:09 -07:00
Andrew Kelley
11a0644365 basic support for building a test target 2016-02-03 18:02:01 -07:00
Andrew Kelley
5ad84e4724 unreachable causes a trap in debug mode 2016-02-02 02:43:33 -07:00
Andrew Kelley
6f1a7a0d70 add abort function and "cold" fn attribute 2016-02-02 00:42:06 -07:00
MovingtoMars
3fd6c0ce25 fix some inaccuracy in float printing 2016-01-29 21:22:15 +13:00
MovingtoMars
a6c2b013fd remove some magic numbers from float printing 2016-01-29 21:19:21 +13:00
MovingtoMars
850f6d2d02 better f64_is_nan 2016-01-29 21:12:33 +13:00
MovingtoMars
90a32629c0 float printing mostly works 2016-01-29 20:55:38 +13:00
Andrew Kelley
2fc4b3629a std: remove incorrect float printing code 2016-01-28 12:54:30 -07:00
MovingtoMars
eb08fd5f5f remove accidental printf from float printing 2016-01-28 19:44:44 +13:00
MovingtoMars
fb7a95b3c4 cleanup float printing 2016-01-28 19:43:08 +13:00
MovingtoMars
dc08412895 basic float printing 2016-01-28 19:28:43 +13:00
MovingtoMars
401a3361ea malloc fails on mmap error code properly 2016-01-28 16:01:52 +13:00
MovingtoMars
9c502030a1 check mmap return against -1 2016-01-28 13:45:35 +13:00
MovingtoMars
04b721d535 malloc fails on proper errors 2016-01-28 13:18:29 +13:00
MovingtoMars
1a913f6bf2 simple malloc and free using mmap 2016-01-28 12:39:02 +13:00