Re: [PATCH 1/2] kernel: Make >>#new/>>#new: go through >>#initialize
Holger Hans Peter Freyther <[email protected]>
| Newsgroups | gmane.comp.lang.smalltalk.gnu.general |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Jul 29, 2014 at 06:48:20PM +0200, Paolo Bonzini wrote: > Yes, this is why I was reluctant to do this. I understand but I think portability is more important. > > I could cheat and add another "cache" for Behavior>>#new or make it > > another kind of primitive? > > Making it another primitive would lower that cost. Sounds like a good idea. Okay, I have one conceptual issue. a.) VMpr_Behavior_basicNewInitialize will lookup_selector (cache) and notice that Object>>#initialize is an empty method and we can skip the call. b.) >>#initialize is custom with real code but I calling _gst_send_message_internal will not lead to the code being executed but we already return from the primitive. What would be nice is to have a PRIM_SEMI_SUCCEED and just call >>#initialize. This doesn't seem to be possible right now. what do you think? holger