Andrew Kelley
a5b79017a3
fix regression from d5648d26
...
thanks Wink Saville for the test case.
2018-11-27 00:52:32 -05:00
Andrew Kelley
7818550edc
Merge branch 'Fix-pushToParent-to-work-for-arrays-of-Objects' of https://github.com/winksaville/zig into winksaville-Fix-pushToParent-to-work-for-arrays-of-Objects
2018-11-27 00:45:46 -05:00
Andrew Kelley
0860be03b1
Merge branch 'kristate-zig-backport-os_file_read-EISDIR'
2018-11-26 20:07:19 -05:00
Andrew Kelley
67a39a4c99
stage1: better file path handling
...
* better message printed when cache hash fails
* better handling of '/' as root source file
* os_path_split parses '/' and '/a' correctly
closes #1693
closes #1746
2018-11-26 20:04:35 -05:00
Andrew Kelley
d2ed4d3dd3
Merge branch 'zig-backport-os_file_read-EISDIR' of https://github.com/kristate/zig into kristate-zig-backport-os_file_read-EISDIR
2018-11-26 19:59:58 -05:00
kristopher tate
0f7de58b64
std.mem: add new separate method and rework SplitIterator;
2018-11-26 02:02:17 +09:00
daurnimator
f6cd02be65
add std.meta.stringToEnum
2018-11-25 11:48:11 -05:00
Andrew Kelley
a07490a4bc
Merge pull request #1783 from ziglang/rand-range
...
Use better rand range implementations
2018-11-25 11:44:08 -05:00
Josh Wolfe
9ae5200bd2
factor out and expose biased range limiting function
2018-11-24 22:25:21 -05:00
Josh Wolfe
eed7b48fe3
test lots of types
2018-11-24 22:25:21 -05:00
Josh Wolfe
49b49618d2
add biased random range api
2018-11-24 22:25:21 -05:00
Josh Wolfe
1924ffa67d
better debiased random range implementation
2018-11-24 22:25:21 -05:00
Andrew Kelley
4d747d452f
update zen os std lib for latest zig changes
2018-11-24 16:51:52 -05:00
Andrew Kelley
3d2752cc36
refactor type_requires_comptime to have possible error
...
fixes a compiler crash when building
https://github.com/AndreaOrru/zen
2018-11-24 16:15:58 -05:00
Andrew Kelley
56a8f2b018
fix @intCast not catching negative numbers to unsigned
2018-11-24 14:36:16 -05:00
Andrew Kelley
b953e322a8
std.os.path.realC: make overflow more clearly impossible
2018-11-21 13:41:10 -05:00
Andrew Kelley
bb3ac177a8
fix incorrect buf len
2018-11-20 12:37:42 -05:00
kristopher tate
a69695a28c
std/mem: writeIntLE: buf.* to buf;
2018-11-20 11:11:07 -05:00
Wink Saville
a05716bd20
Allow json tests to be easily filtered
2018-11-19 18:08:38 -05:00
Andrew Kelley
4dafdc00d5
zig fmt
2018-11-19 17:28:18 -05:00
Andrew Kelley
9493738e54
Merge branch 'freebsd-up' of https://github.com/myfreeweb/zig into freebsd2
2018-11-19 17:24:41 -05:00
Sahnvour
703c6684d1
Crash fixes and small improvements to inline asm. ( #1756 )
...
* codegen: LLVMConstInlineAsm is deprecated.
* codegen: replace commas in asm constraint strings by pipes as required by LLVM.
* ir: enforce usage of '=' constraint modifier for inline assembly outputs.
Others are not currently supported and this was just asserted alter in `ir_render_asm`.
* asm: forbid comptime_int/floats as inputs in favor of explicitely sized constants.
Fixes a crash due to comptime_int/floats having no type_ref.
* asm: handle inputs with integers of <8 or non power of 2 bitsize.
We widen them to the next highest power of two.
2018-11-19 16:22:21 -05:00
Andrew Kelley
89e82281be
fix incorrect --help text
2018-11-19 13:26:35 -05:00
Andrew Kelley
b1a676b279
docs: fix some incorrect error documentation
2018-11-19 13:20:39 -05:00
Andrew Kelley
2f5d1ec500
improve error message when wrong type returned
...
closes #1650
2018-11-19 11:22:57 -05:00
Wink Saville
81d9403dce
Add SegmentedList.shrink
...
I was exploring std.zig.Tokenizer and wanted to compare performance of
arrays, SegmentedList and ArrayList and needed SegmentedList.shrink
to make the comparison "fair".
2018-11-19 10:53:25 -05:00
Marc Tiehuis
4c0163b69b
std/rand: fix ziggurat next_f64 call
2018-11-19 21:56:45 +13:00
Andrew Kelley
921d9c9bcb
add std.meta.intToEnum
2018-11-18 20:18:24 -05:00
Andrew Kelley
3829e200ec
fix assertion failure related to @intToEnum
2018-11-18 20:04:16 -05:00
Josh Wolfe
3c05ad4012
atomic.Int.set
2018-11-18 19:43:13 -05:00
Andrew Kelley
f8a782fb2e
all numbers with comptime known values implicitly cast
...
to all number types. If the value does not fit,
a compile error is emitted.
closes #422
closes #1712
2018-11-18 19:37:59 -05:00
Wink Saville
8d54cbb834
Fix pushToParent to work for arrays of Objects
...
The reference `*array` is a copy of the value on the stack. Instead use
a reference to top of stack. This is the same technique used above for
`var object` in `Value.String`.
Added two simple tests.
2018-11-18 10:14:37 -08:00
Duncan
e9b47d960b
Fix setsockopt syscall on linux
2018-11-18 10:45:38 -05:00
kristopher tate
947cdafd91
src/os.cpp: os_file_read: return ErrorIsDir on case EISDIR;
2018-11-18 15:30:24 +09:00
Andrew Kelley
085d049a08
aarch64 improvements
...
* support C ABI for all return types
* don't include __aeabi_uldivmod & co on aarch64 since
it's 64 bit
2018-11-17 11:21:00 -05:00
Jimmi HC
2a580278c4
Updated comments in parser.cpp
2018-11-17 14:42:47 +01:00
Jimmi HC
f1fd8d2b1f
Updated docs to newest grammar
2018-11-17 14:36:36 +01:00
Andrew Kelley
704374e512
rename `section` keyword to `linksection`
...
add zig fmt support for this syntax
closes #1152
2018-11-17 01:38:35 -05:00
Andrew Kelley
3862962881
delete rogue file
2018-11-16 14:26:53 -05:00
Vallentin
398914eb71
Fixed typos
2018-11-16 14:03:39 -05:00
Matthew O'Connor
fbd6a66ae7
camelCase std.rb.set_child to std.rb.setChild
2018-11-16 13:03:13 -05:00
kristopher tate
e198417687
std/fmt/index.zig: support printing hex bytes on slices;
2018-11-16 10:22:33 -05:00
Jimmi Holst Christensen
be9bb0a857
Fixed #1663 and removed IrInstructionArrayLen
2018-11-16 10:15:13 -05:00
Andrew Kelley
332fdf33ee
update readme
2018-11-16 10:05:52 -05:00
Matthew O'Connor
007783753e
Change rb functions to use snakeCase.
2018-11-16 09:21:48 -05:00
Andrew Kelley
ba361f31c6
more fixes related to readStruct API
2018-11-15 16:16:08 -05:00
Jimmi HC
3090f83800
Fixed failure using readStruct and gave async readStruct the same sig
2018-11-15 21:59:17 +01:00
Jimmi HC
f4606842d2
Have readStruct in stream return a value instead of taking a pointer
2018-11-15 21:03:27 +01:00
Jimmi Holst Christensen
2a9843de95
Added NullOutStream and CountingOutStream ( #1722 )
2018-11-15 09:37:39 -08:00
Andrew Kelley
b8b36f3cce
disable windows test until coroutines rewrite lands
...
See #1363
2018-11-15 10:02:12 -05:00