aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/global.h
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2012-06-27 17:03:54 +0200
committerBjörn-Egil Dahlberg <[email protected]>2015-03-12 17:16:05 +0100
commit8d3dba44bc2ac5ff9e724e90aa832854280b7d1e (patch)
tree7c5d414977da3901064e6de018f5420ca54bb9b9 /erts/emulator/beam/global.h
parent6d521dae843ee098e823e1c4a3bb2e426409dcea (diff)
downloadotp-8d3dba44bc2ac5ff9e724e90aa832854280b7d1e.tar.gz
otp-8d3dba44bc2ac5ff9e724e90aa832854280b7d1e.tar.bz2
otp-8d3dba44bc2ac5ff9e724e90aa832854280b7d1e.zip
Initial Persistent HAMT - Map framework
Conflicts: erts/emulator/Makefile.in erts/emulator/beam/bif.tab erts/emulator/beam/erl_gc.c erts/emulator/beam/erl_gc.h erts/emulator/beam/erl_printf_term.c erts/emulator/beam/erl_term.c erts/emulator/beam/erl_term.h
Diffstat (limited to 'erts/emulator/beam/global.h')
-rw-r--r--erts/emulator/beam/global.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/erts/emulator/beam/global.h b/erts/emulator/beam/global.h
index 5330f389e0..1fb069232a 100644
--- a/erts/emulator/beam/global.h
+++ b/erts/emulator/beam/global.h
@@ -539,6 +539,12 @@ do { \
} \
} while(0)
+#define WSTACK_DEBUG(s) \
+ do { \
+ fprintf(stderr, "wstack size = %ld\r\n", s.wsp - s.wstart); \
+ fprintf(stderr, "wstack wstart = %p\r\n", s.wstart); \
+ fprintf(stderr, "wstack wsp = %p\r\n", s.wsp); \
+ } while(0)
/*
* Do not free the stack after this, it may have pointers into what
@@ -581,7 +587,7 @@ do { \
ASSERT(s.wsp <= s.wend); \
} while (0)
-#define WSTACK_IS_STATIC(s) (s.wstart == WSTK_DEF_STACK(s)))
+#define WSTACK_IS_STATIC(s) (s.wstart == WSTK_DEF_STACK(s))
#define WSTACK_PUSH(s, x) \
do { \
@@ -648,7 +654,7 @@ do { \
#define WSTACK_COUNT(s) (s.wsp - s.wstart)
#define WSTACK_ISEMPTY(s) (s.wsp == s.wstart)
-#define WSTACK_POP(s) (*(--s.wsp))
+#define WSTACK_POP(s) ((ASSERT(s.wsp > s.wstart)),*(--s.wsp))
/* binary.c */