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. Paolo _______________________________________________ help-smalltalk mailing list help-smalltalk@gnu.org https://lists.gnu.org/mailman/listinfo/help-smalltalk