Commit Graph

156 Commits (2b78a90424ee47ee1a9ef590dcf517026d0f13d1)

Author SHA1 Message Date
Andrew Kelley dd2450b1b2
tier 2 support for freebsd 2018-11-27 20:56:43 -05:00
Andrew Kelley 9493738e54
Merge branch 'freebsd-up' of https://github.com/myfreeweb/zig into freebsd2 2018-11-19 17:24:41 -05:00
Jimmi Holst Christensen 2a9843de95
Added NullOutStream and CountingOutStream (#1722) 2018-11-15 09:37:39 -08:00
Andrew Kelley 0c3bd0c3d1
zig fmt: add --check flag
closes #1558
closes #1555
2018-11-15 00:26:43 -05:00
Jimmi Holst Christensen 8139c5a516
New Zig formal grammar (#1685)
Reverted #1628 and changed the grammar+parser of the language to not allow certain expr where types are expected
2018-11-13 05:08:37 -08:00
Andrew Kelley 2b395d4ede
remove @minValue,@maxValue; add std.math.minInt,maxInt
closes #1466
closes #1476
2018-10-26 15:01:51 -04:00
Greg V 831bb66895 Set up libc/rtld paths for FreeBSD 2018-10-20 15:21:35 +03:00
Andrew Kelley d5648d2640
remove implicit cast from T to *const T
closes #1465
2018-10-15 18:23:47 -04:00
Jimmi Holst Christensen 378d3e4403
Solve the return type ambiguity (#1628)
Changed container and initializer syntax
* <container> { ... } -> <container> . { ... }
* <exrp> { ... } -> <expr> . { ...}
2018-10-15 09:51:15 -04:00
Andrew Kelley d40c4e7c89
Merge pull request #1429 from shawnl/arm64
initial arm64 support
2018-10-06 00:11:39 -04:00
Andrew Kelley 9d4eaf1e07
update std lib API for I/O
std.io.FileInStream -> std.os.File.InStream
std.io.FileInStream.init(file) -> file.inStream()
std.io.FileOutStream -> std.os.File.OutStream
std.io.FileOutStream.init(file) -> file.outStream()

remove a lot of error code possibilities from os functions

std.event.net.socketRead -> std.event.net.read
std.event.net.socketWrite -> std.event.net.write
add std.event.net.readv
add std.event.net.writev
add std.event.net.readvPosix
add std.event.net.writevPosix
add std.event.net.OutStream
add std.event.net.InStream

add std.event.io.InStream
add std.event.io.OutStream
2018-09-30 17:28:35 -04:00
Andrew Kelley c06a61e9bf
remove `this`. add `@This()`.
closes #1283
2018-09-13 16:34:33 -04:00
Andrew Kelley 178d69191b windows: std.fs functions support concurrent ops
when reading and writing the same file descriptors
2018-09-12 13:55:35 -04:00
Shawn Landden 342cff28f5 initial arm64 support 2018-09-08 03:52:28 +00:00
Andrew Kelley 832caefc2a fix regressions 2018-09-02 18:35:32 -04:00
Andrew Kelley ea1b21dbdb fix linux
* error.BadFd is not a valid error code. it would always be a bug to
   get this error code.
 * merge error.Io with existing error.InputOutput
 * merge error.PathNotFound with existing error.FileNotFound.
   Not all OS's support both.
 * add os.File.openReadC
 * add error.BadPathName for windows file operations with invalid
   characters
 * add os.toPosixPath to help stack allocate a null terminating byte
 * add some TODOs for other functions to investigate removing the
   allocator requirement
 * optimize some implementations to use the alternate functions when
   a null byte is already available
 * add a missing error.SkipZigTest
 * os.selfExePath uses a non-allocating API
 * os.selfExeDirPath uses a non-allocating API
 * os.path.real uses a non-allocating API
 * add os.path.realAlloc and os.path.realC
 * convert many windows syscalls to use the W versions (See #534)
2018-08-21 20:31:50 -04:00
Andrew Kelley 51852d2587 fix windows 2018-08-21 16:07:28 -04:00
Andrew Kelley 598e80957e windows: call CancelIo when canceling an fs watch 2018-08-10 13:19:07 -04:00
Andrew Kelley 0df485d4dc self-hosted: reorganize creation and destruction of Compilation 2018-08-10 12:28:20 -04:00
Andrew Kelley b219feb3f1 initial windows implementation of std.event.fs.Watch 2018-08-09 16:48:44 -04:00
Andrew Kelley 60955feab8 std.event.fs.Watch distinguishes between Delete and CloseWrite on darwin
TODO: after 1 event emitted for a deleted file, the file is no longer
watched
2018-08-07 22:14:30 -04:00
Andrew Kelley c5f1925bc8 when decls don't change, don't regenerate them 2018-08-03 17:59:11 -04:00
Andrew Kelley 5dfcd09e49 self-hosted: watch files and trigger a rebuild 2018-08-03 17:22:17 -04:00
Andrew Kelley 7f6e97cb26 fixups from the merge 2018-08-02 17:36:08 -04:00
Andrew Kelley 951124e177 evented I/O zig fmt 2018-08-02 17:24:15 -04:00
Andrew Kelley 821805aa92 WIP: Channel.getOrNull 2018-08-02 17:04:17 -04:00
Andrew Kelley a870228ab4 self-hosted: use std.event.fs.readFile 2018-07-30 13:44:36 -04:00
Andrew Kelley 02713e8d8a fix race conditions in self-hosted compiler; add test
* fix race condition in std.event.Channel deinit
 * add support to zig build for --no-rosegment
 * add passing self-hosted compare-output test for calling a function
 * put a global lock on LLD linking because it's not thread safe
2018-07-24 21:28:54 -04:00
Andrew Kelley adefd1a52b self-hosted: function calling another function 2018-07-24 20:24:05 -04:00
Andrew Kelley 2ea08561cf self-hosted: function types use table lookup 2018-07-24 14:20:49 -04:00
Andrew Kelley 72599d420b self-hosted: find all libc paths; windows linker code 2018-07-24 00:06:34 -04:00
Andrew Kelley 2614ef056a self-hosted: basic linker code for macos 2018-07-23 17:38:03 -04:00
Andrew Kelley 5a919dd82d Merge remote-tracking branch 'origin/master' into self-hosted-libc-hello-world 2018-07-23 14:32:13 -04:00
Andrew Kelley 10d2f08d37 self-hosted: fix error messages not cleaning up correctly 2018-07-23 14:28:14 -04:00
Andrew Kelley d767fae47e self-hosted: add first compare-output test 2018-07-23 00:35:53 -04:00
Andrew Kelley 93e78ee722 self-hosted can compile libc hello world 2018-07-22 23:28:53 -04:00
Andrew Kelley 58c5f94a99 self-hosted: share C++ code for finding libc on windows 2018-07-20 23:38:13 -04:00
Andrew Kelley f5a67dba08 self-hosted: implicit cast comptime ints to other ints
we now have successful exit codes from main linking
against libc
2018-07-20 01:46:49 -04:00
Andrew Kelley 33fbd8c1d3 self-hosted: convert some stuff to async/await 2018-07-20 00:13:48 -04:00
Andrew Kelley d9fc149752 relative path to cwd in compile errors 2018-07-19 23:52:44 -04:00
Andrew Kelley 3908b4fdee self-hosted: refactor ParsedFile out of existence
also we are successfully analyzing the return type of main
2018-07-19 15:11:39 -04:00
Andrew Kelley 1d85b588ea self-hosted: progress on IR for supporting libc hello world
* add c int types
 * some more ir stubs
2018-07-19 00:08:47 -04:00
Andrew Kelley bd1c55d2c2 self-hosted: compile errors for return in wrong place
* outside fn definition
 * inside defer expression
2018-07-18 17:43:36 -04:00
Andrew Kelley aa3b41247f self-hosted: linking against libc
also introduce `zig libc` command to display paths
`zig libc file.txt` will parse equivalent text and use that for libc
paths.
2018-07-18 17:43:36 -04:00
Andrew Kelley 3e4a3fa5b7 self-hosted: find libc on linux 2018-07-18 17:43:36 -04:00
Andrew Kelley a8a1b5af07 fix build on windows
* move getAppDataDir and utf16leToUtf8 from self-hosted to std lib
 * fix std.event.Loop on windows
2018-07-18 10:07:22 -04:00
Josh Wolfe 843529d234 implement proper utf16leToUtf8 2018-07-18 03:01:01 -04:00
Andrew Kelley ecf8da00c5 self-hosted: linking 2018-07-17 13:18:13 -04:00
Andrew Kelley 1a7cf4cbce port 69e3b4e to self-hosted compiler
See #1249
2018-07-17 10:42:44 -04:00
Andrew Kelley 3bb00eac37 self-hosted: implement getAppDataDir for windows 2018-07-17 00:01:36 -04:00