aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/beam_load.c
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2011-06-13 17:43:59 +0200
committerBjörn Gustavsson <[email protected]>2011-10-11 11:36:35 +0200
commitfe32a91def97823b036ccad946b84853688b41af (patch)
treec2fc4bac5e3a9e44ce99c9f35e85a2f09d3e4316 /erts/emulator/beam/beam_load.c
parenteea824979a7e8dfd760b943b1790663849862342 (diff)
downloadotp-fe32a91def97823b036ccad946b84853688b41af.tar.gz
otp-fe32a91def97823b036ccad946b84853688b41af.tar.bz2
otp-fe32a91def97823b036ccad946b84853688b41af.zip
Get rid of redundant 'try_me_else' and 'fail' instructions
If the left part of a transformation will always match, omit the the 'try_me_else' and 'fail' instructions. As part of this optimization, make it an error to have a transformation that can never be reached because of a previous transformation that will always match. (Remove one transformation from ops.tab that was found to be unreachable.)
Diffstat (limited to 'erts/emulator/beam/beam_load.c')
-rw-r--r--erts/emulator/beam/beam_load.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/erts/emulator/beam/beam_load.c b/erts/emulator/beam/beam_load.c
index 16dd5795c7..4da411be1f 100644
--- a/erts/emulator/beam/beam_load.c
+++ b/erts/emulator/beam/beam_load.c
@@ -4238,7 +4238,6 @@ transform_engine(LoaderState* st)
ASSERT(restart != NULL);
pc = restart;
ASSERT(*pc < NUM_TOPS); /* Valid instruction? */
- ASSERT(*pc == TOP_try_me_else || *pc == TOP_fail);
instr = st->genop;
#define RETURN(r) rval = (r); goto do_return;