Commit Graph

57 Commits

Author SHA1 Message Date
Andrew Kelley
d9dd50d74c fix not propagating parseh aliases through pub use decls 2017-08-20 04:03:36 -04:00
Andrew Kelley
7f0620a20f partial implementation of printing floating point numbers with errol3
also add bitCast builtin function. closes #387
2017-06-14 00:24:25 -04:00
Andrew Kelley
051ee8e626 change slicing syntax from ... to ..
See #359
2017-05-19 10:39:59 -04:00
Andrew Kelley
b483db4868 typeId builtin instead of isInteger, isFloat, etc
closes #373
2017-05-17 12:26:35 -04:00
Andrew Kelley
99f077baf9 zig build: allow calling b.standardReleaseOptions...
...multiple times. See #368
2017-05-09 21:20:09 -04:00
Andrew Kelley
5c094d7390 std: rename List to ArrayList and re-organize...
...the exports of std.

closes #356
2017-05-04 14:05:06 -04:00
Andrew Kelley
644ea2dde9 remove test and try expressions in favor of if expressions
See #357
2017-05-03 17:23:11 -04:00
Andrew Kelley
6756c27ca4 zig build: cache_root is relative to build_root 2017-05-03 16:13:57 -04:00
Andrew Kelley
cceaa73ff2 zig build: inherit stdin for running commands 2017-05-03 11:27:42 -04:00
Andrew Kelley
f87be94f6a zig build: copy args for addCommand
avoids making it easy to accidentally use a dangling pointer
2017-05-02 18:22:08 -04:00
Andrew Kelley
24a9a42966 add safe release build mode
closes #288
2017-05-02 17:34:21 -04:00
Andrew Kelley
3cbd0065fa basic support for specifying packages at the command line
See #226
2017-05-01 16:35:10 -04:00
Andrew Kelley
17b935325e @import("builtin") instead of @compileVar
See #226
Closes #220
2017-05-01 13:12:38 -04:00
Andrew Kelley
c5dd536845 zig build: support install for zig artifacts
also make os.copyFile atomic

