Commit Graph

4536 Commits (127bb124a06dc93f4def23224d400f4050754674)

Author SHA1 Message Date
Andrew Kelley 127bb124a0
Merge pull request #2091 from ziglang/bigint-print-fix
Fix bigint_append_buf
2019-03-22 10:23:18 -04:00
Andrew Kelley 3560f61c16
Merge pull request #2087 from ziglang/float-parsing
fix some hex literal parsing bugs
2019-03-22 10:16:46 -04:00
Marc Tiehuis a3f42a5fe1 Fix compile-error test case for large integer type 2019-03-23 00:20:03 +13:00
Marc Tiehuis 6f90d2c209 Fix bigint_append_buf
All current usages use base 10 and have a limb length of 1, hence why
we weren't hitting this error in practice.
2019-03-22 22:10:51 +13:00
Jimmi Holst Christensen 23af502d04 Updated langref to newest grammar 2019-03-22 09:01:30 +01:00
Marc Tiehuis e3b70fe4ba Simplify hex-float parsing code 2019-03-22 17:11:57 +13:00
Andrew Kelley d04a1456df
hex float parsing: solve another case
this works now: 0x1.edcb34a235253948765432134674fp-1
2019-03-21 16:35:18 -04:00
Andrew Kelley af509c68b0
fix parsing of large hex float literals
closes #2083
2019-03-21 16:17:29 -04:00
Andrew Kelley b5cc92f163
ci: more quoting 2019-03-21 10:05:14 -04:00
Andrew Kelley 246304125a
add documentation for zig test
closes #1518
2019-03-20 23:50:22 -04:00
Andrew Kelley bf4701562c
ci: add FreeBSD to download page 2019-03-20 23:19:18 -04:00
Andrew Kelley b7fb63d696
ci: apt-get update before install as a workaround 2019-03-20 19:05:47 -04:00
Andrew Kelley 15c316b0d8
add docs for assembly and fix global assembly parsing
Previously, global assembly was parsed expecting it to have
the template syntax. However global assembly has no inputs,
outputs, or clobbers, and thus does not have template syntax.
This is now fixed.

This commit also adds a compile error for using volatile
on global assembly, since it is meaningless.

