Andrew Kelley
4cb203db92
ir: parsing integer literals
2020-04-19 19:31:50 -04:00
Andrew Kelley
7127c07f68
ir: parse types
2020-04-19 19:31:50 -04:00
Andrew Kelley
018daa028e
rework types and values data layout
2020-04-19 19:31:50 -04:00
daurnimator
e535057364
std: use std.ArrayList(u8).OutStream instead of std.Buffer.OutStream
2020-04-01 10:36:38 -04:00
Vexu
538d9a5dd8
remove uses of `@ArgType` and `@IntType`
2020-02-24 23:39:03 +02:00
Ryan Liptak
834218d789
Fix remaining variadic formatted prints
...
Used a series of regex searches to try to find as many instances of the old pattern as I could and update them.
2020-01-09 13:36:44 -05:00
LemonBoy
563d9ebfe5
Implement the callconv() annotation
2020-01-02 18:53:16 +01:00
Robin Voetter
4b4fbe3887
Replace @typeOf with @TypeOf in all zig source
...
This change was mostly made with `zig fmt` and this also modified some whitespace. Note that in some files, `zig fmt` produced incorrect code, so the change was made manually.
2019-12-10 11:09:41 -05:00
Andrew Kelley
a3f6a58c77
remove var args from the language
...
closes #208
2019-12-09 15:27:27 -05:00
Andrew Kelley
fe4963412f
update self-hosted compiler to new format API
2019-12-08 23:17:03 -05:00
Vexu
798d05dd02
add workaround for #3190
2019-11-26 22:11:04 +02:00
Vexu
36849d8a7b
fixes and cleanup in self hosted
2019-11-26 11:52:12 +02:00
Vexu
d40f204ec0
self hosted compiler: small miscellaneous fixes
2019-11-23 21:57:24 +02:00
Vexu
133579d7c0
fix casts
2019-11-23 19:36:26 +02:00
Vexu
86d9563d15
self hosted compiler: various small fixes
2019-11-08 00:18:14 +02:00
Vexu
7a24334199
self hosted compiler: small fixes to imports and declarations
2019-11-07 10:30:56 +02:00
Vexu
c6076a1360
self hosted compiler: use enum literals
2019-11-07 10:30:56 +02:00
Vexu
7000316113
self hosted compiler: fix calling convention in type.zig
2019-11-07 10:30:47 +02:00
Vexu
6dd4a276de
self hosted compiler: update to new std.event
2019-11-07 10:30:37 +02:00
Vexu
110e575497
self hosted compiler: replace Promise with Frame and AnyFrame
2019-11-07 10:30:21 +02:00
Vexu
cb20093614
self hosted compiler: remove await async pattern
2019-11-07 10:30:11 +02:00
Andrew Kelley
d0551db5cd
introduce the enum literal type
...
see #683
2019-03-24 00:44:18 -04:00
Andrew Kelley
5424b4320d
remove namespace type; files are empty structs
...
closes #1047
2019-02-28 10:11:32 -05:00
Andrew Kelley
6769183a9d
fix implicit cast error unions with non-optional to optional pointer
...
and update self hosted compiler for C pointers
See #1059
2019-02-14 15:48:28 -05:00
Andrew Kelley
90b8cd4a45
add C pointer type to @typeInfo
...
See #1059
2019-02-11 16:07:40 -05: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
Andrew Kelley
545064c1d9
introduce vector type for SIMD
...
See #903
* create with `@Vector(len, ElemType)`
* only wrapping addition is implemented
This feature is far from complete; this is only the beginning.
2019-01-30 23:39:25 -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
c06a61e9bf
remove `this`. add `@This()`.
...
closes #1283
2018-09-13 16:34:33 -04:00
Andrew Kelley
0df485d4dc
self-hosted: reorganize creation and destruction of Compilation
2018-08-10 12:28:20 -04:00
Andrew Kelley
adefd1a52b
self-hosted: function calling another function
2018-07-24 20:24:05 -04:00
Andrew Kelley
2ea08561cf
self-hosted: function types use table lookup
2018-07-24 14:20:49 -04:00
Andrew Kelley
93e78ee722
self-hosted can compile libc hello world
2018-07-22 23:28:53 -04:00
Andrew Kelley
33fbd8c1d3
self-hosted: convert some stuff to async/await
2018-07-20 00:13:48 -04:00
Andrew Kelley
1d85b588ea
self-hosted: progress on IR for supporting libc hello world
...
* add c int types
* some more ir stubs
2018-07-19 00:08:47 -04:00
Andrew Kelley
97bfeac13f
self-hosted: create tmp dir for .o files and emit .o file for fn
2018-07-16 20:52:50 -04:00
Andrew Kelley
363f4facea
self-hosted: generate LLVM IR for simple function
2018-07-15 00:07:33 -04:00
Andrew Kelley
28c3d4809b
rename Module to Compilation
...
and CompilationUnit to ObjectFile
2018-07-14 16:31:17 -04:00
Andrew Kelley
278829fc2c
self-hosted: adding a fn to an llvm module
2018-07-14 16:03:22 -04:00
Andrew Kelley
e78b1b810f
self-hosted: basic IR pass2
2018-07-13 21:56:38 -04:00
Andrew Kelley
687bd92f9c
self-hosted: generate zig IR for simple function
...
no tests for this yet. I think the quickest path to testing will be
creating the .o files and linking with libc, executing, and then
comparing output.
2018-07-12 15:12:44 -04:00