[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] [PATCH 1/2] kernel: Make >>#new/>>#new: go through

From: Paolo Bonzini
Subject: Re: [Help-smalltalk] [PATCH 1/2] kernel: Make >>#new/>>#new: go through >>#initialize
Date: Fri, 01 Aug 2014 21:21:36 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

Il 01/08/2014 21:04, Holger Hans Peter Freyther ha scritto:
> 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.

The primitive can send #initialize just like perform: does.  It does not
even need to check if it is empty, _gst_send_message_internal will do
that.  You save the creation of the MethodContext; the disadvantage is
that #new will not appear in the backtrace, and that the JIT will not be
able to use an inline cache.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]