I'm working on some code that generates c level programs dynamically, and
was wondering if there's any way to include some data in the program
definition. Right now, I'm adding a string constant that contains some
text, and when an object is created from the class, I fill in the c level
structures. That works, but it seems somewhat less efficient than if I
were able to specify some data for the program. I looked at the definition
for struct program, and didn't see anything obvious, but figured I'd ask
the experts :)
For those interested in the rationale, I'm working on adding
inheritability to my objective c module. I've got a method that will
generate a pike program for an objective c class, inspecting the class and
creating stubs for each method in that class. Right now, I don't see any
way to include a pointer to the class in the program definition, so I'm
currently adding a constant that contains the class name. Then, when the
object is instantiated, I look up the constant and then look up the class
from the value of the constant. I'd like to cut down on the overhead of
this operation, if possible.
Thoughts?
Bill