Commit Graph

30 Commits (76d0e49e612d661b57b795cd81f5ba06dc26ceca)

Author SHA1 Message Date
Andrew Kelley 0f047337ac IR: fix `this` expression
Previously it returned a block instead of a function when
a function had any arguments.
2016-12-17 20:47:35 -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 768a9780ca rename compileErr builtin to compileError 2016-09-05 17:01:54 -04:00
Andrew Kelley 37d167f6e0 std: conform to style guidelines 2016-08-16 22:42:50 -07:00
Andrew Kelley bc81ddfea6 unsigned integers for sizes of things
Closes #62.
2016-07-26 20:40:11 -07:00
Andrew Kelley 6ae6b5f5b5 add compile_err builtin 2016-05-14 18:54:37 -07:00
Andrew Kelley 01c46eef3a std: separate str and cstr 2016-05-07 10:52:52 -07:00
Andrew Kelley f4c7e1bf49 rearrange standard library a bit 2016-04-18 16:42:56 -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
Andrew Kelley 77ffb5075b update bootstrap to work for macos too
* Directives can have arbitrary expressions as parameters
 * Fix switch statement not generating code sometimes
 * Rename "main" fn in bootstrap.zig to "zig_user_main" to
   avoid name collisions
 * codegen: fix badref when unreachable is last thing in an
   expression
 * support #condition directive on exported functions
2016-02-16 16:41:56 -07:00
Andrew Kelley 592210a173 i386 support
closes #115

Thanks to Seo Sanghyeon for the port code.
2016-02-12 02:04:46 -07:00
Andrew Kelley 4339d55562 update for loop syntax
it matches more closely the %% binary operator syntax

See #51
2016-02-05 17:15:19 -07:00
Andrew Kelley 4e43973413 variable initializations are now mandatory
use `undefined` if you want uninitialized memory
2016-01-25 23:56:46 -07:00
Andrew Kelley 50854226a6 syntax: back to -> for return type, no more => 2016-01-25 17:08:18 -07:00
Andrew Kelley deb3586884 implement %% prefix operator
See #23

also make undefined constants use llvm undef value
2016-01-25 15:45:05 -07:00
Andrew Kelley e85e7ebcf0 bootstrap: use %% operator instead of cast 2016-01-25 14:13:25 -07:00
Andrew Kelley c0ea9290c4 main returns %void 2016-01-23 02:14:01 -07:00
Andrew Kelley ae2151a751 use signed integer for sizes of things 2016-01-18 21:13:14 -07:00
Andrew Kelley 32821e7098 add function pointer support
See #14
2016-01-18 16:42:45 -07:00
Andrew Kelley fbbef14013 add for loop which can iterate over arrays
See #51
2016-01-18 07:00:45 -07:00
Andrew Kelley 5f7685336f better main symbol prototype
closes #64
2016-01-16 00:07:34 -07:00
Andrew Kelley dc162c7f83 rename "use" to "import" 2016-01-15 18:45:52 -07:00
Andrew Kelley b28b7f63d1 all types are now expressions
See #22
2016-01-13 18:15:51 -07:00
Andrew Kelley 5f0bfcac24 fix undefined reference to memcpy in release mode
when not depending on libc, we generate memcpy and memset
implementations.
2016-01-06 06:40:25 -07:00
Andrew Kelley 44d5d008d0 partial import segregation
See #3
2016-01-04 03:31:57 -07:00
Andrew Kelley 9ce36ba0cc inline assembly uses -> instead of return 2015-12-23 15:49:34 -07:00
Andrew Kelley 1f48b626a1 std: even more efficient inline assembly 2015-12-15 02:47:39 -07:00
Andrew Kelley 0dbee2300e add inline assembly support 2015-12-10 15:34:38 -07:00