[Vm-dev] VM Maker: VMMaker.oscog-eem.1016.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Jan 9 21:58:52 UTC 2015


Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.1016.mcz

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

Name: VMMaker.oscog-eem.1016
Author: eem
Time: 9 January 2015, 1:57:19.641 pm
UUID: 656d7591-7ea4-4c5f-9d13-c6a0bd8b8286
Ancestors: VMMaker.oscog-eem.1015

Fix some type warnings in the Newspeak cogit.

=============== Diff against VMMaker.oscog-eem.1015 ===============

Item was changed:
  ----- Method: CogIA32Compiler>>implicitReceiveCacheAt: (in category 'inline cacheing') -----
  implicitReceiveCacheAt: callSiteReturnAddress
  	"Answer the implicit receiver cache for the return address
  	 of a call to the ceImplicitReceiverTrampoline."
  	<option: #NewspeakVM>
+ 	<var: #callSiteReturnAddress type: #'char *'>
  	<inline: false>
+ 	^self literalBeforeFollowingAddress: callSiteReturnAddress asUnsignedInteger - 10!
- 	^self literalBeforeFollowingAddress: callSiteReturnAddress - 10!

Item was changed:
  ----- Method: CogMethodZone>>addToUnpairedMethodList: (in category 'accessing') -----
  addToUnpairedMethodList: aCogMethod
  	<option: #NewspeakVM>
  	<var: #aCogMethod type: #'CogMethod *'>
  	self assert: aCogMethod cmType = CMMethod.
  	self assert: (cogit noAssertMethodClassAssociationOf: aCogMethod methodObject) = objectMemory nilObject.
  	self assert: (unpairedMethodList == nil
  				or: [(self cCoerceSimple: unpairedMethodList to: #'CogMethod *') cmType = CMMethod]).
  	aCogMethod nextMethodOrIRCs: unpairedMethodList.
+ 	unpairedMethodList := aCogMethod asUnsignedInteger!
- 	unpairedMethodList := aCogMethod!

Item was changed:
  ----- Method: Cogit>>implicitReceiverCacheAddressAt: (in category 'newspeak support') -----
  implicitReceiverCacheAddressAt: mcpc
  	"Cached push implicit receiver implementation.  If objectRepresentation doesn't support
  	 pinning then caller looks like
  				mov selector, SendNumArgsReg
  				call ceImplicitReceiver
  				br continue
  		Lclass:	.word
  		Lmixin::	.word
  		continue:
  	 If objectRepresentation supports pinning then caller looks like
  				mov Lclass, Arg1Reg
  				mov selector, SendNumArgsReg
  				call ceImplicitReceiver
  	 and Lclass: .word; Lmixin: .word is somewhere on the heap."
  	<option: #NewspeakVM>
+ 	<var: #mcpc type: #'char *'>
  	<inline: true>
  	<returnTypeC: #usqInt>
  	^objectRepresentation canPinObjects
  		ifTrue:
  			[(backEnd implicitReceiveCacheAt: mcpc) asUnsignedInteger]
  		ifFalse:
  			[mcpc asUnsignedInteger + backEnd jumpShortByteSize]!

Item was changed:
  ----- Method: Cogit>>markLiterals:pc:method: (in category 'garbage collection') -----
  markLiterals: annotation pc: mcpc method: cogMethod
  	"Mark and trace literals.
  	 Additionally in Newspeak, void push implicits that have unmarked classes."
  	<var: #mcpc type: #'char *'>
  	| literal |
  	annotation = IsObjectReference ifTrue:
  		[literal := backEnd literalBeforeFollowingAddress: mcpc asUnsignedInteger.
  		 (objectRepresentation
  				markAndTraceLiteral: literal
  				in: (self cCoerceSimple: cogMethod to: #'CogMethod *')
  				atpc: mcpc asUnsignedInteger) ifTrue:
  			[codeModified := true]].
  	(self isSendAnnotation: annotation) ifTrue:
  		[self offsetCacheTagAndCouldBeObjectAt: mcpc annotation: annotation into:
  			[:entryPoint :cacheTag :tagCouldBeObj |
  			 tagCouldBeObj ifTrue:
  				[(objectRepresentation
  						markAndTraceCacheTagLiteral: cacheTag
  						in: (self cCoerceSimple: cogMethod to: #'CogMethod *')
  						atpc: mcpc asUnsignedInteger) ifTrue:
  					[codeModified := true]].  "cacheTag is selector"
  			  self cppIf: NewspeakVM ifTrue:
  				[entryPoint = ceImplicitReceiverTrampoline ifTrue:
  					[| cacheAddress class mixin |
  					 self assert: NumOopsPerIRC = 2.
  					 cacheAddress := self implicitReceiverCacheAddressAt: mcpc.
  					 (class := backEnd unalignedLongAt: cacheAddress) ~= 0
  						ifTrue:
  							[(objectRepresentation cacheTagIsMarked: class)
  								ifTrue:
  									[(mixin := backEnd unalignedLongAt: cacheAddress + objectMemory bytesPerOop) ~= 0 ifTrue:
  										[objectRepresentation
  											markAndTraceLiteral: mixin
  											in: (self cCoerceSimple: cogMethod to: #'CogMethod *')
+ 											at: (self asAddress: (cacheAddress + objectMemory bytesPerOop) asVoidPointer
- 											at: (self asAddress: cacheAddress + objectMemory bytesPerOop
  													put: [:val| backEnd unalignedLongAt: cacheAddress + objectMemory bytesPerOop put: val])]]
  								ifFalse:
  									[backEnd
  										unalignedLongAt: cacheAddress put: 0;
  										unalignedLongAt: cacheAddress + objectMemory bytesPerOop put: 0.
  									 codeModified := true]]
  						ifFalse:
  							[self assert: (backEnd unalignedLongAt: cacheAddress + objectMemory bytesPerOop) = 0]]]]].
  	^0 "keep scanning"!

Item was changed:
  ----- Method: Cogit>>voidImplicitReceiverCacheAt: (in category 'newspeak support') -----
  voidImplicitReceiverCacheAt: mcpc
  	"Cached push implicit receiver implementation.  If objectRepresentation doesn't support
  	 pinning then caller looks like
  				mov selector, SendNumArgsReg
  				call ceImplicitReceiver
  				br continue
  		Lclass:	.word
  		Lmixin::	.word
  		continue:
  	 If objectRepresentation supports pinning then caller looks like
  				mov Lclass, Arg1Reg
  				mov selector, SendNumArgsReg
  				call ceImplicitReceiver
  	 and Lclass: .word; Lmixin: .word is somewhere on the heap."
  	<option: #NewspeakVM>
+ 	<var: #mcpc type: #'char *'>
  	| cacheAddress |
  	self assert: NumOopsPerIRC = 2.
  	cacheAddress := self implicitReceiverCacheAddressAt: mcpc.
  	backEnd
  		unalignedLongAt: cacheAddress put: 0;
  		unalignedLongAt: cacheAddress + objectMemory bytesPerOop put: 0.
  	objectRepresentation canPinObjects ifFalse:
  		[codeModified := true]!



More information about the Vm-dev mailing list