j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Alternatively, you could do something like the following in your primitive:
interpreterProxy instantiateClass: (interpreterProxy classString) indexableSize: <the size you need>.
This way, you could make whatever call you need to make, then allocate a String for the correct size, and copy the data into that string. Probably very little difference in performance either way (the copy might be a tad faster if done in C).
Right. However, if it is done in the primitive, all other references to oops or parts of oops stored in local variables must be presumed invalid. This is because #instantiateClass:indexableSize: can cause a garbageCollection. Accordingly, depending upon whethe you need actual access to other oops (as opposed to their values), you may need to go back to the stack to re-access parameters.
squeak-dev@lists.squeakfoundation.org