aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/beam_load.c
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2017-11-13 13:26:07 +0100
committerGitHub <[email protected]>2017-11-13 13:26:07 +0100
commit19245b1ac7bf881319950adb973ff2ce24fea23e (patch)
treea6b87d6fa56928cd4d1b303b7aa89d34f8c4a023 /erts/emulator/beam/beam_load.c
parent67b1ee533e8ed22242bc4531f4b206ad6081bc7e (diff)
parent773ded1a02898c4a1f9f395d8df1b25444631706 (diff)
downloadotp-19245b1ac7bf881319950adb973ff2ce24fea23e.tar.gz
otp-19245b1ac7bf881319950adb973ff2ce24fea23e.tar.bz2
otp-19245b1ac7bf881319950adb973ff2ce24fea23e.zip
Merge pull request #1624 from bjorng/bjorn/add-beam-internal-doc
Add internal documentation for the beam_makeops script OTP-14626
Diffstat (limited to 'erts/emulator/beam/beam_load.c')
-rw-r--r--erts/emulator/beam/beam_load.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/erts/emulator/beam/beam_load.c b/erts/emulator/beam/beam_load.c
index 7331c331a6..4fcfea527c 100644
--- a/erts/emulator/beam/beam_load.c
+++ b/erts/emulator/beam/beam_load.c
@@ -2384,8 +2384,18 @@ load_code(LoaderState* stp)
code[ci++] = NIL;
break;
case TAG_q:
- new_literal_patch(stp, ci);
- code[ci++] = tmp_op->a[arg].val;
+ {
+ BeamInstr val = tmp_op->a[arg].val;
+ Eterm term = stp->literals[val].term;
+ new_literal_patch(stp, ci);
+ code[ci++] = val;
+ switch (loader_tag(term)) {
+ case LOADER_X_REG:
+ case LOADER_Y_REG:
+ LoadError1(stp, "the term '%T' would be confused "
+ "with a register", term);
+ }
+ }
break;
default:
LoadError1(stp, "bad tag %d for general source",