Commit Graph

227 Commits

Author SHA1 Message Date
Andrew Kelley
e6ca61bdd1
generated docs: further clean up keyboard shortcut handling
now it's harder to introduce a bug when modifying keyboard shortcut
code.
2019-10-15 18:37:24 -04:00
dtw-waleee
725c873e81
fix small misstake, 'escape' v. 'Escape' 2019-10-15 18:19:13 -04:00
dtw-waleee
3e891c9c0b
Fix keyboard layout issue with help-modal
Some keyboard layouts produces a different ev.which value in firefox
for ? than 191, eg. the Swedish QWERTY one produces 171. Chrome/chromium
doesn't have this issue.
2019-10-15 18:19:13 -04:00
tgschultz
6a629d3a9f Replaced setTag hack in Deserialize with @unionInit 2019-10-15 18:14:13 -04:00
Vexu
7495fd8cb9 fix struct align fmt 2019-10-15 17:58:02 -04:00
LemonBoy
b164e0ae55 Fix stack iteration stop condition 2019-10-13 17:49:47 -04:00
LemonBoy
b1f3f59d66 Fix fp-based backtracing on RISC-V
The fp points to the top of the frame instead of pointing to the old fp,
compensate this difference with an offset.
2019-10-13 12:13:41 +02:00
LemonBoy
ba711f1115 Add ELF architecture constant for RISC-V 2019-10-13 12:12:33 +02:00
LemonBoy
ead9630c13 Fix signedness for some fields in ARM stat definition 2019-10-12 20:52:10 +02:00
LemonBoy
40fc7a1fda Add support for the statx syscall 2019-10-12 20:51:51 +02:00
Rocknest
b175468159 Consistent margins 2019-10-12 19:17:35 +03:00
Andrew Kelley
8b45921664
merge targets of generated docs 2019-10-11 18:14:06 -04:00
Andrew Kelley
30a555eed4
merge dumps tool: merging ast nodes
-fgenerate-docs is replaced ith -femit-docs
-fno-emit-bin is added to prevent outputting binary
2019-10-11 18:13:24 -04:00
Andrew Kelley
01b2c291d5
miscellaneous improvements to generated docs
* introduce std.json.WriteStream API for writing json
   data to a stream
 * add WIP tools/merge_anal_dumps.zig for merging multiple semantic
   analysis dumps into one. See #3028
 * add std.json.Array, improves generated docs
 * add test for `std.process.argsAlloc`, improves test coverage and
   generated docs
2019-10-10 23:25:40 -04:00
Andrew Kelley
0e0976828a
Merge pull request #3421 from LemonBoy/win32-mingw
Win32 mingw
2019-10-10 21:23:28 -04:00
Rocknest
b0cd64c019
Merge branch 'master' into docs-local 2019-10-11 04:09:01 +03:00
Rocknest
2bb2a2fcea Changes from master 2019-10-11 03:54:03 +03:00
Andrew Kelley
6082c14753
generated docs: add optional type support 2019-10-10 20:32:17 -04:00
Andrew Kelley
bc393eefa1
generated docs: better rendering of unknown decls 2019-10-10 19:21:56 -04:00
Rocknest
352663a34c
Merge branch 'master' into docs-local 2019-10-11 01:28:43 +03:00
Rocknest
429d5f2879 Changes from master 2019-10-11 00:48:54 +03:00
Rocknest
238ea85b7e Fix dark mode
Additionally introduces css variables
2019-10-11 00:39:08 +03:00
Andrew Kelley
d15a71afc9
generated docs: clean up type names and param names
closes #3410
2019-10-10 15:42:40 -04:00
Andrew Kelley
4e81df12c3
generated docs: css: wider tables 2019-10-10 13:40:17 -04:00
Andrew Kelley
78d06ec4af
Merge branch 'docs-union-enum' of https://github.com/Vexu/zig into Vexu-docs-union-enum 2019-10-10 13:36:37 -04:00
Rocknest
a34b697c0c Add transtition to search field 2019-10-10 18:55:14 +03:00
Rocknest
f597e0d092 Change layout and styles 2019-10-10 18:03:57 +03:00
Andrew Kelley
6330dfbea6
generated docs: better listing of functions 2019-10-10 11:03:16 -04:00
Timon Kruiper
e34e3344d4 Generated docs: Add function paramater names 2019-10-10 15:23:24 +02:00
Timon Kruiper
4250d27fe5 Generated docs: store static container info in a containerDecl astNode
And then get the struct field astNodes through the containerDecl astNode.
The type of a struct field is still stored in the types array, but the
static information is in the astNodes.
2019-10-10 14:21:35 +02:00
LemonBoy
4de3f9d853 Fix stack-probe symbol redefinition 2019-10-10 09:38:57 +02:00
Vexu
2b55484f3f
implement doc generation for union and enum 2019-10-10 10:27:12 +03:00
Andrew Kelley
12ed85d0d1
generated docs: better handle when root is std 2019-10-10 01:38:20 -04:00
Andrew Kelley
510b6443ba
generated docs: avoid clobbering browser shortcut keys 2019-10-09 18:28:50 -04:00
Andrew Kelley
000a1df4a3
generated docs: add array type support
See #3404
2019-10-09 18:22:46 -04:00
Andrew Kelley
6d54e8fc3c
generated docs: render values
also fix pressing enter in search box before search finishes

