aboutsummaryrefslogtreecommitdiff
path: root/std/debug.zig
AgeCommit message (Collapse)Author
2017-02-09lots of miscellaneous things all in one big commitAndrew Kelley
* add `@compileLog(...)` builtin function - Helps debug code running at compile time - See #240 * fix crash when there is an error on the start value of a slice * add implicit cast from int and float types to int and float literals if the value is known at compile time * make array concatenation work with slices in addition to arrays and c string literals * fix compile error message for something not having field access * fix crash when `@setDebugSafety()` was called from a function being evaluated at compile-time * fix compile-time evaluation of overflow math builtins. * avoid debug safety panic handler in builtin.o and compiler_rt.o since we use no debug safety in these modules anyway * add compiler_rt functions for division on ARM - Closes #254 * move default panic handler to std.debug so users can call it manually * std.io.printf supports a width in the format specifier
2017-02-06improved behavior on debug safety crashAndrew Kelley
* instead of emitting a breakpoint for a debug safety crash, zig calls a panic function which prints an error message and a stack trace and then calls abort. * on freestanding OS, this panic function has a default implementation of a simple infinite loop. * users can override the panic implementation by providing `pub fn panic(message: []const u8) -> unreachable { }` * workaround for LLVM segfaulting when you try to use cold calling convention on ARM. closes #245
2017-02-02add try expressionAndrew Kelley
See #83
2017-01-24printf var args proof of conceptAndrew Kelley
See #167 Need to troubleshoot when we send 2 slices to printf. It goes into an infinite loop. This commit introduces 4 builtin functions: * `@isInteger` * `@isFloat` * `@canImplictCast` * `@typeName`
2017-01-23mem.free no longer requires explicit type argumentAndrew Kelley
2017-01-22use comptime instead of inline for var and paramsAndrew Kelley
See #221
2017-01-16implement error when assigning to field of const structAndrew Kelley
closes #48
2016-12-31IR: progress toward compiling standard libraryAndrew Kelley
* comptime fn call * is_comptime doesn't count as an instruction dependency * update more std code to latest zig
2016-12-21update more std library to new zigAndrew Kelley
2016-12-18IR: add FnProto instructionAndrew Kelley
2016-09-23stack trace is able to figure out compilation unitAndrew Kelley
each address is contained within also fix a bug having to do with codegen for enum value initialization expressions
2016-09-21fix incorrect linking from previous commitAndrew Kelley
2016-09-20fix error when switch prong has implicit castAndrew Kelley
closes #194
2016-09-14MacOSX compatibilityalter
- 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-13change `unreachable{}` to `@unreachable()`Andrew Kelley
instead of a container init expression, it's a builtin function call.
2016-09-08ability to infer parameter typesAndrew Kelley
2016-08-31fix std io input to work for non seekable fdsAndrew Kelley
2016-08-29implement null as a literal typeAndrew Kelley
2016-08-29std: more progress toward stack printingAndrew Kelley
2016-08-17progress toward stack trace printingAndrew Kelley
2016-08-16std: replace print_u64/i64 with printIntAndrew Kelley
2016-08-16std: conform to style guidelinesAndrew Kelley
2016-08-11add CBuf to standard libraryAndrew Kelley
and fix ability to take address of variables from other namespaces
2016-05-17add beginning of print stack trace functionAndrew Kelley
introduce std.debug and move std.assert to std.debug.assert add mem.copy