closes #332
2017-04-30 22:09:44 -04:00
Andrew Kelley
943dbe5b50 zig build: improved API for installing C build artifacts
see #332
2017-04-30 21:03:23 -04:00
Andrew Kelley
97f6b6093c zig build can build and install static C libraries
See #332
2017-04-30 20:29:33 -04:00
Andrew Kelley
2c6827064c fix regression from previous commit 2017-04-30 20:11:35 -04:00
Andrew Kelley
1ec89b0286 zig build: refactor CLibrary and CExecutable into same struct 2017-04-30 19:48:45 -04:00
Andrew Kelley
363d9038c9 zig build: organize build artifacts
closes #328
2017-04-30 18:56:24 -04:00
Andrew Kelley
38a04a267c zig build: when compiling C files put .o files in cache dir
See #328
2017-04-30 13:01:35 -04:00
Andrew Kelley
d04d3ec775 build system: remove setLinkerScriptContents 2017-04-28 10:46:01 -04:00
Andrew Kelley
a147f06585 zig puts temporary object files in zig-cache folder
See #298
2017-04-28 02:22:12 -04:00
Andrew Kelley
2e512a0e6e add compile error for returning local variable address
closes #344
2017-04-27 19:40:35 -04:00
Andrew Kelley
7b0542d08b build system: consolidate duplicate code and more
* add ability to add assembly files when building an exe, obj, or lib
 * add implicit cast from `[N]T` to `?[]const T` (closes #343)
 * remove link_exe and link_lib in favor of allowing build_exe and
   build_lib support no root zig source file
2017-04-26 19:17:05 -04:00
Andrew Kelley
09bc4d6ba3 build system: addAssembly and addObject functions
for building executables
2017-04-26 12:56:10 -04:00
Josh Wolfe
c6605cba83 blocks check that their statements are void
closes #291

This changes the error message "return value ignored" to "expression value is ignored".
This is because this error also applies to {1;}, which has no function calls.

Also fix ignored expression values in std and test.
This caught a bug in debug.readAllocBytes where an early Eof error would have been missed.
See #219.
2017-04-23 21:15:15 -07:00
Andrew Kelley
f9fa768dca zig build system: installFile and installClibrary
See #332
2017-04-23 11:09:26 -04:00
Andrew Kelley
0cce115476 update syntax for try and nullable unwrapping
closes #285
2017-04-21 16:46:33 -04:00
Andrew Kelley
ecb71d1dd3 add example which exercises addObject in the zig build system
closes #329
2017-04-21 02:26:48 -04:00
Andrew Kelley
fb492d19eb zig build system supports building a library
See #329

Supporting work:
 * move std.cstr.Buffer0 to std.buffer.Buffer
 * add build.zig to example/shared_library/ and add an automated test
   for it
 * add std.list.List.resizeDown
 * improve std.os.makePath
   - no longer recursive
   - takes into account . and ..
 * add std.os.path.isAbsolute
 * add std.os.path.resolve
 * reimplement std.os.path.dirname
   - no longer requires an allocator
   - handles edge cases correctly
2017-04-21 01:56:12 -04:00
Andrew Kelley
8654bc1810 delete test_artifacts directory when tests complete
* add std.os.deleteTree
 * add std.os.deleteDir
 * add std.os.page_size
 * add std.os API for iterating over directories
 * refactor duplication in build.zig
 * update documentation on how to run tests
2017-04-20 02:26:36 -04:00
Andrew Kelley
d12f1f5b49 test framework supports name prefix and filter argument
rename self hosted tests to behavior tests
2017-04-19 15:38:12 -04:00
Andrew Kelley
d1e01e43d3 convert assemble and link tests to zig build system 2017-04-19 14:00:12 -04:00
Andrew Kelley
37b9a2e6a4 convert compare-output tests to use zig build system 2017-04-19 01:15:20 -04:00
Andrew Kelley
a791417552 add @fieldParentPtr builtin function
closes #320
2017-04-18 02:28:05 -04:00
Andrew Kelley
216e14891e zig build system creates symlinks atomically
* add std.base64
 * add std.os.rename
 * add std.os.atomicSymLink
2017-04-17 19:08:41 -04:00
Andrew Kelley
05b3082121 zig build system: progress toward install and uninstall
also:
 * add std.os.path.join
 * add std.os.deleteFile
2017-04-17 06:47:20 -04:00
Andrew Kelley
e4ec2d10c6 zig build system: implement custom command step 2017-04-17 06:47:20 -04:00
Andrew Kelley
47336abae3 improvements to zig build system and unwrap error safety
* zig build system: create standard dynamic library sym links
 * unwrapping an error results in a panic message that contains
   the error name
 * rename error.SysResources to error.SystemResources
 * add std.os.symLink
 * add std.os.deleteFile
2017-04-17 06:47:20 -04:00
Andrew Kelley
d16ce67106 zig build system: ability to link against dynamic library step 2017-04-17 06:47:20 -04:00
Andrew Kelley
5fdefe58e4 zig build system understands the concept of dependencies
See #204
2017-04-13 17:21:00 -04:00
Andrew Kelley
095591f0b0 add enumTagName builtin function
closes #299
2017-04-08 17:45:22 -04:00
Andrew Kelley
7611ed3484 allow implicit cast from [N]T to &const []const T
closes #296
2017-04-07 17:56:01 -04:00
Andrew Kelley
273cebdf4d peer resolve types [N]T, [M]T as []const T
closes #125
2017-04-06 18:07:38 -04:00
Andrew Kelley
10dbc735fe zig build: use -D for options instead of -O
because -O is usually optimization level
2017-04-06 13:59:11 -04:00
Andrew Kelley
6fbe1632d0 Update zig build system to support user defined options
* Fix assertion failure when switching on type.
   Closes #310
 * Update zig build system to support user defined options.
   See #204
 * fmt.format supports {sNNN} to set padding for a buffer arg.
 * add std.fmt.bufPrint and std.fmt.allocPrint
 * std.hash_map.HashMap.put returns the previous value
 * add std.mem.startsWith
2017-04-06 05:34:04 -04:00
Andrew Kelley
9c803af044 zig build system: fix cleanup on error, report spawn error 2017-04-04 06:47:42 -04:00
Andrew Kelley
1c6000d047 zig build system improvements, add some std API
* add std.buf_map.BufMap
 * add std.buf_set.BufSet
 * add std.mem.split
 * zig build system improvements (See #204)
   - automatically parses NIX_CFLAGS_COMPILE and NIX_LDFLAGS
   - add builder.addCIncludePath
   - add builder.addRPath
   - add builder.addLibPath
   - add exe.linkLibrary
2017-04-04 01:52:20 -04:00
Andrew Kelley
72fb2443e0 API for command line args
closes #300
2017-04-04 00:17:24 -04:00
Andrew Kelley
c9ae30d27e delete alloca builtin function
See #225

introduce os.EnvMap
2017-04-03 18:11:57 -04:00