Jakub Konka
4894de2b32
Fix readlink smoke test
2020-07-22 08:51:22 +02:00
Jakub Konka
99e3e29e2e
Refactor
2020-07-22 08:51:22 +02:00
Jakub Konka
c47cb8d09f
Fix unlinkatW to allow file symlink deletion on Windows
2020-07-22 08:51:22 +02:00
Jakub Konka
ae8abedbed
Use NtCreateFile to get handle to reparse point
2020-07-22 08:51:22 +02:00
Jakub Konka
d17c9b3591
Fix incorrect byte format of REPARSE_DATA_BUFFER struct
2020-07-22 08:51:22 +02:00
Jakub Konka
9b00dc941b
Use windows.CreateFileW to open the reparse point
2020-07-22 08:51:22 +02:00
Jakub Konka
49b5815364
Add windows.ReadLink similar to OpenFile but for reparse points only
2020-07-22 08:51:22 +02:00
Jakub Konka
92d11fd4e9
Debug readlinkW using OpenFile
2020-07-22 08:51:22 +02:00
Jakub Konka
791795a63a
Finish symlink implementation on Windows
2020-07-22 08:51:22 +02:00
Jakub Konka
515c663cd6
Add readlink smoke test
2020-07-22 08:51:22 +02:00
Jakub Konka
cc83d92b0b
Start drafting out os.readlink on Windows
2020-07-22 08:51:22 +02:00
Jakub Konka
9225763f8b
Add temporary fix to the CI on Win
...
Here's the [thread](https://github.com/msys2/MSYS2-packages/issues/2050 )
for reference.
2020-07-22 06:49:24 +00:00
Andrew Kelley
25a01a16e0
Merge pull request #5905 from Vexu/stage2-float
...
Stage2: floats
2020-07-21 22:35:05 +00:00
Hiroki Noda
68e0632aa5
Use function attribute "frame-pointer"
2020-07-21 21:03:02 +00:00
Vexu
dd89297388
stage2: actually implement float casting
2020-07-21 22:34:14 +03:00
Vexu
c29c79b17a
stage2: remove some dead code, fix build on aarch64
2020-07-21 22:34:14 +03:00
Vexu
7e7d1df4da
stage2: add floatCast to zir and ir
2020-07-21 22:34:12 +03:00
Vexu
7b52dbbf83
stage2: implement some casts for numbers
2020-07-21 22:29:29 +03:00
Vexu
da217fadeb
stage2: astgen for floats and other primitive literals
2020-07-21 22:29:28 +03:00
Vexu
e77ca6af70
stage2: add float values
2020-07-21 22:29:28 +03:00
Vexu
fd2f034e31
fix comptime comparisons of different sized floats
2020-07-21 22:29:15 +03:00
Andrew Kelley
8ee629aa4c
stage2: ability for ZIR to map multiple tags to the same type
2020-07-21 12:13:15 -07:00
Andrew Kelley
7a1a924788
stage2: AST: (breaking) flatten out suffix operations
2020-07-21 10:52:24 -07:00
Andrew Kelley
1ac28eed83
stage2 AST: rename OptionalUnwrap to OrElse
...
preparing to flatten suffix operations AST
2020-07-21 10:46:47 -07:00
Andrew Kelley
1cfe43d563
Merge pull request #5888 from pfgithub/stage-2-testing-Copy
...
stage2: period and suffixop
2020-07-21 17:42:46 +00:00
purringChaos
094223d634
Fix log.zig example.
2020-07-21 18:53:30 +03:00
Andrew Kelley
4abf119d95
Merge branch 'register-allocation'
2020-07-20 13:12:25 -07:00
Andrew Kelley
ef91b11295
stage2: register allocator processes operand deaths
...
also rework the IR data structures
2020-07-20 13:12:20 -07:00
Andrew Kelley
a8065a05a5
stage2: fix implementation of liveness operandDies()
2020-07-20 13:12:20 -07:00
Andrew Kelley
896472c20e
stage2: implement register copying
2020-07-20 13:12:20 -07:00
Andrew Kelley
ef9aeb6ac4
stage2: codegen: refactor to always have comptime arch
2020-07-20 13:12:20 -07:00
Vexu
596ca6cf70
allow non-pointer extern opaque variables
2020-07-18 16:45:07 +03:00
Vexu
78962eeeda
fix floatCast type check regression
...
Closes #5900
2020-07-18 10:22:15 +03:00
data-man
39915ae086
Add trait.isTuple
2020-07-17 17:55:55 +03:00
Vexu
a1e78d0b06
add is_tuple field to struct typeinfo
...
part of #4335
2020-07-17 00:15:34 +03:00
pfg
86922b8d08
stage2: support @"identifier" syntax
2020-07-16 14:08:36 -07:00
Andrew Kelley
cc3bceea3d
Merge pull request #5889 from Vexu/translate-c
...
Translate-c support initializer lists in macros
2020-07-16 19:03:03 +00:00
Vexu
5e88a7a427
add behavior tests fro macro translations
2020-07-16 17:10:52 +03:00
Vexu
06c08e5219
std.mem.zeroes use std.mem.set instead of @memset
...
stage1 comptime is not smart enough to remeber the size of the casted
item which leads to out of bounds errors.
2020-07-16 17:05:14 +03:00
data-man
3cdc0f104e
Vectors clarification in docs
2020-07-16 16:22:28 +03:00
Vexu
37647375dc
translate-c: support initializer list expr macros
2020-07-16 16:20:47 +03:00
Vexu
8fe076daaf
std.mem.zeroInit support initiating with tuples
2020-07-16 16:00:42 +03:00
pfg
83a0073b68
stage2: period and suffixop
2020-07-16 04:22:05 -07:00
pfg
01ab167ce3
stage2: change large switch → inline for loop
2020-07-16 10:32:24 +00:00
Andrew Kelley
e079fdeee7
Merge pull request #5885 from ziglang/stage2-locals
...
self-hosted compiler local consts
2020-07-16 05:57:32 +00:00
Andrew Kelley
d29dd5834b
stage2: local consts
...
These are now supported enough that this example code hits the
limitations of the register allocator:
fn add(a: u32, b: u32) void {
const c = a + b; // 7
const d = a + c; // 10
const e = d + b; // 14
assert(e == 14);
}
// error: TODO implement copyToNewRegister
So now the next step is to implement register allocation as planned.
2020-07-15 22:36:35 -07:00
Andrew Kelley
af12596e8d
stage2: breaking AST memory layout modifications
...
InfixOp is flattened out so that each operator is an independent AST
node tag. The two kinds of structs are now Catch and SimpleInfixOp.
Beginning implementation of supporting codegen for const locals.
2020-07-15 19:39:18 -07:00
haze
82562b205f
On darwin, only add the self exe to the cache hash for compiler id ( #5880 )
...
Now that Big Sur does not have system libraries on the filesystem, zig can no longer read them and add them to the cache hash for the compiler id.
This changes it so that only the first library path returned by os_self_exe_shared_libs is added to the cache hash under Darwin. I looked into methods on getting the system version to keep parity with older versions, but @fengb reported that this works on Catalina (a version behind Big Sur)
Signed-off-by: Haze Booth <isnt@haze.cool>
2020-07-15 22:37:04 -04:00
Andrew Kelley
f119092273
stage2: breaking AST memory layout modifications
...
ast.Node.Id => ast.Node.Tag, matching recent style conventions.
Now multiple different AST node tags can map to the same AST node data
structures. In this commit, simple prefix operators now all map top
SimplePrefixOp.
`ast.Node.castTag` is now preferred over `ast.Node.cast`.
Upcoming: InfixOp flattened out.
2020-07-15 18:15:59 -07:00
Andrew Kelley
e70d6d19f5
stage2: extract AST=>ZIR code to separate file
2020-07-15 15:42:02 -07:00