aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/beam_load.c
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2010-11-09 15:49:06 +0100
committerBjörn Gustavsson <[email protected]>2011-01-17 15:23:39 +0100
commit32be05dcaa4c32596bfe5372451b0b89ccd2f151 (patch)
tree37179180c8dfc7ef7455f06eb9cd575cd24b5e9a /erts/emulator/beam/beam_load.c
parentc5df89ea0d57e41190155dcf14cbc375dc647bee (diff)
downloadotp-32be05dcaa4c32596bfe5372451b0b89ccd2f151.tar.gz
otp-32be05dcaa4c32596bfe5372451b0b89ccd2f151.tar.bz2
otp-32be05dcaa4c32596bfe5372451b0b89ccd2f151.zip
BEAM loader: Pack more instructions using a new 'Q' type
Introduce a new 'Q' type, similar to 'P' except that it can be packed.
Diffstat (limited to 'erts/emulator/beam/beam_load.c')
-rw-r--r--erts/emulator/beam/beam_load.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/erts/emulator/beam/beam_load.c b/erts/emulator/beam/beam_load.c
index c190efb0d1..8df053ae64 100644
--- a/erts/emulator/beam/beam_load.c
+++ b/erts/emulator/beam/beam_load.c
@@ -1929,7 +1929,8 @@ load_code(LoaderState* stp)
}
code[ci++] = (BeamInstr) stp->import[i].bf;
break;
- case 'P': /* Byte offset into tuple */
+ case 'P': /* Byte offset into tuple or stack */
+ case 'Q': /* Like 'P', but packable */
VerifyTag(stp, tag, TAG_u);
tmp = tmp_op->a[arg].val;
code[ci++] = (BeamInstr) ((tmp_op->a[arg].val+1) * sizeof(Eterm));