diff options
author | Björn Gustavsson <[email protected]> | 2015-12-07 14:51:44 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2016-04-07 15:28:29 +0200 |
commit | c6cabe0b76dda183d209498e1e4e13e3407dcf9b (patch) | |
tree | 1ab158a8dae450d21f72e7bb3d4b1b1d512292a4 /erts/emulator/beam/beam_load.h | |
parent | 6d51b25958393d95dee32baafd708aa3909ddb5a (diff) | |
download | otp-c6cabe0b76dda183d209498e1e4e13e3407dcf9b.tar.gz otp-c6cabe0b76dda183d209498e1e4e13e3407dcf9b.tar.bz2 otp-c6cabe0b76dda183d209498e1e4e13e3407dcf9b.zip |
Simplify window management for the transformation engine
Generic instructions have a min_window field. Its purpose is to
avoid calling transform_engine() when there are too few instructions
in the current "transformation window" for a transformation to
succeed.
Currently it does not do much good since the window size will be
decremented by one before being used. The reason for the subtraction
is probably that in some circumstances in the past, the loader could
read past the end of the BEAM module while attempting to fetch
instructions to increase the window size. Therefore, it would not
be safe to just remove the subtraction by one.
The simplest and safest solution seems to always ensure that there
are always at least TWO instructions when calling transform_engine().
That will be safe, as long as a BEAM module is always finished with
an int_code_end/0 that is not involved in any transformation.
Diffstat (limited to 'erts/emulator/beam/beam_load.h')
-rw-r--r-- | erts/emulator/beam/beam_load.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/erts/emulator/beam/beam_load.h b/erts/emulator/beam/beam_load.h index 22ab71c868..68f4b96893 100644 --- a/erts/emulator/beam/beam_load.h +++ b/erts/emulator/beam/beam_load.h @@ -33,7 +33,6 @@ typedef struct gen_op_entry { int specific; int num_specific; int transform; - int min_window; } GenOpEntry; extern GenOpEntry gen_opc[]; |