Vexu
6ca0def499
recover from invalid global error set access
2020-05-16 12:09:34 +03:00
Andrew Kelley
69a5f0d797
Merge remote-tracking branch 'origin/master' into self-hosted-incremental-compilation
2020-05-16 01:26:18 -04:00
Andrew Kelley
a286b5de38
build.zig: -Dlib-files-only skips installing self-hosted
2020-05-16 01:22:56 -04:00
Andrew Kelley
294bfb3321
stage2 zir tests passing
2020-05-15 23:54:13 -04:00
Andrew Kelley
f2feb4e47a
move Module to its own file
2020-05-15 21:44:33 -04:00
Andrew Kelley
64f4ef7556
update ZIR test cases
2020-05-15 21:29:52 -04:00
Andrew Kelley
5135238f86
ZIR: emit proper string literals
2020-05-15 19:11:00 -04:00
Andrew Kelley
8980f150e9
fix memory leaks of one of the ZIR test cases
2020-05-15 18:54:48 -04:00
Vexu
b2f16d4484
fix infinite loop with mismatced bracket
2020-05-15 23:50:47 +03:00
Andrew Kelley
e1d4b59c5b
self-hosted: update main.zig
...
After this commit there are no more bit rotted files.
The testing program that was in ir.zig has been moved to main.zig
Unsupported command line options have been deleted, or error messages
added.
The compiler repl is available from the build-exe, build-lib,
build-obj commands with the --watch option.
The main zig build script now builds the self-hosted compiler
unconditionally. Linking against LLVM is behind a -Denable-llvm
flag that defaults to off.
2020-05-15 15:20:42 -04:00
yvt
b747d4d1ce
Enable the test `standalone/global_linkage`
...
This test was added to the source tree in c39d7a6
, but has never been
referenced from anywhere.
2020-05-16 02:05:55 +09:00
Vexu
a00fd6e254
properly handle extra closing braces at top level
2020-05-15 14:30:49 +03:00
Vexu
f8b99331a2
Merge pull request #5336 from Vexu/parser
...
Make self-hosted parser more error tolerant
2020-05-15 14:15:30 +03:00
Vexu
440189a04a
cleanup* remove unecessary error* properly handle ReturnTypeInvalid in ast.zig functions* assert that the tree is clean in render.zig* simplify parser recovery with top level decls
2020-05-15 11:35:37 +03:00
Andrew Kelley
ebb81ebe59
fix the global offset table code and updating decl exports
2020-05-15 01:22:04 -04:00
Andrew Kelley
81a01bd481
fix codegen of sentinel-terminated arrays and .got alignment
...
we now have an exit(0) program working
2020-05-14 16:34:04 -04:00
Andrew Kelley
0986dcf1cf
self-hosted: fix codegen and resolve some analysis bugs
2020-05-14 13:20:27 -04:00
Vexu
c77fee0344
fix infinite loop
...
findToken wasn't as generic as I thought it was
2020-05-14 19:56:55 +03:00
Vexu
c4552ee8ed
store rparen in ReturnType.Invalid
...
This is useful for getting a partial function signature
2020-05-14 17:18:14 +03:00
Vexu
a32e240540
improve recovery from invalid container members
...
Instead of trying to find the end of the block or the next comma/semicolon
we no try to find the next token that can start a container member.
2020-05-14 12:09:40 +03:00
Vexu
89f2923a8a
recover from missing semicolon
2020-05-14 11:19:50 +03:00
Vexu
ac319b2734
remove useless nosuspend parsing
...
nosuspend cannot be used in a type expression and
all other use casesare covered by PrimaryExpr
2020-05-14 11:19:14 +03:00
Andrew Kelley
fb947c365e
work around stage1 compiler bug
...
breaking from inside the block with defers in scope triggered
broken LLVM module found: Terminator found in the middle of a basic
block!
2020-05-13 22:20:31 -04:00
Andrew Kelley
6a2425c38c
self-hosted: fix the rest of the compile errors
2020-05-13 22:12:38 -04:00
Andrew Kelley
080022f6c6
self-hosted: fix compile errors, except for codegen.zig
2020-05-13 20:06:01 -04:00
Vexu
c3b76d0913
recover from invalid builtin/async call
2020-05-14 00:16:56 +03:00
Vexu
1f81887a78
recover after invalid inline/extern
2020-05-13 23:35:58 +03:00
Vexu
ad71d959d7
correctly recover from invalid top level declarations
2020-05-13 23:28:04 +03:00
Vexu
2296906e2a
modernize std.zig.tokenizer
2020-05-13 23:08:42 +03:00
Vexu
23c5ff94e9
improve recovery on top level declarations
2020-05-13 20:42:18 +03:00
Vexu
4b898893e2
Merge pull request #5254 from ifreund/top-level-struct-file-names
...
Apply naming conventions of structs to files
2020-05-13 19:28:14 +03:00
Vexu
118db892be
Merge pull request #5321 from gpanders/ascii-case-sensitive
...
Add helper functions and docstrings to ascii.zig
2020-05-13 19:04:53 +03:00
Vexu
76681e6b96
Make PriorityQueue.Iterator public
...
The `iterator` function was already public but these seem to have been forgotten.
2020-05-13 18:38:03 +03:00
Vexu
be2b8d58ef
Merge pull request #5337 from DrDeano/master
...
Make StackIterator next public
2020-05-13 18:32:01 +03:00
DrDeano
2589f7207b
Make StackIterator next public
2020-05-13 16:21:15 +01:00
Vexu
3715226b9f
Merge pull request #5332 from jwmerrill/patch-1
...
Fix comment typo RFC8529 -> RFC8259
2020-05-13 18:04:27 +03:00
Vexu
afab095b61
translate-c remove error set from `checkForBuiltinTypedef`
2020-05-13 17:53:15 +03:00
Vexu
cefc04348e
continue parsing on invalid and token
2020-05-13 17:36:06 +03:00
Vexu
be392777b7
continue parsing after missing commas and invalid statements
2020-05-13 17:21:27 +03:00
Vexu
91358f3092
continue parsing on extra qualifier errors
2020-05-13 16:51:23 +03:00
Andrew Kelley
a3da584248
self-hosted: ir: implement separated analysis of Decl and Fn
2020-05-12 23:59:46 -04:00
Jason Merrill
706311cad9
Fix comment typo RFC8529 -> RFC8259
...
Ref: https://tools.ietf.org/html/rfc8259
2020-05-12 19:11:05 -07:00
Andrew Kelley
e3a0fac1a7
self-hosted: link: global offset table support for decls
2020-05-12 20:11:47 -04:00
Andrew Kelley
fda0eef9fb
clear progress indicator before printing errors
2020-05-12 16:43:50 -04:00
Vexu
df22c7dfef
std.zig attempt to continue parsing on error
2020-05-12 22:37:39 +03:00
Vexu
fa57463bb9
make parser testError take a list of expected errors
2020-05-12 21:44:08 +03:00
Vexu
80d0c2f166
Merge pull request #5118 from xackus/fix-json-writestream
...
fix json.WriteStream.emitJson
2020-05-12 17:44:06 +03:00
Greg Anders
c6420820b0
Remove redundant ASCII functions
...
The `matchCase` variants are simply duplicates of the `eql` and
`indexOf` functions found in std.mem.
2020-05-12 08:38:15 -06:00
Vexu
08e2e690d7
Merge pull request #5275 from strangebug/docs-markdown-links
...
Add support for external links and URL to markdown parser.
2020-05-12 15:35:50 +03:00
Vexu
29b3be4f2f
Merge pull request #5319 from Vexu/float-fix
...
Fix intToFloat on comptime_floats
2020-05-12 15:20:03 +03:00