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 /Makefile.in | |
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 'Makefile.in')
0 files changed, 0 insertions, 0 deletions