[squeak-dev] The Trunk: Kernel-ul.557.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Mar 28 15:21:05 UTC 2011


Levente Uzonyi uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-ul.557.mcz

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

Name: Kernel-ul.557
Author: ul
Time: 28 March 2011, 4:21:17.292 am
UUID: 0a3d2d6f-e06c-8a40-af11-63cdc731a4ee
Ancestors: Kernel-mha.556

- removed methods from ProtoObject and CompiledMethod related to the old BlockClosure implementation. No deprecation, because they were broken and dangerous to use, besides they had no senders.
- renamed CompiledMethod >> #embeddedBlockMethods to CompiledMethod >> #embeddedBlockClosures

=============== Diff against Kernel-mha.556 ===============

Item was removed:
- ----- Method: CompiledMethod>>allEmbeddedBlockMethods (in category 'closures') -----
- allEmbeddedBlockMethods
- 
- 	| set |
- 	set := OrderedCollection new.
- 	1 to: self numLiterals do: [:i |  | lit |
- 		lit := self literalAt: i.
- 		(lit isKindOf: CompiledMethod) ifTrue: [
- 			set add: lit.
- 			set addAll: lit allEmbeddedBlockMethods.
- 		] ifFalse: [(lit isKindOf: BlockClosure) ifTrue: [
- 			set add: lit method.
- 			set addAll: lit method allEmbeddedBlockMethods
- 		]].
- 	].
- 	^ set!

Item was added:
+ ----- Method: CompiledMethod>>embeddedBlockClosures (in category 'closures') -----
+ embeddedBlockClosures
+ 
+ 	| bms extractor scanner |
+ 	bms := OrderedCollection new.
+ 	scanner := self scanner.
+ 	extractor := ClosureExtractor withAction: [ :c | bms add: c ] andScanner: scanner.
+ 	[ scanner pc <= self endPC ] whileTrue: [ scanner interpretNextInstructionFor: extractor ].
+ 	^ bms!

Item was removed:
- ----- Method: CompiledMethod>>embeddedBlockMethods (in category 'closures') -----
- embeddedBlockMethods
- 
- 	| bms extractor scanner |
- 	bms := OrderedCollection new.
- 	scanner := self scanner.
- 	extractor := ClosureExtractor withAction: [ :c | bms add: c ] andScanner: scanner.
- 	[ scanner pc <= self endPC ] whileTrue: [ scanner interpretNextInstructionFor: extractor ].
- 	^ bms!

Item was removed:
- ----- Method: CompiledMethod>>isBlockMethod (in category 'closures') -----
- isBlockMethod
- 	"Is this a sub-method (embedded block's method) of another method. If so the last literal points to its outer method"
- 
- 	^ (self header bitAnd: 1 << 29) ~= 0!

Item was removed:
- ----- Method: CompiledMethod>>isBlockMethod: (in category 'closures') -----
- isBlockMethod: bool
- 	"Use the sign bit in the header to mark methods that are sub-methods of an outer method. The outer method will be held in my last literal."
- 
- 	self objectAt: 1 put: (bool
- 		ifTrue: [self header bitOr: 1 << 29]
- 		ifFalse: [self header bitAnd: (1 << 29) bitInvert])!

Item was removed:
- ----- Method: CompiledMethod>>isClosureCompiled: (in category 'closures') -----
- isClosureCompiled: bool
- 	"Use the sign bit in the header to mark methods that have been compiled using the new closure compiler (Parser2)."
- 
- 	self objectAt: 1 put: (bool
- 		ifTrue: [(self header bitOr: 1 << 30) as31BitSmallInt]
- 		ifFalse: [(self header bitAnd: (1 << 30) bitInvert) as31BitSmallInt])!

Item was removed:
- ----- Method: CompiledMethod>>method (in category 'closures') -----
- method
- 	"polymorphic with closure"
- 
- 	^ self!

Item was removed:
- ----- Method: CompiledMethod>>remoteReturns (in category 'closures') -----
- remoteReturns
- 	"For closure methods only"
- 
- 	^ self messages includes: #privRemoteReturnTo:!

Item was removed:
- ----- Method: CompiledMethod>>searchImageForHomeMethod (in category 'closures') -----
- searchImageForHomeMethod
- 
- 	SystemNavigation default allObjectsDo: [:obj |
- 		obj class == CompiledMethod ifTrue: [
- 			(obj pointsTo: self) ifTrue: [^ obj searchImageForHomeMethod]
- 		] ifFalse: [obj class == BlockClosure ifTrue: [
- 			(obj method == self and: [obj size = 0])
- 				ifTrue: [^ obj searchImageForHomeMethod]
- 		]]
- 	].
- 	^ self  "must be a loner block method"!

Item was removed:
- ----- Method: ProtoObject>>privGetInstVar: (in category 'closure-prims') -----
- privGetInstVar: index
- 	"The compiler generates this message when accessing to instance variables of objects other than the receiver.  Do not override or change this unless you also modify the compiler and recompile everything"
- 
- 	<primitive: 73>
- 	^ self basicAt: index - self class instSize!

Item was removed:
- ----- Method: ProtoObject>>privRemoteReturnTo: (in category 'closure-prims') -----
- privRemoteReturnTo: contextTag
- 	"Generated from compiler to return to the home of a block.  self is the value return and contextTag is the tag of the home context.  Do not override or change this unless you also modify the compiler and recompile everything"
- 
- 	contextTag return: self!

Item was removed:
- ----- Method: ProtoObject>>privSetInHolder: (in category 'closure-prims') -----
- privSetInHolder: valueHolder
- 	"The compiler generates this message to place values in global variables.  Do not override or change this unless you also modify the compiler and recompile everything"
- 
- 	valueHolder value: self.
- 	^ self!

Item was removed:
- ----- Method: ProtoObject>>privSetInstVar:put: (in category 'closure-prims') -----
- privSetInstVar: index put: value 
- 
- 	<primitive: 74>
- 	^ self basicAt: index - self class instSize put: value!

Item was removed:
- ----- Method: ProtoObject>>privStoreIn:instVar: (in category 'closure-prims') -----
- privStoreIn: object instVar: index
- 	"The compiler generates this message when assigning to instance variables of objects that have been captured by a block closure.  Do not override or change this unless you also modify the compiler and recompile everything"
- 
- 	object privSetInstVar: index put: self!




More information about the Squeak-dev mailing list