closes #3409
2019-10-09 18:09:35 -04:00
Andrew Kelley
13ae7d47b7
generated docs: refactor how type kinds work 2019-10-09 18:09:35 -04:00
LemonBoy
c9a3c945db Add a bunch of mingw lib32 .def files
Possibly incomplete, but enough to let the test suite compile & pass.
2019-10-09 22:44:36 +02:00
LemonBoy
9ae293ae3b Remove x86/Windows name mangling hack
Let's fix this properly by generating the correct lib files from the
mingw sources.
2019-10-09 22:44:36 +02:00
LemonBoy
f83bb3dd9e Fix compilation w/ clang
Clang pretends to be gcc 4.4 and that causes some re-definition errors.
The problem has been reported to the upstream some time ago but nothing
was done about it.
2019-10-09 22:44:35 +02:00
LemonBoy
a4b3e695af Shuffle around some stack-probing functions 2019-10-09 22:44:35 +02:00
Andrew Kelley
e0ab685467
generated docs: more verbose fields
also prevent docs making hyperlinks for integer types
2019-10-09 16:31:20 -04:00
Andrew Kelley
8d5e3a2f33
generated docs: separate section for namespaces
if a type is a struct with no fields, then it goes in the namespaces
section.
2019-10-09 15:52:55 -04:00
Andrew Kelley
c4e4fa2287
zig build: bump default max exec output size to 400 KB
closes #3415
2019-10-09 15:24:15 -04:00
Andrew Kelley
3ce83e879b
generated docs: show error sets pages
also favicon, improve error sets css, syntax awareness of
noreturn
2019-10-09 15:23:13 -04:00
Timon Kruiper
8a547d9e81 Docs: adds docs comments to struct fields 2019-10-09 13:27:06 -04:00
Andrew Kelley
406b70aa56
Merge pull request #3390 from nrdmn/unicode_character_literals
unicode character literals
2019-10-09 13:25:41 -04:00
Andrew Kelley
f929a58d5f
Merge pull request #3389 from LemonBoy/win32
Win32
2019-10-09 13:22:16 -04:00
Alva
0fc97015e2 Correct std.os.connect_async docs 2019-10-09 13:15:39 -04:00
Andrew Kelley
48f5b21e7c
generated docs: functions in a table with descriptions 2019-10-09 00:24:58 -04:00
Andrew Kelley
71fb4ef8da
generated docs: separate Error Sets from Types 2019-10-08 23:33:19 -04:00
Andrew Kelley
1586f244c4
generated docs: render var decls 2019-10-08 23:24:50 -04:00
Andrew Kelley
5e765356a7
generated docs: global vars in a table 2019-10-08 23:15:47 -04:00
Andrew Kelley
ca3250a57c
generated docs: add global variables
See #3409
2019-10-08 22:39:12 -04:00
Andrew Kelley
cdaaf7c725
generated docs: consistent coloring 2019-10-08 19:04:35 -04:00
Andrew Kelley
e0f0e2aace
generated docs: error sets in fn docs 2019-10-08 18:09:08 -04:00
Timon Kruiper
f74c29b49a Add initial support for struct fields in the docs 2019-10-08 17:29:03 -04:00
Andrew Kelley
784a493dc7
generated docs: functions with inferred error sets display nicely
infrastructure in place for displaying error sets
2019-10-08 13:41:13 -04:00
Andrew Kelley
03a6b33a73
generated docs: bool type and fix error for some fns 2019-10-08 11:59:55 -04:00
Andrew Kelley
6814d6b332
generated docs: function parameters have links 2019-10-08 11:52:06 -04:00
Andrew Kelley
a55db08a7b
generated docs contain generic instantiations and comptime calls 2019-10-08 00:15:16 -04:00
Andrew Kelley
ffc0c26b27
generated docs: highlight active package 2019-10-08 00:15:16 -04:00
Andrew Kelley
2e26aaa70c
generated docs: prioritized sort ranking 2019-10-08 00:15:14 -04:00
Andrew Kelley
7688100b17 stage1: enable PIC for libuserland
we don't really have a way to determine whether the stage1
zig compiler requires PIC so to be safe we always enable it
when building libuserland.

