Commit Graph

25 Commits (fce435db269162774106ce7e6ddf70871d5eeb49)

Author SHA1 Message Date
Andrew Kelley fcef7c4bb2 fix std.io.InStream for windows
now we handle PIPE_BROKEN as an EOF

also set up framework for debugging unexpected posix/windows errors
2017-10-15 16:45:43 -04:00
Andrew Kelley c4262da8de implement os.path.real for windows and update allocator interface 2017-10-09 14:21:35 -04:00
Andrew Kelley ff2c794612 all behavior tests passing for macos
See #273
2017-08-27 05:15:24 -04:00
Andrew Kelley 051ee8e626 change slicing syntax from ... to ..
See #359
2017-05-19 10:39:59 -04:00
Andrew Kelley 5bc9feb5cb organize std and make import relative to current file
closes #216
2017-03-26 06:39:28 -04:00
Andrew Kelley 7ce753a16b replace "&&" and "||" with "and" and "or"
closes #272
2017-03-26 05:21:28 -04:00
Andrew Kelley 451ce09067 new unreachable syntax
* `noreturn` is the primitive type.
 * `unreachable` is a control flow keyword.
 * `@unreachable()` builtin function is deleted.

closes #214
2017-03-26 04:58:48 -04:00
Andrew Kelley 6dba1f1c8e slice and array re-work plus some misc. changes
* `@truncate` builtin allows casting to the same size integer.
   It also performs two's complement casting between signed and
   unsigned integers.
 * The idiomatic way to convert between bytes and numbers is now
   `mem.readInt` and `mem.writeInt` instead of an unsafe cast.
   It works at compile time, is safer, and looks cleaner.
 * Implicitly casting an array to a slice is allowed only if the
   slice is const.
 * Constant pointer values know if their memory is from a compile-
   time constant value or a compile-time variable.
 * Cast from [N]u8 to []T no longer allowed, but [N]u8 to []const T
   still allowed.
 * Fix inability to pass a mutable pointer to comptime variable at
   compile-time to a function and have the function modify the
   memory pointed to by the pointer.
 * Add the `comptime T: type` parameter back to mem.eql. Prevents
   accidentally creating instantiations for arrays.
2017-02-12 17:35:51 -05:00
Andrew Kelley ff5120c584 IR: std makes it to codegen 2016-12-31 18:25:10 -05:00
Andrew Kelley 69132bdeda IR: progress toward compiling standard library
* comptime fn call
 * is_comptime doesn't count as an instruction dependency
 * update more std code to latest zig
2016-12-31 17:10:29 -05:00
Andrew Kelley b55efe5fab update more std library to new zig 2016-12-21 23:34:14 -05:00
Andrew Kelley a71fbe49cb IR: add FnProto instruction 2016-12-18 19:40:26 -05:00
Andrew Kelley b581da41f8 remove compiler directives
* add `setFnTest`, `setFnVisible`, `setFnStaticEval`,
   `setFnNoInline` builtin functions to replace previous
   directive functionality
 * add `coldcc` and `nakedcc` as keywords which can be used as part
   of a function prototype.
 * `setDebugSafety` builtin can be used to set debug safety features
   at a per block scope level.
 * closes #169
2016-09-28 02:33:32 -04:00
Andrew Kelley 06f2f4d64b change `unreachable{}` to `@unreachable()`
instead of a container init expression, it's a builtin
function call.
2016-09-13 16:46:27 -04:00
Andrew Kelley ed50bd1b65 progress toward stack trace printing 2016-08-17 20:11:04 -07:00
Andrew Kelley 37d167f6e0 std: conform to style guidelines 2016-08-16 22:42:50 -07:00
Andrew Kelley 1fa0cabf9d remove multiline comments
closes #161
2016-07-27 23:26:12 -07:00
Andrew Kelley bc81ddfea6 unsigned integers for sizes of things
Closes #62.
2016-07-26 20:40:11 -07:00
Andrew Kelley 78d4fb20c4 inline parameters
This replaces the current generic syntax for functions and replaces
it with the concept of inline parameters.

This paves the way for the "all structs anonymous" proposal.

Closes #151.
2016-07-25 22:55:15 -07:00
Andrew Kelley 7edef4f3fd add beginning of print stack trace function
introduce std.debug and move std.assert to std.debug.assert
add mem.copy
2016-05-17 13:32:43 -07:00
Andrew Kelley 5d2f86116f std: fix linux.get_errno 2016-05-13 09:54:56 -07:00
Andrew Kelley 8e3ab28be9 ability to cast maybe pointer to isize/usize
also ability to put noalias on maybe pointer
2016-05-13 09:54:56 -07:00
Andrew Kelley 22888ca524 some work in progress networking code
also, casting to or from a u8 slice makes a function impure
2016-05-10 15:00:59 -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