Commit Graph

4097 Commits

Author SHA1 Message Date
emekoi
3ff9ab332c fixed type signature 2019-01-11 09:56:37 -06:00
emekoi
51fff9fa82 fixed initializer and typos 2019-01-11 09:56:36 -06:00
emekoi
35d93d22db removed nullables 2019-01-11 09:56:36 -06:00
emekoi
9385127052 changed pointer types 2019-01-11 09:56:35 -06:00
emekoi
bb31695fbf fixed mutex on windows 2019-01-11 09:56:35 -06:00
emekoi
207fa3849c moved to InitializeCriticalSection to init 2019-01-11 09:56:34 -06:00
emekoi
25d7f5b654 switching back to EnterCriticalSection 2019-01-11 09:56:34 -06:00
emekoi
aaae2f5705 switching from EnterCriticalSection to TryEnterCriticalSection 2019-01-11 09:56:33 -06:00
emekoi
99f44219bc updated structs 2019-01-11 09:56:33 -06:00
emekoi
b61bce254c added mutex for windows 2019-01-11 09:56:32 -06:00
Andrew Kelley
5864d92b40
when rendering llvm const values, ensure the types align
the representation of the const expr val in zig, and the
type that we tell LLVM it is.
2019-01-09 10:43:48 -05:00
Andrew Kelley
4d5d0d3ada
@typeInfo: more correct return type info 2019-01-08 14:40:56 -05:00
Andrew Kelley
aa65b94671
fix debug info for function pointers
found when testing against LLVM 8

