[squeak-dev] The Trunk: Kernel-mtf.456.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Jun 3 15:02:18 UTC 2010


Matthew Fulmer uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-mtf.456.mcz

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

Name: Kernel-mtf.456
Author: mtf
Time: 3 June 2010, 11:05:37.324 am
UUID: b1e05e80-6bc8-47fd-adda-82388483e604
Ancestors: Kernel-mtf.455

Added a utility method to Behavior for testing whether a method is compiled correctly without overwriting the incorrectly compiled method if not

=============== Diff against Kernel-mtf.455 ===============

Item was added:
+ ----- Method: Behavior>>sourceMatchesBytecodeAt: (in category 'testing') -----
+ sourceMatchesBytecodeAt: selector
+ 	"Answers true if the source code at the selector compiles to the bytecode at the selector, and false otherwise. Implemented to detect an error where Monticello did not recompile sources when the class shape changed"
+ 	"This code was copied from #recompile:from:, with few changes. Several methods would benefit from a method which turned a selector and class into a CompiledMethod, without  installing it into the methodDictionary"
+ 
+ 	| method trailer methodNode |
+ 	method := self compiledMethodAt: selector.
+ 	trailer := method trailer.
+ 	methodNode := self compilerClass new
+ 				compile: (self sourceCodeAt: selector)
+ 				in: self
+ 				notifying: nil
+ 				ifFail: [^ false].   "Assume OK after proceed from SyntaxError"
+ 	selector == methodNode selector ifFalse: [self error: 'selector changed!!'].
+ 	^ (methodNode generate: trailer) = method!




More information about the Squeak-dev mailing list