Commit Graph

6784 Commits (379d547603badb2667089c85454a2e3f5ede3342)

Author SHA1 Message Date
daurnimator 6037f89212
std: fifo rename from FixedSizeFifo to LinearFifo 2019-11-25 09:26:33 +11:00
daurnimator cd749e0416
std: fifo now has 3 modes: Static, Slice and Dynamic 2019-11-25 09:26:32 +11:00
daurnimator c0e47cb645
std: fix fifo for non-u8 types 2019-11-25 09:26:32 +11:00
daurnimator e810f485ab
std: add optimization to fifo if size is power of two 2019-11-25 09:26:32 +11:00
daurnimator 01b2a56225
std: move auto_align constant to top of comptime function
At a later point in time this might be made into a parameter
2019-11-25 09:26:32 +11:00
daurnimator 52645d06e1
std: fix unfinished doc-comment in fifo 2019-11-25 09:26:32 +11:00
Andrew Kelley c96d565166
add compile error for incompatible pointer sentinels 2019-11-24 17:02:56 -05:00
Andrew Kelley 4018034708
add test cases for arbitrary pointer sentinels 2019-11-24 16:52:32 -05:00
Andrew Kelley 09ec720dab
fix comptime `@ptrCast` of pointers to arrays 2019-11-24 16:25:26 -05:00
Andrew Kelley f7574f44c1
add test for struct with var field 2019-11-24 15:20:15 -05:00
Andrew Kelley 44b1dc6db8
add type coercion: [:x]T to [*:x]T 2019-11-24 15:17:55 -05:00
syscall0 eea8b10463 Call DllMain entry point if declared 2019-11-24 14:46:22 -05:00
schroffl 6109e49c5b Fix FixedSizeFifo buffer type
Update the `.buf` property to be a slice of the type that is given as a parameter.
2019-11-24 14:42:56 -05:00
Andrew Kelley 2b1faa1f20
Merge pull request #3748 from Vexu/modernize-stage2
Updates and cleanup in self hosted compiler
2019-11-24 14:40:16 -05:00
Vexu 20f5f56986
uncomment event.fs.watch 2019-11-24 17:42:20 +02:00
Vexu ab534cc9f1
update event.fs to use global event loop 2019-11-24 17:39:08 +02:00
Vexu 0cbf00a3ec
self hosted compiler: final small fixes to get it compiling 2019-11-24 10:24:47 +02:00
Andrew Kelley 4c7b52503b
all tests passing 2019-11-24 02:14:21 -05:00
Andrew Kelley 2dd20aa04a
langref: update for sentinel-terminated types 2019-11-23 22:29:12 -05:00
Andrew Kelley 00878a15d7
zig fmt: support sentinel-terminated pointer syntax 2019-11-23 22:21:25 -05:00
Andrew Kelley f25182f46d
structs can have fields with type `var`
behavior tests passing now
2019-11-23 17:51:37 -05:00
Vexu 010494d8af
only test stage2 on linux 2019-11-23 23:45:54 +02:00
Vexu 89310dad56
Merge branch 'master' into modernize-stage2 2019-11-23 23:01:28 +02:00
Vexu b9ef36094c
re-enable stage2 tests 2019-11-23 22:57:34 +02:00
Vexu 6c64f079fa
add workaround to child_process.zig 2019-11-23 22:06:51 +02:00
Vexu d40f204ec0
self hosted compiler: small miscellaneous fixes 2019-11-23 21:57:24 +02:00
Michael Dusan 29d7b5a80c remove UTF BOM 2019-11-23 14:17:55 -05:00
Vexu 7fa59565d3 fix small regressions in std.event 2019-11-23 14:01:00 -05:00
Vexu 133579d7c0
fix casts 2019-11-23 19:36:26 +02:00
Vexu 03cc81665b
Merge branch 'master' into modernize-stage2 2019-11-23 19:13:48 +02:00
Andrew Kelley 7597735bad
update the stage1 implementation to the new proposal
See #3731
2019-11-23 04:45:35 -05:00
Andrew Kelley ad0871ea4b
Merge branch 'Vexu-missing-cast'
Closes #3336
Closes #3718
2019-11-21 23:25:02 -05:00
Vexu 4e6c1b676b
add cast to not hit #2561 2019-11-21 23:21:51 -05:00
Vexu 4d9318cee0
fix missing implicit cast in return instruction 2019-11-21 23:21:51 -05:00
Vexu 0b63573674
improve broken llvm module error message 2019-11-21 23:21:14 -05:00
Vexu 0e8a53514e
add missing error set to ChildProsess.SpawnError 2019-11-21 23:21:14 -05:00
Timon Kruiper 94299d16d1 Stage1: Add compile error for an empty switch on a integer 2019-11-22 04:00:47 +00:00
Andrew Kelley 6b623b5ea2
update docs for null terminated stuff 2019-11-21 20:43:42 -05:00
Andrew Kelley fd6020c4e2
update tests, better error messages, update self-hosted tokenizer 2019-11-21 20:43:41 -05:00
Andrew Kelley cf2fe2536e
better error message when null termination does not match 2019-11-21 20:43:41 -05:00
Andrew Kelley 47f06be369
string literals are now null terminated
this also deletes C string literals from the language, and then makes
the std lib changes and compiler changes necessary to get the behavior
tests and std lib tests passing again.
2019-11-21 20:43:41 -05:00
Andrew Kelley 21f344b3b9
add null terminated pointers and arrays to self-hosted
as well as `@typeInfo` and `@Type`
2019-11-21 20:43:41 -05:00
Andrew Kelley 1aa978f32e
implement null terminated pointers 2019-11-21 20:43:41 -05:00
Andrew Kelley e3404e3c78
Merge branch 'std.fs.Dir.openRead' 2019-11-21 20:41:30 -05:00
Andrew Kelley cd5f4de2a6
std: remove O_LARGEFILE from OS bits when the OS does not define it 2019-11-21 20:34:55 -05:00
Benjamin Feng 0f0d01a037 Replace magic numbers with named constants 2019-11-21 18:41:02 -06:00
Andrew Kelley bf1cbebea1 improve std.fs.selfExePath and related functions on Windows 2019-11-21 18:51:12 -05:00
Andrew Kelley cd37c1a377
add std.fs.Dir.openRead
This is progress towards file system APIs that encourage avoiding
Time Of Check, Time Of Use bugs.
2019-11-21 17:07:29 -05:00
Andrew Kelley 874b34a30f
self-hosted tokenizer handles \r in string literals 2019-11-20 21:03:17 -05:00
Andrew Kelley ed619245e9
remove dead code shebang support from self-hosted tokenizer 2019-11-20 20:18:19 -05:00