Commit Graph

3187 Commits (9bdcd2a495d4189d6536d43f1294dffb38daa9a5)

Author SHA1 Message Date
Andrew Kelley cd4676a233 stage1: update darwin code to workaround old libc bug
See #1128
2018-06-18 12:54:31 -04:00
Andrew Kelley 1aa93808b1 Merge branch 'binary132-fix-1117-macos-realpath' 2018-06-18 12:19:16 -04:00
Andrew Kelley 4ce36a6475 adjust logic for finding the path to zig executable on darwin 2018-06-18 12:18:39 -04:00
Andrew Kelley c09c3902c4 Merge branch 'fix-1117-macos-realpath' of https://github.com/binary132/zig into binary132-fix-1117-macos-realpath 2018-06-18 12:16:47 -04:00
Andrew Kelley 48985a7e68 langref: add docs for void
see #367
2018-06-18 12:02:30 -04:00
Andrew Kelley 8fd7cc11e1 disallow opaque as a return type of fn type syntax
closes #1115
2018-06-18 11:12:15 -04:00
Andrew Kelley d49d6f0cde fix compiler crash when using @intToFloat with float literal
closes #1132
2018-06-18 11:04:18 -04:00
Andrew Kelley 7151d72532
Merge pull request #1130 from ziglang/remove-bool-casting-syntax
remove bool to int syntax. add @boolToInt
2018-06-18 10:52:31 -04:00
Bodie Solomon c7057bd25b
Fix 1117: Revise realpath scratch logic 2018-06-18 07:40:31 -04:00
Bodie Solomon 0456822892
Fix 1117: Tweak realpath logic to use out_path as scratch space 2018-06-18 07:40:31 -04:00
Bodie Solomon e6b69151c0
Fix 1117: Use realpath in stage1 Darwin os_self_exe_path
Issue: https://github.com/ziglang/zig/issues/1117

The macOS stage1 Zig compiler should look in Zig's real absolute path
for the Zig stdlib, but os_self_exe_path looks in its path as returned
by _NSGetExecutablePath, which may be a symlink.  This means that a
symlinked Zig cannot find the Zig stdlib.

This patch fixes the issue by resolving the _NSGetExecutablePath result
to the real path using realpath() before copying the result to the
output path.
2018-06-18 07:40:31 -04:00
Andrew Kelley 4210f1f6a0 remove bool to int syntax. add @boolToInt
add missing docs

See #1061
2018-06-18 03:07:16 -04:00
Andrew Kelley d52ef95f77 disable failing macos test. see #1126
I'm unable to reproduce the failure on my mac laptop
more investigation required
2018-06-18 01:09:51 -04:00
Andrew Kelley 92a36040b1 msp430 target: c_long is always 32 bits
closes #1125
2018-06-18 01:03:45 -04:00
Andrew Kelley 906ed059ce update std.DynLib to use @intCast 2018-06-18 00:52:55 -04:00
Andrew Kelley 431fda4141
Merge pull request #1123 from ziglang/remove-number-casting-syntax
Remove number casting syntax
2018-06-17 14:40:07 -04:00
Andrew Kelley e5956f23ca add target C int type information for msp430 target
closes #1125
2018-06-17 12:47:27 -04:00
Andrew Kelley 74ccf56a4b update more tests 2018-06-17 12:33:24 -04:00
Andrew Kelley 3c12ba7180 update test cases 2018-06-17 04:32:57 -04:00
Andrew Kelley 7912061226 remove integer and float casting syntax
* add `@intCast`
 * add `@floatCast`
 * add `@floatToInt`
 * add `@intToFloat`

