Andrew Kelley
183976b242
add this keyword refers to thing in immediate scope
...
See #169
2016-09-26 23:47:30 -04:00
Andrew Kelley
f4d7c91363
std/rand: remove unneeded TODO
2016-09-26 22:42:25 -04:00
Andrew Kelley
87b7c28c9a
cstr.len and cstr.cmp can run at compile time
...
closes #140
2016-09-26 22:33:33 -04:00
Andrew Kelley
7ce7e2c9d1
emit error for extern function
...
with byvalue return value or parameter.
currently we don't codegen byvalue parameters or return values
correctly for C compatibilty functions so instead of generating
incorrect code, we emit a compile error.
eventually we'll support this feature and remove the compile error.
See #180
2016-09-26 20:01:42 -04:00
Andrew Kelley
46eb77dbb2
stack trace is able to figure out compilation unit
...
each address is contained within
also fix a bug having to do with codegen for enum value
initialization expressions
2016-09-23 02:00:23 -04:00
Andrew Kelley
7aeca9bfed
fix incorrect linking from previous commit
2016-09-21 17:40:50 -04:00
Andrew Kelley
b97bfc3ecb
fix error when switch prong has implicit cast
...
closes #194
2016-09-20 16:10:34 -04:00
Andrew Kelley
3239b3cb69
use size_t for indexes
...
protect against incorrect copies in debug mode
2016-09-19 11:54:01 -04:00
Andrew Kelley
f1761632da
darwin compat fixups
...
- delete commented out code
- delete redundant check for missing
mmacosx-version-min/maxdir
- add TODO comment in std library
- rename 'os' to 'self' in io.zig
- `openSelfExe` aborts on darwin instead of compile error
- only allow warnings on the one parseh test that has
`#include <stdint.h>`.
2016-09-14 02:47:16 -04:00
alter
cf9b21c09f
MacOSX compatibility
...
- Implemented some syscall for MacOSX
- tested on : El Capitan 10.11 x86_64
- make self hosted test run on macosx
- modified run_test so it does not fail when parseh throws
warnings (most of them are related to buildin types from
gcc that arent defined in header files and unions)
- making -mmacosx-version-min and -mios-version-min works like
gcc (command line paramers have precedence over enviroment variables)
2016-09-14 02:46:02 -04:00
Andrew Kelley
06f2f4d64b
change unreachable{}
to @unreachable()
...
instead of a container init expression, it's a builtin
function call.
2016-09-13 16:46:27 -04:00
Andrew Kelley
ea2f6594ce
std: fix compile error for unsupported os
2016-09-13 15:36:30 -04:00
Andrew Kelley
9e92dbdd08
std: use parameter type inference on min and max functions
2016-09-10 20:53:57 -04:00
Andrew Kelley
fc9ff13fb6
std: avoid calling close twice in InStream
...
thanks ofelas for pointing this out
2016-09-08 14:21:42 -04:00
Andrew Kelley
d324b1befa
ability to infer parameter types
2016-09-08 00:24:48 -04:00
Andrew Kelley
cfaced3f73
rename errName builtin to errorName
2016-09-05 17:03:11 -04:00
Andrew Kelley
768a9780ca
rename compileErr builtin to compileError
2016-09-05 17:01:54 -04:00
Andrew Kelley
320e26590a
fix std io input to work for non seekable fds
2016-08-31 20:23:47 -07:00
Andrew Kelley
651dc31247
implement null as a literal type
2016-08-29 22:14:09 -07:00
Andrew Kelley
6149f73189
std: more progress toward stack printing
2016-08-29 22:13:59 -07:00
Andrew Kelley
ed50bd1b65
progress toward stack trace printing
2016-08-17 20:11:04 -07:00
Andrew Kelley
a2ac06dcd5
std: replace print_u64/i64 with printInt
2016-08-16 22:59:32 -07:00
Andrew Kelley
37d167f6e0
std: conform to style guidelines
2016-08-16 22:42:50 -07:00
Andrew Kelley
0ae9023832
add CBuf to standard library
...
and fix ability to take address of variables
from other namespaces
2016-08-11 22:25:13 -07:00
Andrew Kelley
0d5ecc4312
ability to have a return type of 'type'
2016-08-07 20:08:37 -07:00
Andrew Kelley
0450b73e3e
std: add tests for mt32 and mt64
2016-07-28 20:14:57 -07:00
Andrew Kelley
711e3d71b9
std: add vaporware plans for floating point builtins
2016-07-27 23:46:20 -07:00
Andrew Kelley
1fa0cabf9d
remove multiline comments
...
closes #161
2016-07-27 23:26:12 -07:00
Andrew Kelley
8552d7fd19
explicit wrapping integer operations
...
instead of wrapping integer types
closes #159
2016-07-27 23:08:27 -07:00
Andrew Kelley
3eb5afd245
std: cleanup of rand
2016-07-27 19:52:38 -07:00
Andrew Kelley
06c4b35eb1
std: improve rand implementation and API
2016-07-26 23:51:58 -07:00
Andrew Kelley
bc81ddfea6
unsigned integers for sizes of things
...
Closes #62 .
2016-07-26 20:40:11 -07:00
Andrew Kelley
76f87cdd96
std: add OutStream.write_byte
2016-07-26 18:13:22 -07:00
Andrew Kelley
78d4fb20c4
inline parameters
...
This replaces the current generic syntax for functions and replaces
it with the concept of inline parameters.
This paves the way for the "all structs anonymous" proposal.
Closes #151 .
2016-07-25 22:55:15 -07:00
Andrew Kelley
b08bc84a36
don't add no-frame-pointer-elim for inline functions
...
and make syscall functions inline
this gets the tests all passing on i386
2016-05-18 18:30:03 -07:00
Andrew Kelley
3273e99d70
linux: accept calls accept4 with 0 for flags
2016-05-18 17:18:28 -07:00
Andrew Kelley
7edef4f3fd
add beginning of print stack trace function
...
introduce std.debug and move std.assert to std.debug.assert
add mem.copy
2016-05-17 13:32:43 -07:00
Andrew Kelley
3df9389215
compiler-rt: add __aeabi_uldivmod
2016-05-15 12:02:37 -07:00
Travis McDemus
7b0052abbb
Add unsigned and signed generic print fns
...
Signed-off-by: Andrew Kelley <superjoe30@gmail.com>
2016-05-15 01:41:15 -07:00
Andrew Kelley
6ae6b5f5b5
add compile_err builtin
2016-05-14 18:54:37 -07:00
Andrew Kelley
76f909edeb
std: take advantage of ability to cast maybe pointer to isize
2016-05-14 12:38:27 -07:00
Andrew Kelley
6a7f3c8df7
std: make parsing an unsigned number generic
2016-05-13 11:11:55 -07:00
Andrew Kelley
5d2f86116f
std: fix linux.get_errno
2016-05-13 09:54:56 -07:00
Andrew Kelley
8e3ab28be9
ability to cast maybe pointer to isize/usize
...
also ability to put noalias on maybe pointer
2016-05-13 09:54:56 -07:00
Andrew Kelley
26718a619c
recognize ar program and pass --gc-sections to ld
...
See #54
2016-05-11 14:44:10 -07:00
Andrew Kelley
6b7ffd4cbe
builtin: use explicit type instead of typeof function
2016-05-11 13:18:28 -07:00
Andrew Kelley
22888ca524
some work in progress networking code
...
also, casting to or from a u8 slice makes a function impure
2016-05-10 15:00:59 -07:00
Andrew Kelley
d92ae20f45
add hashmap to standard library
...
closes #22
2016-05-09 15:07:38 -07:00
Andrew Kelley
f1e5be9686
fix ability to use previous generic params and
...
add error when `%return` shows up in a function with incorrect
return type
2016-05-09 13:44:29 -07:00
Andrew Kelley
56908dcb9d
add debug safety for shortening casts
...
closes #150
2016-05-09 08:44:41 -07:00