Ryan Liptak
57f545eed8
std.heap.DirectAllocator: reduce the amount of redundant memcpy calls on Windows
...
Previously the memory would be copied to a different aligned address in some cases where the old offset could have been used. This fixes it so that it will always try to use the old offset when possible, and only uses a different offset if the old one is truly invalid (not aligned or not enough space to store the alloc at the old offset).
2019-04-25 13:35:45 -07:00
Andrew Kelley
92d9cef071
Merge pull request #2332 from ziglang/translate-c-userland
...
beginnings of implementing translate-c in userland
2019-04-25 08:35:28 -04:00
Andrew Kelley
17ffe166c2
add preliminary windows support to std.io.COutStream
2019-04-25 00:24:25 -04:00
Andrew Kelley
e1bf74fca3
translate-c: put -x c back in there, it's necessary
2019-04-25 00:06:58 -04:00
Andrew Kelley
535d419590
translate-c: self-hosted implementation can detect C errors
...
See #1964
2019-04-25 00:06:58 -04:00
Andrew Kelley
712274997e
translate-c: unify API for self-hosted and C++ translate-c
...
See #1964
2019-04-25 00:06:57 -04:00
Andrew Kelley
976080462c
translate-c: a little closer to self-hosted implementation
2019-04-25 00:06:54 -04:00
Andrew Kelley
56e07622c6
Merge pull request #2312 from squeek502/heap-shrink-large-align
...
fix heap allocators when shrinking an object but growing its alignment
2019-04-24 23:44:28 -04:00
Shawn Landden
8ef7f6febb
remove Shebang (#!) support
...
Closes: #2165
2019-04-24 23:34:19 -04:00
Andrew Kelley
fb2acaff06
@sizeOf
returns 0 for comptime types
...
This defines `@sizeOf` to be the runtime size of a type, which means
that it is zero for types such as comptime_int, type, and (enum
literal).
See #2209
2019-04-24 22:31:53 -04:00
vegecode
733c547a65
compiler-rt: Add missing import of test for comparesf2
2019-04-24 21:16:03 -04:00
vegecode
01168e1577
compiler-rt: add aeabi_dcmp, comparedf2
2019-04-24 21:15:39 -04:00
LemonBoy
e4825dbd77
Other
2019-04-24 20:54:17 +02:00
LemonBoy
12eff09ff4
Expose Elf32_Dyn and Elf64_Dyn
2019-04-24 20:54:05 +02:00
LemonBoy
074ddf1ac6
Implementation of dl_phdr_info
2019-04-24 20:53:46 +02:00
Andrew Kelley
ad994c9642
Merge pull request #2296 from LemonBoy/translate-c-stuff
...
Handle implicit casts in translate-c
2019-04-24 14:43:46 -04:00
Wink Saville
7bafe2e490
Fix alignment of macro FIND_AND_ADD_CLANG_LIB
2019-04-24 14:42:08 -04:00
hryx
06bf918436
Sync grammar with spec
...
- Remove rule LabeledExpr
- Add rule CurlySuffixExpr
2019-04-24 14:38:56 -04:00
Michael Dusan
5de934810f
add -fvisibility-inlines-hidden
...
On macOS building with Xcode/clang the linker complains loudly when
symbol visibility is inconsistent. This option syncs visibilty setting
of both LLVM and Zig.
2019-04-24 14:37:14 -04:00
Andrew Kelley
ed41955522
build libuserland in cross compilation mode
...
Previously libuserland was being built for the native target,
which could depend on native CPU features such as AVX. The
CI infrastructure is intending to create binaries that are
widely compatible and do not make use of specific CPU features.
There could be something to gain from enabling native CPU features
sometimes, by introducing a new cmake configuration option, but
since it's planned to eventually ship self-hosted rather than stage1,
I don't think it really matters.
closes #2348
2019-04-24 14:13:55 -04:00
Jimmi Holst Christensen
e4a86d4653
Merge pull request #2351 from ziglang/fixed-2346
...
fixes #2346
2019-04-24 18:42:55 +02:00
Jimmi HC
1a2e02e267
fixed #2356
...
const_ptr_pointee_unchecked did not take into account that if the
pointer is zero sized, then const_val->data.x_ptr.special would be
ConstPtrSpecialInvalid. This commit fixes this by also checking
that the child type of the pointer only have one possible value
and just returns that value.
2019-04-24 15:04:58 +02:00
Jimmi Holst Christensen
e553ade090
Merge pull request #2335 from hryx/no-tag-expr-for-struct
...
Allow tag expr for enum but not struct
2019-04-24 14:53:54 +02:00
Andrew Kelley
3bc361178c
Merge pull request #2344 from LemonBoy/dbg-things
...
Minor debug things
2019-04-23 10:15:53 -04:00
LemonBoy
374d16793f
Go one instruction before the return address
...
The return address may not point to an area covered by the debug infos
so we hope for the best and decrement the address so that it points to
the caller instruction.
2019-04-23 10:05:46 +02:00
LemonBoy
b095e33667
Fix silly typo
2019-04-23 09:57:57 +02:00
LemonBoy
57ec183c09
Fix reading of signed leb128 values
2019-04-23 09:57:22 +02:00
LemonBoy
70c2e86da3
Add translation from pointer to boolean
2019-04-22 22:23:41 +02:00
LemonBoy
a44ad08954
Add some zig_panic for 80-bit float codepaths
2019-04-22 22:23:41 +02:00
LemonBoy
9ea600b634
Correct rendering of AST Char literals
2019-04-22 22:23:41 +02:00
LemonBoy
8d05330cf7
More precise translation of char literals
2019-04-22 22:23:41 +02:00
LemonBoy
ab424bbb35
translate-c: Add test for implicit casts
2019-04-22 22:23:41 +02:00
LemonBoy
69bc5fd04d
translate-c: Pointer to/from integral conversion
2019-04-22 22:16:30 +02:00
LemonBoy
d3dd49c403
translate-c: Support for integer to boolean conversions
2019-04-22 22:16:29 +02:00
Ryan Liptak
8ce130de3c
Bump up FixedBufferAllocator test memory to account for new tests
2019-04-22 02:25:57 -07:00
Ryan Liptak
b3598163df
std.heap.DirectAllocator: Fix aligned reallocs on Windows
2019-04-22 02:20:01 -07:00
hryx
5765cbd2de
Allow tag expr for enum but not struct
2019-04-22 00:14:51 -07:00
Ryan Liptak
af7daae26b
readme: Simplify instructions for making changes to the standard library
2019-04-21 21:53:35 -07:00
Ryan Liptak
e64c0dee35
readme: Add instructions for making changes to the standard library
...
Closes #2324
2019-04-21 15:21:19 -07:00
emekoi
0f8fc3b924
fixed stack protector issues
2019-04-21 14:13:48 -04:00
daurnimator
211f0a2226
std: Add mem.nativeIntToBig and mem.nativeIntToLittle
...
To be used where `htons`, `htonl`, etc. would be used in C.
It's useful to have a function that returns a number directly for use in initialisers.
2019-04-21 14:04:01 -04:00
daurnimator
217b95da31
std: add msghdr_const
...
As `iovec_const` is to `iovec`, `msghdr_const` is to `msghdr`
2019-04-21 21:53:24 +10:00
daurnimator
9babcac7a6
std: improve msghdr definition
2019-04-21 21:50:48 +10:00
Ryan Liptak
66020856b2
fix heap allocators when shrinking an object but growing its alignment
2019-04-20 23:56:39 -07:00
vegecode
bb25f212b3
compiler-rt: add aeabi_fcmp, comparesf2
2019-04-21 00:12:21 -04:00
tgschultz
22f5e5fd3e
Fixes DirectAllocator Windows implementation to call HeapFree when new_size == 0
2019-04-20 14:04:09 -04:00
Andrew Kelley
b864fe7e23
Merge branch 'LemonBoy-dwarfy'
2019-04-20 13:49:02 -04:00
Andrew Kelley
9b83fe6b4c
fixup and zig fmt
2019-04-20 13:48:38 -04:00
Andrew Kelley
907a7068ce
Merge branch 'dwarfy' of https://github.com/LemonBoy/zig into LemonBoy-dwarfy
2019-04-20 13:32:59 -04:00
LemonBoy
c2542bb7b7
Recover symbol infos from DWARF sections
2019-04-20 10:35:39 +02:00