Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-eem.1329.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.1329 Author: eem Time: 27 May 2015, 11:42:44.314 am UUID: d25444c7-af99-40e1-ab8a-a765c046eae5 Ancestors: VMMaker.oscog-eem.1328
Fix cache tag access for ARM in cPICHasForwardedClass:
Guard access to the inline cache tag in PICs in GC routines by inlineCacheTagsMayBeObjects.
Mark inlineCacheTagsMayBeObjects as inline to eliminate dead code.
=============== Diff against VMMaker.oscog-eem.1328 ===============
Item was changed: ----- Method: CogARMCompiler>>literalBeforeFollowingAddress: (in category 'inline cacheing') ----- literalBeforeFollowingAddress: followingAddress "Answer the long constant loaded by a MOV/ORR/ORR/ORR + or MOV/ORR/ORR/ORR/PUSH, or MOV/ORR/ORR/ORR/CMP sequence, just before this address:" - or MOV/ORR/ORR/ORR/PUSH sequence, just before this address:" ^(self instructionIsOR: (self instructionBeforeAddress: followingAddress)) ifTrue: [self extract32BitOperandFrom4InstructionsPreceeding: followingAddress] ifFalse: [self extract32BitOperandFrom4InstructionsPreceeding: followingAddress - 4]!
Item was changed: ----- Method: CogObjectRepresentation>>inlineCacheTagsMayBeObjects (in category 'in-line cacheing') ----- inlineCacheTagsMayBeObjects + <inline: true> ^self subclassResponsibility!
Item was changed: ----- Method: CogObjectRepresentationForSpur>>inlineCacheTagsMayBeObjects (in category 'in-line cacheing') ----- inlineCacheTagsMayBeObjects + <inline: true> ^false!
Item was changed: ----- Method: CogObjectRepresentationForSqueakV3>>inlineCacheTagsMayBeObjects (in category 'in-line cacheing') ----- inlineCacheTagsMayBeObjects + <inline: true> ^true!
Item was changed: ----- Method: Cogit>>cPICHasForwardedClass: (in category 'in-line cacheing') ----- cPICHasForwardedClass: cPIC <var: #cPIC type: #'CogMethod *'> | pc | pc := cPIC asUnsignedInteger + firstCPICCaseOffset + cPICCaseSize - backEnd jumpLongConditionalByteSize. 2 to: cPIC cPICNumCases do: [:i| | classIndex | + classIndex := backEnd literalBeforeFollowingAddress: pc - backEnd loadLiteralByteSize. - classIndex := backEnd inlineCacheTagAt: pc. (objectMemory isForwardedClassIndex: classIndex) ifTrue: [^true]. pc := pc + cPICCaseSize]. ^false!
Item was changed: ----- Method: Cogit>>closedPICRefersToUnmarkedObject: (in category 'garbage collection') ----- closedPICRefersToUnmarkedObject: cPIC "Answer if the ClosedPIC refers to any unmarked objects or freed/freeable target methods, applying markAndTraceOrFreeCogMethod:firstVisit: to those targets to determine if freed/freeable." <var: #cPIC type: #'CogMethod *'> | pc offsetToLiteral object entryPoint targetMethod | <var: #targetMethod type: #'CogMethod *'> (objectMemory isMarked: cPIC selector) ifFalse: [^true]. pc := cPIC asInteger + firstCPICCaseOffset. "First jump is unconditional; subsequent ones are conditional" offsetToLiteral := backEnd jumpLongByteSize. 1 to: cPIC cPICNumCases do: [:i| + objectRepresentation inlineCacheTagsMayBeObjects ifTrue: + [object := backEnd literalBeforeFollowingAddress: pc - offsetToLiteral - backEnd loadLiteralByteSize. + ((objectRepresentation couldBeObject: object) + and: [(objectMemory isMarked: object) not]) ifTrue: + [^true]]. - object := backEnd literalBeforeFollowingAddress: pc - offsetToLiteral - backEnd loadLiteralByteSize. - ((objectRepresentation couldBeObject: object) - and: [(objectMemory isMarked: object) not]) ifTrue: - [^true]. object := backEnd literalBeforeFollowingAddress: pc - offsetToLiteral. ((objectRepresentation couldBeObject: object) and: [(objectMemory isMarked: object) not]) ifTrue: [^true]. entryPoint := backEnd jumpLongTargetBeforeFollowingAddress: pc. "Find target from jump. Ignore jumps to the interpret and MNU calls within this PIC" (entryPoint asUnsignedInteger < cPIC asUnsignedInteger or: [entryPoint asUnsignedInteger > (cPIC asUnsignedInteger + cPIC blockSize) asUnsignedInteger]) ifTrue: [targetMethod := self cCoerceSimple: entryPoint - cmNoCheckEntryOffset to: #'CogMethod *'. self assert: (targetMethod cmType = CMMethod or: [targetMethod cmType = CMFree]). (self markAndTraceOrFreeCogMethod: targetMethod firstVisit: targetMethod asUnsignedInteger > pc asUnsignedInteger) ifTrue: [^true]]. offsetToLiteral := backEnd jumpLongConditionalByteSize. pc := pc + cPICCaseSize]. ^false!
Item was changed: ----- Method: Cogit>>mapObjectReferencesInClosedPIC: (in category 'garbage collection') ----- mapObjectReferencesInClosedPIC: cPIC "Remap all object references in the closed PIC. Answer if any references are young. Set codeModified if any modifications are made." <var: #cPIC type: #'CogMethod *'> | pc refersToYoung | pc := cPIC asInteger + firstCPICCaseOffset. refersToYoung := self updateMaybeObjRefAt: pc - backEnd jumpLongByteSize. pc := pc + cPICCaseSize. 2 to: cPIC cPICNumCases do: [:i| + objectRepresentation inlineCacheTagsMayBeObjects ifTrue: + [(self updateMaybeObjRefAt: pc - backEnd jumpLongConditionalByteSize - backEnd loadLiteralByteSize) ifTrue: + [refersToYoung := true]]. - (self updateMaybeObjRefAt: pc - backEnd jumpLongConditionalByteSize - backEnd loadLiteralByteSize) ifTrue: - [refersToYoung := true]. (self updateMaybeObjRefAt: pc - backEnd jumpLongConditionalByteSize) ifTrue: [refersToYoung := true]. pc := pc + cPICCaseSize]. ^refersToYoung!
vm-dev@lists.squeakfoundation.org