Commit Graph

5588 Commits

Author SHA1 Message Date
Andrew Kelley
72e983670e
simple async function call working 2019-07-21 16:21:16 -04:00
Andrew Kelley
54e716afdc
remove coroutines implementation and promise type 2019-07-19 18:18:44 -04:00
Andrew Kelley
f429f4dcab
Merge branch 'fengb-tokenize-ampamp'
closes #2723
closes #2660
2019-07-19 17:55:12 -04:00
Andrew Kelley
8ea8cff491
slightly simpler implementation 2019-07-19 17:54:06 -04:00
Benjamin Feng
111d3792e0
Docgen invalid for && 2019-07-19 17:11:58 -04:00
Benjamin Feng
484f8a4cc2
Switch old switch / @TagType() to use inferred enums 2019-07-19 17:11:58 -04:00
Benjamin Feng
4708fb23c0
Generate parse error from && 2019-07-19 17:11:58 -04:00
Benjamin Feng
d4ff27180b
Tokenize '&&' as AmpersandAmpersand 2019-07-19 17:11:58 -04:00
Andrew Kelley
af8661405b
fix usingnamespace
It used to be that usingnamespace was only allowed at top level. This
made it OK to put the state inside the AST node data structure. However,
now usingnamespace can occur inside any aggregate data structure, and
therefore the state must be in the TopLevelDeclaration rather than in
the AST node.

There were two other problems with the usingnamespace implementation:

 * It was passing the wrong destination ScopeDecl, so it could cause an
   incorrect error such as "import of file outside package path".
 * When doing `usingnamespace` on a file that already had
   `pub usingnamespace` in it would "steal" the usingnamespace, causing
   incorrect "use of undeclared identifier" errors in the target file.

closes #2632
closes #2580
2019-07-19 16:56:44 -04:00
Andrew Kelley
1d07bbbef2
zig build: add valgrind cli options 2019-07-18 20:03:38 -04:00
Michael Dusan
e5d032982e closes #2916 2019-07-18 16:42:56 -04:00
Andrew Kelley
3879bebc37
WIN32 -> _WIN32 2019-07-17 16:10:54 -04:00
Andrew Kelley
95e04e3874
back to msvc as the default C ABI on Windows
Zig provides a libc for the GNU C ABI on Windows, and cannot (at least
yet) provide one for the MSVC C ABI. However when not linking libc,
zig has no problem targeting MSVC as the C ABI. And this should be the
default.

