[Vm-dev] VM Maker: VMMaker.oscog-mt.3258.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Oct 27 09:09:04 UTC 2022


Marcel Taeumel uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-mt.3258.mcz

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

Name: VMMaker.oscog-mt.3258
Author: mt
Time: 27 October 2022, 11:08:57.25477 am
UUID: 3c009f35-63a2-d446-b560-94426edb3bfe
Ancestors: VMMaker.oscog-mt.3257

Fixes "-Wint-conversion" error for CogVM builds.

Note that there seem to be several ways to convert "mcpc":
	mcpc asInteger
	objectMemory integerObjectOf: mcpc
	self cCoerce: mcpc to: #sqInt
	
I chose the one that is already used a few lines above.

=============== Diff against VMMaker.oscog-mt.3257 ===============

Item was changed:
  ----- Method: Cogit>>collectCogConstituentFor:Annotation:Mcpc:Bcpc:Method: (in category 'profiling primitives') -----
  collectCogConstituentFor: descriptor Annotation: isBackwardBranchAndAnnotation Mcpc: mcpc Bcpc: bcpc Method: cogMethodArg
  	<var: #descriptor type: #'BytecodeDescriptor *'>
  	<var: #mcpc type: #'char *'>
  	<var: #cogMethodArg type: #'void *'>
  	<var: #targetMethod type: #'CogMethod *'>
  	| address entryPoint |
  	descriptor ifNil: [^0].
  	descriptor isMapped ifFalse: [^0].
  	address := self positiveMachineIntegerFor: mcpc asUnsignedInteger.
  	address ifNil: [^PrimErrNoMemory]. "This cannot trigger a GC but fails if not enough space in Eden,"
  	"Assumes we write the values into topRemappableOop"
  	coInterpreter
  		storePointerUnchecked: cogConstituentIndex
  		ofObject: coInterpreter topRemappableOop
  		withValue: address.
  	coInterpreter
  		storePointerUnchecked: cogConstituentIndex + 1
  		ofObject: coInterpreter topRemappableOop
  		withValue: (objectMemory integerObjectOf: bcpc).
  	cogConstituentIndex := cogConstituentIndex + 2.
  
  	"Collect any first case classTags for closed PICs."
  	((isBackwardBranchAndAnnotation noMask: 1)
  	 and: [self isSendAnnotation: isBackwardBranchAndAnnotation >> 1]) ifTrue:
  		[entryPoint := backEnd callTargetFromReturnAddress: mcpc asInteger.
  		 entryPoint > methodZoneBase ifTrue: "send is linked"
  			[self targetMethodAndSendTableFor: entryPoint annotation: isBackwardBranchAndAnnotation >> 1 into:
  				[:targetMethod :sendTable|
  				  targetMethod cmType = CMClosedPIC ifTrue:
+ 					[targetMethod methodObject: (objectRepresentation classForInlineCacheTag: (backEnd inlineCacheTagAt: mcpc asInteger))]]]].
- 					[targetMethod methodObject: (objectRepresentation classForInlineCacheTag: (backEnd inlineCacheTagAt: mcpc))]]]].
  	^0!



More information about the Vm-dev mailing list