summaryrefslogtreecommitdiff
path: root/libguile/objcodes.c
diff options
context:
space:
mode:
Diffstat (limited to 'libguile/objcodes.c')
-rw-r--r--libguile/objcodes.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/libguile/objcodes.c b/libguile/objcodes.c
index 7d79f3621..f54e79bd6 100644
--- a/libguile/objcodes.c
+++ b/libguile/objcodes.c
@@ -33,8 +33,10 @@
#include "programs.h"
#include "objcodes.h"
-/* SCM_OBJCODE_COOKIE is defined in _scm.h */
-/* The length of the header must be a multiple of 8 bytes. */
+/* SCM_OBJCODE_COOKIE, defined in _scm.h, is a magic value prepended
+ to objcode on disk but not in memory.
+
+ The length of the header must be a multiple of 8 bytes. */
verify (((sizeof (SCM_OBJCODE_COOKIE) - 1) & 7) == 0);
@@ -42,6 +44,14 @@ verify (((sizeof (SCM_OBJCODE_COOKIE) - 1) & 7) == 0);
* Objcode type
*/
+/* The words in an objcode SCM object are as follows:
+ - scm_tc7_objcode | the flags for this objcode
+ - the struct scm_objcode C object
+ - the parent of this objcode, if this is a slice, or #f if none
+ - the file descriptor this objcode came from if this was mmaped,
+ or 0 if none
+ */
+
static SCM
make_objcode_by_mmap (int fd)
#define FUNC_NAME "make_objcode_by_mmap"