Andrew Kelley
8db4d2332e
correct startup logic for exporting libc main
2019-12-03 13:10:26 -05:00
Andrew Kelley
a91f552393
WinMainCRTStartup implies defaulting to console subsystem
2019-12-03 12:52:28 -05:00
Andrew Kelley
6a046c1bcd
activate start code when pub main exists
...
and rename LinkType->LinkMode, OutType->OutputMode
2019-12-03 12:50:42 -05:00
Vexu
ffd21c586d
fix tests
2019-12-03 12:50:42 -05:00
Vexu
621c08e692
exported main must be pub
2019-12-03 12:50:42 -05:00
Vexu
20bcdab462
correct caching and add test for missing fn name
2019-12-03 12:50:41 -05:00
Vexu
a0ca30ce01
move more startup code to std lib
2019-12-03 12:50:18 -05:00
LemonBoy
fd7c7be33c
Pick up WinMain with proper CC
2019-12-03 12:49:08 -05:00
Andrew Kelley
0d48b60794
Merge pull request #3837 from yvt/patch-as
...
Replace the remaining uses of the legacy cast syntax with `@as`
2019-12-03 10:26:07 -05:00
yvt
29f25cf059
Update process_headers.zig
to use @as
2019-12-03 20:05:07 +09:00
yvt
3c6c317424
Update the docs to use @as
2019-12-03 19:56:50 +09:00
LemonBoy
26c8930b95
Accept comptime-known expression for asm
2019-12-02 19:53:06 -05:00
Andrew Kelley
b7be57766b
Merge pull request #3715 from daurnimator/towards-afd
...
Misc windows additions+fixes
2019-12-02 16:12:55 -05:00
Andrew Kelley
55202a021a
add missing license files
2019-12-02 16:02:03 -05:00
Andrew Kelley
6a36c549a8
add extra LICENSE file for clarification
2019-12-02 15:11:11 -05:00
Andrew Kelley
ad214c7aa0
bring your own OS layer in the std lib
...
closes #3784
2019-12-02 15:02:17 -05:00
Andrew Kelley
dcbd5ad155
remove upstream support for Zen hobby OS
...
The new plan to support hobby operating systems is #3784 .
And what kind of name is "Zen" anyway? There's already a
[Zen programming language](http://zenlang.sourceforge.net/ )
and that's just confusing.
2019-12-02 12:01:49 -05:00
Andrew Kelley
fc1373a85d
ci: update sr.ht to use alpine/latest, more reliable
2019-12-02 10:48:12 -05:00
Andrew Kelley
b6127b0fe9
add some null-termination annotations
...
closes #3797
2019-12-02 01:13:46 -05:00
Andrew Kelley
6d8550a7df
fix crash assigning optional struct with anon literal
...
closes #3827
2019-12-02 01:09:06 -05:00
Andrew Kelley
fecd540826
Merge pull request #3787 from ziglang/remove-array-type-coercion
...
Remove array type coercion and fix result location bugs
2019-12-02 00:03:41 -05:00
Andrew Kelley
e7ee6647a1
fix invalid check for fn_inline property
2019-12-01 23:56:28 -05:00
Andrew Kelley
3644e85091
fix regressions on windows
2019-12-01 21:31:00 -05:00
Andrew Kelley
37caa56fbc
fix docs regressions
2019-12-01 21:27:55 -05:00
Andrew Kelley
c32e50f505
fix regressions in compile error tests
2019-12-01 20:53:24 -05:00
Andrew Kelley
4af5c38674
fixes for self-hosted compiler
2019-12-01 19:22:03 -05:00
Andrew Kelley
080316cd4f
fix assigning to an unwrapped optional field in an inline loop
2019-12-01 18:55:35 -05:00
Andrew Kelley
c2cee40aec
add advanced IR debugging support
...
and use it to improve copy_const_val with regards to parent backrefs
2019-12-01 17:09:11 -05:00
Andrew Kelley
8524404f71
this test isn't passing in master branch either
2019-12-01 16:39:30 -05:00
Andrew Kelley
78811ff4ac
Merge remote-tracking branch 'origin/kill-ConstGlobalRefs' into remove-array-type-coercion
2019-12-01 09:58:32 -05:00
Andrew Kelley
b36c07a95a
Merge remote-tracking branch 'origin/master' into remove-array-type-coercion
2019-12-01 09:56:01 -05:00
Andrew Kelley
4b6740e19d
sometimes free stuff from Zig IR pass 1
...
Total bytes used in stage1 std lib tests:
3.418 -> 3.198 GiB (saving 225 MiB)
There's still this from pass 1 not getting freed:
Const: 6909049 items, 72 bytes each, total 474.407 MiB
This is due to 2 things hanging on to references to IrAnalyze pointers:
* ZigVar->owner_exec->analysis
* LazyValue->ira
The LazyValue one could be solved by memoizing the results after the
lazy value is resolved, and then it could unref the IrAnalyze.
ZigVars that are determined to be comptime const, could have their
const_value set to that value, instead of using the mem_slot_index
mechanism. This would prevent an IrAnalyze ref in some cases.
2019-12-01 01:13:21 -05:00
Andrew Kelley
b5df18c8fd
inline ConstGlobalRefs into ZigValue
...
Having ConstGlobalRefs be a pointer in ZigValue was a hack that caused
plenty of bugs. It was used to work around difficulties in type coercing
array values into slices.
However, after #3787 is merged, array values no longer type coerce into
slices, and so this provided an opportunity to clean up the code.
This has the nice effect of reducing stage1 peak RAM usage during the
std lib tests from 3.443 GiB to 3.405 GiB (saving 39 MiB).
There is one behavior test failing in this branch, which I plan to debug
after merging #3787 .
2019-12-01 00:29:16 -05:00
Andrew Kelley
5026b1aad5
free IrAnalyze sometimes
...
Total bytes used in stage1 std lib tests:
3.443 GiB -> 3.418 GiB
2019-11-30 23:57:48 -05:00
Andrew Kelley
951dc451d6
Merge pull request #3808 from LemonBoy/i386-for-ya
...
linux-i386 support
2019-11-30 22:00:00 -05:00
Andrew Kelley
11b8d3ce9d
Merge branch 'std.fs.File'
2019-11-30 18:37:00 -05:00
Andrew Kelley
2e7350140d
further clarify std.fs function docs
2019-11-30 18:36:47 -05:00
Andrew Kelley
034ccb4e4e
add missing error code handling on Windows
2019-11-30 16:58:32 -05:00
LemonBoy
cdeafe777a
Eat shit and die mips
2019-11-30 21:36:16 +01:00
Andrew Kelley
413f9a5cfc
move std.fs.Dir.cwd
to std.fs.cwd
...
update to non-deprecated std.fs APIs throughout the codebase
Related: #3811
2019-11-30 15:35:27 -05:00
LemonBoy
6f105b5ae7
Implement target_dynamic_linker for mips
2019-11-30 21:14:32 +01:00
Andrew Kelley
d039fed831
introduce std.fs.Dir.openFile and std.fs.Dir.createFile
...
These functions have flags parameters which cover all the use cases. The
other functions are now deprecated.
2019-11-30 13:32:11 -05:00
LemonBoy
d0c6728d59
Eat shit and die glibc
2019-11-30 18:55:22 +01:00
LemonBoy
e1e06e6766
linux-i386 support
2019-11-30 16:13:33 +01:00
Andrew Kelley
85e1e3b95f
Merge pull request #3284 from Sahnvour/export_variables
...
Improved support for exporting variables
2019-11-30 00:25:52 -05:00
Andrew Kelley
b220be7a33
more test regression fixes
2019-11-29 23:04:19 -05:00
Andrew Kelley
f980c29306
fix typo in error note for integer casting
2019-11-29 22:33:55 -05:00
Andrew Kelley
d87b13f2f7
fix windows std lib regressions
2019-11-29 21:55:27 -05:00
Andrew Kelley
6936243ee1
fix self-hosted compiler regressions
2019-11-29 21:49:08 -05:00
Andrew Kelley
7278c51ddd
fix empty result location for parameters not working
2019-11-29 21:36:12 -05:00