Andrew Kelley
a8b36fbe34
Merge remote-tracking branch 'origin/master' into llvm10
2020-02-14 10:27:44 -05:00
Andrew Kelley
40b9db7cad
Merge pull request #4451 from daurnimator/use-testing.allocator
...
Migrate (more) tests from FixedBufferAllocator to testing.allocator
2020-02-14 09:40:08 -05:00
Vexu
9206f8a8cd
translate-c improve macro cast translation
2020-02-14 09:36:44 -05:00
xackus
7396b144ba
modernize std.meta
2020-02-14 09:35:38 -05:00
daurnimator
6ea6d5a4bd
std: use testing.allocator in tests
2020-02-14 19:15:09 +11:00
daurnimator
ca41567924
std: use testing.allocator in big int tests
2020-02-14 18:59:40 +11:00
daurnimator
f20ba7c32c
std: increase memory available to testing allocator
2020-02-14 18:59:25 +11:00
daurnimator
b61e53cc40
std: bigint.deinit() shouldn't need a mutable pointer
2020-02-14 18:59:07 +11:00
Andrew Kelley
fb6b94f80f
cmake: remove case mismatch detection on build mode
...
See discussion here for context:
c6df5deb34 (comments)
Michael - I appreciate what you did here, making the configure script
work better for people in practice. When it was checking the build type
against a whitelist, I think it was worth it. However, now that we are
supporting systems which use non-standard cmake build modes, I don't
think this case-mismatch detection thing is worth it. It's starting to
get to the point where it's a lot of complication for very little
benefit. Besides, cmake is not case sensitive. If we support
non-standard build modes, then we would need to support a hypothetical
build mode of `release` (lower case).
So let's just remove this and rely on people to use the build system
correctly (like they will have to do when building any cmake project
from source).
2020-02-13 20:47:44 -05:00
Felix (xq) Queißner
cf67d30cdc
Makes ArenaAllocator.deinit() not require a mutable reference.
2020-02-13 16:19:34 -05:00
LemonBoy
a090a5e3bc
ir: Don't crash when converting undefined ptrs
2020-02-13 16:18:24 -05:00
Andrew Kelley
e8dfc5e7f6
Merge pull request #4442 from fengb/testing-allocator-calls
...
Migrate tests from FixedBufferAllocator to testing.allocator
2020-02-13 16:17:21 -05:00
Andrew Kelley
de23c57133
Merge branch 'LemonBoy-revive-3904'
...
closes #3904
closes #4448
2020-02-13 16:14:10 -05:00
Andrew Kelley
cdba521a06
annotate skipped test with issue link
2020-02-13 16:13:53 -05:00
data-man
948a463cf1
fmt: vector formatting
2020-02-13 16:12:54 -05:00
Andrew Kelley
1675d4f82b
Merge pull request #4443 from LemonBoy/werkzeug
...
A train of small patches
2020-02-13 13:12:18 -05:00
Vexu
fa377dbd15
fix c tokenizer bug
2020-02-13 12:21:28 -05:00
LemonBoy
f93c219f30
Minor changes for a test case
2020-02-13 12:13:56 +01:00
LemonBoy
c5260f7f86
ir: Allow implicit conversion between vector types
...
Only valid when the number of elements match and the types are
compatible.
Fixes #4334
2020-02-13 12:13:56 +01:00
data-man
4578d13b49
Vector comparison in meta and testing
2020-02-13 12:13:55 +01:00
Michael Dusan
1fb70497d2
Merge pull request #4441 from mikdusan/stage1-cmake
...
stage1: limit cmake checks on build type
2020-02-12 21:04:34 -05:00
Michael Dusan
08666a057a
Merge pull request #4439 from vegecode/custom-format-comment-issue
...
Correct comment to include comptime attribute on format output fn par…
2020-02-12 18:35:39 -05:00
Benjamin Feng
a81ae1223d
Convert a lot of json tests to use testing.allocator
2020-02-12 17:17:56 -06:00
Benjamin Feng
699c50a375
Switch a bunch of FBA to use testing.allocator
2020-02-12 17:17:56 -06:00
Michael Dusan
471662f7c9
stage1: limit cmake checks on build type
...
Various maintainers pass custom build types and we don't need to check
those. We are interested only in checking and diagnosing common errors
for Zig project supported types.
Check is now limited to look for case-mismatch only on the well-known
values { Debug, Release, RelWithDebInfo, MinSizeRel }.
2020-02-12 17:23:48 -05:00
LemonBoy
55304128c0
Fix rendering of empty arrays
2020-02-12 23:10:53 +01:00
LemonBoy
327d40e7a3
Fix a UAF when verbose-llvm-ir is specified
...
The g->module is long gone when codegen_link is called.
2020-02-12 23:10:08 +01:00
vegecode
d06bfc2e2a
Correct comment to include comptime attribute on format output fn parameter
...
Without comptime, printing custom type through the stream interface fails
2020-02-12 13:16:32 -06:00
Andrew Kelley
ab4ea5d3cf
Merge pull request #4433 from LemonBoy/ohno
...
Trivial patchset
2020-02-11 13:12:42 -05:00
LemonBoy
6c05f0949a
ir: Fix erroneous error message for ptr casts
...
Don't blindly throw an error if two integer types are checked for
compatibility.
Bug reported in #4430
2020-02-11 17:03:11 +01:00
LemonBoy
b81c5be451
riscv: Remove 'relax' from the baseline cpu features
...
LLD doesn't implement relaxations at the moment.
2020-02-11 17:03:11 +01:00
LemonBoy
f8fd8c481a
test: Skip the atomic-on-fp test for riscv64
2020-02-11 17:03:10 +01:00
LemonBoy
ea8755fda9
compiler-rt: Export the AEABI builtins when targeting thumb
2020-02-11 15:24:18 +01:00
Michael Dusan
e624c86289
Merge pull request #4389 from mikdusan/stage1-mem
...
stage1: memory/report overhaul
2020-02-10 23:08:33 -05:00
Michael Dusan
edb210905d
stage1: memory/report overhaul
...
- split util_base.hpp from util.hpp
- new namespaces: `mem` and `heap`
- new `mem::Allocator` interface
- new `heap::CAllocator` impl with global `heap::c_allocator`
- new `heap::ArenaAllocator` impl
- new `mem::TypeInfo` extracts names without RTTI
- name extraction is enabled w/ ZIG_ENABLE_MEM_PROFILE=1
- new `mem::List` takes explicit `Allocator&` parameter
- new `mem::HashMap` takes explicit `Allocator&` parameter
- add Codegen.pass1_arena and use for all `ZigValue` allocs
- deinit Codegen.pass1_arena early in `zig_llvm_emit_output()`
2020-02-10 21:08:08 -05:00
Timon Kruiper
2618366055
Add cast between [*c]T and ?[*:0]T on fn parameter
...
Fixes #4176
2020-02-10 19:43:58 -05:00
LemonBoy
3237528a59
fmt: Pass the fmt string to the inner formatters
2020-02-10 19:43:11 -05:00
Andrew Kelley
3170ead9eb
compile error instead of abort for unimplemented @typeInfo
...
of `@Frame(func)`. Closes #3995
2020-02-10 19:14:54 -05:00
Andrew Kelley
702398dd0e
Revert "windows: remove the 'A' versions of psapi functions"
...
This reverts commit 1cdefeb10b7496126bbb7d00709235abfee56a4a.
See #4426
2020-02-10 12:30:20 -05:00
Andrew Kelley
1cdefeb10b
windows: remove the 'A' versions of psapi functions
...
See #534
2020-02-10 12:03:11 -05:00
Vexu
ae5ba369e1
translate-c float fixes
2020-02-10 11:02:29 -05:00
Andrew Kelley
70a4794c57
fix compiler assertion when duplicating fields...
...
...in nested anonymous struct literals
closes #4391
2020-02-10 10:57:40 -05:00
Andrew Kelley
cdc5070f21
Merge remote-tracking branch 'origin/master' into llvm10
2020-02-10 00:26:33 -05:00
Andrew Kelley
014f66e6de
Merge pull request #4404 from ziglang/async-std
...
a big step towards std lib integration with async I/O
2020-02-10 00:22:59 -05:00
Andrew Kelley
27575d19c8
avoid conflict with master branch
2020-02-09 22:44:23 -05:00
Andrew Kelley
acdf4048b4
allow local variable address detection to regress
...
See #3180 for a more comprehensive plan to catch this problem. More
sophisticated control flow analysis is needed to provide compile errors
for returning local variable addresses from a function.
2020-02-09 22:40:36 -05:00
Andrew Kelley
5ea79bfc4a
fix not checking type of return pointer
...
Thanks to Vexu for the test cases.
Closes #3422
Closes #3646
Closes #3224
Closes #3327
Closes #3269
2020-02-09 22:34:34 -05:00
Andrew Kelley
04ee3b01a1
fix defer interfering with return value spill
2020-02-09 17:19:28 -05:00
Andrew Kelley
3b622f4494
fix off-by-one error in std.unicode.utf8ToUtf16LeWithNull
...
and fix larger-than-one-byte sentinels when being freed
Thank you to João Pedro for identifying both problems and
providing example code to solve them.
closes #4413
2020-02-09 14:56:19 -05:00
LemonBoy
c4d0f97b4c
compiler_rt: Fix clzsi2 implementation for Thumb1
...
The LUT contains the number of bits set, not the number of leading zeros
as we're subtracting from the total number of bits in a word.
Closes #4415
2020-02-09 14:12:01 -05:00