Commit Graph

6363 Commits (87f632b08a04f4a03facfa220df1cbc466a5de39)

Author SHA1 Message Date
Sahnvour ae0628b30c ci: use parallel msbuild.exe processes for faster building on windows 2019-10-13 11:02:21 -04:00
LemonBoy 22e60df680 Propagate user-defined function alignment to LLVM IR 2019-10-13 14:19:36 +02: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
LemonBoy 60cf3f8a8c Revert LLD patch
The source is now squeaky-clean again.
2019-10-12 10:57:11 +02:00
LemonBoy 2b624fea84 Add dlltool functionality
Don't need no patched lld --kill-at behaviour now.
2019-10-12 10:56:16 +02: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
LemonBoy 8aa20227ed Fix cross-compilation to i386-windows-msvc
Use Mingw's .def files to build a .lib when possible and show an error
otherwise.
2019-10-11 15:52:55 -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 7b20205e68
codegen.cpp: remove unused variable 2019-10-10 21:24:44 -04:00
Andrew Kelley 0e0976828a
Merge pull request #3421 from LemonBoy/win32-mingw
Win32 mingw
2019-10-10 21:23:28 -04:00
Andrew Kelley 6082c14753
generated docs: add optional type support 2019-10-10 20:32:17 -04:00
Andrew Kelley fa47172841
better debug info for integers
now we use ABI size * 8 instead of size_in_bits which makes
gdb work instead of hang
2019-10-10 19:22:15 -04:00
Andrew Kelley bc393eefa1
generated docs: better rendering of unknown decls 2019-10-10 19:21:56 -04:00
Andrew Kelley d15a71afc9
generated docs: clean up type names and param names
closes #3410
2019-10-10 15:42:40 -04:00
LemonBoy 6cbb732b59 Extern unions should not trigger active field check
Fixes #3378
2019-10-10 13:57:48 -04:00
Andrew Kelley 4e81df12c3
generated docs: css: wider tables 2019-10-10 13:40:17 -04:00
Andrew Kelley 57fb550324
Merge branch 'Vexu-docs-union-enum' 2019-10-10 13:36:56 -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
Andrew Kelley 6330dfbea6
generated docs: better listing of functions 2019-10-10 11:03:16 -04:00
Andrew Kelley b9d63551de
Merge pull request #3420 from FireFox317/generated-docs-improvements
Generated docs: add parameter names to functions
2019-10-10 10:34:44 -04:00
Michael Dusan 3464351d1e stage1: fix ir_resolve_str() to return slice
`ir_resolve_str()` bug returns array expression even when when sliced
to a lesser length. Fix is to return array if slice.len == array.len,
otherwise return slice.

Bug report use-case is based on one builtin function. However, at least
the following builtins were exposed to the bug:

    `@byteOffsetOf`
    `@cDefine`
    `@cImport`
    `@cInclude`
    `@cUndef`
    `@compileError`
    `@embedFile`
    `@export`
    `@fieldParentPtr`
    `@hasDecl`
    `@hasField`
    `@import`
    `@unionInit`

closes #3384
2019-10-10 10:20:04 -04:00
Michael Dusan fd94d78ffc cleanup: unused imports in test 2019-10-10 10:16:35 -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
LemonBoy dfcbca8d2f Add i386/mingw to the test rooster 2019-10-10 09:38:57 +02:00
LemonBoy 86e5bbffd7 Patch lld to have a more sensible kill-at implementation
Lift some code from llvm-dlltool, the lld code is meant to follow what
gnu ld does but that's not much useful for our purposes.

Also use the `--kill-at` option when generating the .lib files out of
mingw's .def files: this way our building process closely matches the
one use by the upstream and now finally generates files that allow both
C code and Zig code to link.
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
Michael Dusan 42f2814d9a stage1: fix root top-level-struct typename
- during diagnostics the string representation for root was empty
  and now is `(root)`
- retrofitted all other namespace-qualified type naming to elide
  prefixing with root

closes #2032
2019-10-09 17:36:13 -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 b96fa89462 Compile the architecture-specific mingw sources 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
Andrew Kelley a5714ddb97
add comments about why we choose pentium4 for i386 target
See #3389
2019-10-09 15:06:37 -04:00
Andrew Kelley 2286003666
improve names of error sets when using merge error sets operator 2019-10-09 13:35:19 -04:00
Timon Kruiper 8a547d9e81 Docs: adds docs comments to struct fields 2019-10-09 13:27:06 -04:00