Commit Graph

4917 Commits (50bbb34594eedf7a978c00edb525bcea472b554b)

Author SHA1 Message Date
Andrew Kelley 5cb18e9c6f
translate-c: move some code to the C API
See #1964
2019-04-15 00:32:27 -04:00
Shritesh Bhattarai cc8cf94cb2 Update wasm tiers (#2272)
* tier update: wasm32=2, wasm64=4
2019-04-14 11:29:22 -04:00
Andrew Kelley 27253f09b6
organize how the single threaded option is passed around 2019-04-14 11:01:01 -04:00
Andrew Kelley 63a970a548
Merge pull request #2268 from shritesh/wasi
wasm: preliminary WASI OS support
2019-04-14 10:45:30 -04:00
Shritesh Bhattarai 0f1d92e2cf wasm: force single threaded 2019-04-14 10:21:48 -04:00
Shritesh Bhattarai 94e0871603 wasi: don't pass --no-entry to linker 2019-04-14 00:03:32 -05:00
Shritesh Bhattarai ecd0f89254 wasi: better extern wasi logic 2019-04-13 23:49:02 -05:00
Shritesh Bhattarai 93d43d4529 wasi: add std/os/wasi{,/core}.zig to CMakeLists.txt 2019-04-13 22:51:18 -05:00
Shritesh Bhattarai 22960a5fdf wasi: better comments 2019-04-13 22:45:31 -05:00
Shritesh Bhattarai a2d8f03092 support extern "wasi" functions 2019-04-13 22:28:58 -05:00
Shritesh Bhattarai 93528be6b1 wasi: sigabrt at panic 2019-04-13 21:54:50 -05:00
Shritesh Bhattarai fe9cd0b4bc wasi: use __wasi_proc_exit instead of posix.exit 2019-04-13 21:36:53 -05:00
Andrew Kelley 68d7e4a1b6
better handle quota of setEvalBranchQuota
Now that c58b802034 has removed
the "top of the comptime stack" requirement, the branch quota
can be modified somewhere other than the top of the comptime stack.

This means that the quota of a parent IrExecutable has to be
modifiable by an instruction in the child.

Closes #2261
2019-04-13 16:55:59 -04:00
Duncan a43fd7a550 Add favicon to langref.html 2019-04-13 16:20:33 -04:00
Andrew Kelley 4a2ccd6fb8
Merge pull request #2266 from bnoordhuis/fix-cache-lseek-ebadf
don't close cache manifest file prematurely
2019-04-13 16:17:12 -04:00
Shritesh Bhattarai 72bcd5a4a5 WIP: hello world 2019-04-13 15:15:39 -05:00
Ben Noordhuis 93e89b3b7e don't close cache manifest file prematurely
ErrorInvalidFormat is not a fatal error so don't close the cache
manifest file right away but instead let cache_final() handle it.

Fixes the following (very common) warning when running the test suite:

    Warning: Unable to write cache file [..]: unexpected seek failure

The seek failure is an lseek() system call that failed with EBADF
because the file descriptor had already been closed.
2019-04-13 12:33:29 +02:00
Ben Noordhuis ea5518f69e make os_file_close poison file handle after close
This helps track down use-after-close bugs.
2019-04-13 12:31:49 +02:00
Andrew Kelley 9d229791c6
translate-c: move some code to the C API
See #1964
2019-04-12 14:39:12 -04:00
Shritesh Bhattarai 63f2e96eea wasm: use .wasm ext for exe 2019-04-12 13:17:59 -04:00
Andrew Kelley 6284a4c534
translate-c: move some code to the C API
See #1964
2019-04-12 03:56:38 -04:00
Andrew Kelley f860493f23
translate-c: move some code to the C API
See #1964
2019-04-12 03:12:22 -04:00
Andrew Kelley 6f34d08aed
translate-c: move some code to the C API
See #1964
2019-04-11 23:38:41 -04:00
Shritesh Bhattarai 5f8dbcac06 wasm: disable error ret tracing 2019-04-11 16:37:40 -04:00
Andrew Kelley b960f1d922
translate-c: move some code to the C API
See #1964
2019-04-11 15:33:26 -04:00
Andrew Kelley 4172fe986e
readme: separate powerpc 32 and 64 bit in the support table 2019-04-11 15:22:15 -04:00
Andrew Kelley 3ce024dd85
A bunch of fixes for the DWARF parser (#2254)
* Correct parsing of DWARF line_info section

* Fix reading of udata/sdata encoded attributes

* Add definition for DW_AT_alignment

Even though it's been standardized in DWARF5 some compilers produce it
anyway for DWARF4 infos too.

* Fix reading of reference attributes

* Distinguish between absolute/relative addresses
2019-04-11 14:34:13 -04:00
Andrew Kelley a895c59971
delete unused function
missed by 27cd830ec8
2019-04-11 14:33:43 -04:00
Matthew Iannucci 27cd830ec8 Add initial support for iOS targets (#2237)
* Add iOS C int sizes... try to hack in iOS DebugInfo

* Get rid of ios link check for now

* Remove macos linkversion check
2019-04-11 13:15:17 -04:00
LemonBoy 51eb4ebec1 Distinguish between absolute/relative addresses 2019-04-11 15:41:42 +02:00
Marc Tiehuis b59c65e986
Merge pull request #2102 from ziglang/big.int-additions
Add big.Rational type to std
2019-04-11 22:54:19 +12:00
LemonBoy 38492b2ea4 Fix reading of reference attributes 2019-04-11 10:36:15 +02:00
LemonBoy 29ec409b52 Add definition for DW_AT_alignment
Even though it's been standardized in DWARF5 some compilers produce it
anyway for DWARF4 infos too.
2019-04-11 10:36:15 +02:00
LemonBoy 795b3e9b68 Fix reading of udata/sdata encoded attributes 2019-04-11 10:36:15 +02:00
Andrew Kelley dff201540f
translate-c: move some code to the C API
See #1964
2019-04-11 03:59:12 -04:00
LemonBoy 8f5753ba9f Fix normalization of right-shifted BigInt at CT
The pointer value for the `digits` field was being treated as if it were
a limb.

Fixes #2225
2019-04-11 03:49:15 -04:00
Marc Tiehuis 78af62a19a Pack big.Int sign and length fields
This effectively takes one-bit from the length field and uses it as the
sign bit. It reduces the size of an Int from 40 bits to 32 bits on a
64-bit arch.

This also reduces std.Rational from 80 bits to 64 bits.
2019-04-11 19:36:35 +12:00
Marc Tiehuis 87d8ecda46 Fix math.big.Int divN/gcdLehmer and fuzz-test failures 2019-04-11 19:36:35 +12:00
Marc Tiehuis 30788a98b1 Handle zero-limb trailing div case in big.Int 2019-04-11 19:36:35 +12:00
Marc Tiehuis d3e1f32362 Small fixes for big.Rational and corrections for gcdLehmer
The int div code still causes some edge cases to fail right now.
2019-04-11 19:36:35 +12:00
Marc Tiehuis b3ecdfd7bf Fix big.Int toString maybe-null allocator 2019-04-11 19:36:35 +12:00
Marc Tiehuis 5f4fcd5030 Add initial big.Rational type 2019-04-11 19:36:35 +12:00
Marc Tiehuis ea1d2a2409 Add read-only, non-allocating Int for internal constants
A constant Int is one which has a value of null for its allocator field.
It cannot be resized or have its limbs written. Any attempt made to
write to it will be caught with a runtime panic.
2019-04-11 19:36:35 +12:00
Andrew Kelley e309ad884a
fix outdated/incorrect docs for `@truncate`
closes #2234
2019-04-10 23:00:53 -04:00
Andrew Kelley a4c7e4c4eb __muloti4 does not need the ABI workaround on Windows
Fixes 128-bit integer multiplication on Windows.

closes #2250
2019-04-10 22:33:33 -04:00
Shritesh Bhattarai 13798d26c7 pass exec_path to zig run 2019-04-10 20:07:35 -04:00
Shritesh Bhattarai 666e879925 Build compiler_rt for WASM exe 2019-04-10 19:14:19 -04:00
Andrew Kelley a71bfc249d compiler-rt: better way to do the ABI required on Windows
This removes the compiler_rt.setXmm0 hack. Instead, for
the functions that use i128 or u128 in their parameter and
return types, we use `@Vector(2, u64)` which generates
the LLVM IR `<2 x i64>` type that matches what Clang
generates for `typedef int ti_int __attribute__ ((mode (TI)))`
when targeting Windows x86_64.
2019-04-10 18:47:14 -04:00
LemonBoy 60e2a04322 Correct parsing of DWARF line_info section 2019-04-10 23:30:41 +02:00
Andrew Kelley 52934851f2
compiler_rt: `@divTrunc` rather than `@divFloor` in muloti4 2019-04-10 16:29:10 -04:00