aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/beam_load.c
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2018-04-04 14:10:21 +0200
committerGitHub <[email protected]>2018-04-04 14:10:21 +0200
commitdb1447e1423aaaafa02d52ca0b57115631990780 (patch)
treeafa43c1de02f6156535ce991470db9af648bc4d5 /erts/emulator/beam/beam_load.c
parentf99860259ee557851acc865519a315f04d1d4d51 (diff)
parent63e1c58d27ab695a19897423fc75e607f69ff51b (diff)
downloadotp-db1447e1423aaaafa02d52ca0b57115631990780.tar.gz
otp-db1447e1423aaaafa02d52ca0b57115631990780.tar.bz2
otp-db1447e1423aaaafa02d52ca0b57115631990780.zip
Merge pull request #1725 from michalmuskala/fun-literals
Compile external fun expressions to literals OTP-15003
Diffstat (limited to 'erts/emulator/beam/beam_load.c')
-rw-r--r--erts/emulator/beam/beam_load.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/erts/emulator/beam/beam_load.c b/erts/emulator/beam/beam_load.c
index af620d7432..e61199a8fd 100644
--- a/erts/emulator/beam/beam_load.c
+++ b/erts/emulator/beam/beam_load.c
@@ -4522,6 +4522,19 @@ is_empty_map(LoaderState* stp, GenOpArg Lit)
}
/*
+ * Predicate to test whether the given literal is an export.
+ */
+static int
+literal_is_export(LoaderState* stp, GenOpArg Lit)
+{
+ Eterm term;
+
+ ASSERT(Lit.type == TAG_q);
+ term = stp->literals[Lit.val].term;
+ return is_export(term);
+}
+
+/*
* Pseudo predicate map_key_sort that will sort the Rest operand for
* map instructions as a side effect.
*/