aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/hipe
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2015-04-21 15:33:32 +0200
committerSverker Eriksson <[email protected]>2015-04-21 15:41:56 +0200
commite40aab7e9fb9d622e9879efa43af2ce30b287450 (patch)
tree3a5c69da567670d3baaed8265875f2a6d1029cc8 /erts/emulator/hipe
parent91fb6636f95f882b75170fb77c412ccc4a9b75f4 (diff)
downloadotp-e40aab7e9fb9d622e9879efa43af2ce30b287450.tar.gz
otp-e40aab7e9fb9d622e9879efa43af2ce30b287450.tar.bz2
otp-e40aab7e9fb9d622e9879efa43af2ce30b287450.zip
erts,hipe: Optimize away calls to emasculate_binary
Only call emasculate_binary if ProcBin.flags is set, which means it's a writable binary.
Diffstat (limited to 'erts/emulator/hipe')
-rw-r--r--erts/emulator/hipe/hipe_bif0.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/erts/emulator/hipe/hipe_bif0.c b/erts/emulator/hipe/hipe_bif0.c
index de2ea0ecde..bb61e71b14 100644
--- a/erts/emulator/hipe/hipe_bif0.c
+++ b/erts/emulator/hipe/hipe_bif0.c
@@ -1031,9 +1031,9 @@ void hipe_emulate_fpe(Process* p)
void hipe_emasculate_binary(Eterm bin)
{
ProcBin* pb = (ProcBin *) boxed_val(bin);
- if (pb->thing_word == HEADER_PROC_BIN && pb->flags != 0) {
- erts_emasculate_writable_binary(pb);
- }
+ ASSERT(pb->thing_word == HEADER_PROC_BIN);
+ ASSERT(pb->flags != 0);
+ erts_emasculate_writable_binary(pb);
}
#if 0 /* XXX: unused */