Commit Graph

31 Commits (32d8686da80d282e8cd6d84a0e5c331d269a1f69)

Author SHA1 Message Date
Andrew Kelley 1826a96160 update charToDigit to take advantage of switch syntax 2017-01-23 01:19:03 -05:00
Andrew Kelley 47cf8520ad use comptime instead of inline for var and params
See #221
2017-01-22 19:51:37 -05:00
Andrew Kelley 69132bdeda IR: progress toward compiling standard library
* comptime fn call
 * is_comptime doesn't count as an instruction dependency
 * update more std code to latest zig
2016-12-31 17:10:29 -05:00
Andrew Kelley 37b13bf151 hello.zig working with all structs anonymous 2016-12-18 17:24:52 -05:00
Andrew Kelley 0d2f2b79ea IR: basic support for implicit casting to const pointer 2016-12-18 01:54:27 -05:00
Andrew Kelley 05b3b6a45e IR: update some std code to newest zig 2016-12-18 00:25:26 -05:00
Andrew Kelley c64f9991d5 IR: fix switching on enum 2016-12-17 17:48:07 -05:00
Andrew Kelley b581da41f8 remove compiler directives
* add `setFnTest`, `setFnVisible`, `setFnStaticEval`,
   `setFnNoInline` builtin functions to replace previous
   directive functionality
 * add `coldcc` and `nakedcc` as keywords which can be used as part
   of a function prototype.
 * `setDebugSafety` builtin can be used to set debug safety features
   at a per block scope level.
 * closes #169
2016-09-28 02:33:32 -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 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 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 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 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 8552d7fd19 explicit wrapping integer operations
instead of wrapping integer types

closes #159
2016-07-27 23:08:27 -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
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 6a7f3c8df7 std: make parsing an unsigned number generic 2016-05-13 11:11:55 -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 9e905ab364 not-yet-working implementation of generic hash map 2016-05-08 16:05:41 -07:00
Andrew Kelley f4c7e1bf49 rearrange standard library a bit 2016-04-18 16:42:56 -07:00
Andrew Kelley 5dbc21b511 update cat example, refactor std
partial implementation of @err_name
2016-04-08 16:21:30 -07:00
Andrew Kelley 9c3d7b628c rename syscall.zig to linux.zig 2016-03-01 14:11:38 -07:00
Andrew Kelley f1d338194e rewrite how importing works
* Introduce the concept of packages. Closes #3
 * Add support for error notes.
 * Introduce `@import` and `@c_import` builtin functions and
   remove the `import` and `c_import` top level declarations.
 * Introduce the `use` top level declaration.
 * Add `--check-unused` parameter to perform semantic
   analysis and codegen on all top level declarations, not
   just exported ones and ones referenced by exported ones.
 * Delete the root export node and add `--library` argument.
2016-03-01 03:13:40 -07:00