Squeak 6.0: Kernel-mt.1490.mcz

[email protected] Fri, 10 Jul 2026 15:12:40 0000
Newsgroups gmane.comp.lang.smalltalk.squeak.general
Message-ID <[email protected]>
Marcel Taeumel uploaded a new version of Kernel to project Squeak 6.0:
http://source.squeak.org/squeak60/Kernel-mt.1490.mcz

==================== Summary ====================

Name: Kernel-mt.1490
Author: mt
Time: 10 July 2026, 5:12:39.468383 pm
UUID: a8b92bd3-8de7-114c-a7ac-68d04c582390
Ancestors: Kernel-mt.1488

Backported from Squeak 6.1.

Fixes (somewhat important) regression from 2016, which only surfaces in alternative VMs such as TruffleSqueak. 

As long as OSVM also supports primitive 116 for backwards compatibility, the image should service both to also support alternative VMs.

Note that MethodDictionary >> #at:put: has always been calling primitive 116 when adding new methods.

=============== Diff against Kernel-mt.1488 ===============

Item was changed:
  ----- Method: Behavior>>basicAddSelector:withMethod: (in category 'adding/removing methods') -----
  basicAddSelector: selector withMethod: compiledMethod 
  	"Add the message selector with the corresponding compiled method to the 
  	receiver's method dictionary.
  	Do this without sending system change notifications"
  
  	self methodDict at: selector put: compiledMethod.
  	compiledMethod
  		methodClass: self;
  		selector: selector.
  
  	"Now flush Squeak's method cache for this selector"
+ 	selector flushCache.
+ 	
+ 	"For backwards compatibility with other VMs (e.g., TruffleSqueak), also
+ 	invalidate via old method, which is already done via #at:put: in
+ 	MethodDictionary. See commentary in CompiledCode >> #flushCache."!
- 	selector flushCache!

Item was changed:
  ----- Method: Behavior>>basicRemoveSelector: (in category 'adding/removing methods') -----
  basicRemoveSelector: selector 
  	"Assuming that the argument, selector (a Symbol), is a message selector 
  	in my method dictionary, remove it and its method. Returns the old method
  	if found, nil otherwise."
  
  	| oldMethod |
  	oldMethod := self methodDict at: selector ifAbsent: [^ nil].
  	self methodDict removeKey: selector.
  
  	"Now flush Squeak's method cache for this selector"
  	selector flushCache.
+ 
+ 	"For backwards compatibility with other VMs (e.g., TruffleSqueak), also
+ 	invalidate via old method. See commentary in CompiledCode >> #flushCache."
+ 	oldMethod flushCache.
+ 	
  	^oldMethod!

Squeak-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]