aboutsummaryrefslogtreecommitdiff
path: root/src/all_types.hpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2017-02-09 02:50:03 -0500
committerAndrew Kelley <superjoe30@gmail.com>2017-02-09 03:09:25 -0500
commitfc100d7b3b27bd514dca4e02c160e5b96d4da648 (patch)
treeb365fbdf02c7a35d81d9037a15e1e3917a6e77de /src/all_types.hpp
parent8a859afd580f438f549ee69a3e3487eb5d119fad (diff)
downloadzig-fc100d7b3b27bd514dca4e02c160e5b96d4da648.tar.gz
zig-fc100d7b3b27bd514dca4e02c160e5b96d4da648.zip
lots of miscellaneous things all in one big commit
* 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
Diffstat (limited to 'src/all_types.hpp')
-rw-r--r--src/all_types.hpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/all_types.hpp b/src/all_types.hpp
index bbd8df4b70..1e2ff3aaa4 100644
--- a/src/all_types.hpp
+++ b/src/all_types.hpp
@@ -1096,6 +1096,7 @@ enum BuiltinFnId {
BuiltinFnIdCUndef,
BuiltinFnIdCompileVar,
BuiltinFnIdCompileErr,
+ BuiltinFnIdCompileLog,
BuiltinFnIdGeneratedCode,
BuiltinFnIdCtz,
BuiltinFnIdClz,
@@ -1541,6 +1542,7 @@ enum IrInstructionId {
IrInstructionIdMinValue,
IrInstructionIdMaxValue,
IrInstructionIdCompileErr,
+ IrInstructionIdCompileLog,
IrInstructionIdErrName,
IrInstructionIdEmbedFile,
IrInstructionIdCmpxchg,
@@ -1993,6 +1995,13 @@ struct IrInstructionCompileErr {
IrInstruction *msg;
};
+struct IrInstructionCompileLog {
+ IrInstruction base;
+
+ size_t msg_count;
+ IrInstruction **msg_list;
+};
+
struct IrInstructionErrName {
IrInstruction base;