Andrew Kelley
1c79eea125
zig fmt: while loops
2021-02-09 17:23:57 -07:00
joachimschmidt557
6a5a6386c6
stage2 ARM: fix register allocation in genArmBinOp
...
Previously, this would reuse an operand even if reuseOperand returned
false for both operands.
genArmBinOpCode was also changed to be more Three-address code oriented
in the process.
2021-02-09 23:58:41 +01:00
joachimschmidt557
c2beaba85a
stage2 ARM: fix callee_preserved_regs
...
Previously, the registers included r0, r1, r2, r3 which are not
included in the callee saved registers according to the Procedure Call
Standard for the ARM Architecture.
2021-02-09 23:57:43 +01:00
Andrew Kelley
bcafc51e58
zig fmt: fn protos and anytype
2021-02-09 14:41:50 -07:00
Andrew Kelley
b1d8a0a5a6
zig fmt: asm expressions
2021-02-08 22:03:23 -07:00
Isaac Freund
d869133a9f
zig fmt: implement switches
2021-02-08 15:41:31 -08:00
Isaac Freund
837cd748a8
zig fmt: fix block lbrace indent
2021-02-08 15:41:31 -08:00
Isaac Freund
aaf13a2bb3
zig fmt: implement break
2021-02-08 15:41:31 -08:00
Evan Haas
221f1d898c
translate-c: Improve function pointer handling
...
Omit address-of operator if operand is a function.
Improve handling of function-call translation when using function pointers
Fixes #4124
2021-02-08 10:15:00 +02:00
Isaac Freund
57cec38e61
std/zig/ast: fix Tree.lastToken() for blocks
...
The fact that blocks may end in a semicolon but this semicolon is not
counted by recursive lastToken() evaluation on the sub expression causes
off-by-one errors for lastToken() on blocks currently.
To fix this, introduce BlockSemicolon and BlockTwoSemicolon following
the pattern used for trailing commas in e.g. builtin function arguments.
2021-02-07 14:51:37 -08:00
Isaac Freund
0e38362d24
zig fmt: split Slice and SliceSentinel
...
This saves 4 whole bytes in the common case where there is no sentinel.
2021-02-07 14:51:37 -08:00
Isaac Freund
1d71b19c0d
zig fmt: implement error set decls
2021-02-07 14:51:37 -08:00
Andrew Kelley
1adac0a55b
never pass -s to clang
...
We only use clang to produce object files; the idea of stripping is not
relevant here.
Fixes regression in previous commit.
2021-02-07 15:08:48 -07:00
Andrew Kelley
e197a03124
zig cc: recognize the -s flag to be "strip"
2021-02-07 14:51:27 -07:00
Isaac Freund
bb7b5ee2ac
zig fmt: implement catch and return
2021-02-07 12:04:32 -08:00
Isaac Freund
0929fcbc34
zig fmt: implement slices
2021-02-07 12:04:32 -08:00
Isaac Freund
33915cb1ed
zig fmt: implement pointer types
...
rename PtrType => PtrTypeBitRange, SliceType => PtrType
This rename was done as the current SliceType is used for non-bitrange
pointers as well as slices and because PtrTypeSentinel/PtrTypeAligned
are also used for slices. Therefore using the same Ptr prefix for all
these pointer/slice nodes is an improvement.
2021-02-06 21:29:45 -08:00
Michael Dusan
905c85be96
Merge pull request #7957 from mk12/catalina
...
Use -isysroot on Catalina too, not just Big Sur
2021-02-06 20:12:09 -05:00
Mitchell Kember
fc79cbcc80
Use -isysroot on Catalina too, not just Big Sur
...
This amends #7506 to apply to macOS versions since Catalina (10.15),
rather than since Big Sur (11.0).
2021-02-06 16:32:32 -05:00
Andrew Kelley
d898945786
zig fmt: builtin call with trailing comma
2021-02-05 20:38:30 -07:00
Andrew Kelley
409ca88829
zig fmt: trailing comma in fn parameter list
2021-02-05 17:46:15 -07:00
Andrew Kelley
16a2562c3f
zig fmt: implement container decls
2021-02-05 15:47:18 -07:00
Andrew Kelley
cf42ae178d
std.MultiArrayList: use @memset builtin for undefined
...
See comment for more details
2021-02-05 15:45:33 -07:00
Isaac Freund
0f3fa4d654
zig fmt: array types
2021-02-05 11:36:19 -08:00
Isaac Freund
6f3b93e2e8
zig fmt: struct and anon array initialization
2021-02-05 10:51:45 -08:00
Isaac Freund
3e960cfffe
zig fmt: float literal with exponent
2021-02-05 10:51:45 -08:00
Isaac Freund
0b4bb9b84f
std.MultiArrayList: implement review comments
2021-02-05 10:51:45 -08:00
Andrew Kelley
7069459a76
zig fmt: implement struct init
2021-02-04 19:59:06 -07:00
Andrew Kelley
8e46d06650
zig fmt: implement fn protos and defers
2021-02-04 16:38:29 -07:00
Michael Dusan
300ebbd560
target: map zig ppc32 → llvm ppc
...
- llvm does not accept `ppc32` as a CPU type
closes #7947
2021-02-04 14:22:38 -08:00
Asherah Connor
4428acf0f7
zig fmt: deref, unwrap optional
2021-02-04 10:49:45 -08:00
Andrew Kelley
725adf8332
zig fmt: builtin calls and array access
2021-02-03 22:12:11 -07:00
Andrew Kelley
f5279cbada
zig fmt: implement top-level fields
2021-02-03 17:02:12 -07:00
Rocknest
2d447b57cc
fix typo in comment
2021-02-02 20:07:08 -08:00
Andrew Kelley
1a83b29bea
zig fmt: implement if, call, field access, assignment
2021-02-02 21:05:53 -07:00
Michael Dusan
8661a13b74
fix superfluous fmt specifier in update_glibc
2021-02-02 10:00:13 -05:00
Frank Denis
7a01d396ee
siphash: update the link to the SipHash paper
2021-02-02 11:17:14 +02:00
Andrew Kelley
0c6b98b825
zig fmt: implement simple test with doc comments
2021-02-01 21:31:41 -07:00
Andrew Kelley
272a0ab359
zig fmt: implement "line comment followed by top-level comptime"
2021-02-01 20:11:55 -07:00
Andrew Kelley
20554d32c0
zig fmt: start reworking with new memory layout
...
* start implementation of ast.Tree.firstToken and lastToken
* clarify some ast.Node doc comments
* reimplement renderToken
2021-02-01 17:23:49 -07:00
Michael Dusan
70a7c14ca6
update update_glibc to format strings with "{s}"
2021-02-01 16:57:41 -05:00
Andrew Kelley
102d954220
Merge pull request #7827 from Snektron/spirv-setup
...
Stage 2: SPIR-V setup
2021-02-01 12:49:51 -08:00
Jonathan Marler
06b29c8546
std.json large number support
2021-02-01 12:40:49 -08:00
Martin Wickham
1032a69321
Dupe strings on all public api points for std.build
2021-02-01 12:31:24 -08:00
Ryan Liptak
5e81b048a0
docs: Clarify that @field can work on declarations
2021-02-01 12:29:50 -08:00
Andrew Kelley
1517ed0a5e
Merge pull request #7895 from Luukdegram/wasm-control-flow
...
stage2: wasm control flow
2021-02-01 12:29:22 -08:00
Luuk de Gram
c0685458a2
Define wasm constants
...
Update link.Wasm.zig to use std.wasm for its constants
Make opcodes u8 and non-exhaustive
Update test and rename 'spec' to 'wasm'
2021-02-01 12:28:25 -08:00
Cameron Conn
683d3f7242
Don't read more bytes than exist in MsfStream ( #7839 )
2021-02-01 15:27:39 -05:00
joachimschmidt557
446ebddb93
stage2 ARM: save function arguments to stack for debugging
...
This changes genArg to copy registers to the stack for better
debugging. Thus, it requires genSetStack to be implemented in order for
genArg to work.
2021-02-01 12:17:24 -08:00
Vincent Rischmann
16905d96f7
Fixes for std.Thread.Condition ( #7883 )
...
* thread/condition: fix PthreadCondition compilation
* thread/condition: add wait, signal and broadcast
This is like std.Thread.Mutex which forwards calls to `impl`; avoids
having to call `cond.impl` every time.
* thread/condition: initialize the implementation
2021-02-01 15:16:39 -05:00