Related: #2911
2019-07-17 12:40:48 -04:00
dimenus
d64bd30690 fixed slice length in getEnvVarOwned 2019-07-17 12:13:50 -04:00
Andrew Kelley
c0b4121ff2
libc headers before C language headers, and disable libunwind on arm32 2019-07-16 21:38:18 -04:00
Andrew Kelley
ec92739022
Merge branch 'update-musl'
closes #2601
2019-07-16 20:07:05 -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
b1f8b53d20
rename internal names regarding usingnamespace 2019-07-16 16:20:54 -04:00
Andrew Kelley
158e2312ea
Merge branch 'JohnathanFL-master'
closes #2900
closes #2894
2019-07-16 13:14:11 -04:00
Andrew Kelley
23dd7f4527
organize the docs and some rewording 2019-07-16 13:13:21 -04:00
JohnathanFL
475a181028
Add multidimensional array example 2019-07-16 13:02:30 -04:00
Andrew Kelley
15ed47921f
Merge branch 'msvc-libc-2064' of https://github.com/dimenus/zig into dimenus-msvc-libc-2064 2019-07-16 12:51:02 -04:00
daurnimator
3a67c13b5d cmake: allow user to select static vs dynamic LLVM 2019-07-16 12:33:13 -04:00
Andrew Kelley
9dcddc2249
retire the example/ folder, rename test-build-examples to "standalone"
closes #2759
2019-07-16 12:15:46 -04:00
Andrew Kelley
92e781baa1
fix documentation regarding mixing object files
closes #2905
2019-07-16 11:50:34 -04:00
Andrew Kelley
9a9a7daef0
Merge branch 'SamTebbs33-main-return' 2019-07-16 11:50:17 -04:00
Andrew Kelley
741c74e427
cleanups 2019-07-16 11:50:00 -04:00
Andrew Kelley
45cc488cef
Merge branch 'main-return-!u8' of https://github.com/SamTebbs33/zig into SamTebbs33-main-return 2019-07-16 11:27:11 -04:00
emekoi
0435026474 fixed size of ZigClangAPValue on mingw-w64 2019-07-16 09:34:02 -04:00
Andrew Kelley
68149f2039
fix gitattributes 2019-07-16 00:05:12 -04:00
Andrew Kelley
5345044edf
Merge branch 'hryx-translate-c-userland' 2019-07-16 00:01:31 -04:00
Andrew Kelley
776423bbf7
fix result location alignment in ir_render_call 2019-07-15 23:44:44 -04:00
Andrew Kelley
6fe3b20962
Merge branch 'translate-c-userland' of https://github.com/hryx/zig into hryx-translate-c-userland 2019-07-15 22:19:54 -04:00
Andrew Kelley
3f4abe97bd
Merge pull request #2892 from ziglang/install-with-zig-build
move some of the installation from cmake to zig build
2019-07-15 20:46:12 -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
Nick Erdmann
33eaaadd01 fix documentation of assert 2019-07-15 19:52:07 -04:00
Andrew Kelley
eaf545e24c fix build on windows 2019-07-15 19:50:56 -04:00
Andrew Kelley
c3d20373ee
std.unicode.utf8ToUtf16Le: improve performance
on a simple test input:

original utf8ToUtf16Le: elapsed: 111384483 ns (111 ms)
new utf8ToUtf16Le: elapsed: 138570 ns (0 ms)

it's 800x faster in debug mode and ~4500x faster in release-fast mode.

this was slowing down installation of files on windows in build scripts.
2019-07-15 19:35:10 -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
Andrew Kelley
51a3938b04 fix the build on macos
Stat structs gain methods to abstract over the platform differences with
regards to mtime, ctime, atime.
2019-07-15 12:28:39 -04:00
Andrew Kelley
0cd660462f
move install_files.h to not be generated code 2019-07-15 01:47:26 -04:00
Andrew Kelley
6237380b01
fix the build on linux 2019-07-15 01:45:26 -04:00
Andrew Kelley
b23ace27db
fix the build on windows 2019-07-15 01:45:26 -04:00
Andrew Kelley
aa170a7eff
implement std.fs.File.updateTimes for windows 2019-07-15 01:45:26 -04:00
Andrew Kelley
95fdff3feb
std.fs.updateFile: make path if necessary 2019-07-15 01:45:26 -04:00
Andrew Kelley
40a562f26d
cmake: fix incorrect dependencies 2019-07-15 01:45:26 -04:00
Andrew Kelley
6096dc5f94
move some of the installation from cmake to zig build
This moves the installation of shipped source files from large
CMakeLists.txt lists to zig build recursive directory installation.

On my computer a cmake `make install` takes 2.4 seconds even when it has
to do nothing, and prints a lot of unnecessary lines to stdout that say
"up-to-date: [some file it is installing]".

After this commit, the default output of `make` is down to 1
second, and it does not print any junk to stdout. Further, a `make
install` is no longer required and `make` is sufficient.

This closes #2874.

It also closes #2585. `make` now always invokes `zig build` for
installing files and libuserland.a, and zig's own caching system makes
that go fast.
2019-07-15 01:45:26 -04:00
Andrew Kelley
7d9ee5d6d5
Merge pull request #2882 from andersfr/hash-branch
Implementation of MurmurHash and CityHash
2019-07-13 20:08:18 -04:00