Martin Wickham
0b8ddb4478
Improve debug names of decls
2021-10-02 15:21:48 -05:00
Martin Wickham
993dc2ae77
Fix ownership of array type and elements
2021-10-02 15:21:48 -05:00
Martin Wickham
7ef5938450
Fix decl removal from namespace when destroyed
2021-10-02 15:21:48 -05:00
Martin Wickham
b1e5081826
Fix rendering of type names
2021-10-02 15:21:48 -05:00
Martin Wickham
269e548770
Fix namespace references for deeply nested structs
2021-10-02 15:21:48 -05:00
Nathan Michaels
4916e26be4
Document some functions in std.math.
2021-10-02 16:06:03 -04:00
Andrew Kelley
468ed7ada5
Merge pull request #9875 from g-w1/timestimes
...
stage2: emit Value.repeated for `**` with array len 1
2021-10-02 16:05:12 -04:00
Martin Wickham
05d36fce9c
Add zlib to needed libraries
2021-10-02 14:58:16 -05:00
Andrew Kelley
49f687f7c6
build.zig: omit LLVMTableGen from the llvm lib list
2021-10-02 12:41:08 -07:00
Andrew Kelley
b9ec7c5675
build.zig: update list of LLVM libs
...
companion commit to 0f35a1f37ade9cf25707c41711b352174f1e2789
fixes compiling with a dev kit.
2021-10-02 12:40:40 -07:00
Andrew Kelley
dde0adcb36
Merge branch 'llvm13'
2021-10-02 10:45:56 -07:00
Matthew Borkowski
bb3ef76434
astgen.zig formatting
2021-10-02 11:44:51 -04:00
Matthew Borkowski
ada72c7aa9
astgen.zig: assert that advanceSourceCursor never has to rewind cursor
2021-10-02 08:21:04 -04:00
Matthew Borkowski
c64b885c82
astgen.zig: have defer scopes cache source cursor to reduce redundant scanning during genDefers
2021-10-02 08:20:43 -04:00
Matthew Borkowski
a3842cbafd
astgen.zig: make switchExpr generate cases in source order to keep source cursor increasing monotonically
2021-10-02 08:06:26 -04:00
Matthew Borkowski
a1c802cbba
astgen.zig: pass lbrace line and column to addFunc to keep source cursor increasing monotonically
2021-10-02 07:56:56 -04:00
Matthew Borkowski
9f441c7f8f
print_zir.zig: always print 1-based line and column numbers
2021-10-02 07:55:57 -04:00
Ryan Liptak
36f1f4f9fe
deflate: Update fuzzed test cases and add InvalidTree test cases
2021-10-02 03:38:03 -07:00
Andrew Kelley
7a2624c3e4
std: disable ArrayBitSet test on aarch64
...
See #9879 . This regressed with the release of LLVM 13.0.0.
2021-10-01 22:32:13 -07:00
Andrew Kelley
c7b32eb99a
ci: windows: update tar command line parameter order
...
you have got to be kidding me
2021-10-01 22:27:16 -07:00
Ryan Liptak
933fd5110d
deflate: Better Huffman.construct errors and error handling
...
This brings construct error handling in line with puff.c
2021-10-01 22:07:11 -07:00
Andrew Kelley
86bb09a0ff
ci: update macos tarballs
...
These bring in a bug fix to libcxx.zig that is currently causing the CI
to fail.
2021-10-01 18:32:19 -07:00
Andrew Kelley
210ef5af8e
ci: windows: adjust tar workaround
...
tar does not properly implement the -k feature, so don't use it.
It incorrectly reports "file exists" when the expected behavior is to
leave the existing file alone.
2021-10-01 18:07:50 -07:00
Andrew Kelley
f317acb2cd
libcxx: pass -faligned-allocation flag when needed
...
libc++ now requires this flag
2021-10-01 18:06:17 -07:00
Andrew Kelley
acb0a87158
ci: windows: workaround for tar symlink behavior
2021-10-01 17:18:32 -07:00
Andrew Kelley
43e3734d3b
ci: macos arm64 script uses release build of zig
...
even for the host. This prevents a dependency on "dump" functions of
LLVM, which are not included in the tarballs used for the CI.
2021-10-01 16:53:42 -07:00
Andrew Kelley
9bf10b1018
ci: update windows tarballs to llvm 13
2021-10-01 16:53:33 -07:00
Andrew Kelley
7350cb2fc7
ci: update tarballs for LLVM 13
...
NetBSD CI is disabled because it is not yet supported in
zig-bootstrap. Once NetBSD has proper zig-bootstrap support, it can be
re-enabled.
Windows is not solved here yet; will be pushing a separate commit for
that.
2021-10-01 16:07:42 -07:00
pfg
d82b3e2fb1
fix fmt
2021-10-01 16:53:58 -04:00
Jacob G-W
83dcd9f038
stage2: emit Value.repeated for ** where the array size is one
...
This takes advantage of the repeated value.
2021-10-01 16:46:28 -04:00
pfg
ebdd9e8719
fix style in th
2021-10-01 16:23:58 -04:00
pfg
d5c5824c80
fix line numbers on multiline strings, add line numbers to peg grammar
2021-10-01 16:06:30 -04:00
pfg
de92925897
Add line numbers to langref ( fixes #9870 )
2021-10-01 15:43:23 -04:00
Andrew Kelley
456d7e5f5f
libcxx: update to compile with -std=c++20
...
This is required to successfully build libc++.
2021-10-01 11:40:06 -07:00
Andrew Kelley
1bbec59e07
clang API bindings: fix enum detection functions
...
These functions are intended to emit compile errors when Clang adds new
items to its enums. However, two of them were casting to the Zig enum
and switching on that, which wouldn't detect anything useful.
2021-10-01 11:39:12 -07:00
Andrew Kelley
0f35a1f37a
fix the list of llvm libraries
...
not sure what "HelloNew" was doing in there
2021-09-30 23:33:03 -07:00
Andrew Kelley
3eb729b442
Merge remote-tracking branch 'origin/master' into llvm13
2021-09-30 21:38:04 -07:00
Nathan Michaels
c4cd592f0e
Fix a typo in @ceil documentation.
2021-09-30 23:32:09 -04:00
Jacob G-W
b0e89ee499
stage2 llvm backend: implement codegen for Value.repeated
2021-09-30 21:29:52 -04:00
g-w1
5e7406bdd9
stage2: implement array_init instruction ( #9843 )
...
* stage2: array mul support more types of operands
* stage2: array cat support more types of operands
* print_zir: print array_init
* stage2: implement Sema for array_init
2021-09-30 18:31:27 -04:00
Martin Wickham
c82c3585c8
Add error message to test runner for bad arguments
2021-09-30 18:00:13 -04:00
Martin Wickham
f87156e33c
Add a panic handler to give better errors for crashes in sema
2021-09-30 17:39:01 -04:00
Matthew Borkowski
2ed9288246
parse.zig: better c pointer prefix parsing, don't index out of bounds on eof
2021-09-30 15:36:57 +02:00
Andrew Kelley
ba7f40c430
stage2: fix ELF linking to include compiler_rt
...
There was duplicated logic for whether to include compiler_rt in the
linker line both in the frontend and in the linker backends. Now the
logic is only in the frontend; the linker puts it on the linker line if
the frontend provides it.
Fixes the CI failures.
2021-09-29 15:37:34 -07:00
Andrew Kelley
bdbedff910
stage2: LLVM backend: properly set module target data
...
Also fix tripping LLVM assert having to do with 0 bit integers.
stage2 behavior tests now run clean in a debug build of llvm 12.
2021-09-29 15:33:45 -07:00
Andrew Kelley
ea6706b6f4
stage2: LLVM backend: implement struct type fwd decls
...
Makes struct types able to refer to themselves.
2021-09-29 14:04:52 -07:00
Andrew Kelley
1d1f6a0421
move some behavior tests to the "passing for stage2" section
2021-09-29 11:33:22 -07:00
Andrew Kelley
b02932f96e
Sema: generic function instantiations gain addrspace of owner Decl
2021-09-29 11:09:37 -07:00
Andrew Kelley
4e85bf1185
stage2: put use_llvm and use_stage1 into the Module cache hash
...
This prevents a compiler_rt built with stage2 (which is intentionally
different than when built with stage1) from being used for stage1 and
vice versa.
Fixes the regression from the previous commit.
2021-09-29 10:46:32 -07:00
Andrew Kelley
99961f22dc
stage2: enable building compiler_rt when using LLVM backend
...
* AstGen: fix emitting `store_to_inferred_ptr` when it should be emitting
`store` for a variable that has an explicit alignment.
* Compilation: fix a couple memory leaks
* Sema: implement support for locals that have specified alignment.
* Sema: implement `@intCast` when it needs to emit an AIR instruction.
* Sema: implement `@alignOf`
* Implement debug printing for extended alloc ZIR instructions.
2021-09-29 00:13:21 -07:00