[squeak-dev] The Trunk: Kernel-eem.732.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Feb 6 21:12:06 UTC 2013


Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.732.mcz

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

Name: Kernel-eem.732
Author: eem
Time: 6 February 2013, 1:10:49.952 pm
UUID: d9c124ab-9da1-4785-bfa3-341b385fffcb
Ancestors: Kernel-nice.731

Make CompiledMethod>>removeProperty:[ifAbsent:] get rid
of the AdditionalMethodState if the resulting state is empty.

Streamline BlockClosure>>newProcess[With:] which does
not need to run unwinds if control reaches the end of
the process.

Use the abstract blockCreationBytecodeMessage to compute
BlockClosure's size instead of accessing bytecodes directly.

=============== Diff against Kernel-nice.731 ===============

Item was changed:
  ----- Method: BlockClosure>>newProcess (in category 'scheduling') -----
  newProcess
  	"Answer a Process running the code in the receiver. The process is not 
  	scheduled."
  	<primitive: 19> "Simulation guard"
  	^Process
  		forContext: 
  			[self value.
+ 			"Since control is now at the bottom there is no need to terminate (which
+ 			 runs unwinds) since all unwnds have been run.  Simply suspend.
+ 			 Note that we must use this form rather than e.g. Processor suspendActive
+ 			 so that isTerminated answers true.  isTerminated requires that if there is a
+ 			 suspended context it is the bottom-most, but using a send would result in
+ 			 the process's suspendedContext /not/ being the bottom-most."
+ 			Processor activeProcess suspend] asContext
- 			Processor terminateActive] asContext
  		priority: Processor activePriority!

Item was changed:
  ----- Method: BlockClosure>>newProcessWith: (in category 'scheduling') -----
  newProcessWith: anArray 
  	"Answer a Process running the code in the receiver. The receiver's block 
  	arguments are bound to the contents of the argument, anArray. The 
  	process is not scheduled."
  	<primitive: 19> "Simulation guard"
  	^Process
  		forContext: 
  			[self valueWithArguments: anArray.
+ 			"Since control is now at the bottom there is no need to terminate (which
+ 			 runs unwinds) since all unwnds have been run.  Simply suspend.
+ 			 Note that we must use this form rather than e.g. Processor suspendActive
+ 			 so that isTerminated answers true.  isTerminated requires that if there is a
+ 			 suspended context it is the bottom-most, but using a send would result in
+ 			 the process's suspendedContext /not/ being the bottom-most."
+ 			Processor activeProcess suspend] asContext
- 			Processor terminateActive] asContext
  		priority: Processor activePriority!

Item was changed:
  ----- Method: BlockClosure>>size (in category 'accessing') -----
  size
+ 	"Extract this closure's bytecode size (number of bytes) by accessing
+ 	 the closure creation bytecode in the enclosing method."
- 	"Extract this closure's bytecode size (number of bytes) by accessing the closure
- 	creation bytecode in the enclosing method."
  	
+ 	^self blockCreationBytecodeMessage arguments last!
- 	^ ((self method at: self startpc - 2) bitShift: 8) + (self method at: self startpc - 1)!

Item was changed:
  ----- Method: CompiledMethod>>removeProperty: (in category 'accessing-pragmas & properties') -----
  removeProperty: propName
  	"Remove the property propName if it exists.
  	 Do _not_ raise an error if the property is missing."
+ 	| value newAdditionalState |
- 	| value |
  	value := self propertyValueAt: propName ifAbsent: [^nil].
+ 	newAdditionalState := self penultimateLiteral copyWithout:
- 	self penultimateLiteral: (self penultimateLiteral copyWithout:
  									(Association
  										key: propName
+ 										value: value).
+ 	self penultimateLiteral: (newAdditionalState isEmpty
+ 								ifTrue: [newAdditionalState selector]
+ 								ifFalse: [newAdditionalState]).
- 										value: value)).
  	^value!

Item was changed:
  ----- Method: CompiledMethod>>removeProperty:ifAbsent: (in category 'accessing-pragmas & properties') -----
  removeProperty: propName ifAbsent: aBlock
  	"Remove the property propName if it exists.
  	 Answer the evaluation of aBlock if the property is missing."
+ 	| value newAdditionalState |
- 	| value |
  	value := self propertyValueAt: propName ifAbsent: [^aBlock value].
+ 	newAdditionalState := self penultimateLiteral copyWithout:
- 	self penultimateLiteral: (self penultimateLiteral copyWithout:
  									(Association
  										key: propName
+ 										value: value).
+ 	self penultimateLiteral: (newAdditionalState isEmpty
+ 								ifTrue: [newAdditionalState selector]
+ 								ifFalse: [newAdditionalState]).
- 										value: value)).
  	^value!



More information about the Squeak-dev mailing list