fixes build on some configurations of alpine linux.
2019-10-08 00:06:28 -04:00
Andrew Kelley
15471531d0
generated docs: sort search results 2019-10-07 18:17:06 -04:00
Andrew Kelley
478e53911d
generated docs: smart ignore case 2019-10-07 18:12:28 -04:00
Andrew Kelley
9df0d53981
generated docs: search cleanup 2019-10-07 18:00:01 -04:00
Andrew Kelley
4a97558ae8
generated docs: navigable search results 2019-10-07 17:46:22 -04:00
Andrew Kelley
d46234ef72
generated docs: keyboard shortcuts modal 2019-10-07 15:41:45 -04:00
Andrew Kelley
16de5a7228
generated docs: fix search stuff 2019-10-07 14:47:59 -04:00
Andrew Kelley
d70c30055e
generated docs: better navigation 2019-10-07 14:29:01 -04:00
Andrew Kelley
9237461b24
generated docs: logo and basic search proof of concept 2019-10-07 13:57:01 -04:00
Andrew Kelley
2ccb48ddc3
generated docs: show doc comments on functions 2019-10-07 12:21:11 -04:00
Andrew Kelley
85b8854c41
move doc/ to docs/
fixes regression caused by 86171afb9b
2019-10-07 11:31:47 -04:00
Nick Erdmann
ae7392e504
unicode character literals 2019-10-07 08:18:16 +02:00
LemonBoy
6a687bda76 Support for TLS on Win32 2019-10-06 16:45:51 +02:00
LemonBoy
93a49076f7 Initial support for i386-windows-msvc target 2019-10-06 14:27:36 +02:00
Andrew Kelley
571123465b
generated docs: canonical package paths 2019-10-05 18:01:01 -04:00
Andrew Kelley
0e40fc46d1
generated docs: show public stuff only 2019-10-05 16:38:42 -04:00
Andrew Kelley
19c2474b34
generated docs: render functions 2019-10-05 16:38:42 -04:00
Andrew Kelley
edadccde54
generated docs: add navigation bar 2019-10-05 15:33:23 -04:00
Andrew Kelley
5aa1e78807
generated docs: navigable types 2019-10-05 13:29:35 -04:00
Andrew Kelley
f78d49c916
generated docs: navigable packages 2019-10-05 13:07:59 -04:00
Andrew Kelley
dca6e74fec proof of concept of stage1 doc generation
This commit adds `-fgenerate-docs` CLI option, and it outputs:
 * doc/index.html
 * doc/data.js
 * doc/main.js

In this strategy, we have 1 static html page and 1 static javascript
file, which loads the semantic analysis dump directly and renders it
using dom manipulation.

Currently, all it does is list the declarations. But there is a lot more
data available to work with. The next step would be making the
declarations hyperlinks, and handling page navigation.

Another strategy would be to generate a static site with no javascript,
based on the semantic analysis dump that zig now provides. I invite the
Zig community to take on such a project. However this version which
heavily relies on javascript will also be a direction explored.