closes #1515
2019-03-20 19:00:23 -04:00
Andrew Kelley 3c7555cb67
Merge remote-tracking branch 'origin/llvm8' 2019-03-20 13:34:07 -04:00
Andrew Kelley 2fdf69bc40
Merge pull request #2079 from Sahnvour/issue-2050
Fixes c_ABI tests on windows
2019-03-20 00:11:11 -04:00
Sahnvour d669db7673 c_abi: activate tests on windows 2019-03-19 22:41:27 +01:00
Sahnvour 27d5e1f36c c_abi: add some tests for int and float parameter passing potentially using both registers and stack 2019-03-19 22:09:12 +01:00
Andrew Kelley ac34841270
build.zig: allow run() on non-native target artifacts 2019-03-19 17:08:50 -04:00
Sahnvour c17b1635ca c_abi: when compiling for x86_64, differenciate between system V and windows ABI 2019-03-19 22:08:19 +01:00
Andrew Kelley 9801a1df6a
disable all C warnings when building musl 2019-03-19 15:04:39 -04:00
Andrew Kelley 3c36929603
zig targets prints the available libcs 2019-03-19 15:04:29 -04:00
Andrew Kelley af9ac0d548
better buffer length for formatIntUnsigned
see #1358
2019-03-19 10:11:28 -04:00
Jimmi Holst Christensen e508b85746 Updated parser to newest grammar 2019-03-19 10:36:37 +01:00
Andrew Kelley 1b25dcde96
freebsd ci: disable not working stuff 2019-03-19 00:53:36 -04:00
Andrew Kelley fd2993578d
ci: freebsd tests docs 2019-03-19 00:05:59 -04:00
Andrew Kelley b44ff4ca8e
freebsd ci: install wget and set -x -e 2019-03-18 23:44:29 -04:00
Andrew Kelley 0c6e687436
start producing freebsd binaries 2019-03-18 23:37:48 -04:00
Andrew Kelley 567175f833
add documentation for Memory
closes #1904
2019-03-18 21:40:24 -04:00
Andrew Kelley fca83876d8
workaround for Ubuntu/Debian bug
see #2076
2019-03-18 20:56:46 -04:00
Andrew Kelley 85256521ba
fix translate-c regression 2019-03-18 20:09:27 -04:00
Andrew Kelley a581f4f0e2
Merge remote-tracking branch 'origin/master' into llvm8 2019-03-18 20:03:23 -04:00
Andrew Kelley db0e188f0e update macos static build for llvm8 2019-03-18 18:36:35 -04:00
Andrew Kelley 1b801bdbae
pass explicit frame pointer args when compiling C code 2019-03-18 16:59:48 -04:00
Andrew Kelley a17bf219c6
Merge pull request #2069 from ziglang/glibc-assert-translation
Implemented enough of translate-c to translate assert
2019-03-18 14:43:17 -04:00
Andrew Kelley 7dfbeca13e
libc: separate linux headers from musl/glibc 2019-03-18 13:47:59 -04:00
Jimmi Holst Christensen 9171e7a7c1 More work on ignoring values correctly 2019-03-18 14:55:57 +01:00
Andrew Kelley 6acabd6b57 when linking msvcrt, also link ntdll.lib
See #2073
2019-03-17 14:14:05 -04:00
Andrew Kelley c8453454e1
add missing std lib file rb.zig to cmakelists.txt 2019-03-17 13:52:45 -04:00
Sahnvour ae9b90cf6e print a message instead of returning an error when debug info comes from a source file not found (for example compiled on another computer) 2019-03-16 15:34:14 +01:00
Sahnvour 704dfaaabf avoid reading LineBlockFragmentHeader at all if the address is not in range, thus simplifying code and improving speed of execution 2019-03-16 15:34:14 +01:00
Sahnvour 094d40fb1a allow pdb modules to have no C13 data, this happens if the module is stripped 2019-03-16 15:34:14 +01:00
Sahnvour 0d4a5c40bc correct padding handling between std.pdb.ModInfo entries in DbiStream 2019-03-16 15:34:14 +01:00
Andrew Kelley 6abe6dbfe4 enable issue_339 test on macos
closes #1126
2019-03-16 01:18:46 -04:00
Andrew Kelley 6d6195424d
add regression test for invalid multiple dereferences
closes #1042
2019-03-16 00:23:18 -04:00
Andrew Kelley c40448eb9a
add compile error for wrong type with `use`
closes #1557
2019-03-16 00:18:10 -04:00
Andrew Kelley 4a5cd0b895
fix while continue block not checking for ignored expression
closes #957
2019-03-15 23:52:11 -04:00
Andrew Kelley 01fb421031 fix regressions on Windows from previous commit 2019-03-15 18:57:07 -04:00
Andrew Kelley 9c13e9b7ed
breaking changes to std.mem.Allocator interface API
Before, allocator implementations had to provide `allocFn`,
`reallocFn`, and `freeFn`.

Now, they must provide only `reallocFn` and `shrinkFn`.
Reallocating from a zero length slice is allocation, and
shrinking to a zero length slice is freeing.

When the new memory size is less than or equal to the
previous allocation size, `reallocFn` now has the option
to return `error.OutOfMemory` to indicate that the allocator
would not be able to take advantage of the new size.

For more details see #1306. This commit closes #1306.

This commit paves the way to solving #2009.

This commit also introduces a memory leak to all coroutines.
There is an issue where a coroutine calls the function and it
frees its own stack frame, but then the return value of `shrinkFn`
is a slice, which is implemented as an sret struct. Writing to
the return pointer causes invalid memory write. We could work
around it by having a global helper function which has a void
return type and calling that instead. But instead this hack will
suffice until I rework coroutines to be non-allocating. Basically
coroutines are not supported right now until they are reworked as
in #1194.
2019-03-15 17:57:21 -04:00
Jimmi HC 5ae400fb39 fixed void cast and added the last tests 2019-03-15 19:11:46 +01:00
Andrew Kelley 4090fe81f6
Merge pull request #2068 from ziglang/workaround-for-2043
workaround for #2043
2019-03-15 11:19:21 -04:00