Stevie Hryciw
04f3067a79
run zig fmt on everything checked by CI
2022-11-18 19:22:42 +00:00
Veikka Tuominen
e01ec96288
Autodoc: not all block_inlines contain a break_inline
2022-11-11 18:01:14 +02:00
Loris Cro
d4487b6a2e
autodoc: update to new func zir body structure
...
this is a hack meant to restore functionality for the upcoming release,
a proper analysis of the new zir structure is required to make a robust
change.
2022-10-30 17:17:34 +01:00
Ali Chraghi
ca27055cda
all: rename @maximum to @max and @minimum to @min
2022-10-18 14:15:16 +03:00
Ryan Liptak
6ac0d2d9d6
Fix all std lib tests being run for any file within the std package
...
Before this commit:
```
$ zig test lib/std/fs/test.zig --main-pkg-path lib/std --zig-lib-dir lib
2170 passed; 37 skipped; 0 failed.
```
After this commit:
```
$ zig test lib/std/fs/test.zig --main-pkg-path lib/std --zig-lib-dir lib
All 45 tests passed.
```
This matches stage1 behavior:
```
$ zig test -fstage1 lib/std/fs/test.zig --main-pkg-path lib/std --zig-lib-dir lib
All 45 tests passed.
```
All tests are still run if `zig test` is run directly on `lib/std/std.zig`:
```
$ zig test lib/std/std.zig --main-pkg-path lib/std --zig-lib-dir lib
2170 passed; 37 skipped; 0 failed.
```
`zig build test-std` is unaffected by this change.
Closes #12926
2022-10-05 04:21:16 -04:00
Luuk de Gram
9cd521a24f
zig fmt
2022-09-26 19:54:35 +02:00
Der Teufel
55a9db4c9d
autodoc: Added .html to generated source view file names
2022-09-26 15:46:01 +02:00
Andrew Kelley
85e3204344
stage2: free up 2 ZIR tags
...
cmpxchg_weak and cmpxchg_strong are not very common; demote them to
extended operations to make some headroom.
This commit does not change any behavior, only memory layout of the
compiler.
2022-09-21 03:54:37 -04:00
Loris Cro
2698cb346a
autodoc: don't collect tests, usingnamespace and comptime blocks
...
Previously we were collecting as autodoc decls everything that was a ZIR
decl in a rather naive way. Now we only collect decltests as part of the
data relative to the decl they refer to, and ignore everything else.
2022-09-18 20:00:44 +02:00
Andrew Kelley
d3d24874c9
std: remove deprecated API for the upcoming release
...
See #3811
2022-09-16 14:46:53 -04:00
Andrew Kelley
bec70a1a39
stage2: remove pointless discards from source code
...
Good riddance!
2022-09-13 02:04:20 -07:00
Loris Cro
2a96f80d03
autodoc: reduce json payload size
...
this commit removes whitespace and changes Decl, AstNode and Type to be
json arrays instead of json objects. This change reduces json payload
size for the stdlib from 25mb to < 10mb.
2022-09-11 21:35:01 +02:00
Der Teufel
b8001335c4
autodoc: Opaque now handled like other container types
2022-09-04 22:47:58 +02:00
Loris Cro
dbd60e3d29
autodoc: add support for doc tests
2022-09-04 22:45:57 +02:00
Loris Cro
4a08c6dd51
autodoc: fix stage2 compile error
2022-09-02 18:13:17 +02:00
Loris Cro
e72a8ed5a1
autodoc: fix merge mistake
2022-09-02 17:59:37 +02:00
Loris Cro
907c60aaa7
Merge pull request #12705 from der-teufel-programming/autodoc-big-int
...
Autodoc big_int
2022-09-02 17:48:17 +02:00
Loris Cro
a77d7b740f
autodoc: simplify int_big json stringify procedure
2022-09-02 17:47:04 +02:00
Loris Cro
70b96169ae
Merge pull request #12709 from der-teufel-programming/autodoc-compare-operators
...
autodoc: Compare operators
2022-09-02 17:38:00 +02:00
Loris Cro
081d5a9690
autodoc: correct line number implementation
...
we also correctly take advantage of the starting byte offset of the
parent decl when calling `tree.tokenLocation()`!
2022-09-02 17:28:12 +02:00
Der Teufel
4c033eb35c
autodoc: int_big cleanup
2022-09-02 11:01:46 +02:00
Der Teufel
0d3c6b7aa8
autodoc: Added int_big support
2022-09-02 11:01:46 +02:00
Der Teufel
3bbf08e98a
autodoc: Compare operators
2022-09-01 15:17:14 +02:00
Veikka Tuominen
d3b4b2edf1
Sema: shift of comptime int with runtime value
...
Closes #12290
2022-08-30 12:22:07 -07:00
Loris Cro
e0103704c5
autodoc: better line counting for decls
2022-08-27 22:48:18 +02:00
Loris Cro
b32e5a14ce
autodoc: handle self-referential call+field_type instructions
2022-08-23 18:45:22 +02:00
Loris Cro
0482e8ba9d
autodoc: initial support for struct_init_anon
2022-08-23 18:37:29 +02:00
Der Teufel
a022157956
autodoc: compileError now uses index into exprs instead of a []const u8
2022-08-21 05:29:39 +02:00
Loris Cro
53e971226d
autodoc: minor pr cleanup
2022-08-18 18:02:19 +02:00
Der Teufel
f0bfdf9766
Fixed stage1 compilation error
2022-08-18 15:33:56 +02:00
Der Teufel
656b9429d0
autodoc: An attempt at generating HTML files from all imported source
...
files. Files generated from the standard library could be considered
for placing with main.js and index.html in lib/docs. Paths should
reflect packages in the future.
2022-08-18 14:03:42 +02:00
Loris Cro
7f7d58ee89
Merge branch 'master' into autodoc-links
2022-08-16 16:52:26 +02:00
Isaac Freund
0d32b73078
stage2: Implement explicit backing integers for packed structs
...
Now the backing integer of a packed struct type may be explicitly
specified with e.g. `packed struct(u32) { ... }`.
2022-08-10 19:54:45 +02:00
Veikka Tuominen
0778490283
AutoDoc: update to Zir call inst changes
2022-08-09 19:26:40 +03:00
Veikka Tuominen
d769fd0102
stage2: pass anon name strategy to reify
2022-08-08 18:28:39 -07:00
Maciej 'vesim' Kuliński
a0a1178694
autodoc: links to source code
2022-08-08 21:42:38 +02:00
Loris Cro
55ec2148fd
autodoc: fix analysis of function return types
2022-08-04 23:24:18 +02:00
Loris Cro
4c750016eb
autodoc: inferred error unions in function return values
2022-08-03 17:21:56 +02:00
Loris Cro
447a4cc115
autodoc: fix off-by-1 error in analysis of pointer types
2022-08-02 17:49:36 +02:00
Loris Cro
c5afefec42
autodoc: fix autodoc analysis for @typeInfo
...
We were previously erroneously saving it as a `@TypeOf`.
2022-08-02 17:49:36 +02:00
Loris Cro
e863292fe2
autodoc: no whitespace in json output for release builds
...
With this change, stdlib autodocs go from 24mb to 16mb (-8mb).
2022-07-28 15:08:58 +02:00
Andrew Kelley
a035d75a17
Autodoc: update to new ZIR
...
Fixes a merge conflict with 8e75ba653b03477229cf72211e8a8bfe7b071254
which removed ptr_type_simple and added overflow_arithmetic_ptr.
2022-07-22 21:24:19 -07:00
Loris Cro
92966088c2
autodoc: cleanup file-related operations
2022-07-21 16:31:45 +02:00
Loris Cro
d74a49456d
autodoc: use already open handles to output docs artifacts
2022-07-21 14:17:25 +02:00
Loris Cro
268edce862
Autodoc: fix int expr size for 32bit targets
2022-07-20 08:34:05 +02:00
Andrew Kelley
42b2fb4c5d
Autodoc: stage2 miscompilation workaround
...
There is no issue open for this yet; I will file one after pushing this
commit.
2022-07-19 19:55:12 -07:00
Andrew Kelley
8df1b91d17
Autodoc: clean up debug printing
...
use std.log.scoped
2022-07-19 19:10:12 -07:00
Andrew Kelley
84adbeb077
Autodoc: update to new array_type ZIR
2022-07-19 19:10:12 -07:00
Andrew Kelley
22d61faf17
Autodoc: update to new ZIR encoding
...
* error_to_int, int_to_error moved to extended
* struct field encodings are different
2022-07-19 19:10:12 -07:00
Loris Cro
8ec34eb046
autodoc: handle result location instructions
2022-07-19 19:10:12 -07:00