I also welcome contributors to improve the html, css, and javascript of
what this commit started, as well as whatever improvements are necessary
to the static analysis dumping code to provide more information.

See #21.
2019-10-04 20:18:06 -04:00
LemonBoy
7640bec8e0 Fix pipe syscall for MIPS 2019-10-03 17:07:53 -04:00
Andrew Kelley
7481a4ad08
zig build: fix exe file ext to match target.cpp 2019-10-03 16:02:24 -04:00
LemonBoy
17f2af10b5 Correct signal bits for MIPS
Also enable the segfault handler for all the supported architectures
beside MIPS.
2019-10-01 13:58:58 -04:00
SamTebbs33
bed4bfa69a Replace code occurences of --override-std-dir with --override-lib-dir 2019-10-01 07:29:24 -04:00
Nick Erdmann
ff9c3c6e5b std/os/uefi: fix Guid alignment in rng protocol 2019-09-29 12:28:14 -04:00
Andrew Kelley
543e729398
Merge pull request #3331 from meme/android-ndk
Support Android NDK
2019-09-28 13:30:19 -04:00
Andrew Kelley
ce0e794092
fix glibc builds on aarch64-linux-gnu
There was a missing include path in the compilation line, leading to
incorrect fstat ABI.

closes #3291
2019-09-27 18:19:21 -04:00
Andrew Kelley
dc299166cf
std.os.fstat: EINVAL => unreachable
Related: #3291
2019-09-27 17:17:24 -04:00
meme
f7bf61a983 support Android NDK and bionic 2019-09-27 16:51:42 -04:00
LemonBoy
a220648198 Backport patch for Musl libc
Allows musl to compile for mipsel targets.

https://www.openwall.com/lists/musl/2019/09/27/1/2
2019-09-27 18:20:00 +02:00
LemonBoy
5aaa7d0fbb Avoid truncating mmap2 offsets if not multiple of page size 2019-09-27 18:18:38 +02:00
Nick Erdmann
4527110e02
std/os/uefi: add some hii support 2019-09-27 07:56:14 +02:00
Nick Erdmann
a4f324e9ea
std/os/uefi: add exitBootServices and allocatePool 2019-09-27 07:56:02 +02:00
Andrew Kelley
23a82b5ffd
fix mipsel regression in previous commit
I think that should actually be a compile error, it's a usingnamespace
that depends on itself. This workaround is fine for now.
2019-09-26 21:38:04 -04:00
Andrew Kelley
ebe79329a2
fix some linux declarations not getting exposed 2019-09-26 18:49:37 -04:00
LemonBoy
a94372231c Errno changes for MIPS 2019-09-26 18:07:39 +02:00
LemonBoy
dfb4446d09 Add comments about the test cases that have been disabled 2019-09-26 17:42:58 +02:00
LemonBoy
c8e4108c5b Export _start as __start for MIPS targets 2019-09-26 17:13:57 +02:00
LemonBoy
a9be62f085 Fix wrong IOCTL value 2019-09-26 11:49:49 +02:00
LemonBoy
4ebcf64864 Initial support for mipsel architecture¬ 2019-09-26 09:31:55 +02:00
Andrew Kelley
dc7016344e
remove --override-std-dir. fix issues caused by moving std lib 2019-09-25 23:59:07 -04:00
Andrew Kelley
ed36dbbd9c
mv std/ lib/
that's all this commit does. further commits will fix cli flags and
such.

see #2221
2019-09-25 23:35:41 -04:00
Andrew Kelley
40e77dad83
musl [PATCH] arm: fix setjmp and longjmp asm for armv8-a
From: Szabolcs Nagy <szabolcs.nagy@arm.com>

armv8 removed the coprocessor instructions other than cp14, so
on an armv8 system the related hwcaps should never be set.

new llvm complains about the use of coprocessor instructions in
armv8-a mode (even though they are never executed at runtime),
so ifdef them out when musl is built for armv8.

