aboutsummaryrefslogtreecommitdiff
path: root/builtins
diff options
context:
space:
mode:
Diffstat (limited to 'builtins')
-rw-r--r--builtins/macros.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/builtins/macros.h b/builtins/macros.h
index 7c40acc2..4fbaa5f5 100644
--- a/builtins/macros.h
+++ b/builtins/macros.h
@@ -6,5 +6,6 @@
#include <string.h>
#define heap(x) (__typeof(x)*)memcpy(GC_MALLOC(sizeof(x)), (__typeof(x)[1]){x}, sizeof(x))
+#define stack(x) (__typeof(x)*)((__typeof(x)[1]){x})
#define tagged(obj_expr, type_name, tag_name) ({ __typeof(obj_expr) obj = obj_expr; \
obj.$tag == $tag$##type_name##$##tag_name ? &obj.tag_name : NULL; })