aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/global.h
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2016-01-12 16:57:59 +0100
committerSverker Eriksson <[email protected]>2016-01-13 19:59:54 +0100
commit4c763443365591e170308a1c5f11a4586734ca4e (patch)
tree2cb663b23541827d3eebf19a582686de6c535cf9 /erts/emulator/beam/global.h
parenta4920dc4045f394f6f4ab1cc89d54d55722a66d6 (diff)
downloadotp-4c763443365591e170308a1c5f11a4586734ca4e.tar.gz
otp-4c763443365591e170308a1c5f11a4586734ca4e.tar.bz2
otp-4c763443365591e170308a1c5f11a4586734ca4e.zip
erts: Optimize erlang:check_process_code
by ignoring literals. erts_internal:check_process_code will be called again anyway (with option {copy_literals, true}) before the module is actually purged. No need to check literals twice.
Diffstat (limited to 'erts/emulator/beam/global.h')
-rw-r--r--erts/emulator/beam/global.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/erts/emulator/beam/global.h b/erts/emulator/beam/global.h
index bbf684d49d..3f5925765d 100644
--- a/erts/emulator/beam/global.h
+++ b/erts/emulator/beam/global.h
@@ -985,7 +985,10 @@ Eterm erl_send(Process *p, Eterm to, Eterm msg);
Eterm erl_is_function(Process* p, Eterm arg1, Eterm arg2);
/* beam_bif_load.c */
-Eterm erts_check_process_code(Process *c_p, Eterm module, int allow_gc, int *redsp);
+#define ERTS_CPC_ALLOW_GC (1 << 0)
+#define ERTS_CPC_COPY_LITERALS (1 << 1)
+#define ERTS_CPC_ALL (ERTS_CPC_ALLOW_GC | ERTS_CPC_COPY_LITERALS)
+Eterm erts_check_process_code(Process *c_p, Eterm module, Uint flags, int *redsp);
typedef struct {
Eterm *ptr;