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

commits at source.squeak.org commits at source.squeak.org
Sat Nov 5 00:00:48 UTC 2022


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

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

Name: VMMaker.oscog-eem.3262
Author: eem
Time: 4 November 2022, 5:00:26.932232 pm
UUID: eb9e0f35-dee3-41a5-9665-becc970c383a
Ancestors: VMMaker.oscog-mt.3261

Fix a crash on ARMv8 when toggling fail/succeed primitives for mixed mode arithmetic.
Fix some comment typos.

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

Item was changed:
  ----- Method: CCodeGenerator>>ifStaticallyResolvedPolymorphicReceiverThenUpdateSelectorIn: (in category 'public') -----
  ifStaticallyResolvedPolymorphicReceiverThenUpdateSelectorIn: aSendNode
+ 	"We allow a limited amount of polymorphism; if a class chooses, its selectors can be
- 	"We allow a limited amount of polymorphism; if a class chooses, its selectoers can be
  	 prefixed with a given string to disambiguate. This hack allows us to use two different
  	 compaction algorithms with the same API at the same time; the selection being done
  	 by a class which holds the flag stating which algorithm is in effect at the current time."
  	| class |
  	staticallyResolvedPolymorphicReceivers ifNil: [^self].
  	aSendNode receiver isVariable ifFalse:
  		[^self].
  	class := staticallyResolvedPolymorphicReceivers
  				at: aSendNode receiver name
  				ifAbsent: [^self].
  	aSendNode selector: (class staticallyResolvePolymorphicSelector: aSendNode selector)!

Item was changed:
  ----- Method: CCodeGenerator>>staticallyResolveMethodNamed:forClass:to: (in category 'public') -----
  staticallyResolveMethodNamed: selector forClass: aClass to: staticallyResolvedSelector
+ 	"We allow a limited amount of polymorphism; if a class chooses, its selectors can be
- 	"We allow a limited amount of polymorphism; if a class chooses, its selectoers can be
  	 prefixed with a given string to disambiguate. This hack allows us to use two different
  	 compaction algorithms with the same API at the same time; the selection being done
  	 by a class which holds the flag stating which algorithm is in effect at the current time."
  	| method |
  	method := methods
  					removeKey: selector
  					ifAbsent:
  						[self logger cr; nextPutAll: 'warning: did not find ', selector, ' to be able to map to ', staticallyResolvedSelector.
  						^self].
  	method selector: staticallyResolvedSelector.
  	methods at: staticallyResolvedSelector put: method!

Item was changed:
  ----- Method: CCodeGenerator>>staticallyResolvedPolymorphicReceiver:to: (in category 'public') -----
  staticallyResolvedPolymorphicReceiver: variableName to: aClass
+ 	"We allow a limited amount of polymorphism; if a class chooses, its selectors can be
- 	"We allow a limited amount of polymorphism; if a class chooses, its selectoers can be
  	 prefixed with a given string to disambiguate. This hack allows us to use two different
  	 compaction algorithms with the same API at the same time; the selection being done
  	 by a class which holds the flag stating which algorithm is in effect at the current time."
  	(staticallyResolvedPolymorphicReceivers ifNil: [staticallyResolvedPolymorphicReceivers := Dictionary new])
  		at: variableName
  		put: aClass!

Item was changed:
  ----- Method: Cogit>>unlinkSendsToMethodsSuchThat:AndFreeIf: (in category 'jit - api') -----
  unlinkSendsToMethodsSuchThat: criterion AndFreeIf: freeIfTrue
  	<api>
  	"Unlink all sends in cog methods to methods with a machine code
  	 primitive, and free machine code primitive methods if freeIfTrue.
  	 To avoid having to scan PICs, free any and all PICs"
  	<var: 'criterion' declareC: 'sqInt (*criterion)(CogMethod *)'>
  	| cogMethod freedSomething |
  	<var: #cogMethod type: #'CogMethod *'>
  	methodZoneBase ifNil: [^self].
  	self cCode: nil inSmalltalk: [debugAPISelector := nil].
  	codeModified := freedSomething := false.
  	cogMethod := self cCoerceSimple: methodZoneBase to: #'CogMethod *'.
  	[cogMethod < methodZone limitZony] whileTrue:
  		[cogMethod cmType = CMMethod
  			ifTrue:
  				[(freeIfTrue
  				  and: [self perform: criterion with: cogMethod])
  					ifTrue:
  						[methodZone freeMethod: cogMethod.
  						 freedSomething := true]
  					ifFalse:
  						[self mapFor: cogMethod
  							 performUntil: #unlinkIfLinkedSend:pc:if:
  							 arg: criterion]]
  			ifFalse:
  				[cogMethod cmType = CMClosedPIC ifTrue:
  					[methodZone freeMethod: cogMethod.
  					 freedSomething := true]].
  		cogMethod := methodZone methodAfter: cogMethod].
  	freedSomething
  		ifTrue: [self unlinkSendsToFree]
  		ifFalse:
  			[codeModified ifTrue: "After possibly updating inline caches we need to flush the icache."
+ 				[backEnd flushICacheFrom: methodZoneBase asUnsignedInteger to: methodZone freeStart]].
+ 	self ensureExecutableCodeZone!
- 				[backEnd flushICacheFrom: methodZoneBase asUnsignedInteger to: methodZone freeStart]]!



More information about the Vm-dev mailing list