Eliot Miranda uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-eem.1348.mcz
==================== Summary ====================
Name: Kernel-eem.1348 Author: eem Time: 9 October 2020, 7:18:24.987162 pm UUID: 006721f7-6f3b-44fa-86f3-8c661d950fa4 Ancestors: Kernel-eem.1347
Fix the wrong outer code bug (see CompilerTest>>testValidFullBlockMethod) and recompile all offending methods.
=============== Diff against Kernel-eem.1347 ===============
Item was added: + ----- Method: CompiledBlock>>copyWithOuterCode: (in category 'private-copying') ----- + copyWithOuterCode: aCompiledCode + "Private; answer a shallow copy of the receiver updated with deep copies of + embedded block methods and a reference to aCompiledCode as the outer code." + | numLiterals copy | + copy := self shallowCopy. + 1 to: (numLiterals := self numLiterals) - 1 do: + [:i| | lit | + (lit := copy literalAt: i) isCompiledCode ifTrue: + [copy literalAt: i put: (lit copyWithOuterCode: copy)]]. + copy literalAt: numLiterals put: aCompiledCode. + ^copy!
Item was removed: - ----- Method: CompiledCode>>copyWithTrailerBytes: (in category 'copying') ----- - copyWithTrailerBytes: trailer - "Testing: - (CompiledMethod compiledMethodAt: #copyWithTrailerBytes:) - tempNamesPut: 'copy end ' - " - | copy end start | - start := self initialPC. - end := self endPC. - copy := trailer createMethod: end - start + 1 class: self class header: self header. - 1 to: self numLiterals do: [:i | copy literalAt: i put: (self literalAt: i)]. - start to: end do: [:i | copy at: i put: (self at: i)]. - copy postCopy. - ^copy!
Item was added: + ----- Method: CompiledMethod>>copyWithTrailerBytes: (in category 'copying') ----- + copyWithTrailerBytes: trailer + "Testing: + CompiledMethod >> #copyWithTrailerBytes: + copyWithTempsFromMethodNode: (CompiledMethod >> #copyWithTrailerBytes:) methodNode" + | copy end start | + start := self initialPC. + end := self endPC. + copy := trailer createMethod: end - start + 1 class: self class header: self header. + 1 to: self numLiterals do: + [:i | | lit | + lit := self literalAt: i. + copy literalAt: i put: ((lit isCompiledCode and: [lit isCompiledBlock]) + ifTrue: [lit copyWithOuterCode: copy] + ifFalse: [lit])]. + start to: end do: [:i | copy at: i put: (self at: i)]. + copy postCopy. + ^copy!
Item was changed: + (PackageInfo named: 'Kernel') postscript: '"recompile all methods containing blocks with the wrong outerCode" + (self systemNavigation allMethodsSelect: [:m| m literals anySatisfy: [:l| l isCompiledCode and: [l isCompiledBlock and: [l outerCode ~~ m]]]]) do: + [:mr| mr actualClass recompile: mr selector]'! - (PackageInfo named: 'Kernel') postscript: 'EventSensor default installInterruptWatcher.'!
squeak-dev@lists.squeakfoundation.org