aboutsummaryrefslogtreecommitdiff
path: root/src/ir_print.cpp
AgeCommit message (Collapse)Author
2017-10-03add @setAlignStack builtinAndrew Kelley
2017-09-05add OpaqueType builtinAndrew Kelley
closes #326
2017-08-30successfully cross-building behavior tests for windowsAndrew Kelley
2017-08-29more alignment improvementsAndrew Kelley
* add alignment capability for fn protos * add @alignCast * fix some ast rendering code * fix some ir rendering code * add error for pointer cast increasing alignment * update allocators in std to correctly align See #37
2017-08-29introduce align keywordAndrew Kelley
* remove `@setGlobalAlign` * add align keyword for setting alignment on functions and variables. * loads and stores use alignment from pointer * memcpy, memset use alignment from pointer * add syntax for pointer alignment * slices can have volatile * add u2, i2 primitives * ignore preferred align and use abi align everywhere * back to only having alignOf builtin. preferredAlignOf is too tricky to be useful. See #432. Partial revert of e726925e802eddab53cbfd9aacbc5eefe95c356f. See #37
2017-08-26remove @alignOf and add @cAbiAlignOf and @preferredAlignOfAndrew Kelley
See #396
2017-08-19add setEvalBranchQuota builtin functionAndrew Kelley
2017-08-09more intuitive left shift and right shift operatorsAndrew Kelley
Before: * << is left shift, not allowed to shift 1 bits out * <<% is left shift, allowed to shift 1 bits out * >> is right shift, allowed to shift 1 bits out After: * << is left shift, allowed to shift 1 bits out * >> is right shift, allowed to shift 1 bits out * @shlExact is left shift, not allowed to shift 1 bits out * @shrExact is right shift, not allowed to shift 1 bits out Closes #413
2017-08-06fix segfault when var args fn proto shows up in ir printingAndrew Kelley
2017-06-14partial implementation of printing floating point numbers with errol3Andrew Kelley
also add bitCast builtin function. closes #387
2017-05-23building with mingw for windowsAndrew Kelley
2017-05-20add setFloatMode builtin and std.math.floorAndrew Kelley
* skip installing std/rand_test.zig as it's not needed beyond running the std lib tests * add std.math.floor function * add setFloatMode builtin function to choose between builtin.FloatMode.Optimized (default) and builtin.FloatMode.Strict (Optimized is equivalent to -ffast-math in gcc)
2017-05-17typeId builtin instead of isInteger, isFloat, etcAndrew Kelley
closes #373
2017-05-09inline function call with builtin function instead...Andrew Kelley
...of special syntax. partially reverts 41144a8566a6fbd779403f6b69424bb640c94a7f closes #306
2017-05-07delete @generatedCode builtin functionAndrew Kelley
good riddance
2017-05-07detect duplicate switch value even when else prong presentAndrew Kelley
closes #43
2017-05-06builtin functions for division and remainder divisionAndrew Kelley
* add `@divTrunc` and `@divFloor` functions * add `@rem` and `@mod` functions * add compile error for `/` and `%` with signed integers * add `.bit_count` for float primitive types closes #217
2017-05-01`@import("builtin")` instead of `@compileVar`Andrew Kelley
See #226 Closes #220
2017-04-23blocks check that their statements are voidJosh Wolfe
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-23make undefined as a constant value lazyAndrew Kelley
closes #268
2017-04-22slicing now returns correct const-nessAndrew Kelley
also remove the ability to override constness when slicing closes #334
2017-04-20Add @offsetOf builtin functionRaul Leal
2017-04-18add `@fieldParentPtr` builtin functionAndrew Kelley
closes #320
2017-04-18rename `@intType` to `@IntType` to follow conventionAndrew Kelley
closes #327
2017-04-13ability to inline at function callsiteAndrew Kelley
closes #306
2017-04-08add enumTagName builtin functionAndrew Kelley
closes #299
2017-04-03delete alloca builtin functionAndrew Kelley
See #225 introduce os.EnvMap
2017-04-02zig build system progressAndrew Kelley
* In-progress os.ChildProcess.spawn implementation. See #204 * Add explicit cast from integer to error. Closes #294 * fix casting from error to integer * fix compiler crash when initializing variable to undefined with no type
2017-03-31change `@bitcast` to `@ptrcast`Andrew Kelley
See #290
2017-03-31first pass at zig build systemAndrew Kelley
* `zig build --export [obj|lib|exe]` changed to `zig build_obj`, `zig build_lib` and `zig build_exe` respectively. * `--name` parameter is optional when it can be inferred from the root source filename. closes #207 * `zig build` now looks for `build.zig` which interacts with `std.build.Builder` to describe the targets, and then the zig build system prints TODO: build these targets. See #204 * add `@bitcast` which is mainly used for pointer reinterpret casting and make explicit casting not do pointer reinterpretation. Closes #290 * fix debug info for byval parameters * sort command line help options * `std.debug.panic` supports format string printing * add `std.mem.IncrementingAllocator` * fix const ptr to a variable with data changing at runtime. closes #289
2017-03-26add stack protector safety when linking libcAndrew Kelley
* introduce zigrt file. it contains only weak symbols so that multiple instances can be merged. it contains __zig_panic so that multiple .o files can call the same panic function. * remove `@setFnVisible` builtin and add @setGlobalLinkage builtin which is more powerful * add `@panic` builtin function. * fix collision of symbols with extern prototypes and internal function names * add stack protector safety when linking against libc. To add the safety mechanism without libc requires implementing Thread Local Storage. See #276
2017-03-26add debug safety checks for remainder divisionAndrew Kelley
See #217
2017-03-18lazy analysis of top level declarationsAndrew Kelley
previously, we had lazy analysis of top level declarations, but if a declaration was referenced within a compile-time if or switch statement, that would still add the top level declaration to the resolution queue. now we have a declref ir instruction, which is only resolved if we analyze the instruction. this takes into account comptime branching. closes #270
2017-03-16introduce new test syntaxAndrew Kelley
* remove setFnTest builtin * add test "name" { ... } syntax * remove --check-unused argument. functions are always lazy now.
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-05setGlobalSection and setGlobalAlign work for functionsAndrew Kelley
2017-02-04remove volatileStore builtin; add volatile pointersAndrew Kelley
closes #238
2017-02-04ability to set global variable alignment and ...Andrew Kelley
..section in the initialization expression
2017-02-03add volatileStore() builtin functionAndrew Kelley
See #238 We can revisit how volatile will work later - for now here's a builtin function to do it.
2017-02-03add setGlobalAlign and setGlobalSection builtin functionsAndrew Kelley
closes #241
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-22remove staticEval builtin in favor of comptime expressionAndrew Kelley
2017-01-12IR: implement macro for function aliasing function pointerAndrew Kelley
2017-01-10IR: implement error for missing or extra switch prongsAndrew Kelley
2017-01-08pass unnecessary if statement testAndrew Kelley
2017-01-05containers created during eval get names for parametersAndrew Kelley
2016-12-26IR: pass intToEnum testAndrew Kelley
2016-12-26IR: pass cStringConcatenation testAndrew Kelley
2016-12-26IR: pass intToPtrCast testAndrew Kelley
2016-12-26IR: pass enumToInt testAndrew Kelley