See #1061
2018-06-17 02:57:07 -04:00
Andrew Kelley 06a26f0965 std.Complex: use better arg passing convention and fix a TODO 2018-06-16 21:32:53 -04:00
Andrew Kelley 751518787a
Merge pull request #1109 from ziglang/pass-by-non-copying-value
allow passing by non-copying value
2018-06-16 21:13:10 -04:00
Andrew Kelley 3ee4d23ebd posix read can return error.IsDir 2018-06-16 19:54:16 -04:00
Andrew Kelley eae9634ac9 langref: be clear that float types are always IEEE 754 2018-06-16 19:53:52 -04:00
Andrew Kelley 472b7ef7e6 disable byval 2018-06-16 19:37:00 -04:00
Andrew Kelley e311cd562b don't automatically take pointer when passing by non-copying value
this commit does not have all tests passing
2018-06-16 19:37:00 -04:00
Andrew Kelley 59b3dc8907 allow passing by non-copying value
closes #733
2018-06-16 19:36:33 -04:00
Andrew Kelley a7d59086b4 disable load dynamic library test
it's failing on CI. I will troubleshoot it and then re-enable
2018-06-16 19:36:06 -04:00
Andrew Kelley c529b814ee load_dynamic_library test: no need to link libc 2018-06-16 18:54:41 -04:00
Andrew Kelley 65d04cbeb4 std.DynLib: open the fd with CLOEXEC 2018-06-16 17:27:45 -04:00
Andrew Kelley 48de57d824 add basic std lib code for loading dynamic libraries
this is going to only work for very basic libraries;
I plan to slowly add more features over time to support more
complicated libraries
2018-06-16 17:01:23 -04:00
Jay Weisskopf b3a3e2094e Make `zig version` compliant with SemVer (#1113)
The git revision is build metadata and should be appended with a plus sign.

https://semver.org/#spec-item-10
2018-06-15 14:06:56 -04:00
Andrew Kelley f0697c28f8 langref: docs for error return traces
See #367
2018-06-14 18:12:31 -04:00
Andrew Kelley cdf1e366f9 fix build on windows, broken by previous commit 2018-06-14 16:36:07 -04:00
Andrew Kelley 6943cefebf std.os.path.dirname: return null instead of empty slice
for when there is no directory component. Makes it harder
to write bugs.

closes #1017
2018-06-14 16:15:32 -04:00
Andrew Kelley 2219cc0612
Merge pull request #1105 from ziglang/i128-compiler-rt
Add i128 compiler-rt div/mul support
2018-06-14 10:59:38 -04:00
Alexandros Naskos 4ec09ac243 Enabled optional types of zero bit types with no LLVM DI type. (#1110)
* Zero bit optional types do not need a LLVM DI type
2018-06-14 10:57:28 -04:00
Marc Tiehuis a369d69c51 Add windows x86_64 i128 abi workaround 2018-06-14 21:18:36 +12:00
Andrew Kelley fc87f6e417 fix race condition bug in test harness of std.atomic 2018-06-13 11:57:57 -04:00
Andrew Kelley e1f56c9af6 std.zig.ast: add test for iterate
closes #1101
2018-06-13 11:48:06 -04:00
Andrew Kelley 41e6c664d8 langref: add merge error sets operator to operator table 2018-06-13 11:09:41 -04:00
Andrew Kelley 8dd24796c4 disallow implicit casts that break rules for optionals
closes #1102
2018-06-13 11:04:09 -04:00
Marc Tiehuis 9110140514 Add i128 compiler-rt div/mul support 2018-06-13 22:25:04 +12:00
Andrew Kelley 86adc1ef39 add docs and missing test case for merging error sets
See #367
2018-06-12 19:38:59 -04:00
Andrew Kelley 13d3255e2a docgen: don't leave garbage .h files lying around
closes #1100
2018-06-12 15:21:14 -04:00
Andrew Kelley fdd9cf0928 better debugging for CI failures of std.atomic 2018-06-12 15:14:32 -04:00
Andrew Kelley 259413251d fix ability to call mutating methods on zero size structs
closes #838
2018-06-12 15:06:02 -04:00
Andrew Kelley 7580e39b38 zig fmt 2018-06-12 02:18:11 -04:00
Andrew Kelley 3dd9af9948 implement std.os.Dir for windows
improve std.os.File.access so that it does not depend on shlwapi.dll

closes #1084
2018-06-12 01:57:09 -04:00
Andrew Kelley 0a18d53c3d langref: add orelse keyword to syntax highlighting 2018-06-11 17:38:24 -04:00