[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

A Representation for Native Code

From: Noah Lavine
Subject: A Representation for Native Code
Date: Fri, 10 Dec 2010 19:20:27 -0500


I was thinking about how to represent native code. I think I have a
solution, but I'd like to check if it's a good idea before I implement

Current an objcode object has four words:
- The type tag and some flags
- a struct scm_objcode C object
- the parent of this objcode, if it is a slice, or #f if there is none
- the file descriptor of the file this was mmaped from, or 0 if it was
not mmaped

If I understand what slices are correctly, the objcode for a native
code trampoline will never be a slice, so it should be okay to take
over the third word of the objcode object for that case. I'd make a
new flag to keep track of what was happening.

Also, am I correct in assuming that we'd want to keep the old objcode
around even after we jitted something, just in case something tried to
introspect on it? I think putting it in a procedure property would


reply via email to

[Prev in Thread] Current Thread [Next in Thread]