[Pkg] Squeak3.11 Contributions: Kernel-Extensions-kph.83.mcz

squeak-dev-noreply at lists.squeakfoundation.org squeak-dev-noreply at lists.squeakfoundation.org
Sun Nov 2 01:34:39 UTC 2008


A new version of Kernel-Extensions was added to project Squeak3.11 Contributions:
http://www.squeaksource.com/311/Kernel-Extensions-kph.83.mcz

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

Name: Kernel-Extensions-kph.83
Author: kph
Time: 2 November 2008, 1:34:36 am
UUID: f71ec1c7-4086-4bd3-8de4-173834ae4cd7
Ancestors: Kernel-Extensions-kph.82

removed Streaming readability improvements into 7219

=============== Diff against Kernel-Extensions-kph.82 ===============

Item was added:
+ ----- Method: TPureBehavior>>methodDictAddSelectorSilently:withMethod: (in category '*kernel-extensions-adding/removing methods-override') -----
+ methodDictAddSelectorSilently: selector withMethod: compiledMethod
+ 
+ 	self basicAddSelector: selector withMethod: compiledMethod.
+ 	
+ 	"temporary fix to enable loading"
+      (self respondsTo: #onChanged) ifTrue: [ self onChanged ].!

Item was changed:
- SystemOrganization addCategory: #'Kernel-Extensions'!
  SystemOrganization addCategory: #'Kernel-Extensions-Tests'!
+ SystemOrganization addCategory: #'Kernel-Extensions'!

Item was added:
+ ----- Method: TPureBehavior>>sourceMatchesBytecodeAt: (in category '*kernel-extensions') -----
+ 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 newMethod |
+ 	method := self compiledMethodAt: selector.
+ 	trailer := method trailer.
+ 	[methodNode := self compilerClass new
+ 				compile: (self sourceCodeAt: selector)
+ 				in: self
+ 				notifying: nil
+ 				ifFail: [^ false]
+ 	] on: SyntaxErrorNotification do: [^ false].
+ 	selector == methodNode selector ifFalse: [self error: 'selector changed!!'].
+ 	newMethod := methodNode generate: trailer.
+ 
+ 	selector == #cacheTempNames: ifTrue: [
+ 	"store something else in the name cache so that = won't go into an infinite loop"
+ 		(Object >> #yourself) cacheTempNames: nil]. 
+ 	^ newMethod = method!

Item was changed:
  ----- Method: Behavior>>sourceMatchesBytecodeAt: (in category '*kernel-extensions') -----
  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 newMethod |
  	method := self compiledMethodAt: selector.
  	trailer := method trailer.
  	[methodNode := self compilerClass new
  				compile: (self sourceCodeAt: selector)
  				in: self
  				notifying: nil
  				ifFail: [^ false]
  	] on: SyntaxErrorNotification do: [^ false].
  	selector == methodNode selector ifFalse: [self error: 'selector changed!!'].
  	newMethod := methodNode generate: trailer.
  
  	selector == #cacheTempNames: ifTrue: [
  	"store something else in the name cache so that = won't go into an infinite loop"
  		(Object >> #yourself) cacheTempNames: nil]. 
  	^ newMethod = method!

Item was added:
+ ----- Method: TPureBehavior>>onChanged (in category '*kernel-extensions-notification') -----
+ onChanged
+ 
+ 	"a hook, called when the class has been edited"
+ 
+  	 !

Item was removed:
- ----- Method: SequenceableCollection>>putOn: (in category '*kernel-extensions') -----
- putOn: aStream
- 
- 	self do: [ :each | each putOn: aStream ]!

Item was removed:
- ----- Method: WriteStream>><< (in category '*kernel-extensions-readability') -----
- << aCollection
- 	"we want a readable version of nextPutAll however it may be difficult to fully recreate nextPutAll:
- 	for all the different types of stream. Rather then simply send to nextPutAll:
- 	we handle the String (or ByteArray) argument
- 	as fast as possible - the rest we delegate to putOn: This means that we handle single characters and bytes 
- 	whereas nextPutAll: is only for sequencable collections.
- 	.
- 	Note this may not work in every case that nextPutAll: does subject to extensive testing, 
- 	but it should work in the important cases"
- 
- 	| newEnd |
- 	collection class == aCollection class ifFalse:
- 		[ aCollection putOn: self. ^ self ].
- 
- 	newEnd := position + aCollection size.
- 	newEnd > writeLimit ifTrue:
- 		[self growTo: newEnd + 10].
- 
- 	collection replaceFrom: position+1 to: newEnd  with: aCollection startingAt: 1.
- 	position := newEnd.
- 
- !

Item was removed:
- ----- Method: Stream>><< (in category '*kernel-extensions-readability') -----
- << items
- 
-  	items putOn: self.
- 	
- 	^ self!

Item was removed:
- ----- Method: Magnitude>>putOn: (in category '*kernel-extensions-streaming') -----
- putOn: aStream
- 
- 	(aStream isBinary ifTrue: [ self asByteArray ] ifFalse: [ self asString]) putOn: aStream
- 	
-  !



More information about the Packages mailing list