LemonBoy
98bc2b73bf
Implement failsafe logic for posixSleep
...
Now we'll sleep for the specified amount of time even though the number
of seconds doesn't fit in a `isize` field.
2019-05-04 09:03:01 +02:00
LemonBoy
b612512bb5
std: Remove some assumptions about the host platform
...
The stdlib is now 32-bit friendly.
2019-05-04 08:44:26 +02:00
Ryan Liptak
cf8dde2d68
std.HashMap: cleanup ensureCapacity + add test
...
- Cleaned up some comments
- Removed the "is power of two" check from optimizedCapacity since the * 5 / 3 is unlikely to end up with a power of two, so it's a wasted check the majority of the time
- Made ensureCapacity/ensureCapacityExact increment the modification count if they resize the hash map so that we can catch resizes while iterating, which would likely break the iterator state
2019-05-03 21:15:00 -07:00
tgschultz
4dfd1f54db
Ugh. I updated these but forgot to git add.
2019-05-04 03:08:33 +00:00
tgschultz
7dc71cdc4a
and again
2019-05-04 02:39:55 +00:00
tgschultz
3e3bdd577c
Fixed some comments
2019-05-04 02:38:16 +00:00
tgschultz
e2fd37e75b
Added PackedIntArray, PackedIntSlice to std
2019-05-04 00:28:51 +00:00
Shritesh Bhattarai
f4798297de
wasi: Implement read and write with err checking
2019-05-03 17:35:42 -04:00
LemonBoy
2f3b461703
compiler-rt: Add __modsi3, __umodsi3
2019-05-03 17:12:33 -04:00
LemonBoy
1be4e87f0b
compiler-rt: Add __moddi3, __divdi3
2019-05-03 17:12:33 -04:00
LemonBoy
077216b582
Address the comments of the first review round
2019-05-03 22:42:45 +02:00
Andrew Kelley
584dd2863a
Merge pull request #2409 from shritesh/wasi_native
...
WASI std: implement native os.exit and os.abort
2019-05-03 16:24:00 -04:00
Shritesh Bhattarai
f86b8e4535
WasmAllocator: compileError on non-wasm arch
2019-05-03 16:21:33 -04:00
Shritesh Bhattarai
2f39da7cdd
docgen: show -target command line argument
2019-05-03 15:56:33 -04:00
Shritesh Bhattarai
5c04c22bcc
docgen: support wasm and wasi
2019-05-03 15:56:33 -04:00
Andrew Kelley
f6937db7d6
remove redundant information from README
2019-05-03 14:48:56 -04:00
Andrew Kelley
bd9c629c4c
always respect threadlocal for variables with external linkage
...
Previously if you had, for example:
extern "c" threadlocal var errno: c_int;
This would turn errno into a normal variable for --single-threaded
builds. However for variables with external linkage, there is an ABI
to uphold.
This is needed to make errno work for DragonFly BSD. See #2381 .
2019-05-03 14:39:54 -04:00
Andrew Kelley
8cda4fd73a
docs: remove @setGlobalLinkage
section
...
`@setGlobalLinkage` was removed with #462 . The not-yet-implemented
proposal for external weak symbols is #1917 .
2019-05-03 13:38:24 -04:00
Benjamin Feng
8d58dc715b
Switch wasm export-all to only values marked exports
2019-05-03 13:23:02 -04:00
daurnimator
fca3e3a73f
std: add std.ArrayList.orderedRemove
2019-05-03 01:54:49 -04:00
Andrew Kelley
3552180143
optimize @memset
with undefined
...
When using `@memset` to set bytes to `undefined`, Zig notices this
case and does a single Valgrind client request rather than N.
Speeds up all allocators in safe modes.
Closes #2388
2019-05-03 01:25:03 -04:00
Ryan Liptak
13a7b8586a
std.HashMap: make ensureCapacityExact private
2019-05-02 17:43:51 -07:00
Ryan Liptak
26591d4f22
std.HashMap: add putAssumeCapacity fn
2019-05-02 17:42:38 -07:00
Ryan Liptak
4d42275d03
std.HashMap: make ensureCapacity optimize for the expected count, add ensureCapacityExact
2019-05-02 17:01:30 -07:00
Shritesh Bhattarai
a530a111a5
wasi: remove posix-y exit
2019-05-02 11:33:10 -05:00
Shritesh Bhattarai
84682eb862
wasi: implement os.exit
2019-05-02 11:26:33 -05:00
Shritesh Bhattarai
6fb677c4f6
wasi: native os.abort
2019-05-02 11:25:25 -05:00
Andrew Kelley
f8117a0799
docs: update for shared libraries
2019-05-02 12:00:16 -04:00
Ryan Liptak
0afa2d040a
make std.HashMap.ensureCapacity round up to the nearest power of two
2019-05-02 00:58:26 -07:00
Marc Tiehuis
f950ec0c16
Merge pull request #2397 from ziglang/std.math
...
Review std/math and update documentation
2019-05-02 19:05:26 +12:00
Marc Tiehuis
3370e60dd9
std.math: Correct math.nan usage in cos
2019-05-02 19:03:49 +12:00
Ryan Liptak
8b7c59a414
std.HashMap: add public ensureCapacity fn
2019-05-01 23:46:52 -07:00
Dong-hee Na
c00c18de6a
main: change --enable-pic and --disable-pic to -fPIC and -fno-PIC
2019-05-01 16:11:08 -04:00
Andrew Kelley
6e4f69a54a
docgen: add exe_build_err tag
2019-05-01 15:34:36 -04:00
Andrew Kelley
54a93e5393
docs: add note to @setRuntimeSafety
2019-05-01 15:09:03 -04:00
Marc Tiehuis
40fe6afdad
Don't install zig_cpp lib for stage2 target
...
Missed in last commit. See #2220 .
2019-05-01 21:01:34 +12:00
Marc Tiehuis
89d71a960b
std.math: Add documentation for all functions and algorithm sources
2019-05-01 18:37:46 +12:00
Marc Tiehuis
f94964cd05
std.math: Add upstream changes/fixes and simplify go derived code
...
This also starts the documentation effort for the math/ subdirectory.
The intent is to use this as a somewhat representative test-case for any
work on the documentation generator.
2019-05-01 18:13:33 +12:00
Shritesh Bhattarai
7bbc8eb16c
wasi: import all core exports
2019-04-30 23:53:17 -04:00
Shritesh Bhattarai
f53abf4063
wasi: import all constants and their types
2019-04-30 22:58:41 -04:00
Andrew Kelley
bb0c5f7a2f
Merge pull request #2392 from shritesh/wasi_clock
...
wasi: implement timestamp
2019-04-30 21:52:26 -04:00
Shritesh Bhattarai
d395ed2d40
wasi: implement timestamp
2019-04-30 20:43:43 -05:00
Shritesh Bhattarai
0ce05fa621
wasi: import clock and timestamp function/types
2019-04-30 20:06:39 -05:00
Shritesh Bhattarai
1fabd6bbf3
wasi: implement getRandomBytes
2019-04-30 20:50:41 -04:00
Andrew Kelley
79a139ac63
Merge pull request #2390 from shritesh/wasi_env
...
wasi: add getEnvMap
2019-04-30 19:52:20 -04:00
Shritesh Bhattarai
0a693b70e4
wasi: use mem.separate instead
2019-04-30 18:43:43 -05:00
Shritesh Bhattarai
20458f56d8
wasi: add getEnvMap
2019-04-30 18:18:20 -05:00
Shritesh Bhattarai
8e700bf92a
wasi: import environ_get and environ_sizes_get
2019-04-30 16:35:27 -05:00
Andrew Kelley
9dfd24a334
add test case to cover solved bug
...
closes #2114
2019-04-30 14:17:16 -04:00
Marc Tiehuis
81767a658d
Don't install stage2 artifacts
...
Fixes #2220 .
2019-04-30 12:13:41 -04:00