aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/module.h
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2012-01-11 21:01:49 +0100
committerSverker Eriksson <[email protected]>2012-02-21 12:22:57 +0100
commit166032bddf9a14f3ea6252724532039a1113612d (patch)
treecbcbe2c80735a0aedcc4a97cdebce07b6e301a4c /erts/emulator/beam/module.h
parent3735ecf0815925950db313e56e8d2371afe2207a (diff)
downloadotp-166032bddf9a14f3ea6252724532039a1113612d.tar.gz
otp-166032bddf9a14f3ea6252724532039a1113612d.tar.bz2
otp-166032bddf9a14f3ea6252724532039a1113612d.zip
erts: Refactor Module struct
Diffstat (limited to 'erts/emulator/beam/module.h')
-rw-r--r--erts/emulator/beam/module.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/erts/emulator/beam/module.h b/erts/emulator/beam/module.h
index 694e4ab72f..4a2c92c0f7 100644
--- a/erts/emulator/beam/module.h
+++ b/erts/emulator/beam/module.h
@@ -24,18 +24,19 @@
#include "index.h"
#endif
+struct erl_module_instance {
+ BeamInstr* code;
+ int code_length; /* Length of loaded code in bytes. */
+ unsigned catches;
+ struct erl_module_nif* nif;
+};
typedef struct erl_module {
IndexSlot slot; /* Must be located at top of struct! */
int module; /* Atom index for module (not tagged). */
- BeamInstr* code;
- BeamInstr* old_code;
- int code_length; /* Length of loaded code in bytes. */
- int old_code_length; /* Length of old loaded code in bytes */
- unsigned catches, old_catches;
- struct erl_module_nif* nif;
- struct erl_module_nif* old_nif;
+ struct erl_module_instance curr;
+ struct erl_module_instance old;
} Module;
Module* erts_get_module(Eterm mod);