[GOODIE] named primitives without dynamic loading
ohshima at is.titech.ac.jp
ohshima at is.titech.ac.jp
Fri Dec 10 09:20:10 UTC 1999
Tim,
I remembered that you posted an email about the dynamic
loading couple of months ago, so I should have asked you
before:-)
> I'd like to sugest a much simpler solution, based on the
> observation that finding the address does not need to be
> fast since it is done only one and the result is recorded
> in the method literals.
Yes.
> This avoids the need to worry about
> hashing, and I claim that simple strcmp() searching would
> be ok.
I (almost) agree. In fact, as far as I read the
implementation of "dlsym()" on FreeBSD, it does linear
search on a linked list.
However, the platform I think of has limited hardware
resources, for instance, narrow memory bandwidth. So I'd
like to avoid heavy memory access if possible.
# Other thing is, if there is two ways to archive same
# place, a not-so-good programmer (like me) tends to opt the
# difficult way.
> The good news is that it is completely known how many
> entries are needed and how many characters each function
> name uses so it should be simple to make the structure -
> an array of {(char *)name; *addr()} like structs would do,
> with the strings off in some long char array.
The code generated from my framework has a "char*" array
of the named primitives, so it is pretty close to mine.
Thank you for the feedback.
-- Yoshiki
More information about the Squeak-dev
mailing list
|