A new version of Kernel was added to project The Inbox: http://source.squeak.org/inbox/Kernel-lrnp.1535.mcz
==================== Summary ====================
Name: Kernel-lrnp.1535 Author: mt Time: 9 November 2023, 11:35:47.162378 am UUID: 8f0c1c65-3c48-c44b-8492-5d6c32cf4174 Ancestors: Kernel-dtl.1531
Combines two lrnp contributions that had an incompatible version name.
Kernel.lrnp-20231108.1534 - enforce more strict pragma access - treat pragma access like for #primitive : they are stored on the CompiledMethod, so have CompiledBlock answer not found even if its home method has one. - Also move #hasPragma: to CompiledCode to avoid the caller needing to add a guard. - Complements the new testPragmaAccess Context test in KernelTests.lrnp-20231108.446. - I don't know if this is backwards-incompatible due to mixed use of homeMethod and method on Context. I didn't include properties because that does certainly break at least one method.
Kernel.lrnp-20231108.1533 - cause #homeMethod to answer a CompiledMethod - causes "[thisContext homeMethod] value = thisContext homeMethod" to answer true.
=============== Diff against Kernel-dtl.1531 ===============
Item was changed: ----- Method: BlockClosure>>homeMethod (in category 'accessing') ----- homeMethod "Answer the home method associated with the receiver. This is polymorphic with BlockClosure, CompiledCode, Context etc."
+ | maybe | + maybe := self method. + maybe ifNil: [^nil]. + ^ maybe homeMethod! - ^self method!
Item was removed: - ----- Method: CompiledBlock>>pragmaAt: (in category 'accessing-pragmas & properties') ----- - pragmaAt: aKey - "Answer the pragma with selector aKey, or nil if none." - ^self homeMethod pragmaAt: aKey!
Item was removed: - ----- Method: CompiledBlock>>pragmas (in category 'accessing-pragmas & properties') ----- - pragmas - ^self homeMethod pragmas!
Item was removed: - ----- Method: CompiledBlock>>pragmasAt: (in category 'accessing-pragmas & properties') ----- - pragmasAt: aSelector - "Answer all pragmas with selector aSelector." - ^self homeMethod pragmasAt: aSelector!
Item was added: + ----- Method: CompiledCode>>hasPragma: (in category 'accessing-pragmas & properties') ----- + hasPragma: aSymbol + + ^ (self pragmaAt: aSymbol) notNil!
Item was added: + ----- Method: CompiledCode>>pragmaAt: (in category 'accessing-pragmas & properties') ----- + pragmaAt: aKey + "Answer the pragma with selector aKey, or nil if none." + ^nil!
Item was added: + ----- Method: CompiledCode>>pragmas (in category 'accessing-pragmas & properties') ----- + pragmas + ^#()!
Item was added: + ----- Method: CompiledCode>>pragmasAt: (in category 'accessing-pragmas & properties') ----- + pragmasAt: aSelector + "Answer all pragmas with selector aSelector." + ^#()!
Item was removed: - ----- Method: CompiledMethod>>hasPragma: (in category 'accessing-pragmas & properties') ----- - hasPragma: aSymbol - - ^ (self pragmaAt: aSymbol) notNil!
Item was changed: ----- Method: Context>>homeMethod (in category 'accessing') ----- homeMethod "Answer the home method associated with the receiver. This is polymorphic with BlockClosure, CompiledCode, Context etc."
+ | maybe | + maybe := self method. + ^ (maybe isKindOf: CompiledMethod) + ifTrue: maybe + ifFalse: [maybe homeMethod]! - ^self method!
squeak-dev@lists.squeakfoundation.org