Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-eem.3008.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.3008 Author: eem Time: 31 July 2021, 8:34:40.390618 pm UUID: 1e79edb0-7b90-41e3-8c4c-bf737b4b23a6 Ancestors: VMMaker.oscog-eem.3007
And in computing accessor depths at the right time make sure to use a TMethod's smalltalkSelector to not be confused by smart syntax.
=============== Diff against VMMaker.oscog-eem.3007 ===============
Item was changed: ----- Method: CCodeGenerator>>accessorDepthForMethod: (in category 'spur primitive compilation') ----- accessorDepthForMethod: method "Compute the depth the method traverses object structure, assuming it is a primitive. This is in support of Spur's lazy become. A primitive may fail because it may encounter a forwarder. The primitive failure code needs to know to what depth it must follow arguments to follow forwarders and, if any are found and followed, retry the primitive. This method determines that depth. It starts by collecting references to the stack and then follows these through assignments to variables and use of accessor methods such as fetchPointer:ofObject:. For example | obj field | obj := self stackTop. field := objectMemory fetchPointer: 1 ofObject: obj. self storePointer: 1 ofObject: field withValue: (self stackValue: 1) has depth 2, since field is accessed, and field is an element of obj.
The information is cached since it needs to be computed *before* inlining" ^accessorDepthCache at: method smalltalkSelector ifAbsentPut: [beganInlining ifTrue: [((vmClass primitiveTable includes: method smalltalkSelector) or: [method export]) ifTrue: [-1] ifFalse: [self error: 'it is too late to compute accessor depths!!']] ifFalse: [((method definingClass includesSelector: method smalltalkSelector) ifTrue: + [(method definingClass >> method smalltalkSelector) pragmaAt: #accessorDepth:]) - [(method definingClass >> method selector) pragmaAt: #accessorDepth:]) ifNil: [((self accessorChainsForMethod: method interpreterClass: (vmClass ifNil: [StackInterpreter])) inject: 0 into: [:length :chain| length max: (self accessorDepthForChain: chain)]) - 1] ifNotNil: [:pragma| pragma arguments first]]]!
vm-dev@lists.squeakfoundation.org