<dalias> i think the patch looks ok
2019-09-25 15:15:52 -04:00
Andrew Kelley
c161ce3f7c
mingw-w64 libc: fix incorrect detection of _xgetbv
It was using __GNUC__ < 8 to check if _xgetbv intrinsic is available.
Since we always use zig cc with this header, we know we have clang 9,
which does have this intrinsic.
2019-09-22 19:10:27 -04:00
Andrew Kelley
92a427437c
Merge remote-tracking branch 'origin/master' into llvm9 2019-09-10 16:53:11 -04:00
Andrew Kelley
7101e583d6
update glibc src files to 2.30 2019-09-10 16:40:54 -04:00
Andrew Kelley
3cd035ba3b
update C header files to clang 9.0.0rc4 2019-09-10 13:30:43 -04:00
Andrew Kelley
185cb13278
Merge remote-tracking branch 'origin/master' into llvm9 2019-09-10 13:00:35 -04:00
Andrew Kelley
b21ad07767
update glibc ABI lists to 2.30 2019-09-07 15:04:09 -04:00
Andrew Kelley
45ab9d5fd6
update glibc headers to 2.30 2019-09-07 14:59:38 -04:00
Andrew Kelley
058050f22c
Merge remote-tracking branch 'origin/master' into llvm9 2019-09-02 20:56:31 -04:00
Andrew Kelley
fed5c12d9a
musl: fix alltypes.h and syscall.h not being correct
The previous
[instructions](https://github.com/ziglang/zig/wiki/Updating-libc) for
updating musl libc headers had this (repeated for each architecture):

make DESTDIR=build-all/arm install-headers ARCH=arm

However musl's build system does not properly rebuild alltypes.h and
syscall.h from source, instead using whatever is cached from the
previous build. In the case of the previous time that I updated to musl
1.1.23, this happened to be the aarch64 architecture.

As a workaround, one can remove the obj/ directory to force rebuilding
this file. Now the instructions say this (repeated for each architecture):

rm -rf obj/ && make DESTDIR=build-all/arm install-headers ARCH=arm

This commit updates the resulting headers after this workaround is
applied and the process headers tool is run again.
2019-08-30 15:02:23 -04:00
Andrew Kelley
8bb6bf6818
update libcxx to 9.0.0-rc2
upstream commit 67a4a12d61bfb10b2410b53c5a43ef9b4a03de7d
2019-08-20 19:36:26 -04:00
Andrew Kelley
c0bd2eb398
update C headers to clang 9.0.0-rc2
upstream commit 67a4a12d61bfb10b2410b53c5a43ef9b4a03de7d
2019-08-20 19:16:06 -04:00
Andrew Kelley
70e05c67ce
update libcxx to llvm9
upstream commit 1931d3cb20a00da732c5210b123656632982fde0
2019-07-19 16:55:59 -04:00
Andrew Kelley
dab0cf6428
update libunwind to llvm9
upstream commit 1931d3cb20a00da732c5210b123656632982fde0
2019-07-19 16:54:00 -04:00
Andrew Kelley
2117fbdae3
update C headers to llvm9
upstream commit 1931d3cb20a00da732c5210b123656632982fde0
2019-07-19 16:50:45 -04:00
Andrew Kelley
04ce5376a8
carry some upstream patches to musl to fix riscv inline asm
Upstream commits:
 * 8eb49e0485fc547eead9e47200bbee6d81f391c1
 * 2dcbeabd917e404a0dde0195388da401b849b9a4
 * f0eb2e77b2132a88e2f00d8e06ffa7638c40b4bc

These will be in the next version of musl, so no harm carrying them
here.
2019-07-18 11:43:39 -04:00
Andrew Kelley
d994379173
update bundled musl source to 1.1.23 2019-07-16 19:54:14 -04:00
Andrew Kelley
f70ce707e2
update musl headers to musl v1.1.23 2019-07-16 19:02:51 -04:00
Andrew Kelley
aff90c2252
avoid shipping junk files
I did a diff of the shipped file list with master branch and it looks
good after this commit.
2019-07-15 20:35:34 -04:00
Andrew Kelley
851a7288a9
mingw libc can link against ntdll 2019-07-15 18:25:13 -04:00
Andrew Kelley
49d1a4c562 move lib dirs to lib subdir
also start prefering NtDll API. so far:
 * NtQueryInformationFile
 * NtClose

adds a performance workaround for windows unicode conversion. but that
should probably be removed before merging
2019-07-15 17:54:50 -04:00