aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/hipe/hipe_stack.h
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2016-10-04 12:26:54 +0200
committerSverker Eriksson <[email protected]>2016-10-10 11:31:54 +0200
commit9cb85a8cd1e02263f34c57aac68d16a2f1c03180 (patch)
treec93cab8f8529090e8d66d6317cea9bdf15a6b16a /erts/emulator/hipe/hipe_stack.h
parent3bffb5797c9498e2294b65ba24abec5842655a11 (diff)
downloadotp-9cb85a8cd1e02263f34c57aac68d16a2f1c03180.tar.gz
otp-9cb85a8cd1e02263f34c57aac68d16a2f1c03180.tar.bz2
otp-9cb85a8cd1e02263f34c57aac68d16a2f1c03180.zip
erts: Refactor hipe_sdesc.summary into bit fields
Diffstat (limited to 'erts/emulator/hipe/hipe_stack.h')
-rw-r--r--erts/emulator/hipe/hipe_stack.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/erts/emulator/hipe/hipe_stack.h b/erts/emulator/hipe/hipe_stack.h
index e9d05bf99c..81f2e53dbc 100644
--- a/erts/emulator/hipe/hipe_stack.h
+++ b/erts/emulator/hipe/hipe_stack.h
@@ -35,7 +35,9 @@ struct hipe_sdesc {
unsigned long hvalue; /* return address */
struct hipe_sdesc *next; /* hash collision chain */
} bucket;
- unsigned int summary; /* frame size, exn handler presence flag, arity */
+ unsigned int fsize : 23; /* frame size */
+ unsigned int has_exnra : 1; /* exn handler presence flag */
+ unsigned int arity : 8;
#ifdef DEBUG
Eterm dbg_M, dbg_F;
unsigned dbg_A;
@@ -50,17 +52,17 @@ struct hipe_sdesc_with_exnra {
static __inline__ unsigned int sdesc_fsize(const struct hipe_sdesc *sdesc)
{
- return sdesc->summary >> 9;
+ return sdesc->fsize;
}
static __inline__ unsigned int sdesc_arity(const struct hipe_sdesc *sdesc)
{
- return sdesc->summary & 0xFF;
+ return sdesc->arity;
}
static __inline__ unsigned long sdesc_exnra(const struct hipe_sdesc *sdesc)
{
- if ((sdesc->summary & (1<<8))) {
+ if (sdesc->has_exnra) {
const char *tmp;
tmp = (const char*)sdesc - offsetof(struct hipe_sdesc_with_exnra, sdesc);
return ((const struct hipe_sdesc_with_exnra*)tmp)->exnra;