see https://bugs.llvm.org/show_bug.cgi?id=40198
2019-01-08 11:53:51 -05:00
Andrew Kelley
013c7b24d2
Merge pull request #1874 from ziglang/issue-1866
Fix #1866
2019-01-06 14:00:34 -05:00
Jimmi HC
da08525bb3 Removed oops comments 2019-01-06 18:02:00 +01:00
Jimmi HC
97702988d1 Added test case 2019-01-06 17:58:00 +01:00
Jimmi HC
55e95daf54 Fixed issue where TypeInfo would use types from a prev CodeGen instance
When doing multible codegen passes (such as building
compiler_rt and then something else) the TypeInfo cache code would point
to types from the prev code gen (such as the prev 'bool' type), giving
us errors like "expected type 'bool', but found type 'bool'"
This disabling of caching might have a performance hit, but correctness is better than
speed, so let's have this for now, until someone optimizes this
correctly (probably in stage2)
2019-01-06 17:53:34 +01:00
Jimmi HC
e410b1f915 Implemented buf_read_value_bytes for ZigTypeIdArray
* Only for x_array.special == ConstArraySpecialNone
2019-01-06 17:49:24 +01:00
Jimmi HC
db92891587 Respect the type system instead of ConstExprValue when getting field 2019-01-06 17:48:31 +01:00
Marcio
5f26d1dddb freebsd: fix wrong call to clock_getres (#1871)
Reported-by: daurnimator
2019-01-05 13:34:47 -05:00
vegecode
1f08be4d7f Mark comptime int hardcoded address pointee as a run time variable #1171 (#1868)
* Mark comptime int hardcoded address as a run time variable #1171

* test case for dereferencing hardcoded address intToPtr
2019-01-04 17:34:21 -05:00
Marcio Giaxa
5c2a1055a0 freebsd: add sockaddr structs 2019-01-04 16:31:57 -05:00
Marcio Giaxa
4d9547ff2e freebsd: implement clock related functions
- clock_gettime
 - clock_getres
2019-01-04 16:31:57 -05:00
Marcio Giaxa
1e781a30f6 freebsd: add clock const definitions 2019-01-04 16:31:57 -05:00
vegecode
f6cd68386d @bitreverse intrinsic, part of #767 (#1865)
* bitreverse - give bswap behavior

* bitreverse, comptime_ints, negative values still not working?

* bitreverse working for negative comptime ints

* Finished bitreverse test cases

* Undo exporting a bigint function. @bitreverse test name includes ampersand

* added docs entry for @bitreverse
2019-01-02 16:47:47 -05:00
alexander
6df8e4bca7 Add DIFlagStaticMember flag to functions.
Prevents LLVM from generating debug info for
struct member functions with a pointer as the
first parameter as though the first parameter
were the implicit "this" pointer from C++.
2018-12-30 12:57:49 -05:00
Andrew Kelley
d8b6fa9134
Merge pull request #1859 from mgxm/fbsd2
Progress towards tier 1 support for FreeBSD x86_64
2018-12-29 12:49:23 -05:00
Marcio Giaxa
2e08bd6be4
ci: update freebsd manifest 2018-12-28 15:36:43 -02:00
Marcio Giaxa
4ff23b668a
tests: remove freebsd from the test matrix
- Manually add all the native tests to CI manifest.
2018-12-28 11:38:58 -02:00
Andrew Kelley
c464ecf3bf
Merge pull request #1857 from vegecode/boolean-switch
Switching on bools with duplicate and missing value detection: Issue …
2018-12-27 18:14:33 -05:00
alexander
64061cc1bf Test cases for compiler error and working behavior for switching on booleans 2018-12-27 13:46:32 -06:00
Andrew Kelley
aaef6259c3
allow not having libc include paths and doing @cImport 2018-12-26 20:44:06 -05:00
Marcio Giaxa
c29cae76b0
tests: add FreeBSD to the test matrix 2018-12-26 22:44:13 -02:00
Andrew Kelley
2b7e29f791
Merge branch 'nebulaeonline-nebulaeonline'
Zig gains the UEFI OS target
2018-12-26 15:26:53 -05:00
Andrew Kelley
a918ce26b8
fixups 2018-12-26 15:25:54 -05:00
alexander
4a1f0e1418 Switching on bools with duplicate and missing value detection: Issue 1768 2018-12-26 10:44:25 -06:00
nebulaeonline
f49b45b00f tabs to space fix. thanks visual studio. 2018-12-24 14:01:35 -05:00
Marcio Giaxa
52be7d7404 freebsd: fix flags for opening files
Prior to this fix, the compare-outputs test suite was showing a strange
behavior, the tests always stopped between tests 6-8 and had a stack track
similar to each other.

```
Test 8/68 compare-output multiple files with private function (ReleaseSmall)...OK
/usr/home/mgxm/dev/zig/zig-cache/source.zig:7:2: error: invalid token: '&'
}&(getStdOut() catch unreachable).outStream().stream;
 ^
The following command exited with error code 1:

```

With the wrong O_* flags, the source code was being written in append mode which
resulted in an invalid file

```zig
use @import("foo.zig");
use @import("bar.zig");

pub fn main() void {
	foo_function();
	bar_function();
}&(getStdOut() catch unreachable).outStream().stream;
	stdout.print("OK 2\n") catch unreachable;
}

fn privateFunction() void {
	printText();
}
```
2018-12-24 11:45:55 -02:00
nebulaeonline
28cd337d1f fixed formatting in options display 2018-12-24 07:49:15 -05:00
Marcio Giaxa
de473d4423
freebsd: implement std.os.time.sleep 2018-12-24 10:27:08 -02:00
nebulaeonline
7dcee99510 fixed stricmp/strcasecmp between windows/posix 2018-12-23 23:59:59 -05:00
nebulaeonline
51baea184b Yet another git user error remnant fixed 2018-12-23 23:46:45 -05:00
nebulaeonline
480061d2c9 git user error fix 2018-12-23 23:09:07 -05:00
nebulaeonline
e0af3d7b50 Merge branch 'nebulaeonline' of https://github.com/nebulaeonline/zig into nebulaeonline 2018-12-23 22:56:20 -05:00
nebulaeonline
fdea12b2d9 msvc subsystem option handling; added uefi os type 2018-12-23 22:44:02 -05:00
nebulaeonline
39d32ee40a Altered SUBSYSTEM option handling when linking in msvc mode; Added preliminary UEFI support. 2018-12-23 22:21:32 -05:00
Marcio Giaxa
682815f6e9
freebsd: remove syscall and use libc
Use libc interface for:
 - getdents
 - kill
 - openat
 - setgid
 - setuid
2018-12-23 23:30:31 -02:00
Marcio Giaxa
773bf80133 Merge branch 'master' into fbsd2 2018-12-23 23:21:59 -02:00
Andrew Kelley
280187031a
tests: make type info tests not depend on builtin.Os enum 2018-12-23 18:03:22 -05:00
Andrew Kelley
45081c1e9c
hello world example can use const instead of var 2018-12-23 13:57:37 -05:00