Jimmi HC
a8146ade2a
Renamed UndefinedLiteral to Undefined
2018-06-05 11:54:11 +02:00
Jimmi HC
236c680f6b
Removed NullLiteral to Null
2018-06-05 11:30:01 +02:00
Jimmi HC
02cb220faf
Renamed "(int/float literal)" to "comptime_int/float"
2018-06-05 11:14:43 +02:00
Andrew Kelley
e53b683bd3
Pointer Reform: proper slicing and indexing ( #1053 )
...
* enable slicing for single-item ptr to arrays
* disable slicing for other single-item pointers
* enable indexing for single-item ptr to arrays
* disable indexing for other single-item pointers
see #770
closes #386
2018-06-04 22:11:14 -04:00
Andrew Kelley
d21a1922eb
support `zig fmt: off` and `zig fmt: on` between top level decls
...
closes #1030
closes #1033
2018-06-04 12:15:02 -04:00
Andrew Kelley
96164ce613
disallow single-item pointer indexing
...
add pointer arithmetic for unknown length pointer
2018-06-04 01:39:57 -04:00
Andrew Kelley
5f38a01ede
run zig fmt
2018-06-01 01:22:35 -04:00
Andrew Kelley
2a7c8c5b10
add test case for pointer to type and slice of type
...
closes #588
2018-06-01 00:18:10 -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
ea58f4a5a9
run zig fmt on the codebase
2018-05-30 16:09:11 -04:00
Jimmi HC
2b3af4ef6b
fixed #1009
...
ir_make_type_info_defs already calls resolve_top_level_decl on all Tld
when building the def array. This means, that there is no reason that
analyze_fn_body is nessesary, as the fn type should have already been
resolved completly. The only thing analyze_fn_body does here, is cause
problems with generic functions.
2018-05-30 10:30:09 +02:00
Andrew Kelley
0c16cd2d0e
run zig fmt on the codebase
...
See #1003
2018-05-29 04:23:38 -04:00
Andrew Kelley
c029f4bfc4
trailing comma after var args is not supported
2018-05-25 20:41:14 -04:00
Andrew Kelley
08f95d0c2f
enum fields with a type are not supported
...
the c++ codebase lets it slide
the self hosted parser correctly reports a parse error
2018-05-25 01:10:54 -04:00
Andrew Kelley
ca49b6f6b4
struct fields with no explicit type are not supported
...
the c++ codebase lets it slide
the self hosted parser correctly reports a parse error
2018-05-25 00:39:18 -04:00
Andrew Kelley
43085417be
update github.com/zig-lang to github.com/ziglang
2018-05-24 21:27:44 -04:00
Andrew Kelley
5cfabdd493
Merge remote-tracking branch 'origin/master' into pointer-reform
2018-05-16 00:02:26 -04:00
Andrew Kelley
74b10c08d1
fix @typeInfo not setting a field to comptime
2018-05-15 14:11:41 -04:00
Andrew Kelley
86a352c45b
Merge branch 'master' into pointer-reform
2018-05-13 13:38:03 -04:00
Andrew Kelley
a6ae45145f
add @newStackCall builtin function
...
See #1006
2018-05-12 17:35:15 -04:00
Andrew Kelley
277b9cf878
fix comptime code modification of global const
...
closes #1008
2018-05-11 22:41:44 -04:00
Marc Tiehuis
efa39c5343
Fix bigint shift-right partial shift
2018-05-10 22:26:26 +12:00
Andrew Kelley
6928badd85
Merge branch 'master' into pointer-reform
2018-05-09 23:43:07 -04:00
Jimmi HC
9b29c872ce
Added Slice as it's own type info in userland
2018-05-09 09:34:04 +02:00
Andrew Kelley
77a1a216d2
tagged union field access prioritizes members over enum tags
...
closes #959
2018-05-07 16:43:20 -04:00
Marc Tiehuis
d7b029995c
Fix bigint multi-limb shift and masks
2018-05-05 22:40:29 +12:00
Andrew Kelley
b9e320dd52
Merge pull request #951 from alexnask/reflect_reify
...
Metaprogramming - @typeInfo [DONE]
2018-05-03 23:02:33 -04:00
Jimmi Holst Christensen
aa2586de18
Fixed extern enums having the wrong size ( #970 )
...
Fixed extern enums having the wrong size
See #977
2018-05-03 22:27:04 -04:00
Andrew Kelley
adbb691f46
fix behavior tests for ReleaseSmall
2018-05-02 22:48:04 -04:00
Alexandros Naskos
131c133bb7
Fixed inlining determination test ( #972 )
...
When deciding wether we should inline a scope, look up the parents until we get to a function definition scope
2018-05-02 21:43:07 -04:00
Alexandros Naskos
7d239414f7
Fixed type info test, added documentation.
2018-05-01 13:42:20 +03:00
Alexandros Naskos
255c0ef406
Resolved merge conflict.
2018-05-01 13:09:34 +03:00
Alexandros Naskos
e1535ee0a9
Added typeInfo tests
2018-05-01 13:01:54 +03:00
Alexandros Naskos
ff1c4e1f13
Added tests.
2018-05-01 13:00:39 +03:00
Andrew Kelley
ac4d55dec1
behavior tests passing with new pointer deref syntax
2018-05-01 01:53:04 -04:00
Andrew Kelley
a35b366eb6
[breaking] delete ptr deref prefix op
...
start using zig-fmt-pointer-reform branch build of zig fmt
to fix code to use the new syntax
all of test/cases/* are processed, but there are more left
to be done - all the std lib used by the behavior tests
2018-04-30 20:35:54 -04:00
Andrew Kelley
76ab1d2b6c
support foo.* for ptr deref
...
See #770
2018-04-30 14:20:56 -04:00
Andrew Kelley
0bb054e5e7
Merge pull request #930 from zig-lang/float-printing
...
Finish and fix float printing
2018-04-28 22:43:52 -04:00
Andrew Kelley
ec2a81a081
fix compiler-rt ABI for x86_64 windows
2018-04-28 22:03:07 -04:00
Jimmi Holst Christensen
2fc34eaa58
Functions with infered error set can now return literals
...
fixes #852
2018-04-28 16:27:31 +02:00
Jimmi Holst Christensen
3178528335
Removed zero sized error set optimization
...
fixes #762
fixes #818
2018-04-28 14:05:08 +02:00
Andrew Kelley
15bf0c1541
fix interaction between defer and labeled break
...
closes #830
2018-04-23 18:06:33 -04:00
Andrew Kelley
89a4c373d3
fix bigint twos complement implementation
...
closes #948
2018-04-23 12:06:18 -04:00
Andrew Kelley
21767144fc
linux: support VDSO for clock_gettime
...
also fix a compiler crash when using cmpxchg with nullable pointer
2018-04-22 18:11:50 -04:00
Jimmi Holst Christensen
1b91478bff
Optimized field ptr ir for hot path and fix assignment bug
2018-04-19 21:34:18 +02:00
Jimmi Holst Christensen
6b4f6ebd89
Added field builtin function
2018-04-19 20:11:16 +02:00
Andrew Kelley
06909ceaab
support break in suspend blocks
...
* you can label suspend blocks
* labeled break supports suspend blocks
See #803
2018-04-18 22:21:54 -04:00
Andrew Kelley
f1f998e071
improve cmpxchg
...
* remove @cmpxchg, add @cmpxchgWeak and @cmpxchgStrong
- See explanations in the langref.
* add operand type as first parameter
* return type is ?T where T is the operand type
closes #461
2018-04-18 12:16:42 -04:00
Andrew Kelley
b9360640ce
add @atomicLoad builtin
...
See #174
2018-04-15 18:12:00 -04:00
Andrew Kelley
859b10d8bf
std.math.ln and std.math.exp use float strict mode
...
closes #920
2018-04-15 15:22:27 -04:00