Andrew Kelley
b9e320dd52
Merge pull request #951 from alexnask/reflect_reify
...
Metaprogramming - @typeInfo [DONE]
2018-05-03 23:02:33 -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
849ea61fa1
Small fix.
2018-05-01 17:10:50 +03:00
Alexandros Naskos
255c0ef406
Resolved merge conflict.
2018-05-01 13:09:34 +03:00
Alexandros Naskos
ff1c4e1f13
Added tests.
2018-05-01 13:00:39 +03:00
Alexandros Naskos
013f548202
Finished FnDef TypeInfo generation (warning: may be buggy).
2018-04-29 15:40:26 +03:00
Alexandros Naskos
66aa760f83
More FnDef TypeInfo generation.
2018-04-29 14:03:55 +03:00
Andrew Kelley
96ecb40259
add fuzz tests for std.atomic.Stack
2018-04-28 17:53:06 -04:00
Alexandros Naskos
af73462da4
Started work on function definition TypeInfo generation.
2018-04-28 19:57:59 +03:00
Jimmi Holst Christensen
341f8c1e86
Fixed wrong formatting for arg_index when reporting @ArgType error
2018-04-28 17:57:47 +02:00
Alexandros Naskos
9ba400673d
Generating TypeInfo's now forces definitions to be resolved.
2018-04-28 18:38:38 +03:00
Jimmi Holst Christensen
fba0347ec4
.ReturnType and @ArgType now emits errors on unresolved types
...
related: #846
2018-04-28 17:17:48 +02:00
Jimmi Holst Christensen
2fc34eaa58
Functions with infered error set can now return literals
...
fixes #852
2018-04-28 16:27:31 +02:00
Alexandros Naskos
61b0180596
Added definition TypeInfo generation, except for function definitions.
2018-04-28 17:01:19 +03:00
Jimmi Holst Christensen
3178528335
Removed zero sized error set optimization
...
fixes #762
fixes #818
2018-04-28 14:05:08 +02:00
Alexandros Naskos
ea2596280f
Added BoundFn TypeInfo generation.
2018-04-27 05:10:20 +03:00
Alexandros Naskos
8f703f919f
Added Fn TypeInfo generation.
2018-04-27 04:29:50 +03:00
Alexandros Naskos
a2dadbc206
Added struct TypeInfo generation.
2018-04-27 02:52:09 +03:00
Alexandros Naskos
9041d0d37e
Fixed enum tag type detection in TypeInfo generation.
2018-04-27 02:05:24 +03:00
Alexandros Naskos
884e32d5c3
Added ErrorUnion, Union TypeInfo generation
2018-04-26 19:56:34 +03:00
Alexandros Naskos
fbbbee6b72
Switched to shallow TypeInfo.
2018-04-26 18:18:47 +03:00
Alexandros Naskos
4aa5d87ada
Added ErrorSet TypeInfo generation.
2018-04-26 17:14:38 +03:00
Alexandros Naskos
f5977f68eb
Added Enum TypeInfo except for methods
2018-04-26 16:41:59 +03:00
Alexandros Naskos
7a91e4736a
Reset parent on cached TypeInfo values if we need to.
2018-04-26 14:29:27 +03:00
Alexandros Naskos
bb56360bfa
Added TypeInfo cache
2018-04-26 14:03:19 +03:00
Alexandros Naskos
dd88d7deda
Cleanup
2018-04-26 13:27:16 +03:00
Alexandros Naskos
bc160821d3
Changed TypeInfo layout.
2018-04-25 17:50:11 +03:00
Alexandros Naskos
2606993cb4
Fixed ir_type_info_struct_set_parent for struct parents.
2018-04-25 11:59:35 +03:00
Alexandros Naskos
d68aea4f35
Added checks for field name/index mapping in TypeInfo generation. Abstracted the parent setting out.
2018-04-25 11:35:46 +03:00
Alexandros Naskos
778b931bf3
Fixed comptime union void field access
2018-04-25 02:50:18 +03:00
Alexandros Naskos
182a9fad2d
Added ArrayInfo, NullableInfo, PromiseInfo generation
2018-04-24 17:38:30 +03:00
Alexandros Naskos
09d7033d1d
PointerInfo child is known at comptime
2018-04-24 17:08:45 +03:00
Alexandros Naskos
2d8553c853
Fixed PointerInfo generation
2018-04-24 17:01:20 +03:00
Alexandros Naskos
189e8e97bd
PointerInfo child is a pointer to a TypeInfo union, still not working correctly
2018-04-24 16:50:36 +03:00
Alexandros Naskos
0e5fb035e3
Added (broken) pointer info, float info
2018-04-24 16:23:22 +03:00
Alexandros Naskos
e9309d3b13
Fixed IntInfo generation.
2018-04-24 15:17:34 +03:00
Alexandros Naskos
ec2a3ed500
Attempt at adding comptime union field access
2018-04-24 15:03:46 +03:00
Alexandros Naskos
fb88f5a0d2
@typeInfo with void payloads now works!
2018-04-24 11:20:33 +03:00
Alexandros Naskos
7eab62325b
One step towards @typeInfo
2018-04-24 01:49:22 +03:00
Andrew Kelley
15bf0c1541
fix interaction between defer and labeled break
...
closes #830
2018-04-23 18:06:33 -04:00
Andrew Kelley
8503eff8c1
add compile error for invalid deref on switch target
...
closes #945
2018-04-22 23:46:55 -04:00
Andrew Kelley
6e57243a79
zig fmt: preserve comments in front of test blocks
...
* refactor std.zig.parser
* fix compiler crashing for some compile errors
* take advantage of @field in std.zig.ast
* move ast.NodeFoo to ast.Node.Foo
* comment preservation is more explicit
See #911
2018-04-20 02:15:09 -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
b5459eb987
add @sqrt built-in function
...
See #767
2018-04-15 13:26:58 -04:00
Andrew Kelley
b7af9edb8a
add std.os.createThread
...
this adds kernel thread support to the standard library for
linux.
See #174
2018-04-14 02:24:05 -04:00
Andrew Kelley
373b3586a1
inline functions must be stored in const or comptime var
...
closes #913
2018-04-12 16:26:23 -04:00