[GOODIE] named primitives without dynamic loading

ohshima at is.titech.ac.jp ohshima at is.titech.ac.jp
Fri Dec 10 19:18:44 UTC 1999


  Hi Tim,

> >   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.
> Me too. I have a 16MHz memory bus for a 202MHz CPU! Ouch! One simple
> trick I've used to help in this sort of search is to first scan the list
> for the starting character before a full comparision - or better yet the
> first _word_ if you can rely on word alignment.

  Nice idea.  Unfortunately, I think the compiler I'm using
doesn't align strings to word boundary unless I hack the
assembly code.  (Space efficiency is the compiler's
concern.)

# BTW, I had an idea to make faster version of
# "String>>compare:...", in "word comparison loop +
# remainder" way as usual strcmp() implementation does.

> >   The code generated from my framework has a "char*" array
> > of the named primitives, so it is pretty close to mine.
> Did you make a way to generate the list? I only spotted a literal array
> of Strings, but I haven't had time to be exhaustive yet. I think it's
> actually easy to make the list from the collection of methods left after
> the inlining and pruning. With luck I'll find out today!

# I'm sorry for telling this, but my English is not good
# enough to understand your sentense...

  If I understand your question correctly, the answer is
that the code generator has an inst var named 'methods', and
the methods that may be called as named primitive are marked
as 'export' ('mth export' returns true) so 'select:'ing
'export'ed method from 'methods' seems fine.

# Umm, this simple answer seems not what you want...

  -- Yoshiki





More information about the Squeak-dev mailing list