Commit Graph

18 Commits (958f00f1c71f205ce738433d00e9da7dde060f14)

Author SHA1 Message Date
Andrew Kelley fe4963412f
update self-hosted compiler to new format API 2019-12-08 23:17:03 -05:00
Vexu c6076a1360
self hosted compiler: use enum literals 2019-11-07 10:30:56 +02:00
Andrew Kelley 2f040a23c8
clean up references to os 2019-05-26 18:32:44 -04:00
Andrew Kelley dfbc063f79
`std.mem.Allocator.create` replaced with better API
`std.mem.Allocator.createOne` is renamed to `std.mem.Allocator.create`.

The problem with the previous API is that even after copy elision,
the initalization value passed as a parameter would always be a copy.
With the new API, once copy elision is done, initialization
functions can directly initialize allocated memory in place.

Related:
 * #1872
 * #1873
2019-02-03 16:13:28 -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
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 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 832caefc2a fix regressions 2018-09-02 18:35:32 -04:00
Andrew Kelley 51852d2587 fix windows 2018-08-21 16:07:28 -04:00
Andrew Kelley 5dfcd09e49 self-hosted: watch files and trigger a rebuild 2018-08-03 17:22:17 -04:00
Andrew Kelley 821805aa92 WIP: Channel.getOrNull 2018-08-02 17:04:17 -04:00
Andrew Kelley 10d2f08d37 self-hosted: fix error messages not cleaning up correctly 2018-07-23 14:28:14 -04:00
Andrew Kelley 93e78ee722 self-hosted can compile libc hello world 2018-07-22 23:28:53 -04:00
Andrew Kelley e78b1b810f self-hosted: basic IR pass2 2018-07-13 21:56:38 -04:00
Andrew Kelley 574e31f0a0 self-hosted: first passing test
* introduce std.atomic.Int
 * add src-self-hosted/test.zig which is tested by the main test suite
   - it fully utilizes the multithreaded async/await event loop so the
     tests should Go Fast
 * `stage2/bin/zig build-obj test.zig` is able to spit out an error if 2 exported
   functions collide
 * ability for `zig test` to accept `--object` and `--assembly`
   arguments
 * std.build: TestStep supports addLibPath and addObjectFile
2018-07-10 20:18:43 -04:00
Andrew Kelley 85f928f8bf remove std.mem.Allocator.construct and other fixups 2018-06-20 17:33:29 -04:00
Andrew Kelley fcbb7426fa use * for pointer type instead of &
See #770

To help automatically translate code, see the
zig-fmt-pointer-reform-2 branch.

This will convert all & into *. Due to the syntax
ambiguity (which is why we are making this change),
even address-of & will turn into *, so you'll have
to manually fix thes instances. You will be guaranteed
to get compile errors for them - expected 'type', found 'foo'
2018-05-31 17:28:07 -04:00
Andrew Kelley a05acaf9fd Add --color CLI option to zig fmt
It doesn't actually do terminal color yet because we need to add
cross platform terminal color abstractions. But it toggles between
the single line error reporting and the multiline error reporting.

See #1026
2018-05-30 18:26:09 -04:00